3

I have a List of Tables which is comprised of longtables and tables. My List of tables appears as

 1. Table 1
 2. Table 2
 3  Table 3
 4. Table 4
 5  Table 5

The 3rd and 5th table punctuation is not appearing in my list of tables. These tables are generated with longtable as the tables 1, 2, and 4 are in the usual \begin{table} environment.

Is there a method to include the punctuation in the L.O.T with the longtables?

Here is a M.W.E. along with the dissertation style required

\documentclass[12pt,a4paper]{report}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\author{Michael C. Kunkel}
\usepackage{longtable}
%\addcontentsline{toc}{chapter}{\uppercase{List of Tables}}
\usepackage{ODUthesis}  %%%%%%%%%%%%%
\begin{document}
M.W.E.

\listoftables

\newpage
\begin{table}[h!]
\begin{minipage}{\textwidth}
\begin{center}


\caption[Table 1]{\label{tab:eff_events}Table 1 \vspace{0.75mm}}

\begin{tabular}{c|c|c}

\hline
Item & Data & Category \\
\hline
item 1 & data 1& cat 1 \\
\hline \hline
\end{tabular}

\end{center}
\end{minipage}
\end{table}

% % % % % % % % % % % % % % % % % % % %




\begin{center}
\begin{longtable}{lr||lr}
\caption[G12 Production Run List Excluded From Current Analysis]{\label{tab:excluded_runs}G12 production runs excluded from current analysis and the reasoning}\\ %\vspace{0.75mm}

\hline \hline
\multicolumn{2}{l||}{Excluded Run}  & \multicolumn{2}{l}{Excluded Run} \\
\multicolumn{2}{r||}{Exclusion Reason} & \multicolumn{2}{r}{Exclusion Reason} \\
\hline
\endfirsthead

\multicolumn{4}{l}{\scriptsize continued from previous page.} \\
\hline
\multicolumn{2}{l||}{Excluded Run}  & \multicolumn{2}{l}{Excluded Run} \\
\multicolumn{2}{r||}{Exclusion Reason}  & \multicolumn{2}{r}{Exclusion Reason} \\
\hline
\endhead

\hline
\multicolumn{4}{r}{\scriptsize continued on next page.} \\
\endfoot

\hline \hline
\endlastfoot

56476   &    Single-prong Run       &   56408   &     Lepton TrigBit (6) Not Set    \\


\end{longtable}
\end{center}
\end{document}

Dissertation style ODUthesis.sty

%
% Dr. J. W. Van Orden, Professor, Department of Physics.
% 13 November 2011
%
%This file is meant to be used as a package with the standard LaTeX class file report.cls.
%The formatting corresponds to "The Old Dominion University Guide to the Preparation of These and Dissertation"
%as updated in August 2010.
%
\setlength{\voffset}{-0.5in}
\marginparwidth 40pt \marginparsep 10pt
\topmargin 0in \headsep .31in
\textheight 8.94in \textwidth 5.96in
\brokenpenalty=10000


\oddsidemargin 0.50in
\if@twoside
  \evensidemargin 0.0in
\else
  \evensidemargin 0.50in
\fi

\textfloatsep  40pt plus 2pt minus 4pt
\floatsep  40pt plus 2pt minus 4pt
%\intextsep  40pt plus 2pt minus 4pt %%%% added FRW

% \def\textfraction{.4}  %%%%% frw
\def\textfraction{.25}
\def\floatpagefraction{.5}

\def\cl@chapter{\@elt{section}\@elt{footnote}}
\def\thefigure{\@arabic\c@figure}
\def\thetable{\@arabic\c@table}
\def\thechapter{\@arabic\c@chapter}
\def\theequation{\arabic{equation}}
\renewcommand{\figurename}{FIG.}
\renewcommand{\tablename}{TABLE}
\renewcommand{\bibname}{BIBLIOGRAPHY}
\renewcommand{\chaptername}{CHAPTER}
\renewcommand{\appendixname}{APPENDIX}

\setcounter{tocdepth}{1}

\renewcommand\@dotsep{2.}




\def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
   \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner
      \@parmoderr\@floatpenalty\z@
    \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
       \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
       \@tfor \@tempa :=#2\do
                        {\if\@tempa h\advance\@tempcnta \@ne\fi
                         \if\@tempa t\advance\@tempcnta \tw@\fi
                         \if\@tempa b\advance\@tempcnta 4\relax\fi
                         \if\@tempa p\advance\@tempcnta 8\relax\fi
         }\global\count\@currbox\@tempcnta}\@fltovf\fi
    \global\setbox\@currbox\vbox\bgroup
    \def\baselinestretch{1}\@normalsize
    \boxmaxdepth\z@
    \hsize\columnwidth \@parboxrestore}


\long\def\@caption#1[#2]#3{%
  \par
  \addcontentsline{\csname ext@#1\endcsname}{#1}%
   {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}%
  \begingroup
   \@parboxrestore
   \if@minipage
   \@setminipage
   \fi
   \normalsize
   \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}

\long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth \@parboxrestore
   \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
    {\rule{\z@}{\footnotesep}\ignorespaces
      #1\strut}}}


\def\dept#1{\gdef\@dept{#1}}
\def\principaladviser#1{\gdef\@principaladviser{#1}}
\def\submitdate#1{\gdef\@submitdate{#1}}
\def\copyrightyear#1{\gdef\@copyrightyear{#1}} % \author, \title in report
\def\degrees#1{\gdef\@degrees{#1}}
\def\abstract#1{\def\@abstract{#1}}
\def\@title{}\def\@author{}\def\@dept{computer science}
\def\@principaladviser{}
\def\@degrees{}
\def\@abstract{}
\def\vita#1{\gdef\@vita{#1}}
\def\@vita{}

\def\@submitdate{\ifcase\the\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space \number\the\year}
\ifnum\month=12
    \@tempcnta=\year \advance\@tempcnta by 1
    \edef\@copyrightyear{\number\the\@tempcnta}
\else
    \def\@copyrightyear{\number\the\year}
\fi
\newif\ifcopyright \newif\iffigurespage \newif\iftablespage
\copyrighttrue \figurespagetrue \tablespagetrue

\newif\ifphd
\phdtrue


%FRW  fix for 2e over 2.09
%
\def\signline#1{\\
                \rule{2.5in}{0.5pt}\\
                 {\small #1} \\}


\def\@member{}
\def\member#1{\expandafter\def\expandafter\@member\expandafter
{\@member{\signline{#1\ (Member)}}}}

\def\titlep{%
        \def\baselinestretch{2.0}\@normalsize
        \thispagestyle{empty}%
        \begin{center}
                {\large\bf\uppercase\expandafter{\@title}}
        \end{center}
        \renewcommand{\baselinestretch}{1.0}\@normalsize
        \begin{center}
                 by\\
                \vspace{18pt}
                \@author\\
                \@degrees\\
        \end{center}
        \vfill
        \begin{center}
                A \ifphd Dissertation \else Thesis \fi Submitted to the Faculty of\\
                Old Dominion University in Partial Fulfillment of the\\
                Requirements for the Degree of\\
                \vspace{18pt}
                \ifphd \uppercase{Doctor of Philosophy} \else \uppercase{Master of Science}\fi \\
                \vspace{18pt}
                \uppercase\expandafter{\@dept}\\
                \vspace{18pt}
                \uppercase{Old Dominion University}\\
                \@submitdate\\
        \end{center}
        \vfill
        \hfill\parbox[t]{2.5in}{Approved by:\\
                                \signline{\@principaladviser\ (Director)}
                                \@member}
        \vfill\newpage}


\def\abstractpage{\def\baselinestretch{1.3}\@normalsize\pagestyle{empty}%
        \begin{center}
                {\large\bf ABSTRACT}\\
                \vspace{18pt}
                \renewcommand{\baselinestretch}{1.0}\@normalsize
                {\large\uppercase\expandafter{\@title}}\\
                \vspace{18pt}
                \@author\\
                Old Dominion University, \number\the\year\\
                Director: Dr. \@principaladviser\\
        \end{center}
        \par
        \@abstract
        \vfill\newpage}

\def\vitapage{\def\baselinestretch{1.3}\@normalsize\pagestyle{myheadings}
              \chapter*{VITA}
              \addtocontents{toc}{\vspace*{12pt}}
              \addcontentsline{toc}{chapter}{VITA}
              \begin{flushleft}
                 \@author\\
                 Department of \@dept \\
                 Old Dominion University \\
                 Norfolk, VA 23529
              \end{flushleft}
              \par
              \@vita
              \vfill
              \begin{flushleft}
                 Typeset using \LaTeX .
              \end{flushleft}}



\def\copyrightpage{%
        \pagestyle{myheadings}
        \vspace*{2in}
        \begin{center}
                Copyright,\ \@copyrightyear,\ by
                \@author,\
                All Rights Reserved.
        \end{center}
        \vfill\newpage}


\def\beforepreface{
        \pagenumbering{roman}
        \pagestyle{empty}
        \newpage
        \titlep
      \cleardoublepage
        \abstractpage
      \cleardoublepage
        \ifcopyright\copyrightpage\fi }


\def\prefacesection#1{%
      \pagestyle{myheadings}
      \cleardoublepage
        \def\baselinestretch{1.3}\@normalsize
        \chapter*{#1}}

\def\afterpreface{\cleardoublepage
        \def\baselinestretch{1}\@normalsize
        \tableofcontents

        \cleardoublepage
        \iftablespage
                {\addvspace{10pt}
                \let\saveaddvspace=\addvspace
                \def\addvspace##1{}
                \listoftables
                \let\addvspace=\saveaddvspace
                \addcontentsline{toc}{chapter}{\uppercase{List of Tables}}
                \let\addvspace=\saveaddvspace}
                \cleardoublepage
        \fi
        \iffigurespage
                {\addvspace{10pt}
                \let\saveaddvspace=\addvspace
                \def\addvspace##1{}
                \listoffigures
                \addcontentsline{toc}{chapter}{\uppercase{List of Figures}}
                \let\addvspace=\saveaddvspace}
                \cleardoublepage
        \fi
        \def\baselinestretch{1.3}\@normalsize
        \pagenumbering{arabic}
        \pagestyle{myheadings}
        \labelchaptersintableofcontents}

\def\tableofcontents{\pagestyle{myheadings}\chapter*{Table of Contents}
 \@starttoc{toc}
 \addtocontents{toc}{\hfill Page\par}}

\def\listoffigures{\chapter*{List of Figures}
 %\newline
 {\setlength{\parskip}{12\p@}
  \@starttoc{lof}}
 \addtocontents{lof}{\noindent Figure\hfill Page\par}}

\renewcommand*\l@figure{\@dottedtocline{1}{0em}{2.3em}}

\renewcommand*\l@table{\@dottedtocline{1}{0em}{2.3em}}


\def\listoftables{\chapter*{List of Tables}
 {\setlength{\parskip}{12\p@} \@starttoc{lot}}
 \addtocontents{lot}{\noindent Table\hfill Page\par}}

% Start with pagestyle{myheadings} in case front matter isn't processed
\pagestyle{myheadings}
\markboth{}{}

%
% FRW added custom footnote without number for document style phrase
%
\def\nnfootnote{%
     \@ifnextchar [\@xfootnotenext
       {\protected@xdef%
%       \@thefnmark{\thempfn}%   removed the number from FOOTNOTETEXT command:
        \@thefnmark{ }%
    \@footnotetext}}
%
\renewcommand{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi
%                   \thispagestyle{myheadings}%
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter}%
                         \addcontentsline{toc}{chapter}%
                                   {\protect\numberline{\thechapter.}\uppercase{#1}}%
                    \else
                      \addcontentsline{toc}{chapter}{\uppercase{#1}}%
                    \fi
                    %\chaptermark{#1}%
                    %\addtocontents{lof}{\protect\addvspace{10\p@}}%
                    %\addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
\def\@makechapterhead#1{%
%  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \renewcommand{\baselinestretch}{2}
    \ifnum \c@secnumdepth >\m@ne
%        \centerline{\large\bfseries \@chapapp\space \thechapter}
        \begin{center}
        \large\bfseries \@chapapp\space \thechapter
        \end{center}
        \par\nobreak
        \vskip 12\p@
    \fi
    \interlinepenalty\@M
 %    \centerline{\large \bfseries \uppercase{#1}}\par\nobreak
    \begin{center}
    \large \bfseries \uppercase{#1}
    \end{center}
    \vskip 18\p@
  }}
\def\@schapter#1{\if@twocolumn
                   \@topnewpage[\@makeschapterhead{#1}]%
                 \else
                   \@makeschapterhead{#1}%
                   \@afterheading
                 \fi}
\def\@makeschapterhead#1{%
  %\vspace*{50\p@}%
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
 %   \centerline{
     \begin{center}
     \large \bfseries  \uppercase{#1}
     \end{center}
     \par\nobreak
   \vskip 18\p@
  }}

\renewcommand{\section}{
                    \secdef\@section\@ssection}
\def\@section[#1]#2{\ifnum \c@secnumdepth >\m@ne
                         \refstepcounter{section}%
                         \addcontentsline{toc}{section}%
                                   {\protect\numberline{\thesection}\uppercase{#1}}%
                    \else
                      \addcontentsline{toc}{section}{\uppercase{#1}}%
                    \fi
                       \@makesectionhead{#2}%
                     }
\def\@makesectionhead#1{%
        \vskip 12\p@
         {\bfseries \noindent \thesection\space\parbox[t]{5.5in}{\raggedright\uppercase{#1}}}
        \vskip 12\p@
  }
\def\@ssection#1{
                   \@makessectionhead{#1}%
                 }
\def\@makessectionhead#1{%
        \vskip 12\p@
     {\bfseries \noindent \raggedright\uppercase{#1}}
   \vskip 12\p@
  }

\renewcommand{\subsection}{
                    \secdef\@subsection\@ssubsection}
\def\@subsection[#1]#2{\ifnum \c@secnumdepth >\m@ne
                         \refstepcounter{subsection}%
                         \addcontentsline{toc}{subsection}%
                                   {\protect\numberline{\thesubsection}\uppercase{#1}}%
                     \fi
                    %\chaptermark{#1}%
                    %\addtocontents{lof}{\protect\addvspace{10\p@}}%
                    %\addtocontents{lot}{\protect\addvspace{10\p@}}%
                       \@makesubsectionhead{#2}%
                     }
\def\@makesubsectionhead#1{%
        \vskip 12\p@
        {\bfseries \noindent \raggedright\thesubsection\space\uppercase{#1}}
        \vskip 12\p@
  }
\def\@ssection#1{
                   \@makessubsectionhead{#1}%
                 }
\def\@makessubsectionhead#1{%
        \vskip 12\p@
     {\bfseries \noindent \raggedright\uppercase{#1}}
   \vskip 12\p@
  }
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1. #2}%
  \ifdim \wd\@tempboxa >\hsize
    #1. #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}


\newcommand{\labelchaptersintableofcontents}{%
     \addtocontents{toc}{\vspace*{12pt}}
    \addtocontents{toc}{\noindent Chapter}
              \addtocontents{toc}{} }
\newcommand{\labelappendicesintableofcontents}{%
     \addtocontents{toc}{\vspace*{12pt}}
     \addtocontents{toc}{\noindent APPENDICES}
     \addtocontents{toc}{}}
\renewcommand{\appendix}{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \labelappendicesintableofcontents%
  \gdef\@chapapp{\appendixname}%
  \gdef\thechapter{\@Alph\c@chapter}}
\renewcommand*\l@chapter[2]{%
  \ifnum \c@tocdepth >\m@ne
    \addpenalty{-\@highpenalty}%
    \vskip 1.0em \@plus\p@
    \setlength\@tempdima{1.5em}%
    \begingroup
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode %\bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\nobreak\dotfill \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
      \penalty\@highpenalty
    \endgroup
  \fi}
  • Welcome to TeX.SX! Please provide a minimal working example (MWE)](meta.tex.stackexchange.com/q/228) demonstrating the problem. – Andrew Swann Dec 2 '14 at 20:06
  • the format of the longtable caption (\LT@caption and friends) is not the same as what is produced by many of the variations on \caption and this is the source of the discrepancy. to be more precise requires knowledge of what document class you're using, and any other packages that may join in this conspiracy. – barbara beeton Dec 2 '14 at 20:36
  • M.W.E. added along with the .sty used – mkunkel Dec 2 '14 at 20:43
  • you are using \begin{table}[h!] (which would be better as \begin{table}[ht!] but the package you are using redefines the float handling (to go back 20 years to code based on latex2.09) and disables the ! feature (and other things) actually more than 20 years the boxmaxdepth line was commented out of the original in december 1987. Why would you use these macros now??????? – David Carlisle Dec 3 '14 at 0:29
  • I was switching between platforms while writing. A few of my distributions were running old verions of linux, with old latex code while other platforms were modern Mac and latex. – mkunkel Dec 3 '14 at 15:51
3

The package you are using adds a ' so you can do the same to LT version after loading longtable:

\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{\thetable.}{#2}}}%
  \fi}
\makeatother
  • Thank you. This fix works with the M.W.E. however when applied to my dissertation does not fix the problem. Advice? – mkunkel Dec 2 '14 at 23:44
  • @mkunkel there are some definitions in your document that are conflicting. standard advice applies start with a copy of the document and delete everything that can be deleted checking at each stage the problem is there. the last thing you delete that makes the problem go away is the cause of the problem.... – David Carlisle Dec 2 '14 at 23:50

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.