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

Manfred Braun manfred.braun at uni-due.de
Mon Jan 31 05:35:46 EST 2011

Hi Don,

On Jan 31, 2011, at 4:29 AM, Don Green Dragon wrote:

> Hello Manfred,
>
>> 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
>

\noalign is a remnant from Don Knuth's original TeX alignment (The TeX Book, Chapter 22), meanwhile superseded by the LaTeX tabular environment. I use it sometimes in constructions like this (xcolor package must be loaded):

\begin{tabular}{c | c | c}
A & B & C \\
\noalign{\color{red}\hrule height2pt}
F & F & F\\
\hline
\end{tabular}

I don't know how this could be done without recourse to the \noalign primitive.

Manfred

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20110131/f20836ea/attachment.html>