phockett / Quantum-Metrology-with-Photoelectrons-Vol3

Other
4 stars 0 forks source link

Maths rendering #4

Open phockett opened 1 year ago

phockett commented 1 year ago

Some inconsistencies in default builds...

For forcing version in _config.py, see https://jupyterbook.org/en/stable/content/math.html#math-and-equations

TODO: clean test page, currently testing in main Theory notebook, might be other issues...?

UPDATE: may actually be issue with source and/or Pandoc conversion, currently failing to case with $\boldsymbol{\mathbf{E}}$, but $\mathbf{E}$ or $\bm{E}$ may be equivalent...?

UPDATE2: things seem OK in maths test page for \boldsymbol (even nested), but not for \bm. May have issue related to https://github.com/executablebooks/jupyter-book/issues/1528 with Plotly? (See also https://jupyterbook.org/en/stable/interactive/interactive.html#plotly) Maybe also issue with extensions or macros, https://docs.mathjax.org/en/latest/input/tex/extensions/boldsymbol.html?

Ignore for now and use standard methods - but should fix!

UPDATE3 21/11/22:

phockett commented 1 year ago

See also adding tex macros to Sphinx build at https://jupyterbook.org/en/stable/advanced/sphinx.html#defining-tex-macros

phockett commented 1 year ago

For notes on \label support: https://github.com/executablebooks/MyST-Parser/issues/202

phockett commented 1 year ago

Some specific issues (see QM3/doc-source/tests/formatting_syntax_tests_081122.ipynb for more details):

phockett commented 1 year ago

\boldsymbol rendering broken in current builds for Photoionization Theory page (Firefox), possibly since adding computational example with symmetry?

Rendering OK in Ice Dragon however. Sigh.

jangenoe commented 1 year ago

I noticed the Maths rendering issue in the TOC, which also occurs in my text-books [currently not yet released]. I used your public example to report this rendering bug

phockett commented 10 months ago

I (eventually) managed to fix the TOC bug, since I realised it only affected pages which had no maths on - in this case it seems like the Mathjax script wasn't automatically injected. (This was for builds from the .md files, I didn't test builds from .ipynb source.)

There's likely an elegant way to force this via Sphinx config, but my quick and dirty fix was just to add a cell directly to my Markdown documents duplicating the script tags in the working HTML pages - my patch is in https://github.com/phockett/Quantum-Metrology-with-Photoelectrons-Vol3/blob/main/scripts/mathjax_patch.txt (and my in my main build script I just run cat mathjax_patch.txt >> page.md for each page I need to add the script to).

Hope your book is going well @jangenoe :)

jangenoe commented 10 months ago

I will also use your patch... Thanks