Support inline math with dollar $...$
delimiters when --config latex_math=True
#410
Labels
$...$
delimiters when --config latex_math=True
#410
Expected Behavior
Inline math delimited with
$ ... $
should work in html output out of the box with--config latex_math=True
specified.It is supported in pandoc (link), GitHub (link), and finally it is being rolled out in GitLab (link) (this behavior still under-documented in official docs though). I create this issue based on @kernc reply in #28 (comment).
This unification is important, because users will be saved from the frustration when they are trying to display their math on multiple places, such as GitHub readme, GitLab readme, pdoc3 HTML, pdoc3 + pandoc PDF output, ...
Actual Behavior
Currently, the dollar delimiter style works only for blocks of math with
$$...$$
.Steps to Reproduce
Steps for Ubuntu
mkdir tmp
virtualenv .venv
pip install pdoc3
source .venv/bin/activate
nano test.py
, paste the code from bellow and save the filepdoc test.py --html --force --config latex_math=True
html
folder and opentest.html
in your browserpdoc test.py --pdf | pandoc --metadata=title:"test" --from=markdown+abbreviations+tex_math_dollars --pdf-engine=xelatex --output=tmp.pdf
You should get this HTML output:
You should get this PDF output:
Additional info
For those who want a workaround: Copy the
head.mako
from.venv/lib/python3.8/site-packages/pdoc/templates
to your desired location, fill it with code from this answer, and then compile your documentation with custom--template-dir
as @kernc suggested #28 (comment).The text was updated successfully, but these errors were encountered: