我一直在努力使长(有时是宽)的表格和大量的脚注正常工作。
基本上,我使用 MultiMarkdown 生成许多表格,它使用tabulary
内部minipage
和内部的包生成表格table
(可能作为一种解决方法,以允许在表格内使用常规脚注),通常具有以下结构:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabulary}
\usepackage{booktabs}
\begin{document}
\begin{table}[htbp]
\begin{minipage}{\linewidth}
\setlength{\tymax}{0.5\linewidth}
\centering
\small
\caption{Long table caption\footnote{test}.\label{long}}\\
\begin{tabulary}{\textwidth}{@{}ll@{}} \toprule
Something\footnote{test} & something else\\
\midrule
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
\bottomrule
\end{tabulary}
\end{minipage}
\end{table}
\end{document}
这些表格通常在一定长度内工作正常,但它们不会跨页,如果脚注太多,它们会被推离页面。我可以绕过其中一些限制,而无需重写 LaTeX 代码,只需将它们放在 -environment 中\begin{landscape}
并修改页面样式和几何形状即可:
\newgeometry{margin=1cm}
\begin{landscape}
\thispagestyle{plain}
... the actual table...
\end{landscape}
\restoregeometry{}
\reversemarginpar{}
但这种解决方法只适用于可以通过增加宽度来缩短长度的表格。因此,我实际上正在寻找一种解决方法,需要对 MultiMarkdown 生成的 LaTeX 代码进行最少的操作(理想情况下,使用一个我可以简单地包裹生成的表格的环境),在寻找使这些表格正常工作的方法时,我遇到了和之间的这种特殊bigfoot
不兼容性longtable
:
在尝试手动转换tabulary
为支持跨页分页的表格格式时,我读到它longtable
具有良好的脚注支持。目前,我避免使用 -package tabu
,因为我读到它没有维护,而且我不太好用tablex
(例如与 一起使用ltablex
,但我读到过其他选项)。
longtable
目前,我正在尝试将-package 与 一起使用pdflscape
,但我注意到当我使用 -package 时它无法编译bigfoot
:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage{bigfoot}
\begin{document}
\begin{landscape}
\begin{longtable}[c]{| c | c |}
\caption{Long table caption.\label{long}}\\
\hline
\multicolumn{2}{| c |}{Begin of Table}\\
\hline
Something & something else\\
\hline
\endfirsthead
\hline
\multicolumn{2}{|c|}{Continuation of Table \ref{long}}\\
\hline
Something & something else\\
\hline
\endhead
\hline
\endfoot
\hline
\multicolumn{2}{| c |}{End of Table}\\
\hline\hline
\endlastfoot
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
Lots of lines \footnote{test} & like this \footnote{test}\\
\end{longtable}
\end{landscape}
\end{document}
在本地机器上,它有时会经过很长时间才能编译(而在 Overleaf 上总是超时),并出现错误消息和数千页的 PDF:
!TeX 容量超出,抱歉 [主内存大小=5000000]。 \footinsdefault l.76 很多行 \footnote{test} & 像这样 \footnote{test}\ 如果您确实需要更多容量,可以请向导帮我扩大。
但是,如果我注释掉,MWE 可以在本地机器和 Overleaf 上很好地编译\usepackage{bigfoot}
。
我尝试过使用footmisc
带有para
选项(\usepackage[para]{footmisc}
)的包,但脚注会完全消失并且脚注标记会覆盖,导致页面左下角出现一个大黑块。
我认为这些问题可能与这些包的维护者有关(特别是bigfoot
和之间的错误longtable
),但我很乐意为我实际遇到的 MultiMarkdown 生成的表的问题找到一个简单但稳定的方法。