1

I am using the \pdfmarkupcomment command from the pdfcomment package to highlight and comment on sections of a paper. When the highlighted text spans multiple lines, the final PDF has separate comments for each of the highlights as shown in the image below.

enter image description here

How can I make the \pdfmarkupcomment command generate a single PDF comment that spans the entire highlighted range as in the following image? enter image description here

Screenshots taken from Adobe Acrobat.

Minimal working example that generates the problem (run with pdfLaTeX three times to generate annotations):

\documentclass{article}
\usepackage{pdfcomment}
\usepackage{xcolor}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Sed at diam ultricies, vehicula neque eu, efficitur risus. 
Vestibulum porttitor posuere ligula. Suspendisse nulla massa, 
efficitur eu odio interdum, pharetra varius ipsum. 
Etiam suscipit quam eleifend iaculis porta. 
\pdfmarkupcomment[color=yellow, opacity = 0.3]
{Nullam egestas magna ligula, nec sollicitudin nulla feugiat eu. 
Praesent vulputate tempus consequat.}{my comment} 
Mauris sit amet faucibus odio, nec pharetra ex.
Pellentesque eu orci vel nibh tincidunt blandit faucibus vel justo. 
Donec eleifend congue mauris eu maximus. 
Sed feugiat sapien a odio rhoncus posuere. Vivamus id orci volutpat,
aliquam ante quis, scelerisque arcu. 
Curabitur dignissim, tortor malesuada faucibus laoreet, 
mauris nibh varius est, eu tincidunt leo lorem tincidunt risus.
\end{document}
  • with the final option you don't get any annotations. – Ulrike Fischer Feb 15 at 18:05
  • Thank you for catching that I left the [final] option in the MWE. I edited the question so that the MWE will produce annotations. – RobotRaven Feb 15 at 19:47
  • Well if I hate something that is untested MWE which don't show the claimed behaviour - I wasted 15 minutes wondering what could be different on my system until I check the documentation and now I won't spend more time wondering if and how the code could be improved - make a feature request to the author. – Ulrike Fischer Feb 15 at 20:56
  • I am sorry for my mistake, but thank you for your efforts. – RobotRaven Feb 16 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.