Closed wikfeldt closed 2 years ago
so, the problem is specifically with $ syntax. The following does not render correctly with the gh-action:
$$
\ket{\psi_I} = \ket{0} \otimes \ket{0} \otimes \ket{0} \otimes \ket{0} \equiv
\ket{0000}.
$$
but this works:
```{math}
\ket{\psi_I} = \ket{0} \otimes \ket{0} \otimes \ket{0} \otimes \ket{0} \equiv
\ket{0000}.
I want the former to work because then learners can use the actual notebooks for the episodes for exercises, with nice rendered math etc. any pointers @rkdarst ?
Hm, somehow this makes me think it is an issue with the parser, in this case myst-nb or myst-parser. the docutils(~=ReST) semantics only handle directives/roles with math, but not $
natively.
This looks relevant: https://github.com/executablebooks/MyST-Parser/pull/505 (explains some reasoning)
Solution is likely dollarmath
to extensions: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#math-shortcuts
myst_enable_extensions = ["dollarmath", "amsmath", "myst_dmath_double_inline"]
... well, look at those extensions and see what you need.
thanks Richard! It now works with
myst_enable_extensions = ["dollarmath","amsmath"]
myst_dmath_double_inline
is apparently not supported in myst-nb 0.15.0
hey! I'm trying to fix this math-rendering problem for jupyter notebooks as source for lesson episodes. See the latex code under https://enccs.github.io/NordIQuEst-workshop/E1_qc-1/#quantum-circuits for an example of the problem.
When building locally, math renders correctly with an old messy conda environment that's been updated once in a while. This working environment has the following packages:
A new local environment with the dependencies i thought were sufficient does not work however. This non-working env has this:
Any ideas what's missing?