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

Don Green Dragon fergdc at shaw.ca
Sat Jan 29 10:05:39 CET 2011


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}

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.

Next:

I've redesigned the numbering of subsection, subsubsections, and paragraphs.  Trying to follow the example in the LaTeX Companion, I tried

% Now change the numbering of subsections, subsubsections, and  paragraphs within a chapter
\renewcommand{\thesubsection{\thesection.\Alph{subsection}}}

which worked fine except that a warning was issued:

+++++
./MasterCalc.tex:53: LaTeX Error: \thesubsection {0.0.}undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.53 ...subsection{\thesection.\Alph{subsection}}}
./MasterCalc.tex:53: LaTeX Error: \thesubsection {0.0.}undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.53 ...subsection{\thesection.\Alph{subsection}}}
+++++
and had to be chased away with hit RETURN.

The LaTeX Companion uses a different syntax, namely

\renewcommand\thesubsection{\thesection.\Alph{subsection}}

and the above typesets nicely and issues no warning. Then I read Graetzer's example and tried

\renewcommand{\thesubsection}{\thesection.\Alph{subsection}}

which also typeset properly and without warnings. I guess my question is:

Is there some convention in LaTeX --- that I'm obviously not aware of --- which would tell one that the part 

\renewcommand\thesubsection

is equivalent to

\renewcommand{\thesubsection}
?

It is late, hope the answer is not obvious!  :-)


Don Green Dragon
fergdc at Shaw.ca





More information about the macostex-archives mailing list