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

Robert Spence spence at saar.de
Sat Jan 29 04:48:06 EST 2011


Hi Don,

On 29 Jan 2011, at 10:05 , Don Green Dragon wrote:

> Hi All,
> 
> 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}

As far as I know, a command like \hline can come _after_ an end-or-row command (\\) but not _before_ one. What are the results of simply typing the following?:

\begin{tabular}{c | c | c}
A & B & C\\
\hline
F & F & F
\end{tabular}

Often it pays to try to get used to the appearance of the "standard" results, rather than hacking... But you could try, perhaps:

\begin{tabular}{c | c | c}
A & B & C\\
\hline
\multicolumn{3}{c}{}\\[-12pt]
F & F & F
\end{tabular}

After the \\ the program expects a new table row; it starts trying to typeset one (hence the vertical line at the end of what should have been the first cell of that row); to overcome this you'd need to define a "dummy" row, as I did with the \multicolumn command above, then add even more negative leading  [12pt] or so, instead of [9pt]. But again, what's wrong with the standard tabular results?

Can't help with the other problem I'm afraid, 
but...

HTH
-- Rob Spence


> 
> does not typeset properly. Namely, the second vertical rule is broken into two pieces. Roughly
> 
> A | B | C
> --|---|---
>  |   
> F | F | F
> 
> Not counting the horizontal rule generated by \hline as "a row", the error is that above the second | in the second row (there is no third row, it just looks that way in my Ascii diagram), there is a vertical segment missing. I.E., it should look like
> 
> A | B | C
> --|---|---
>  |   |  
> F | F | F
> 
> In case you are wondering about the \\[-9pt] gimmick, that raises the F | F | F line so that there is not too much whitespace above it.
> 

(...)

> Don Green Dragon
> fergdc at Shaw.ca
> 
> 
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
> 

-- 

------------------------------------------
Dr. Robert Spence
Lessingstr. 59
D-66121 Saarbrücken
Germany
Telefon: +49 (0)681 6 74 78
Mobil: +49 (0)175 526 3506





More information about the MacOSX-TeX mailing list