[Tex/LaTex] Caption of table is too small and does not align with other captions of tables

captionslongtabletables

I am making a paper and for one table I have to use the longtable package, after struggling a lot I am almost done with this table. One problem left, the caption does/header of the table is too small and does not align with the other tables (these other tables are not made with longtable but with tabular). I used almost exactly the example on https://stackoverflow.com/questions/2896833/how-to-stretch-a-table-over-multiple-pages

  \documentclass[12pt]{article}

  % input Marco 
  \setlength{\parindent}{30pt}
  \usepackage{perpage} %the perpage package
  \MakePerPage{footnote} %the perpage package command
  \usepackage{rotating}
  \usepackage{longtable}

  % Standard list of included packages
  \usepackage{setspace}           % Allows easy changes to line spacing 
  \usepackage{graphicx}           % Allows including of graphics files
  \usepackage{amsmath}            % Additional math capabilities
  \usepackage{tabularx}
  \usepackage{longtable}
  \usepackage{multirow} 
  \usepackage{array}
  \usepackage{nth}
  \usepackage{multicol}
  \usepackage{versionPO}          % Include text conditionally
  \usepackage{marginnote}         % Used with todonotes package
  \usepackage{datetime}           % Allows formatting of date and time
  \usepackage{enumitem}           % Change formatting of lists
  \usepackage{subfigure}          % Create numbered and captioned subfigures
  \usepackage{rotating}           % Create landscape tables and figures
  \usepackage{hyperref}           % URLS and hyperlinks
  \usepackage{float}              % Activate [H] option to place figure HERE

  \usdate  % Use usual LaTeX date layout
  % Packages included specifically for this document.
  \usepackage{texintro}           % Document-specific definitions
  \usepackage{tocvsec2}           % More flexible formatting of table of contents
  \usepackage[longnamesfirst]{natbib} % Bibliography formatting
  \usepackage{bibentry}           % Print full citation in text
    \nobibliography*                                % Allow use of \bibentry
    \usepackage[retainorgcmds]{IEEEtrantools}  % Equation formatting. Option needed
    % to
                                     % allow enumitem to work.    

    % Notes options
    \ifnotes{%
    \usepackage[margin=1in,paperwidth=10in,right=2.5in]{geometry}%
    \usepackage[textwidth=1.4in,shadow,colorinlistoftodos]{todonotes}%
    }{%
    \usepackage[margin=1in]{geometry}%
    \usepackage[disable]{todonotes}%

    \begin{document}
    \begin{center}
    \begin{longtable}{lccccc}
    \caption{{\bf Cointegration}\newline In ....
    \hline \multicolumn{1}{c}{\textbf{Intercept}} & \multicolumn{1}{c}{Max. rank} &
                       multicolumn{1}{c}{Parameters} 
    & \multicolumn{1}{c}{Eigenvalue}
    & \multicolumn{1}{c}{T-stat}
    & \multicolumn{1}{c}{5\% Crit. value}
    \\ \hline
    \endfirsthead   

    \multicolumn{3}{c}%
    {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
    \hline \multicolumn{1}{c}{\textbf{Slope}} & \multicolumn{1}{c}{Max. rank} &  

    \multicolumn{1}{c}{Parameters}  
    & \multicolumn{1}{c}{Eigenvalue}
    & \multicolumn{1}{c}{T-stat}
    & \multicolumn{1}{c}{5\% Crit. value}
    \\ \hline
    \endhead

    \hline \multicolumn{3}{c}{{Continued on next page}} \\ \hline
    \endfoot

    \hline 
    \endlastfoot

   % \(then my results)    

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

First I thought may be I can exclude \begin{center} and \end{center} but unfortunately, it did not help. Thanks for your response. PS: I also made a screenshot of my problem!! Where on the first page is a good table made with tablurx and on the second page (after the pagebreak) there must be my longtable, but as you can see the caption is smaller than the caption of the first table.

enter image description here

Best Answer

Longtable captions are set to the width \LTcapwidth which defaults to 4in If you want a different setting you can change this with \setlength\LTcapwidth{\textwidth} as it says in the documentation.

Related Question