Menu

#456 Latex Blank lines in Block Math Environment

closed-invalid
nobody
None
5
2023-04-20
2022-09-01
No

The latex writer has a serious bug regarding block math displays.
According to the book More Math into Latex:

No blank lines are permitted within an equation or equation* environment.

But if you look at the code that's exactly what it does. The resulting Latex output is incorrect.
Please fix this as soon as possible.

BTW get with the times and start using git please.

Discussion

  • Günter Milde

    Günter Milde - 2022-09-07
     
  • Günter Milde

    Günter Milde - 2022-09-07

    Can you provide a MWE (minimal working/failing example), please.
    I don't know where in the code (Docutils source code or LaTeX code?) I should look,
    so I cannot reproduce.

     
  • Daniel James Perry

    It happens with every math block that I try. Look at the visit_math and visit_math_block methods in writers/latex2e/__init__.py, you can see that there are newlines that shouldn't be there.

     
  • Günter Milde

    Günter Milde - 2022-10-29
    • status: open --> pending-works-for-me
     
  • Günter Milde

    Günter Milde - 2022-10-29

    I cannot find spurious newlines in latex2e/__init__.py and no blank lines in {equation*} environments in the LaTeX test output. Nor in the output of "rst2latex" for a local copy of https://docutils.sourceforge.io/docs/ref/rst/mathematics.txt.

    Please provide a minimal example (input file + generated latex file), the Docutils version and eventual extensions/wrappers.

     
  • Günter Milde

    Günter Milde - 2022-11-30

    Could this be a misunderstanding?
    While "no blank lines "\n\n" are permitted within an equation or equation* environment",
    line breaks (newlines, "\n") are no problem for LaTeX.

     
  • Günter Milde

    Günter Milde - 2023-04-20
    • status: pending-works-for-me --> closed-invalid
     
  • Günter Milde

    Günter Milde - 2023-04-20

    Closing this now, as there is no example of invalid LaTeX code generation.

     

Log in to post a comment.