小页面中的脚注如何对脚注标记和脚注文本使用相同的字体

小页面中的脚注如何对脚注标记和脚注文本使用相同的字体

小页面中的脚注如何为脚注标记和脚注文本使用相同的字体。示例中的标记使用

\bfseries\sffamily\Huge

文本使用普通字体。“直接”脚注也是如此

\documentclass{article}
\usepackage{%
expl3,%   
xparse,%  
}

\newcounter{Foot}

\newcommand\Mark{%
  \stepcounter{Foot}%
  \footnotemark[\theFoot]%
}% Mark

\newcommand\Meaning[1]{%
  \stepcounter{Foot}%
  \footnotetext[\theFoot]{#1}%
}% Meaning

\NewDocumentEnvironment{Test}{O{t}D(){\empty}}{%
  \begin{minipage}[#1]{6cm}%
    \bfseries\sffamily\Huge%
    \renewcommand{\thefootnote}{\alph{footnote}}%
    \setcounter{Foot}{0}%
}{%
  \ifx#2\empty\else%
    \setcounter{Foot}{0}%
    #2%
  \fi%
  \end{minipage}%
}% Test

\begin{document}
Start Text

\begin{Test}(\Meaning{First}\Meaning{Second})
  Word1\Mark word2\footnote{FN1}\\
  word3\Mark word4\footnote{FN2}
\end{Test}

After Text
\end{document}

答案1

您可以使用\footnotesize来控制脚注文本的大小,同时\reset@font控制字体类型。

\documentclass{article}
\usepackage{%
expl3,%   
xparse,%  
}

% modify \footnotemark to use same counter as \footnote
\makeatletter
\def\footnotemark{\@ifnextchar[\@xfootnotemark{\stepcounter\@mpfn
 \protected@xdef\@thefnmark{\thempfn}
 \@footnotemark}}

\def\@xfootnotemark[#1]{%
 \begingroup
   \csname c@\@mpfn\endcsname #1\relax
   \unrestored@protected@xdef\@thefnmark{\thempfn}%
 \endgroup
 \@footnotemark}
\makeatother

\newcounter{Foot}

\newcommand\Mark{%
  \stepcounter{Foot}%
  \footnotemark[\value{Foot}]%
}% Mark

\newcommand\Meaning[1]{%
  \stepcounter{Foot}%
  \footnotetext[\theFoot]{#1}%
}% Meaning

\NewDocumentEnvironment{Test}{O{t}D(){\empty}}{%
  \begin{minipage}[#1]{6cm}%
    \bfseries\sffamily\Huge
    \let\footnotesize=\Huge
    \expandafter\let\csname reset@font\endcsname=\relax
    %\renewcommand{\thempfn}{\alph{\csname @mpfn\endcsname}}%
    \setcounter{Foot}{0}%
}{%
  \ifx#2\empty\else%
    \setcounter{Foot}{0}%
    #2%
  \fi%
  \end{minipage}%
}% Test

\begin{document}
Start Text

\begin{Test}(\Meaning{First}\Meaning{Second})
  Word1\Mark word2\footnote{FN1}\\
  word3\Mark word4\footnote{FN2}
\end{Test}

After Text
\end{document}

演示

相关内容