如何将 sidewaystable 环境与长表结合起来?

如何将 sidewaystable 环境与长表结合起来?

我的文档中有一个大的横向表格。为此,我使用了来自包的sidewaystable和。但是,当我创建一个横向表格时,有 2 页或更多页,环境无法正常工作。我读到并发现使用来自 de 包的环境是个好主意(我测试过并且有效),但是环境不会像它那样创建浮动。有人能帮我吗?我真的想改用sidewaysfigurerotatingsidewaystablelandscapepdflscapelandscapesidewaystablesidewaystablelandscape

MWE 与sidewaystable

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage[%
    left=3.00cm,
    right=2.00cm,
    top=3.00cm,
    bottom=2.00cm
]{geometry}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{pdflscape}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{array}
\usepackage{makecell}
\usepackage{ltablex}
\usepackage{threeparttable}
\usepackage[referable]{threeparttablex}
\usepackage{blindtext}
\begin{document}

\begin{sidewaystable}
\begin{ThreePartTable}
\footnotesize
\centering
\begin{tabularx}{\linewidth}{c*{3}{>{\raggedright\arraybackslash}X}c}
\caption{Caption}\\%
\midrule
\textbf{Head 1}&%
\textbf{Head 2}&%
\textbf{Head 3}&%
\textbf{Head 4}&%
\textbf{\makecell{Head 5.1\\Head 5.2}}\\%
\midrule
\endfirsthead
%
\multicolumn{5}{l}{\tablename\ \thetable~--~continued from previous page}\\
\midrule
\textbf{Head 1}&%
\textbf{Head 2}&%
\textbf{Head 3}&%
\textbf{Head 4}&%
\textbf{\makecell{Head 5.1\\Head 5.2}}\\%
\midrule
\endhead
%
\midrule
\multicolumn{5}{r}%
{Continued on next page...}
\endfoot
%
\midrule
\endlastfoot
%
&\blindtext&&\blindtext& \\
&\blindtext&&\blindtext& \\
&\blindtext&&\blindtext& \\

\end{tabularx}
\end{ThreePartTable}
\end{sidewaystable}
\end{document}

在此处输入图片描述

MWE 与landscape

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage[%
    left=3.00cm,
    right=2.00cm,
    top=3.00cm,
    bottom=2.00cm
]{geometry}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{pdflscape}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{array}
\usepackage{makecell}
\usepackage{ltablex}
\usepackage{threeparttable}
\usepackage[referable]{threeparttablex}
\usepackage{blindtext}
\begin{document}

\begin{landscape}
\begin{ThreePartTable}
\footnotesize
\centering
\begin{tabularx}{\linewidth}{c*{3}{>{\raggedright\arraybackslash}X}c}
\caption{Caption}\\%
\midrule
\textbf{Head 1}&%
\textbf{Head 2}&%
\textbf{Head 3}&%
\textbf{Head 4}&%
\textbf{\makecell{Head 5.1\\Head 5.2}}\\%
\midrule
\endfirsthead
%
\multicolumn{5}{l}{\tablename\ \thetable~--~continued from previous page}\\
\midrule
\textbf{Head 1}&%
\textbf{Head 2}&%
\textbf{Head 3}&%
\textbf{Head 4}&%
\textbf{\makecell{Head 5.1\\Head 5.2}}\\%
\midrule
\endhead
%
\midrule
\multicolumn{5}{r}%
{Continued on next page...}
\endfoot
%
\midrule
\endlastfoot
%
&\blindtext&&\blindtext& \\
&\blindtext&&\blindtext& \\
&\blindtext&&\blindtext& \\

\end{tabularx}
\end{ThreePartTable}
\end{landscape}
\end{document}

在此处输入图片描述 在此处输入图片描述 在此处输入图片描述

相关内容