[Tex/LaTex] Multiple paragraphs break custom command


first of all sorry if the question seems repetitive: I have tried to find a solution in previously asked questions but none of the hints provided seems to work for me.

Here is my situation. I am writing a new class to typeset my thesis (and hopefully help other students who would like to use LaTeX instead of Hangul) by customizing the memoir package.

Everything ran smoothly until I became stuck in this: I have a number of custom commands that define variables which are then output by the command \prelims (see code below).


%%% \asbtractEN


      School of \KNUdepartment \\
      Major in \KNUmajor \\
      The Graduate School \\
      (Supervised by Professor \KNUsupervisor)



\tableofcontents \newpage
\listoffigures \newpage
\listoftables \newpage


My problem is that when specifying an abstract consisting of multiple paragraphs, such as



the compiler kindly spits at me with the "usual" Paragraph ended before \abstractEN was complete.

I have tried putting the argument in a separate block, in a box, and even in a minipage, but the error persists.

Any helpful soul around?

P.S. Any errors in English in the abstract command are strictly required by our University's template -.-

Best Answer

In TeX terminology, this is because your commands are not defined as \long so do not permit paragraph breaks in their arguments, because you have defined them with \newcommand* instead of \newcommand.

If using \def and variants to define commands that take arguments (and want them to accept paragraph breaks also), one needs to use the \long prefix. Andrew Swann pointed out that you use \gdef so should be aware of this, but none of the commands defined with \gdef in your example appear to take arguments, so do not require this.

Solution: Remove the * from \newcommand*{\abstractEN}.

See What's the difference between \newcommand and \newcommand*? The answers to that question explain why the non-\long form can be useful.

Related Question