I'm trying to define a macro to be used as follows:
\usepackage[normalem]{ulem}
\newcommand{\thesis}[1]{\uline{\ignorespaces #1\unskip}}
% underlining required by school - I know, I know
% later...
\thesis{
This is the beginning of a multi-line thesis statement.
I use one sentence on each line throughout my document.
Thus, the thesis is broken as in XKCD 1285.
}
The problem is that the \unskip doesn't gobble the final line break. If I add a comment (like as in XKCD 1285.%) then it works as expected, but isn't this what \unskip is supposed to do?
The initial space is gobbled correctly. Without \ignorespaces there is an underlined space at the beginning, but \ignorespaces removes it. The \unskip is supposed to remove the underlined statement at the end, but doesn't.
My understanding is that \unskip is kind of like \ignorepreviousspace. Is this correct?
MWE:
\documentclass{article}
\usepackage[normalem]{ulem}
\newcommand{\thesis}[1]{\uline{\ignorespaces #1\unskip}}
\begin{document}
\thesis{
Foo.
Bar.
Baz.
} % comment at end of previous line gives desired output
\end{document}
