At the time TeX was written there wasn’t too many text editors with brace-matching features to catch a } you forgot somewhere, so Knuth build some ways of checking if you forgot a } before the a macro tried to grab the rest of the input file as argument. Apart from David’s favourite, outer, a macro can also be short or long.

A short macro can be defined as simply as:


but then if you forget a }:

test here boom!}

TeX will raise that exact same error:

Runaway argument?

However TeX’s scanner does not look for something that means a paragraph break, it just looks for a par token, so LaTeX (and also plain TeX) provides you with endgraf, which is a copy of par defined as:


You could also trick TeX by using csname parendcsname instead, or something else that would hide the par token.

LaTeX’s newcommand defines a long macro by default, so if you do newcommandtest[1]{(#1)}, the example above will work. tkzTabLine, however, is defined with newcommand*, which does a short def (perhaps there’s a good reason for who wrote that package to make it short; I didn’t check).

Just for completeness, if you are defining the macro yourself and you are using xparse, then you need the + modifier to make the argument long, like in:

NewDocumentCommand test {+m} {(#1)}



Please enter your comment!
Please enter your name here

Comment moderation is enabled. Your comment may take some time to appear.