我正在写一部剧本,我想给剧本赋予不同的色彩。然而,当尝试显而易见的方法时:
\usepackage{xcolor} \\\
\def\stdir{\color{red} \StageDir} \\\
\begin{drama} \\\
\stdir{text, text, text},
然后,从文本中的第一个 Stage 方向开始,所有内容都变成红色。我一直试图\StageDir
用内部颜色声明重新定义 -command,但无济于事。有人对如何仅获取\StageDir
不同颜色有什么建议吗?
提前致谢,
答案1
它etoolbox
非常容易,因为\StageDir
只需使用stagedir
环境:
\documentclass{article}
\usepackage{dramatist}
\usepackage{xcolor}
\usepackage{etoolbox}
\AtBeginEnvironment{stagedir}{\color{red}}
\begin{document}
\Character[Billy Prose]{BILLY}{billy}
\Character[Sally Verse]{SALLY}{sally}
\StageDir{text, text, text}
\begin{drama*}
\sallyspeaks I am a poet \\
I know it\\
I like to speak in short lines\\
Like this\\
My cat is gray\\
My fish is dead\\
Because the cat ate it\\
I am\\
A very difficult person\\
To have a conversation with.\\
\end{drama*}
\StageDir{text, text, text}
\begin{drama}
\billyspeaks I like to talk like a normal person. Your cat is lame. I have a gerbil named Phil. He
sleeps in my dresser. I'm so sorry that my examples sounds insane.
\end{drama}
\end{document}
\end{document}