我正在报告中为某些名称和内容着色
我不想为每个名字单独着色,而是想通过某种编码预先定义内容,以便在输入单词时,它在编译后的 pdf 输出中突出显示
请指导
\documentclass{article}
\usepackage{enumitem}
\usepackage{geometry}
\usepackage{xcolor}
\renewcommand*\familydefault{\sfdefault}
\begin{document}
\begin{center}{\large \textbf{HANDING / TAKING OVER}}\end{center}
\begin{description}
\item {\textbf {\fbox{AON for CHT}}}
\item 11 Nov 2019
\subitem \fcolorbox{black}{green}{Preetha} check progress with IFA
\item 12 Nov 2019
\subitem \fcolorbox{black}{green}{Preetha} to liaise with IFA
\end{description}
\begin{description}
\item {\textbf {\fbox{AON for DEO}}}
\item 11 Nov 2019
\subitem \fcolorbox{black}{green}{Preetha} check progress with IFA
\item 12 Nov 2019
\subitem \fcolorbox{black}{green}{Preetha} to liaise with IFA
\end{description}
\end{document}
答案1
您可以在序言中创建一个新命令,例如
\newcommand{\Preetha}{\fcolorbox{black}{green}{Preetha}}
要在文本中使用它,只需输入
\Preetha