改变 \ref 的大小以匹配文本

改变 \ref 的大小以匹配文本

如何更改 \ref 的字体大小显示了如何更改所有参考文献的字体大小。如果我想更改字体大小以匹配周围的文本,该怎么办?

这是 MWE。

\documentclass[justified]{tufte-handout}

\renewcommand{\thefootnote}{{\footnotesize[\emph{\alph{footnote}}]}}

\begin{document}
\title{Tufte Test}
\maketitle

I want this footnote marker to be \verb|\footnotesize|:\footnote{\label{fn}I.e. {\tt\textbackslash thefootnote} is redefined to emit {\tt \textbackslash footnotesize[\textbackslash emph\{\textbackslash alph\{footnote\}\}]}\ldots}  $\leftarrow$ And it works.

\vspace{2cm}

\noindent{\normalsize \ref{fn}}: $\leftarrow$ But then writing \verb|{\normalsize \ref{fn}}|, just gives me ``{\normalsize \ref{fn}},''  whereas I would wanted to see something like ``[a]'' there.

\end{document}

enter image description here

答案1

感谢 David Carlisle 评论中的提示,这里有些东西可以满足我的要求。一旦我知道要寻找什么,我就会找到采用常规或其他字体样式的脚注标记

\documentclass[justified]{tufte-handout}

\renewcommand{\thefootnote}{[\emph{\alph{footnote}}]}

\makeatletter%
\long\def\@makefnmark{%
\hbox {\@textsuperscript {\footnotesize \@thefnmark }}}%
\makeatother

\makeatletter%
\long\def\@makefntext#1{%
\@textsuperscript {\@tufte@sidenote@font \@thefnmark }\,\footnotelayout #1}%
\makeatother

\begin{document}
\title{Tufte Test}
\maketitle

%\makeatletter\show\@makefnmark\makeatother <- will depend on class
%\makeatletter\show\@makefntext\makeatother

I want this footnote marker to be \verb|\footnotesize|:\footnote{\label{fn}This
solution redefines both {\tt \textbackslash @thefnmark} and
{\tt \textbackslash @makefntext}.}  $\leftarrow$ And it works.

\vspace{2cm}

\noindent Now \ref{fn} (produced by ``\verb|\ref{fn}|'') matches the
 text.\footnote{\label{fn2}: Even in here; see \ref{fn}.}
\end{document}

enter image description here

相关内容