Extensions#
Current Limitations#
The issues currently facing this plugin are the following:
The
pdfcropCLI 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) withpdfcropand (2) adjusting the default<xml>header that jupytexmagic prepends to each.svg.Once the cropping is fixed, we need to find a way to automatically change the tags of
%%texcode cells to have eitherhide-inputorhide-codeso 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.The
svgfiles 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:
copy the entire file tree of the source code project into the OPE book created by
ope new_bookcopy the metadata of this project into
$books/conent/{BOOKNAME}_toc.ymlrun
makeinside the$books/{BOOKNAME}/contentdirectory to initialize all of the.ipynbfiles for each correspondingtexsource file as specified in$books/content/{BOOKNAME}_toc.ymlfor formatting documents, leave the .tex source code in the directory to allow for proper imports (e.g. you cannot import formatting code from another
%%texcode cell currently, so needs to be separate)copy all of the LaTeX source code into
%%texcells for each corresponding fileInside
$books/${BOOKNAME}runmakeandmake puband enjoy viewing your content on GitHub pages (link is automatically printed bymake pub)