I want to prompt some messages to my console. I used

\message{Hi out there!}

Now i want some more Text but with an linebreak.

\message{Hello World %some line break here 
Salut monde

Well i scanned the TeXbook for and tried many things but without result. I would welcome any (related) comments.

BTW I want that to work with pdf(la)tex as well.

1 Answer 1


You could set a value to \newlinechar representing the character which should cause the line break.

This works for me, printing out a line break after Hello World :

\message{Hello World^^JSalut monde}
  • 1
    Do you even need the \newlinechar setting by default? But it's good to know how to set it explicitly. Dec 5, 2010 at 12:39
  • 1
    @Will: without the setting, TeX printed Hello World^^JSalut monde, when I tested it. But pdfTeX doesn't require it - it breaks the line even without that setting.
    – Stefan Kottwitz
    Dec 5, 2010 at 14:01
  • 1
    Try \showthe\newlinechar. With pdflatex this should show 10, the character code of ^^J. With e.g. pdftex, this gives -1, i.e. no new-line character. Feb 7, 2011 at 10:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .