Extensions#

Current Limitations#

The issues currently facing this plugin are the following:

  1. The pdfcrop CLI tool has issues cropping to content, we need to tweak this so that the rendered pages are contiguous and enlarged properly. There are two parts involved in changing this: (1) with pdfcrop and (2) adjusting the default <xml> header that jupytexmagic prepends to each .svg.

  2. Once the cropping is fixed, we need to find a way to automatically change the tags of %%tex code cells to have either hide-input or hide-code so that the large tex source code is hidden upon compilation. There’s code to do this provided by Jupyter, so this shouldn’t be too hard to incorporate.

  3. The svg files render fine in Jupyter Lab and Jupyter Book, but when displayed on other platforms (e.g. GitHub or Jupyter Notebook) the glyph sizing gets thrown into disarray as text size varies across the document. Not sure how to fix this, but isn’t a problem related to publishing or authoring Jupyter Books with Jupyter Lab.

Future Extensions#

I’d like to develop code which uses the jupytexmagic plugin to port LaTeX projects into OPE automatically. This feature would be immensly powerful because it would provide an avenue for publishing existing projects online with the click of a button. Almost all scientific papers, textbooks, and documents are written using LaTeX, so if OPE provides a unique way for people to easily display their LaTeX projects online, this would exponentially increase the adoption of OPE worldwide.

This tool would operate as follows:

  1. copy the entire file tree of the source code project into the OPE book created by ope new_book

  2. copy the metadata of this project into $books/conent/{BOOKNAME}_toc.yml

  3. run make inside the $books/{BOOKNAME}/content directory to initialize all of the .ipynb files for each corresponding tex source file as specified in $books/content/{BOOKNAME}_toc.yml

  4. for formatting documents, leave the .tex source code in the directory to allow for proper imports (e.g. you cannot import formatting code from another %%tex code cell currently, so needs to be separate)

  5. copy all of the LaTeX source code into %%tex cells for each corresponding file

  6. Inside $books/${BOOKNAME} run make and make pub and enjoy viewing your content on GitHub pages (link is automatically printed by make pub)