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

Support macros when prerendering #65

Open
rnburn opened this issue Jan 24, 2022 · 1 comment
Open

Support macros when prerendering #65

rnburn opened this issue Jan 24, 2022 · 1 comment

Comments

@rnburn
Copy link

rnburn commented Jan 24, 2022

Macros aren't passed to the katex command line if katex_prerender=True.

They could be written to a file and passed using the --macro-file CLI option.

Example macro file

\abc: 123
\xyz: \mathbf{XYZ}
@hagenw
Copy link
Owner

hagenw commented Jan 26, 2022

Thanks for reporting. Seems like pre-rendering from Python code is in general far from optimal, compare #37.

There should be a solution to the problem reported here. We have to look for macros: in the katex_options string to extract them, then write them to a temporary file and if this file exists add the --macro-file option. Not very nice, but I guess still better then not including the macros.

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

2 participants