General Category > Technical Questions

Bad LaTeX

(1/1)

Victor Ivrii:
I noticed constructions like

--- Code: --- $a\\ b$
--- End code ---
and
--- 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:

http://ctan.cms.math.ca/tex-archive/info/l2tabu/english/l2tabuen.pdf

explains what one should and should not do in LaTeX

Navigation

[0] Message Index

Go to full version