General Category > Technical Questions

Bad LaTeX


Victor Ivrii:
I noticed constructions like

--- Code: --- $a\\ b$
--- End code ---
--- Code: --- $$a\\ b$$
--- End code ---

This is not good! Reason: the former works in LaTeX but here \\ means linebreak and in inline math here you get $1\\2$ (improper vertical alignment) and in the real LaTeX 2 will just move to the beginning of the next line.

The latter does not work at all (simply ignored) as LaTeX has several multi-lined environments: gather, split, align and multline (in AMS-LaTeX which we support here), their * versions gather*, split*, align* and multline*  and also gathered, aligned.

As we want to be able to copy-paste from MathJax to LaTeX with no editing we should use a proper syntax.

PS. Opposite is not true as MJ is not full LaTeX environment, and is not intended to be. Due to technical reasons (inner mathml engine) even \intertext does not work in MJ.

PPS. There are lots of things like it works but is deprecated

Victor Ivrii:
eqnarray is buggy and deprecated

More genera:

explains what one should and should not do in LaTeX


[0] Message Index

Go to full version