diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-07 22:47:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-07 22:47:28 +0000 |
commit | 3f1971c9b7717818766692c9aa497e20e7472f2c (patch) | |
tree | 678de0190b6643b1b21fd9441fa1387bce180726 /Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-tabcellalign.html | |
parent | c7c3b090320a234149dbe23315e2a15a2773ac79 (diff) |
FAQ-en 3.19d (7apr10)
git-svn-id: svn://tug.org/texlive/trunk@17742 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-tabcellalign.html')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-tabcellalign.html | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-tabcellalign.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-tabcellalign.html index 8aca9116776..19cac75890e 100644 --- a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-tabcellalign.html +++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-tabcellalign.html @@ -2,7 +2,7 @@ <title>UK TeX FAQ -- question label tabcellalign</title> </head><body> <h3>How to alter the alignment of tabular cells</h3> -<p/>One often needs to alter the alignment of a tabular <code>p</code> (‘paragraph’) +<p/>One often needs to alter the alignment of a tabular <code>p</code> (‘paragraph’) cell, but problems at the end of a table row are common. With a <code>p</code> cell that looks like: <blockquote> @@ -10,41 +10,42 @@ cell, but problems at the end of a table row are common. With a ... & \centering blah ... \\ </pre> </blockquote><p> -one is liable to encounter errors that complain about a “misplaced -<code>\</code><code>noalign</code>” or “<a href="FAQ-altabcr.html">extra alignment tab</a>”, or the like. +one is liable to encounter errors that complain about a “misplaced +<code>\</code><code>noalign</code>” or “<a href="FAQ-altabcr.html">extra alignment tab</a>”, or the like. The problem is that the command <code>\\</code> means different things in different circumstances: the <code>tabular</code> environment switches the meaning to a value for use in the table, and <code>\</code><code>centering</code>, <code>\</code><code>raggedright</code> and <code>\</code><code>raggedleft</code> all change the meaning to something incompatible. Note that the problem only arises in the last cell of a row: since each cell is set into a box, -its settings are lost at the <code>&</code> (or <code>\\</code>) that +its settings are lost at the <code>&</code> (or <code>\\</code>) that terminates it. -<p/><p/>The technique using <code>\</code><code>PBS</code> was developed in the days of LaTeX 2.09 -because the actual value of <code>\\</code> that the <code>tabular</code> -environment uses was only available as an internal command. Nowadays, -the value is a public command, and you can in principle use it -explicitly: +<p/>In the old days, the actual value of <code>\\</code> that the +<code>tabular</code> environment uses was only available as an +internal command. Nowadays, the value is a public command, and you +can in principle use it explicitly: <blockquote> <pre> ... & \centering blah ... \tabularnewline </pre> </blockquote><p> +(but that’s a rather verbose way of doing things). <p/>The <i>array</i> package provides a command <code>\</code><code>arraybackslash</code> which restores <code>\\</code> to its correct (within table) meaning; -the command may be used in <i>array</i>’s “field format” preamble +the command may be used in <i>array</i>’s “field format” preamble specifications: <blockquote> <pre> -\begin{tabular}{... >{\centering\arraybackslash}p{50mm}} +\begin{tabular}{... >{\centering\arraybackslash}p{50mm}} ... </pre> </blockquote><p> <p/>The <code>\</code><code>tabularnewline</code> and <code>\</code><code>arraybackslash</code> commands are (somewhat) modern additions to LaTeX and the <i>array</i> -package, respectively. If neither is available, the user may try the -(old) solution which preserves the meaning of <code>\\</code>: +package, respectively. In the unlikely event that neither is +available, the user may try the (old) solution which preserves the +meaning of <code>\\</code>: <blockquote> <pre> \newcommand\PBS[1]{\let\temp=\\% @@ -62,11 +63,11 @@ which one uses within a table as: or in the preamble as: <blockquote> <pre> -\begin{tabular}{...>{\PBS\centering}p{5cm}} +\begin{tabular}{...>{\PBS\centering}p{5cm}} </pre> </blockquote><p> <dl> -<dt><tt><i>array.sty</i></tt><dd>Distributed as part of <a href="http://www.tex.ac.uk/tex-archive/macros/latex/required/tools.zip">macros/latex/required/tools</a> (or <a href="http://www.tex.ac.uk/tex-archive/macros/latex/required/tools/">browse the directory</a>) +<dt><tt><i>array.sty</i></tt><dd>Distributed as part of <a href="http://www.tex.ac.uk/tex-archive/macros/latex/required/tools.zip">macros/latex/required/tools</a> (or <a href="http://www.tex.ac.uk/tex-archive/macros/latex/required/tools/">browse the directory</a>); <a href="http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/array.html">catalogue entry</a> </dl> <p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tabcellalign">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tabcellalign</a> |