关于伪代码和表格宽度的设置 Latex

发布时间 2023-05-06 20:49:50作者: Johannie

伪代码设置

表格列宽调整

(20条消息) Latex更改表格列宽的办法(可以实现不同列设置不同列宽)latex 表格宽度慢下去、静下来的博客-CSDN博客

  • 采用box

  • 采用\setlength,每个列宽都一样

  • 采用\resizebox

长表格列宽调整

\setlength\LTleft{-1.8in}
\setlength{\tabcolsep}{22pt}
%手动调整的
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\begin{longtable}[H]{P{.1\textwidth} P{.45\textwidth} P{.45\textwidth}}

 \caption{Confusion} \\
 
 \toprule
 \endfirsthead
 \multicolumn{3}{c}%
 {\tablename\ \thetable\ -- \textit{ Continued from previous page}} \\
 
\toprule
 \endhead
 \hline \multicolumn{3}{l}{\textit{ Continued on next page}} \\
 
 \endfoot
 \hline
 \endlastfoot
{\textbf{Algorithm}} & {\textbf{Confusion matrix}} & {\textbf{Description}} \\、
......
 \midrule
\end{longtable}