I have the request to use underline text. I am aware this could be done with \ul (from soul package) which works in most of the scenarios. Somehow this command has a problem to handle properly \href{} commands.
Despite the question if this makes sense or not I need a solution for this case. I found that \uline (from ulem package) could handle this situation much better without any problems. But now the next problem is arising, namely
\uline{This is a bold text
with an empty line inbetween}
is not properly handled due to the empty linebreak. I have somehow in my memory this is because how the arguments of the commands are handled. I remember vague that the command needs to be redefined to hold an empty linebreak but I coudln't find a hint how to do so. Could somebody please point me toward a solution?
Note: I am using lualatex with the purpose to generate a PDF file. Math mode is not really a subject, meaning I don't care much about Math mode.
\endgrafinstead of the blank line will work (it will allow the argument, whether\ulinecan cope with end of paragraph I do not know and you didn't provide a test file – David Carlisle Jun 01 '19 at 13:14\ulhandles this properly. So therefore I don't understand why the problem arises with\uline... – LeO Jun 01 '19 at 20:27\hrefis handled and empty lines. No idea about page breaks but might be an issue as well. Anyway I'll test it. Thx – LeO Jun 01 '19 at 20:32\par. If the macros underlying\ulineare not defined in terms of\long, their args must not contain the token\parno matter how\paris defined. But you can do\uline{This is a bold text\csname par\endcsname with a par-token in between}and see that\ulinewill ignore paragraph breaking. One could define a routine which splits its arg at\par-tokens and does\uline{paragraph1}\par\uline{paragraph2}\par...but evaluating the arg and finding ends of paragraphs is a "hard" problem... – Ulrich Diez Jun 02 '19 at 10:51\newlinethan it works. But I'm interested in it to use the latex code for the text without too much of a change. I thought a redefine of the command might be helpful. Besides this the approach from Marcel sounds promising. – LeO Jun 02 '19 at 13:28