我有一些标准文本,但其中的某些部分是不同的。但在这些不同的部分中,只有少数存在。
例如我想要:
\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。有没有人解决这个问题?