我有一些标准文本,但其中的一部分是不同的。但这些不同的部分只有很少存在。
例如,我想要:
\mytext{...}{a}
\mytext{...}{b}
那会产生:
\section{Item: ...}\label{item...}
This is a standard item. Items of type a are very precious.
\section{Item: ...}\label{item...}
This is a standard item. Items of type b are cheap.
一个简单的解决方案是定义命令mytexta和mytextb,但由于我有更多的选项,我想要更像编程语言中的if或switch。有人有这个问题的解决方案吗?