我希望一些文本以red
彩色显示。例如,paragraph
文本需要以red
彩色显示。我的 MWE 是:
\documentclass{article}
\usepackage{times}
\usepackage{amsmath,amssymb}
\begin{document}
This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.
This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.
This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.
This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.
This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.This is the sample paragraph text here. This is the sample paragraph text here.
\end{document}
如何实现这个目标?
答案1
如果您不想使用颜色package
并且想要启动自动着色,那么您可以使用pdfcsplain
OPmac 而不是 LaTeX 的格式:
\input opmac \localcolor
\def\registerword#1{\sdef{w:#1}{{\Red#1}}%
\expandafter\mubyte\csname w:#1\endcsname \space#1\endmubyte}
\mubytein=0
\registerword { is }
\registerword {paragraph}
\registerword {text}
\mubytein=1
This is the sample paragraph text here.
Other text is tested. How are you?
This is the sample paragraph text here.
Other text is tested. How are you?
\bye
答案2
当我想让部分文本显示为红色时,我通常会在序言中放入这个宏:
\newcommand{\red}[1]{\textcolor{red}{#1}}
在文中我使用:
Some normal (black) text \red{the part of the text that I want to be red} some other text.