Sorry, but I am so bad in English. I try my best to describe my problem.
Here is an example
\usepackage{ulem}
\usepackage{xparse}
\NewDocumentCommand{\test}{o m}{
% #1#2
}
\begin{document}
%\uline{\test[ab]{c d}} %fine
\uline{\test[a b]{c d}}
\end{document}
log:
Runaway argument?
\ERROR {c d}\xdef \UL@spfactor {\the \spacefactor } \UL@end *
./test.tex:60: Paragraph ended before \test was complete.
<to be read again>
\par
l.60
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
\uline{\test[ab]{c d}}
is fine.
but \uline{\test[a b]{c d}}
raised an error, where the difference between them is the optional argument [ab]
and [a b]
(there is a white space between a
and b
).
What should I do if I want something like \uline{\test[a b]{c d}}
to work fine?
thanks!
\uline{\test[{a b}]{c d}}
works.