1

In my publishing company we have our own template with custom \tcaption command which make caption above the table with company's standards (and I don't use table environment). However this command doesn't write information in LOT file, so I can't produce the list of tables. What should I change in CLS file to fix this problem?

I can't simply write \addcontentsline{lot} because I have 170 tables.

  • Can you renewcommand the \tcaption command or is it forbidden? If yes can you provide the description of \tcaption (arguments etc.)? – Ludovic C. Oct 29 '13 at 17:15
  • 3
    If you can show us some code, preferably in a complete minimal working example (MWE), some folks may be able to help.... – cmhughes Oct 29 '13 at 18:10
1

Whatever is in the class, some good old things should work. Try putting this into the preamble, you don't even have to modify the .cls file:

\makeatletter
\let\old@tcaption\tcaption
\def\my@tcaption[#1]#2{\addcontentsline{lot}{#1}\old@tcaption{#2}}
\def\tcaption{\@dblarg\my@tcaption}
\makeatother
  • thank you for your answer, unfortunately i have an error ! Use of \my@tcaption doesn't match its definition. <argument> \def \reserved@a { \def \@currenvir {equation}\edef \@currenvline ... l.716 \end{equation}} – anatoly Oct 30 '13 at 8:54
  • Well, you likely have an equation in the caption. In that case you have to use the optional argument to \tcaption that omits the equation. Equations, new paragraphs etc. cannot propagate to the List of Tables, hence the error. – yo' Oct 30 '13 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.