1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<head>
<title>UK TeX FAQ -- question label dolldoll</title>
</head><body>
<h3>Why use <code>\</code><code>[</code> ...<code>\</code><code>]</code> in place of <code>$$</code> ...<code>$$</code>?</h3>
<p>LaTeX defines inline- and display-maths commands, apparently
analagous to those that derive from the TeX primitive maths
sequences bracketing maths commands with single dollar signs (or pairs
of dollar signs).
<p>As it turns out, LaTeX’s inline maths grouping,
<code>\</code><code>(</code><code> ... </code><code>\</code><code>)</code>, has precisely the same effect as the
TeX primitive version <code>$ ... $</code>. (Except that
the LaTeX version checks to ensure you don’t put <code>\</code><code>(</code> and
<code>\</code><code>)</code> the wrong way round.)
<p>In this circumstance, one often finds LaTeX users, who have some
experience of using Plain TeX, merely assuming that LaTeX’s
display maths grouping <code>\</code><code>[</code><code> ... </code><code>\</code><code>]</code> may be replaced by
the TeX primitive display maths <code>$$ ... $$</code>.
<p>Unfortunately, they are wrong: if LaTeX code is going to patch display
maths, it can only do so by patching <code>\</code><code>[</code> and <code>\</code><code>]</code>. The most
obvious way this turns up, is that the class option <code>fleqn</code>
simply does not work for equations coded using
<code>$$ ... $$</code>, whether you’re using the standard classes
alone, or using package <i>amsmath</i>. Also, the <code>\</code><code>[</code> and
<code>\</code><code>]</code> has code for rationalising vertical spacing in some extreme
cases; that code is not available in <code>$$ ... $$</code>, so if you
use the non-standard version, you may occasionally observe
inconsistent vertical spacing .
<p>There are more subtle effects (especially with package
<i>amsmath</i>), and the simple rule is
<code>\</code><code>[</code><code> ... </code><code>\</code><code>]</code> whenever
unadorned displayed maths is needed in LaTeX.
<p><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dolldoll">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=dolldoll</a>
</body>
|