0

How to change font size of \ref shows how to change the font size of references everywhere. What if I want to change it to match the surrounding text?

Here's a 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

3
  • it's wrong to have the font change command in \thexxx if it wasn't there the number would naturally match the surrounding size. Aug 12 '16 at 20:48
  • 2
    the formatting of the footnotemark (such as font size) should be in \@makefnmark not \thefootnote Aug 12 '16 at 20:49
  • OK, I think I've got it, thanks. Will post a working solution below. Aug 12 '16 at 21:00
1

Here, thanks to the hint in David Carlisle's comment, is something that does what I was aiming for. Once I knew what to look for I found the approach described in Footnote mark in regular or other font styles.

\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

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.