
표에 각주를 두 개 이상 넣고 싶습니다. 그러나 첫 번째 \footnotetext
. 이것이 제대로 작동하도록 하는 가장 좋은 방법은 무엇입니까?
\documentclass{article}
\begin{document}
\ \vfill\
\begin{tabular}{|r|l|}
\hline
First & footnote.\footnotemark \\
Second & footnote.\footnotemark \\
Third & footnote.\footnotemark \\
\hline
\end{tabular}
\footnotetext{First} \footnotetext{Second} \footnotetext{Third}
Fourth footnote.\footnote{Four}
\
\end{document}
답변1
\footnotemark
카운터 값은 증가 하지만 사용 footnote
하면 동기화가 해제됩니다 .\footnotetext
footnote
카운터 를 재설정해야 합니다.~ 후에환경 tabular
을 국가에~ 전에. 이 작업은 수동으로 수행할 수 있지만 값이 변경되거나 더미 카운터를 사용하여 수행되면 지루해질 수 있습니다. 더미 카운터는 footnote
이전에 카운터를 보유했다 tabular
가 이후에 원래 숫자로 복원됩니다 tabular
(여기서 패키지의 명령을 사용하여 수행 \AtBeginEnvironment
하고 \AfterEndEnvironment
명령을 사용하여 etoolbox
복원).
그러나 \footnotetext
는 증가하지 않습니다 footnote
. -- 접근 방식 을 사용하거나 이 단계를 자동으로 수행하는 pretocmd
래퍼 매크로를 사용하십시오 . \myfootnotetext
(아니면 수동으로 하세요.)
\documentclass{article}
\newcommand{\myfootnotetext}[1]{%
\stepcounter{footnote}\footnotetext{#1}%
}
\newcounter{dummycounter}
\usepackage{etoolbox}
\AtBeginEnvironment{tabular}{%
\setcounter{dummycounter}{\value{footnote}}%
}
\AfterEndEnvironment{tabular}{%
\setcounter{footnote}{\value{dummycounter}}%
}
\begin{document}
\begin{tabular}{|r|l|}
\hline
First & footnote.\footnotemark \\
Second & footnote.\footnotemark \\
Third & footnote.\footnotemark \\
\hline
\end{tabular}
\myfootnotetext{First}
\myfootnotetext{Second} \myfootnotetext{Third}
Fourth footnote.\footnote{Four}
%\
\end{document}
답변2
table
환경 사용을 고려하려는 경우 tablefootnote
패키지가 문제를 해결합니다.
\documentclass[colorlinks]{article}%
\usepackage{footnotebackref}
\usepackage{tablefootnote}
\begin{document}
\mbox{}\vfill
A first footnote\footnote{First}
\begin{table}[htbp]
\renewcommand\arraystretch{1.5}
\begin{tabular}{|r|l|}
\hline
First & footnote.\tablefootnote{Second} \\
Second & footnote.\tablefootnote{Third} \\
Third & footnote.\tablefootnote{Fourth} \\
\hline
\end{tabular}
\end{table}
Fifth footnote.\footnote{Fifth}
\end{document}