Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing a MS dissertation, and using a long table in my thesis. I have a problem related with the caption of the long table in list of tables(LoT). Table 4.1 which is seen below, is a long table and not convenient for the thesis format for LoT. I want long table to be in the same format like other tables in LoT. I solved the same problem for normal tables and figures by setting \usepackage[caption=false]{subfig}. However, it did not work for long table.

Table 3.5. Caption.......

4.1 Caption........

Table 4.2. Caption......

Table 4.3. Caption......

The long table is the following. Thanks in advance for any help.

\begin{center}
\begin{longtable}{ | c | p{3cm} | c | c | c |}
\caption{Basic properties of sensors during deployment.}  \label{table:basic-property-deployment}
\\  \hline
    \textbf{Sensors} & \textbf{Location} & \textbf{Threshold} & \textbf{Base Station} & \textbf{Resistance}\\ [6pt]
    \hline
    \endfirsthead
    \multicolumn{5}{c}%
   % \bigskip 
    {\tablename\ \thetable\ . Basic properties of sensors during deployment} \\
    \hline
     \textbf{Sensors} & \textbf{Location} & \textbf{Threshold} & \textbf{Base Station} & \textbf{Resistance}\\ [6pt]
     \hline
     \endhead
     \hline \multicolumn{5}{r}{\textit{Continued on next page}} \\
     \endfoot
     \hline
     \endlastfoot

     ROWS


\end{longtable}
\end{center}
share|improve this question

1 Answer 1

It always helps if you post a complete document showing all packages loaded, but as a guess longtable toc is written by

\def\LT@c@ption#1[#2]#3{%
  \LT@makecaption#1\fnum@table{#3}%
  \def\@tempa{#2}%
  \ifx\@tempa\@empty\else
     {\let\\\space
     \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}%
  \fi}

So if you had

\makeatletter
\def\LT@c@ption#1[#2]#3{%
  \LT@makecaption#1\fnum@table{#3}%
  \def\@tempa{#2}%
  \ifx\@tempa\@empty\else
     {\let\\\space
     \addcontentsline{lot}{table}{\protect\numberline{Table \thetable.}{#2}}}%
  \fi}
\makeatother

Then Table would appear in the toc (or use whatever other format your caption style is using in \addcontentsline)

share|improve this answer
    
Thank you so much David, you saved my day:)) Your guess is right, it works:) Now another problem occurs, I need a new line between the long table and the subsequent table in LoT. Since, I do not have enough reputation to send an image, I try to describe it below, sorry for that. –  user25260 Jan 30 '13 at 21:36
    
You can use the image upload button but then delete (just) the ! from the generated markup, that makes a link to the image and someone with edit rights will put the ! back –  David Carlisle Jan 30 '13 at 21:40
    
Ok. I think I put the image, actually it does not seem as a serious problem, however I need space between the long table and the subsequent table in LoT as it can be seen in the image. When I insert new lines in the code you supplied, the dots disappears, and the page number is placed to the next line which I do not want. I need just a space between the long table and the subsequent one in LoT. [enter image description here][1] [1]: i.stack.imgur.com/iHDj5.png –  user25260 Jan 30 '13 at 22:03
    
Do you have any idea about the spacing problem between the long table entry and next table entry in LoT? –  user25260 Jan 31 '13 at 12:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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