Sign up ×
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 cannot seem to figure out how to separate lines in the text of a pdfcomment (\pdfmarkupcomment). I tried different standard representations, like \n.

\pdfmarkupcomment{$1+1$}{first line second line}%shows lines together
%{first line\n second line} not working: undefined command \n
%{first line/n second line} /n ignored

a similar solution for the tab character (if possible) will be appreciated.

(note: if my memory doesn't fail, I think \pdfmarginpar did allow \n to represent the new line)

share|improve this question

1 Answer 1

up vote 7 down vote accepted

According to the pdfcomment manual you are looking for \textCR. The tab character can be given as \textHT, and there is also \textLF for a line feed. (Manual for v2.3, page 10.) Certain for me

\pdfmarkupcomment{$1+1$}{first line\textCR second line}

works when viewed in Adobe Reader.

share|improve this answer

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.