考虑遵循 MWE:
\documentclass{article}
\usepackage{blindtext}
\usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes}
\presetkeys%
{todonotes}%
{inline,backgroundcolor=yellow,textcolor=blue!20!white}{}
\begin{document}
\blindtext\todo{Is this text in blue?}
\end{document}
我如何全局指定我的待办事项的文本颜色?
答案1
您可以通过节点使用的样式指定文本颜色,如下所示:
\tikzset{/tikz/notestyleraw/.append style={text=blue!20!white}}
\documentclass{article}
\usepackage{blindtext}
\usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes}
\presetkeys%
{todonotes}%
{inline,backgroundcolor=yellow}{}
\tikzset{/tikz/notestyleraw/.append style={text=blue!20!white}}
\begin{document}
\blindtext\todo{Is this text in blue?}
\end{document}
答案2
由于没有选项可以做到这一点,最简单的方法是重新定义命令\todo
。因此,将以下几行添加到您的序言中。
\makeatletter
\renewcommand{\todo}[2][]{\@bsphack\@todo[#1]{\textcolor{blue!20!white}{#2}}\@esphack\ignorespaces}
\makeatother
梅威瑟:
\documentclass{article}
\usepackage{blindtext}
\usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes}
\presetkeys%
{todonotes}%
{inline,backgroundcolor=yellow}{}
\makeatletter
\renewcommand{\todo}[2][]{\@bsphack\@todo[#1]{\textcolor{blue!20!white}{#2}}\@esphack\ignorespaces}
\makeatother
\begin{document}
\blindtext\todo{Is this text in blue?}
\end{document}
输出: