我正在制作一篇论文,其中一张表格必须使用软件包longtable
,经过一番努力,我几乎完成了这张表格。还剩下一个问题,表格的标题/标题太小,与其他表格不对齐(这些其他表格不是用 制作的,longtable
而是用 制作的tabular
)。我几乎完全使用了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}
一开始我想也许我可以排除\begin{center}
,\end{center}
但不幸的是,这没有帮助。谢谢你的回复。PS:我还截取了我的问题的屏幕截图!!第一页是用 tablurx 制作的一张好表格,第二页(分页符后)肯定是我的长表,但正如你所见,标题比第一个表格的标题小。
答案1
长表标题的宽度\LTcapwidth
默认设置为 4 英寸,如果您想要不同的设置,可以\setlength\LTcapwidth{\textwidth}
按照文档中所述进行更改。