sphinx-simplepdf
sphinx-simplepdf copied to clipboard
Math Not Rendering Correctly in PDF Output
I am experiencing issues with LaTeX math rendering in the PDF output generated using sphinx-simplepdf. The HTML output is correct, but the PDF output shows LaTeX notation as raw text, e.g., (2^{31} -1).
What I have tried:
- Installed sphinx-mathjax-offline via pip (link: https://pypi.org/project/sphinx-mathjax-offline/)
- Configured conf.py
extensions = [
'sphinx.ext.mathjax',
'sphinx-mathjax-offline',
]
mathjax2_config = {
'tex2jax': {
'inlineMath': [['$', '$'], ['\\(', '\\)']],
'displayMath': [['$$', '$$'], ['\\[', '\\]']],
'processEscapes': True,
}
}
RST content:
1 to :math:`2^{31} - 1`
Result:
HTML output renders math correctly:
But PDF output displays raw LaTeX text:
Expected Behavior: Math expressions should be rendered correctly in both HTML and PDF outputs.