Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 9 down vote accepted

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}
share|improve this answer
Hey thx vm works just fine! –  bloodworks Dec 4 '10 at 18:12
Do you even need the \newlinechar setting by default? But it's good to know how to set it explicitly. –  Will Robertson Dec 5 '10 at 12:39
@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 '10 at 14:01
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. –  Bruno Le Floch Feb 7 '11 at 10:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.