如何让 mdframed 中的 longtable 显示比 firsthead 更多的内容?

如何让 mdframed 中的 longtable 显示比 firsthead 更多的内容?

我有一个文档,它tabular/tabulary使用 mdframed 包裹表格(或者更确切地说是)。无论表格是内联显示还是浮动到另一页(table*显然是 mdframed 在内),它都能很好地工作,我对结果很满意。

但是,当我尝试使用 换行时longtablemdframed效果并不理想。表格按预期在页面末尾断开,但我没有获得辅助页眉和页脚。

  • 也不适用于longtabu或其他longtable风格的黑客(例如ltabulary)。
  • tcolorbox当包围时也不起作用longtable

在下面的例子中:

  • 第 1 章显示了longtable我所期望的内容(“下页继续...”,“...上页继续”,带有列标题)。
  • 第 2 章显示相同的longtable内容mdframed(请注意,第一页后没有“继续”注释,也没有列标题)。
  • 第 3 章和第 4 章展示了文本的样子,以供比较(可能重要也可能不重要)

longtable当包裹时,如何显示次要的头部和脚部mdframed

梅威瑟:

\documentclass{report}
\usepackage{lipsum}
\usepackage{longtable}
\usepackage{mdframed}

\begin{document}
\chapter{Table, no mdframed}
\input{ltab}
\chapter{Table, mdframed}
\begin{mdframed}[frametitle={Table Sample mdframed}]
\input{ltab}
\end{mdframed}
\chapter{Text, no mdframed}
\lipsum[1-4]
\chapter{Text, mdframed}
\lipsum[5]
\begin{mdframed}[frametitle={Text Sample mdframed}]
\lipsum[6-8]
\end{mdframed}
\end{document}

MWE ltab.tex:

\begin{longtable}{clr}
\textbf{d\%} & \textbf{Text Column} & \textbf{Page} \\
\endfirsthead

\multicolumn{3}{l}{\emph{... continued from previous page}} \\
\textbf{d\%} & \textbf{Text Column} & \textbf{Page} \\
\endhead

\multicolumn{3}{r}{\emph{continued on next page...}} \\
\endfoot
\endlastfoot

1--1 & text column & 1 \\
2--2 & text column & 2 \\
3--3 & text column & 3 \\
4--4 & text column & 4 \\
5--5 & text column & 5 \\
6--6 & text column & 6 \\
7--7 & text column & 7 \\
8--8 & text column & 8 \\
9--9 & text column & 9 \\
10--10 & text column & 10 \\
11--11 & text column & 11 \\
12--12 & text column & 12 \\
13--13 & text column & 13 \\
14--14 & text column & 14 \\
15--15 & text column & 15 \\
16--16 & text column & 16 \\
17--17 & text column & 17 \\
18--18 & text column & 18 \\
19--19 & text column & 19 \\
20--20 & text column & 20 \\
21--21 & text column & 21 \\
22--22 & text column & 22 \\
23--23 & text column & 23 \\
24--24 & text column & 24 \\
25--25 & text column & 25 \\
26--26 & text column & 26 \\
27--27 & text column & 27 \\
28--28 & text column & 28 \\
29--29 & text column & 29 \\
30--30 & text column & 30 \\
31--31 & text column & 31 \\
32--32 & text column & 32 \\
33--33 & text column & 33 \\
34--34 & text column & 34 \\
35--35 & text column & 35 \\
36--36 & text column & 36 \\
37--37 & text column & 37 \\
38--38 & text column & 38 \\
39--39 & text column & 39 \\
40--40 & text column & 40 \\
41--41 & text column & 41 \\
42--42 & text column & 42 \\
43--43 & text column & 43 \\
44--44 & text column & 44 \\
45--45 & text column & 45 \\
46--46 & text column & 46 \\
47--47 & text column & 47 \\
48--48 & text column & 48 \\
49--49 & text column & 49 \\
50--50 & text column & 50 \\
51--51 & text column & 51 \\
52--52 & text column & 52 \\
53--53 & text column & 53 \\
54--54 & text column & 54 \\
55--55 & text column & 55 \\
56--56 & text column & 56 \\
57--57 & text column & 57 \\
58--58 & text column & 58 \\
59--59 & text column & 59 \\
60--60 & text column & 60 \\
61--61 & text column & 61 \\
62--62 & text column & 62 \\
63--63 & text column & 63 \\
64--64 & text column & 64 \\
65--65 & text column & 65 \\
66--66 & text column & 66 \\
67--67 & text column & 67 \\
68--68 & text column & 68 \\
69--69 & text column & 69 \\
70--70 & text column & 70 \\
71--71 & text column & 71 \\
72--72 & text column & 72 \\
73--73 & text column & 73 \\
74--74 & text column & 74 \\
75--75 & text column & 75 \\
76--76 & text column & 76 \\
77--77 & text column & 77 \\
78--78 & text column & 78 \\
79--79 & text column & 79 \\
80--80 & text column & 80 \\
81--81 & text column & 81 \\
82--82 & text column & 82 \\
83--83 & text column & 83 \\
84--84 & text column & 84 \\
85--85 & text column & 85 \\
86--86 & text column & 86 \\
87--87 & text column & 87 \\
88--88 & text column & 88 \\
89--89 & text column & 89 \\
90--90 & text column & 90 \\
91--91 & text column & 91 \\
92--92 & text column & 92 \\
93--93 & text column & 93 \\
94--94 & text column & 94 \\
95--95 & text column & 95 \\
96--96 & text column & 96 \\
97--97 & text column & 97 \\
98--98 & text column & 98 \\
99--99 & text column & 99 \\
100--100 & text column & 100 \\

\end{longtable}

相关内容