Download Comments on using LATEX for theses
Transcript
Hidden possibilities
§10–11
Hidden possibilities
LATEX has a couple things that—one reason or another—tend to pass
unnoticed until one discovers them serendipitously.
\\ §10. The optional argument to \\ is one of them. In virtually ev-
ery context where this line-breaking command is used (regular text,
array or tabular environments, etc.), you can add a LATEX dimension (within square brackets, as in \\[3mm]), which will be vertically
added to the line skip. For example:
Chess\\ Checkers\\ Canasta\\ Bridge
Chess\\ Checkers\\[2mm] Canasta\\ Bridge
Chess
Checkers
Canasta
Bridge
Chess
Checkers
Canasta
Bridge
The dimension can also be negative.
§11. Stacking words (or any kind of LATEX box) on top of each other
A
is sometimes needed, for things like ♣ . It would seem that the only
way to do this is by means of \parbox:
\fbox{\parbox{3mm}{\scriptsize\textsf{A}$\clubsuit$}}
but this of course implies ‘guessing’ the right width for the box (in this
case there is no problem, but when you deal with words or formulas,
you are bound to do it by trial and error). Another possibility is
to try with a one-column tabular environment (which automatically
finds the width of the columns), but that involves a lot of typing and
\shortstack uncertainty about spurious vertical spaces. Well, the \shortstack
command will do nicely:
\fbox{\scriptsize\shortstack{\textsf{A}\\$\clubsuit$}}
Different lines are separated by \\ (whose optional argument functions
here as well), and LATEX finds the width of the box. By default,
8