答案1
不是那样,但差不多:
\documentclass{book}
\makeatletter
\newcommand\?[1]{\test@key#1}
\def\test@key#1[#2]{%
\begin{tabular}[t]{@{}c@{}}
\underline{#1}\\#2
\end{tabular}%
}
\makeatother
\begin{document}
\begin{enumerate}
\item \?{Early[A]} colonial \?{coffeehouses[B]} served as
\?{meeting places[C]} where shipowners and merchants
could exchange \?{informations[D]} and conduct business.
\item \?{Sunlights[A]} cannot \?{reach[B]} far \?{beneath[C]}
the ocean's \?{surface[D]}
\end{enumerate}
\end{document}
如果你想要固定高度的下划线(切割降部),使用
\documentclass{book}
\makeatletter
\newcommand\?[1]{\test@key#1}
\def\test@key#1[#2]{%
\begin{tabular}[t]{@{}c@{}}
\underline{\smash{#1}}\\#2 % <--- smash
\end{tabular}%
}
\makeatother
\begin{document}
\begin{enumerate}
\item \?{Early[A]} colonial \?{coffeehouses[B]} served as
\?{meeting places[C]} where shipowners and merchants
could exchange \?{informations[D]} and conduct business.
\item \?{Sunlights[A]} cannot \?{reach[B]} far \?{beneath[C]}
the ocean's \?{surface[D]}
\end{enumerate}
\end{document}