小型頁面中的腳註如何對腳註標記和腳註文字使用相同的字體

小型頁面中的腳註如何對腳註標記和腳註文字使用相同的字體

小型頁面中的腳註如何對腳註標記和腳註文字使用相同的字體。範例中的標記使用

\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}

示範

相關內容