在 Tufte 模板中...我如何让 LaTeX 使用符号(*、†、‡ 等等)而不是数字来标记侧注?

在 Tufte 模板中...我如何让 LaTeX 使用符号(*、†、‡ 等等)而不是数字来标记侧注?

抱歉,这个问题可能有些幼稚......我正在使用精彩的 Tufte 模板...我怎样才能让 LaTeX 使用符号(*、†、‡ 等等)而不是数字来标记旁注?

我尝试了使用符号代替数字作为脚注标记,但不适用于 Tufte 模板。

答案1

只需将以下内容添加到您的序言中:

\makeatletter
    \def\thempfn{\fnsymbol{\@mpfn}}
\makeatother

答案2

您需要做两三件事才能实现这一目标。

首先,告诉 LaTeX 使用脚注符号而不是数字:

% Works up to nine sidenotes
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}

接下来,我们要重置每一页的脚注计数器,否则我们很快就会用完可用的符号:

% Ensure that the sidenote marker is reset at each page
\usepackage{perpage}
\MakePerPage{footnote}

最后,我们可能需要定义更多的脚注符号,以便每页可以使用九个以上的脚注符号:

% Define up to 18 footnote symbols
\makeatletter
\def\@fnsymbol#1{%
  \ensuremath{%
    \ifcase#1\or
      *\or
      \dagger\or
      \ddagger\or
      \mathsection\or
      \mathparagraph\or
      \|\or
      **\or
      \dagger\dagger\or
      \ddagger\ddagger\or
      \mathsection\mathsection\or
      \mathparagraph\mathparagraph\or
      \|\|\or
      ***\or
      \dagger\dagger\dagger\or
      \ddagger\ddagger\ddagger\or
      \mathsection\mathsection\mathsection\or
      \mathparagraph\mathparagraph\mathparagraph\or
      \|\|\|
    \else
      % We've run out of footnote symbols for this page.
      % We would normally emit an error here,
      % but because the perpage package won't work until the
      % second pass, we need to do something less abrupt.
    \fi
  }%
}
\makeatother

(无论如何,我们都需要重新定义该\@fnsymbol宏,以便它不会调用\@ctrerrperpage包裹在 LateX 第一次通过时不会重置计数器,并且如果我们在页面上使用的脚注多于我们定义的符号,LaTeX 将调用\@ctrerr并发出错误。)

下面是一个显示所有内容的示例文档:

\documentclass{tufte-handout}

% Works up to nine sidenotes
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}

% Ensure that the sidenote marker is reset at each page
\usepackage{perpage}
\MakePerPage{footnote}

% Define up to 18 footnote symbols
\makeatletter
\def\@fnsymbol#1{%
  \ensuremath{%
    \ifcase#1\or
      *\or
      \dagger\or
      \ddagger\or
      \mathsection\or
      \mathparagraph\or
      \|\or
      **\or
      \dagger\dagger\or
      \ddagger\ddagger\or
      \mathsection\mathsection\or
      \mathparagraph\mathparagraph\or
      \|\|\or
      ***\or
      \dagger\dagger\dagger\or
      \ddagger\ddagger\ddagger\or
      \mathsection\mathsection\mathsection\or
      \mathparagraph\mathparagraph\mathparagraph\or
      \|\|\|
    \else
      % We've run out of footnote symbols for this page.
      % We would normally emit an error here,
      % but because the perpage package won't work until the
      % second pass, we need to do something less abrupt.
    \fi
  }%
}
\makeatother

% Because I'm too lazy to type it twice...
\newcommand{\printsidenotes}{%
  First note.\sidenote{First, a sidenote.}
  Second note.\sidenote{A second sidenote.}
  Third note.\sidenote{Finally, a sidenote!}

  Fourth note.\sidenote{Another sidenote.}
  Fifth note.\sidenote{Yet another sidenote.}
  Sixth note.\sidenote{When will they stop?!}

  Seventh note.\sidenote{Bet you didn't expect another sidenote.}
  Eighth note.\sidenote{We normally wouldn't be able to see this many sidenotes on a single page using the regular set of footnote symbols.}
  Ninth note.\sidenote{But we've extended the set to allow for this silliness.}

  Tenth note.\sidenote{Note 10.}
  Eleventh note.\sidenote{Note 11.}
  Twelfth note.\sidenote{Note 12.}

  Thirteenth note.\sidenote{Note 13.}
  Fourteenth note.\sidenote{Note 14.}
  Fifteenth note.\sidenote{Note 15.}

  Sixteenth note.\sidenote{Note 16.}
  Seventeenth note.\sidenote{Note 17.}
  Eighteenth note.\sidenote{Note 18.}

  Nineteenth note.\sidenote{Too many sidenotes!}
}


\title{Sidenote marks}
\author{Kevin M. Godby}

\begin{document}

\maketitle

\printsidenotes

% Test to make sure the sidenote markers reset after a page break
\clearpage
\printsidenotes

\end{document}

相关内容