I have a question similar to the one asked here, but I did not understand the answer given to that question. I would like to use mathjax and JSXGraphs in several widgets with iBooksAuthor, but I would like to add these only once. The default way is to add the necessary js libraries to every widget, but this way the resulting ibook gets very large. Can someone please give more details (or guide me to a website with more details) on how to do this without including these libraries in all widgets?

  • The answer you linked to is the correct answer to your problem. It would help to know what part of that answer you were having difficulty understanding.
    – blendenzo
    Jun 2, 2017 at 19:22
  • When I look inside the ibook (with an archive manager) I don't see the .oebps folder. I can see an OPS folder, inside of which I can find assets/widgets. I assume this is where I need to store the js files. My main problem is that in the iBooksAuthor documentation ( support.apple.com/en-gb/HT204433 ) I see that widgets created by ibooks author cannot access the general file system. By placing the js files outside the widget, isn't this what I am asking the widget to do? Also, since I am adding a new file manually to the ibook, do I need to record it in some bookkeeping file? Jun 3, 2017 at 1:20
  • @blendenzo : All in all, can this be done within iBooksAuthor or do I need to hack the file created by iBooksAuthor, in which case will my new file be compatible with the iBooks reader (I can try it now, but will it stay compatible in the future)? Jun 3, 2017 at 1:26
  • Other files in the book archive are not the general filesystem, so the widgets should have no trouble accessing another file or folder inside the book. This info was confirmed by the OP on the question you linked. I don't use iBooksAuthor, but if I were trying to follow the instructions from the linked answer, I would put a Javascript folder in the OPS directory you are seeing, then use a relative URL to link to the script. Something like <script src="../Javascript/my_script.js">
    – blendenzo
    Jun 3, 2017 at 20:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.