Some packages (ntheorem for example) take only text switches as arguments that can be used in the form {\switch text}
, for example \bfseries
. If I now want to have a suitable command for underlining, the \underline
command does not work, as it requires the argument explicitly using parentheses.
To make this clearer, I would like to convert something like
\underline{lorem ipsum}
to the form
{\ulswitch lorem ipsum}
latex-project
tag is really just about the develop project of LaTeX. You don't need to tag a question for LaTeX, that's the default here.\underline
for text, because it is only intended for math. Use\uline
fromulem
as I show in my answer or the corresponding macro fromsoul
.ulem
, but I thought\underline
would make the question clearer.