Author Topic: Bad LaTeX  (Read 3065 times)

Victor Ivrii

  • Administrator
  • Elder Member
  • *****
  • Posts: 1332
  • Karma: 0
    • View Profile
    • Personal website of Victor Ivrii
Bad LaTeX
« on: January 25, 2013, 01:47:17 AM »
I noticed constructions like
Code: [Select]
$a\\ b$ and
Code: [Select]
$$a\\ b$$
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
« Last Edit: February 07, 2013, 04:33:14 AM by Victor Ivrii »

Victor Ivrii

  • Administrator
  • Elder Member
  • *****
  • Posts: 1332
  • Karma: 0
    • View Profile
    • Personal website of Victor Ivrii
Re: Bad LaTeX
« Reply #1 on: February 07, 2013, 04:41:05 AM »
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