[OS X TeX] longtable and style files overwriting table

Charilaos Skiadas cskiadas at gmail.com
Sat Mar 15 11:40:59 EDT 2008


I must confess first of all that this is a pure latex question. Not  
sure if the subject line really describes my problem well, but  
basically I am using a style file provided by my publisher, and the  
problem I am encountering (at this moment that is) is with tables.  
The problem is that this style file overwrites the table command, and  
gets me in trouble whenever I want to do something even remotely  
fancy with the table. To begin with, I have to be using \tabletitle  
instead of \caption, but that is not really much of a problem. I've  
had two problems so far:

a) I could not include the array package, and use things like  
extrarowheight. I've sort of given up on this one, but if someone has  
any suggestions I would be most happy to hear them.
b) The problem I am encountering now is that I want to use longtable,  
and of course my publisher's style file only overwrites \table (I am  
sort of guessing that overwriting \table amounts to overwriting the  
\begin{table} environment, is that correct?).

I'm not sure if I am allowed to send you the entire style file, but  
I've appended the part that I think contains the definition of  
\table, and should therefore be the most relevant. My main question  
though in essence is:
Is there a good source describing the LaTeX "dirty parts" relating to  
table? I tend to not mess with such things, but it looks like in this  
case I might have to. I.e. how should I go about trying to  
troubleshoot this?

Unless someone can suggest some easy way to tell LaTeX something to  
the effect of "whatever changes this style file does to table, do  
analogous changes to longtable". Though I imagine this might be a bit  
of a dream?

I have probably not given enough information, but that is partly  
because I am not sure what information is relevant here, and I didn't  
want to overload the list with pages and pages of useless output.

Thanks in advance for any insight,
Haris Skiadas
Department of Mathematics and Computer Science
Hanover College




\def\table{%
   %\long\def\caption##1{\tabletitle{##1}\@TableTitle\par}%
   \@float{table}}
\@namedef{table*}{%
   \long\def\caption##1{\tabletitle{##1}\@TableTitle\par}%
   \@dblfloat{table}}
\def\@tabular{%
   \leavevmode
   \if at centertable\hfil\fi
   \vbox\bgroup
   \setbox\@tablebox\hbox\bgroup
   \baselineskip11pt
   \global\let\@fn\@empty
   \def\footnote##1{\footnotemark\gdef\@fn{##1}}
   \renewcommand{\arraystretch}{.916666666667}%
   $\let\@acol\@tabacol
   \let\@classz\@tabclassz
   \let\@classiv\@tabclassiv
   \let\\\@tabularcr
   \@tabarray}
\def\endtabular{%
   \crcr\egroup\egroup $\egroup
   \@tablewidth\wd\@tablebox
   \ifnum\@tabletitlewidth>0
     {\hsize\@tabletitlewidth\raggedright\global\setbox\@tabletitlebox 
\vbox{\@Tabletitle}}%
   \else
     \setbox\@tabletitlebox\hbox{\@Tabletitle}%
     \ifnum\wd\@tabletitlebox>\@tablewidth
       {\hsize\@tablewidth\raggedright\global\setbox\@tabletitlebox 
\vbox{\@Tabletitle}}\fi
     \@tabletitlewidth\wd\@tabletitlebox\fi
   \ifnum\@tabletitlewidth>0
     \ifnum\@tabletitlewidth>\@tablewidth\@tablewidth\@tabletitlewidth 
\fi
     \hbox to\@tabletitlewidth{\if at centertabletitle\hfil\fi\box 
\@tabletitlebox\hfil}\par\fi
   \max at tablewidth\@tablewidth
   \ifnum\@tabletitlewidth>\max at tablewidth\max at tablewidth 
\@tabletitlewidth\fi
   \if at tablerules
     \ifnum\@tabletitlewidth>0\vskip-6pt\fi
     \hbox to\max at tablewidth{\if at centertable\hfil\fi\rule 
{\@tablewidth}{1pt}\hfil}\par\fi
   \hbox to\max at tablewidth{\if at centertable\hfil\fi\box\@tablebox\hfil} 
\vskip1pt
   \if at tablerules\hbox to\max at tablewidth{\if at centertable\hfil\fi\rule 
{\@tablewidth}{1pt}\hfil}\par\fi
   \ifx\@fn\@empty\else\FootnoteFont\parindent\z@\noindent\@makefnmark 
\@fn\par\fi
   \egroup\hfil
   \vskip 0pt plus 12pt
   \gdef\@Tabletitle{}}




More information about the MacOSX-TeX mailing list