长桌溢出 ESKDX

长桌溢出 ESKDX

当我尝试以纵向方向创建longtable宽度时\linewidth,它的处理方式非常奇怪。

长桌溢出

这是 MWE

\documentclass[russian,utf8,floatsection,equationsection,reduceheight=1mm,nocolumnsxix]{eskdtext}
\usepackage{longtable, tabularx, lscape}
\usepackage[T2A]{fontenc}
\begin{document}
\newpage
Example is on the second page
\newpage
\begin{landscape}
\begin{table}[h!]
\begin{tabularx}{\linewidth}{|X|}
\hline
TabularX\\
\hline
\end{tabularx}
\end{table}
\begin{longtable}{|p{0.5\linewidth}|p{0.25\linewidth}|p{0.25\linewidth}|}
\caption{Table}\\
\hline
Head & Head & Head\\\hline
\endfirsthead
\caption*{End of table \thetable}\\
\hline
Head & Head & Head\\\hline
\endhead
\endfoot
\endlastfoot
Longtable & with & 3 cells \\
\hline
\end{longtable}
\begin{longtable}{|p{\linewidth}|}
\caption{Tabletable}\\
\hline
Head\\\hline
\endfirsthead
\caption*{End of tabletable \thetable}\\
\hline
Head\\\hline
\endhead
\endfoot
\endlastfoot
Longtable with 1 cell \\
\hline
\end{longtable}
\end{landscape}
\end{document}

你可以访问 Sagecloud 上的项目页面

答案1

\begin{longtable}{|p{\linewidth}|}

让桌子\linewidth+2\tabcolsep+2\arrayrulewidth变宽,你想要

\begin{longtable}{|p{\dimexpr\linewidth-2\tabcolsep-2\arrayrulewidth\relax}|}

相似地

\begin{longtable}{|p{0.5\linewidth}|p{0.25\linewidth}|p{0.25\linewidth}|}

太宽了 6\tabcolsep+4\arrayrulewidth

相关内容