Showing posts with label tables. Show all posts
Showing posts with label tables. Show all posts

Wednesday, February 25, 2009

Table lines starting with square bracket

this one does not compile:

\documentclass{article}
\begin{document}
\begin{tabular}{ll}
a & b \\
[c] & d \\
\end{tabular}
\end{document}

if required, one can specify the vertical gap between lines in a table using
\\[len]

LaTeX removed the newline and whitespace to interpret the table as having a \\[c] entry, and there exists no length "c".

So the solution is to write the initial square bracket into curly braces. This way it is not interpreted as the beginning of the optional argument of the newline command.

\documentclass{article}
\begin{document}
\begin{tabular}{ll}
a & b \\
{[}c] & d \\
\end{tabular}
\end{document}

Thanks to Werner Grundlingh for showing me the problem source.

Sunday, March 16, 2008

First word of a paragraph

Today, with all the troubles around tables, I learned that the first word of a paragraph never gets hyphenated. (Thanks, Ulrike) Just in case you wonder why your table header does not get automatically hyphenated, you know …

Tables

Everything I learned about tables in an introductory LaTeX is ok but not sufficient.

Very nice and up-to-date Table guide has been written by Lapo Filippo Mori and I warmly recommend it to everybody.

Friday, March 7, 2008

Line spacing in tables

If you need more space between the lines in a table use the array package and put the following line somewhere between \begin{table} and \begin{tabular}


\setlength{\extrarowheight}{length}


Instead of “length” you write the desired space, e.g. “3pt”