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

How can I vertically align svg equations inline on html page inside a paragraph? #156

Open
burakertr opened this issue Nov 3, 2024 · 1 comment

Comments

@burakertr
Copy link

burakertr commented Nov 3, 2024

I use make4ht for generating svg equations to inject into my html page paragraphs but it is always vertically align bottom to bottom. I need to calculate and give a vertical padding to align it into paragraph. Is there any chance if library can help me on this?

sscb

Thanks in advance.

@michal-h21
Copy link
Owner

Can you post a MWE for this? Anyway, you can try the "pic-m,svg" options, like this:

$ make4ht -f html5+dvisvgm_hashes -m draft filename.tex "pic-m,svg"

The pic-m option will make images for the whole contents of the inline math. It shoul also try to calculate the vertical alignment. svg option is needed for SVG images instead of PNG, which should look better. -f html5+dvisvgm_hashes will reuse images between compilations, which should be much faster.

Better output for math is MathML or MathJax though, as it will create much better looking output, and it is also better for the accessibility. Try these commands:

$ make4ht -m draft filename.tex "mathml,mathjax"

or

$ make4ht -m draft filename.tex "mathjax"

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