![更改文档中作者致谢的颜色](https://linux22.com/image/394332/%E6%9B%B4%E6%94%B9%E6%96%87%E6%A1%A3%E4%B8%AD%E4%BD%9C%E8%80%85%E8%87%B4%E8%B0%A2%E7%9A%84%E9%A2%9C%E8%89%B2.png)
答案1
这里的问题是,仅对于的排版\maketitle
命令\thanks
被定义为的副本\footnote
。
因此我们必须修补命令并在其中添加例如标题中脚注标记的\maketitle
颜色,如:red
\makeatletter % <=======================================================
\patchcmd{\maketitle}%
{\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}}%
{\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\color{red}\@thefnmark}}}}% <==================
{}%success
{}%failure
\makeatother % <========================================================
命令makeatletter
和仅在需要修补的代码中使用\makeatother
时才需要。使用完整的 mwe@
\documentclass{article}
\usepackage{xcolor}
\usepackage{etoolbox} % <===============================================
\makeatletter % <=======================================================
\patchcmd{\maketitle}%
{\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}}%
{\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\color{red}\@thefnmark}}}}%
{}%success
{}%failure
\makeatother % <========================================================
\title{Sample Title}
\author{John Doe\thanks{email}~ and Jane Doe\thanks{twitter}}
\date{\today}
\begin{document}
\maketitle
Blah blah blah\footnote{This is a test.}
\end{document}
您将获得最终的 pdf: