ggrossetie / asciidoctor-web-pdf

Convert AsciiDoc documents to PDF using web technologies
https://asciidoctor.org
MIT License
445 stars 92 forks source link

Large latex equations not fitting within page width #532

Open vishalkrsinha opened 3 years ago

vishalkrsinha commented 3 years ago

LatexEquationsNotFittingInPageWidth

How to handle the issue where big latex equations are not fitting in a page width? Kindly suggest.

ggrossetie commented 3 years ago

Not sure, I guess you need to reduce the font size? I don't think breaking the equations (i.e., adding a new line) will be acceptable.

vishalkrsinha commented 3 years ago

Not sure, I guess you need to reduce the font size? I don't think breaking the equations (i.e., adding a new line) will be acceptable.

Breaking the equation in newline is okay. Please refer below the result of latex equation in html generated file (using 'asciidoctor').

LatexEquationsInNewLine

  1. Kindly suggest how to achieve the html file like result here for pdfs? Please note, I would have around 400 files to modify.
  2. Equation no. 16 in attached pdf screenshot seems have been merged into a single line unlike html file where it is automatically separated in 3 lines. Suggestions please?
ggrossetie commented 3 years ago

Apparently, this feature is not yet available in MathJax 3: https://docs.mathjax.org/en/latest/output/linebreaks.html

I guess you could use a custom converter with MathJax 2.x (instead of MathJax 3.x) or wait until MathJax 3.x implements this feature.

Related issue: https://github.com/mathjax/MathJax/issues/2312

vishalkrsinha commented 3 years ago

Apparently, this feature is not yet available in MathJax 3: https://docs.mathjax.org/en/latest/output/linebreaks.html

I guess you could use a custom converter with MathJax 2.x (instead of MathJax 3.x) or wait until MathJax 3.x implements this feature.

Related issue: mathjax/MathJax#2312

Can you please share some example of using custom converter? Or, some way to modify the font size for latex equations to fit them within page width?