표에 각주를 두 개 이상 넣고 싶습니다. 이것이 제대로 작동하도록 하는 가장 좋은 방법은 무엇입니까?

표에 각주를 두 개 이상 넣고 싶습니다. 이것이 제대로 작동하도록 하는 가장 좋은 방법은 무엇입니까?

표에 각주를 두 개 이상 넣고 싶습니다. 그러나 첫 번째 \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} 

여기에 이미지 설명을 입력하세요

관련 정보