|
发表于 2009-5-6 11:06:50
|
显示全部楼层
Post by Dirac2003;1979474
现在想写个命令把所有红色消除,即把\textcolor{red}{xxx}改为xxx
You (or the original tex file) really misunderstand the spirit of (la)tex. Long story short, you don't define how things looks, but define what things are.
For your case, what if, say, several versions later, you decide (or it is required) to use back the red highlighting?
The best approach, define a command, which explains what are you defining, say KeywordRed, as:
\newcommand{\KeywordRed}[1]{
\textcolor{red}{#1}
}
then replace all \textcolor{red} with \KeywordRed.
If you want to disable red highlighting, do
\newcommand{\KeywordRed}[1]{
%\textcolor{red}{#1}
#1
}
which makes it very easy for you if you decide to change your mind. |
|