Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math Not Rendering Correctly in PDF Output #99

Open
sachin-suresh-rapyuta opened this issue May 15, 2024 · 0 comments
Open

Math Not Rendering Correctly in PDF Output #99

sachin-suresh-rapyuta opened this issue May 15, 2024 · 0 comments

Comments

@sachin-suresh-rapyuta
Copy link

sachin-suresh-rapyuta commented May 15, 2024

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:

  1. Installed sphinx-mathjax-offline via pip (link: https://pypi.org/project/sphinx-mathjax-offline/)
  2. 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:
image

But PDF output displays raw LaTeX text:
image

Expected Behavior:
Math expressions should be rendered correctly in both HTML and PDF outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant