TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.