footnotemark 相当于 tablefootnote - 多次引用/使用同一个脚注

footnotemark 相当于 tablefootnote - 多次引用/使用同一个脚注

可以选择使用 footnotemark 在脚注中标记相同的交叉引用。

我可以对 tablefootnote 做同样的事情吗?

梅威瑟:

\documentclass{article}

\usepackage{tablefootnote}



\begin{document}

\begin{tabular}{l}
This is the first line........\tablefootnote{according to amitha}\\
This is second line where I have same footnote \tablefootnote{according to amitha}
\end{tabular}

Here for footnote\footnote{\label{mark}Here its working fine}, here is an optiion
\footnotemark[\ref{mark}].


\end{document}

答案1

回答之前,让我来解释一下为什么你的 MWE 永远无法工作。根据文档第 3tablefootnote(表格脚注.pdf)

如果在表格环境中使用 \tablefootnote{...},而该表格环境位于(横向)表格环境内,则一切正常,但是当表格环境不在(横向)表格内时,tablefootnote 将不起作用。


据我所知,没有直接等效于\footnote使用\footnotemark[...]tablefootnote包的方法。但是,您可以模拟它。首先,我提供了直接方法,其次,是命令快捷方式。(图片已裁剪以减少空间)

\documentclass{article}

\usepackage{tablefootnote}
\usepackage{refcount}

\begin{document}

First footnote\footnote{\label{mark1}First standard footnote}, 
here is another reference to the first standard footnote \footnotemark[\getrefnumber{mark1}].

\begin{table}[h!]
    \begin{tabular}{l}
    \hline
    This is the 
    first line........\tablefootnote{first table footnote\label{reference footnote}} \\
    %%%%%%%%%%%
    This is second line where I have 
    same first table footnote \textsuperscript{\getrefnumber{reference footnote}} \\
    %%%%%%%%%%%
    This is the 
    third line........\tablefootnote{second table footnote\label{reference footnote two}} \\
    %%%%%%%%%%%
    This is fourth line where I have 
    same second table footnote \textsuperscript{\getrefnumber{reference footnote two}} \\
    \hline
    \end{tabular}
\end{table}

Last footnote\footnote{\label{mark2}Second standard footnote}, 
here is another reference to the second standard footnote \footnotemark[\getrefnumber{mark2}].

\end{document}

引用现有表格脚注的第一版

第二种方法,使用命令快捷方式:

\documentclass{article}

\usepackage{tablefootnote}

\usepackage{refcount}

\def\tablefootnotemark#1{\textsuperscript{\getrefnumber{#1}}}
%If you prefer \newcommand then use this one
%\newcommand{\tablefootnotemark}[1]{\textsuperscript{\getrefnumber{#1}}}

\begin{document}

First footnote\footnote{\label{mark1}First standard footnote}, 
here is another reference to the first standard footnote \footnotemark[\getrefnumber{mark1}].

\begin{table}[h!]
    \begin{tabular}{l}
    \hline
    This is the 
    first line........\tablefootnote{first table footnote\label{example tablefootnote one}} \\
    %%%%%%%%%%%
    This is second line where I have 
    same first table footnote \tablefootnotemark{example tablefootnote one} \\
    %%%%%%%%%%%
    This is the 
    third line........\tablefootnote{second table footnote\label{example tablefootnote two}} \\
    %%%%%%%%%%%
    This is fourth line where I have 
    same second table footnote \tablefootnotemark{example tablefootnote two} \\
    \hline
    \end{tabular}
\end{table}

Last footnote\footnote{\label{mark2}Second standard footnote}, 
here is another reference to the second standard footnote \footnotemark[\getrefnumber{mark2}].

\end{document}

引用现有表格脚注的版本二

我提供了第二个版本\newcommand,使用 ,以防您有偏好。\footnotemark[\getrefnumber{...}]当然,您可以为 创建一个类似的命令快捷方式。

相关内容