首页 > 解决方案 > 如何在尾注中指定字体?

问题描述

问题是关于在使用 pagenote 包时格式化“report”和“memoir”文档类中的尾注字体。

在下面的最小示例中,当使用 \footnote 时,\footnotesize{} 命令按预期执行:脚注按照要求为 16pt。当尾注与 \pagenote 一起使用时,尾注在回忆录和报告环境中都按预期显示,但在这两种情况下都使用正文字体。

实际上,问题是如何创建像 \endnotesize{} 这样的东西?

\documentclass[a4paper,12pt,openany]{memoir}

% set the font size in the footnotes
\makeatother
\renewcommand{\footnotesize}{\fontsize{16pt}{16pt}\selectfont}

\usepackage{pagenote}
\makepagenote
\renewcommand*{\notedivision}{\chapter*{\notesname}}

\let\footnote\pagenote  % toggle endnotes instead of footnotes

\begin{document}
\chapter{}
Here is the main text of the article\footnote{The first footnote in 16pt}
To clarify the situation a second footnote helps\footnote{The second footnote also 16pts}

%\printnotes            % needed for report style
\printpagenotes         % needed for memoir style

\end{document}    

  

在这个例子中,如果使用 \printnotes 而不是 '\printpagenotes','memoir' 可以被 'report' 替代。通过注释掉 '\let\footnote\pagenote' 行,出现脚注而不是尾注。在 \footnote 模式下,此示例提供 16pt 脚注。

我的工作环境是 TexWorks 中的 pdfLatex。

标签: latex

解决方案


对于memoir该类,您可以像这样重新定义\prenotetextand\postnotetext宏:

\documentclass[a4paper,12pt,openany]{memoir}

% set the font size in the footnotes
\makeatother
\renewcommand\prenotetext{\begingroup\fontsize{16pt}{16pt}\selectfont}
\renewcommand\postnotetext{\endgroup}

\usepackage{pagenote}
\makepagenote
\renewcommand*{\notedivision}{\chapter*{\notesname}}

\let\footnote\pagenote  % toggle endnotes instead of footnotes

\begin{document}
\chapter{}
Here is the main text of the article\footnote{The first footnote in 16pt}
To clarify the situation a second footnote helps\footnote{The second footnote also 16pts}

%\printnotes            % needed for report style
\printpagenotes         % needed for memoir style

\end{document}    

  

对于report课堂:

\documentclass[a4paper,12pt,openany]{report}

% set the font size in the footnotes
\makeatother


\usepackage{pagenote}
\makepagenote
\renewcommand*{\notedivision}{\chapter*{\notesname}}

   
\renewcommand{\prenoteinnotes}{\par\fontsize{16pt}{16pt}\selectfont\noindent}
\renewcommand{\postnoteinnotes}{\par}


\let\footnote\pagenote  % toggle endnotes instead of footnotes

\begin{document}
\chapter{}
Here is the main text of the article\footnote{The first footnote in 16pt}
To clarify the situation a second footnote helps\footnote{The second footnote also 16pts}

\printnotes            % needed for report style
%\printpagenotes         % needed for memoir style

\end{document}    

推荐阅读