如何使用 supertabular 引用脚注?

如何使用 supertabular 引用脚注?

我使用 supertabular 的 mpsupertabular 环境来允许脚注。基本的 \footnote 命令工作正常,尽管它使用字母而不是数字作为脚注标记。但是,当我尝试引用前一个脚注时,脚注标记呈现为数字,而不是原始脚注的字母。我尝试使用 \footnotemark[\alph{fn:sub}],但这给了我错误消息

!缺失数字,视为零。

\documentclass{article}
\usepackage{supertabular}

\begin{document}

\section {Symbols}
\label{sec:Symbols}
These macros simply generated predefined symbols in an appropriate font. Change them as appropriate for your house
style.

\bottomcaption{Symbols}
\tablefirsthead%
{
  \hline
  Macro & Definition & Meaning \\
  \hline
%  & & \\
%  \hline
}

\tablehead%
{
  \hline
  \multicolumn{3}{|c|}{\small\sl continued from previous page} \\
  \hline
  Macro & Definition & Meaning \\
  \hline
%  & & \\
%  \hline
}

\tabletail%
{
  \hline
  \multicolumn{3}{|c|}{\small\sl continued on next page} \\
  \hline
}

\tablelasttail%
{
  \hline
}

\begin{mpsupertabular}[t]{| l | l | p{3.2in} |}
A & B &  C
\footnote{footnote.}
\newcounter{fn:sub}
\setcounter{fn:sub} {\value{mpfootnote}}
\\
\hline
D & E & F
({\textbackslash}alph\{fn:sub\} = \alph{fn:sub})
\footnotemark[\value{fn:sub}]
\\
%    \hline
%    D & E & F
%    ({\textbackslash}alph\{fn:sub\} = \alph{fn:sub})
%    \footnotemark[\alph{fn:sub}]
%    Gets ("C:\Program Files\MiKTeX 2.9\tex\latex\base\omscmr.fd")
%    ! Missing number, treated as zero.
%    \\
\end{mpsupertabular}

\end{document}

答案1

环境mpsupertabular将表格页放入 中minipage,因此 的脚注标记\footnote来自 内部\footnoteminipage并且默认以小写字母标记。

\footnotemark不适用于 的脚注minipage,而是用于页面的脚注。因此,它按页面脚注编号。\footnotetext然后会超出minipage

以下示例\mpfootnotemark以与 类似的方式定义\footnotemark,但应用于minipage脚注。然后,\mpfootnotemark[\value{fn:sub}]使用为脚注格式化的标记minipage

\documentclass{article}
\usepackage{supertabular}

\makeatletter
\newcommand*{\mpfootnotemark}{%
  \@ifnextchar[\@xmpfootnotemark{%
    \stepcounter{mpfootnote}%
    \protected@xdef\@thefnmark{\thempfootnote}%
    \@footnotemark
  }%
}
\def\@xmpfootnotemark[#1]{%
  \begingroup
    \c@mpfootnote #1\relax
    \unrestored@protected@xdef\@thefnmark{\thempfootnote}%
  \endgroup
  \@footnotemark
}
\makeatother

\begin{document}

\section {Symbols}
\label{sec:Symbols}
These macros simply generated predefined symbols in an appropriate font. Change
style.

\bottomcaption{Symbols}
\tablefirsthead%
{
  \hline
  Macro & Definition & Meaning \\
  \hline
%  & & \\
%  \hline
}

\tablehead%
{
  \hline
  \multicolumn{3}{|c|}{\small\sl continued from previous page} \\
  \hline
  Macro & Definition & Meaning \\
  \hline
%  & & \\
%  \hline
}

\tabletail%
{
  \hline
  \multicolumn{3}{|c|}{\small\sl continued on next page} \\
  \hline
}

\tablelasttail%
{
  \hline
}

\begin{mpsupertabular}[t]{| l | l | p{3.2in} |}
A & B &  C
\footnote{footnote.}
\newcounter{fn:sub}
\setcounter{fn:sub} {\value{mpfootnote}}
\\
\hline
D & E & F
({\textbackslash}alph\{fn:sub\} = \alph{fn:sub})
\mpfootnotemark[\value{fn:sub}]
\\
\end{mpsupertabular}

\end{document}

结果

相关内容