答案1
答案2
这定义了三个级别,但支持任意多个级别。
\documentclass{article}
\usepackage[T1]{fontenc}
\newcommand{\uw}[1]{%
\addtocounter{uw}{1}%
\csname uw\romannumeral\value{uw}\endcsname{#1}%
\addtocounter{uw}{-1}%
}
\newcounter{uw}
\newcommand{\uwi}[1]{``#1''}
\newcommand{\uwii}[1]{`#1'}
\newcommand{\uwiii}[1]{<<#1>>}
\begin{document}
\uw{abc}
\uw{abc \uw{def} ghi}
\uw{abc \uw{def \uw{ghi} lmn} pqr}
\end{document}