如何更改 Tikzpicture 中脚注线和脚注标记的颜色

如何更改 Tikzpicture 中脚注线和脚注标记的颜色

考虑一下代码

\documentclass[12pt]{book}
\textwidth=4in \textheight=6.40in
\usepackage[sfdefault]{cabin} 
\usepackage{csquotes}
\usepackage{xcolor}
\definecolor{bblue}{RGB}{33,41,88}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\begin{document}
\thispagestyle{empty}

\begin{center}
\begin{tikzpicture}[pencildraw/.style={ %
    decorate,
    decoration={random steps,segment length=2pt,amplitude=1pt}
    } %
]
\node[
preaction={fill=black,opacity=0.5,transform canvas={xshift=1mm,yshift=-1mm}},
pencildraw,draw,fill=bblue,text=white,text width=1.00\textwidth,inner sep=2.5mm,align=justify] 
{\fontsize{11.5}{14}\selectfont {\bf \enquote{How to color the footnotemark and footnoteline white?\footnote{\textcolor{white}{The footnote.}}} \par}};
\end{tikzpicture}
\end{center}
\end{document}

产生

在此处输入图片描述

问题:在特定的 中tikzpicture,我如何将脚注行和其下方的脚注标记的颜色更改为不同的颜色;在这种情况下,白色的

谢谢。

答案1

/utils/exec你可以使用https://tex.stackexchange.com/a/674806/36296重新定义 tikz 图片开头的脚注规则:

\documentclass[12pt]{book}
\textwidth=4in \textheight=6.40in
\usepackage[sfdefault]{cabin} 
\usepackage{csquotes}
\usepackage{xcolor}
\definecolor{bblue}{RGB}{33,41,88}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\makeatletter
\def\myfootnoterule{\color{white}\kern-3\p@\hrule \@width 2in \kern 2.6\p@}
\makeatother

\begin{document}
\thispagestyle{empty}

\begin{center}
\begin{tikzpicture}[pencildraw/.style={ %
    /utils/exec={\renewcommand{\footnoterule}{\myfootnoterule}},
    decorate,
    decoration={random steps,segment length=2pt,amplitude=1pt}
    } %
]
\node[
preaction={fill=black,opacity=0.5,transform canvas={xshift=1mm,yshift=-1mm}},
pencildraw,draw,fill=bblue,text=white,text width=1.00\textwidth,inner sep=2.5mm,align=justify] 
{\fontsize{11.5}{14}\selectfont {\bfseries \enquote{How to color the footnotemark and footnoteline white?\footnote{\textcolor{white}{The footnote.}}}}};
\end{tikzpicture}
\end{center}
\end{document}

在此处输入图片描述

相关内容