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

\documentclass[]{article}
\usepackage[]{pdfcomment}
\begin{document}
\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
\end{document}

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
add comment

1 Answer

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

\documentclass{article}
\usepackage{pdfcomment}
\begin{document}
\pdfmarkupcomment{$1+1$}{first line\textCR second line}
\end{document}

works when viewed in Adobe Reader.

share|improve this answer
add comment

Your Answer

 
discard

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.