我在使用 latex 时遇到了问题longtable
。我的问题是我无法longtable
正确调整单元格。下面是我的longtable
示例:
\usepackage{float}
\usepackage{longtable}
\usepackage{afterpage}
\usepackage{array}
\usepackage{makecell}
\usepackage[bottom]{footmisc}
\usepackage{seqsplit}
\usepackage{verbatim}
\usepackage{url}
\usepackage{minitoc}
\usepackage[title]{appendix}
\usepackage{footmisc}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}
\renewcommand{\thefigure}{\arabic{figure}}
\newcommand\tab[1][1.25cm]{\hspace*{#1}}
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\usepackage{titletoc}% http://ctan.org/pkg/titletoc
\titlecontents*{chapter}% <section-type>
[0pt]% <left>
{}% <above-code>
{\bfseries\chaptername\ \thecontentslabel\quad}% <numbered-entry-format>
{}% <numberless-entry-format>
{\bfseries\hfill\contentspage}% <filler-page-format>
\let\origaddvspace\addvspace
\renewcommand{\addvspace}[1]{}
\addto{\captionsfrench}{% Making babel aware of special titles
\renewcommand{\mtctitle}{Plan}
}
\pagenumbering{arabic}
\setcounter{page}{1}
\newpage
\begin{longtable}{|p{0.05\linewidth}|p{0.1\linewidth}|p{0.25\linewidth}|p{0.45\linewidth}|}
\hline
\centering &\centering Test & \centering Description & \centering Service
\tabularnewline
\endhead
\hline
1&testFoundingAllCertificateWithPrivateKey & &CertificateService.extractAllCertificates() \\
\hline
2& testRetrieveCertificateWithNonInitializedKeyStore & & CertificateService.extractAllCertificates()\\
\hline
3& & &CertificateService.signDataCMS() \\
\hline
4& & &CertificateService.signDataCMS() \\
\hline
5& & &CertificateService.signDataCMS() \\
\hline
6& & &CertificateService.signDataCMS() \\
\hline
7& & &CertificateService.signDataCMS() \\
\hline
\caption{Les tests unitaires}
\end{longtable}
\end{document}
有没有什么方法可以自动调整文本?