hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
310 stars 60 forks source link

improve generation of ipynb output #136

Closed utsekaj42 closed 5 years ago

utsekaj42 commented 6 years ago

With mathjax in a Jupyter notebook labels prevent rerendering the cell if a modification is made to a cell which includes \label{xxx}. I believe this has something to do with the fact that the label is already defined and needs to be reset, as if you change xxx to yyy the cell rerenders fine once, but then the tags and HTML anchors are out of sync with equation labels. I haven't been able to look into it much on the mathjax/jupyter side. This is a mathjax/jupyter issue not a doconce problem so far as I can tell.

Thus I have added an option for simply not using \label, which may be advisable for ipython notebooks which are intended to be distributed and modified.

utsekaj42 commented 6 years ago

I also noticed quite a bit of changing latex for ipynb format that

  1. prevented downloading notebooks as pdf, and
  2. seems to be unnecessarily restrictive.

I have tried a number of other latex environments and the results seem fine in my jupyter-notebooks. I believe this code was mostly copied from the markdown generator, while ipynb supports a bit more latex than barebones markdown.