[OS X TeX] Tabular error & changing the numbering of subsections, ...

Don Green Dragon fergdc at shaw.ca
Mon Jan 31 03:29:25 CET 2011

Hello Manfred,

>>> <<snip>>

>>> I'm working with the document class LaTeX {book}. The following source code
>>> \begin{tabular}{c | c | c}
>>> A & B & C\\
>>> \hline\\[-9pt]
>>> F & F & F
>>> \end{tabular}
>> Specify a complete second row of empty values between the two rows.
>> \begin{tabular}{c | c | c}
>> A & B & C\\\hline
>>  &    &\\[-9pt]
>> F & F & F
>> \end{tabular}
>> Themis
> Another possibility:
> \begin{tabular}{c|c|c}
> A & B & C \\
> \hline
> \noalign{\vskip-3pt}
> F & F & F
> \end{tabular}

\noalign ! Eh? 

To see what \noalign produces --- for those who do not know --- replace Manfred's 
"\noalign{\vskip-3pt}" with something like "A simple phrase" and see what you get.

I had to modify the \vskip amount in order to "get it right". Very nice! However, the vertical rules may not be continuous --- each may be 'broken' --- and if you substitute "\noalign{\vskip 5pt}" in Manfred's example you will see the breaks. I had to use {\vskip Npt} with N=0 in order that the 'breaks' do not appear. When N was set to -1, -2, -3 (points), there were no breaks in the vertical rules, but the line "F F F" was raised too much. 

Since Graetzer does not have \noalign in his index, the LaTeX Companion came to the rescue with a rather complicated example. But on page 904, I found the following illuminating (listed amongst Error Messages):
Misplace \noalign
The TeX primitive \noalign is internally used to place "nonaligned" material between rows of alignment displays. It is therefore allowed only directly following the command that finishes a row. For example, you get this error when you use \hline outside of array or tabular, or not directly after \\ within these environments.
Simple blunder spawns interesting solutions!  :-)  Thanks.

Don Green Dragon
fergdc at Shaw.ca

More information about the macostex-archives mailing list