如何使用 ulem 对包含 \enquote{d text} 的单行文本加下划线?

如何使用 ulem 对包含 \enquote{d text} 的单行文本加下划线?

这个 MWE 应该解释这个问题和疑问:

\usepackage{fontspec}

%\usepackage[ngerman]{babel} % polyglossia is recommended for lualatex
\usepackage{polyglossia}
\setdefaultlanguage[babelshorthands=true,variant=german,spelling=new]{german}

\usepackage[strict=true,autostyle=true,german=quotes]{csquotes}
\usepackage[normalem]{ulem}

\begin{document}
This is what I want to do, but ...

\noindent
... it does not work at all (neither with babel, nor with polyglossia):\\
Aaaaaaa bbbbbbb \uline{cccccccc \enquote{ddddddd} eeeeeeee} ffffffff.

%This is not (exactly) what I want to do (it's just for debugging), but ...

%\noindent
%... it works at least with polyglossia, but not with babel:\\
%Aaaaaaa bbbbbbb \uline{cccccccc "`ddddddd"' eeeeeeee} ffffffff.

%\noindent
%... this works with both:\\
%Aaaaaaa bbbbbbb cccccccc \enquote{\uline{ddddddd}} eeeeeeee ffffffff.
\end{document}

答案1

虽然不是最理想的,但至少是一种解决方法(灵感来自这里):

Aaaaaaa bbbbbbb \uline{\mbox{cccccccc \enquote{ddddddd} eeeeeeee}} ffffffff.

相关内容