1
\documentclass{standalone}
\usepackage{xcolor}
\usepackage{pdfcomment}
\begin{document}
\pdfmarkupcomment[color=red,markup=StrikeOut]{A little Test!}{Why is this repeated? This is a StrikeOut markup annotation} 
\end{document} 

The pdfmarkupcomment is not shown. With \documentclass{article} it is. How can I make use of pdfmarkupcomment in standalone?

1 Answers1

2

pdfcomment use soulpos to calculate the size of the annotation. soulpos writes some values with \AtEndDocument to an external file, but with standalone the \AtEndDocument is not executed (it would if you would use multi, but then the page size is wrong).

You can execute the needed code manually

\documentclass[]{standalone}
\usepackage{xcolor}
\usepackage{pdfcomment}

\begin{document}

\pdfmarkupcomment[color=red,markup=StrikeOut]{A little Test!}{Why is this repeated? This is a StrikeOut markup annotation}%

\makeatletter \closeout\ulp@out \closein\ulp@in \write@auxout{\string\ulp@afterend}% \def\ulp@afterend{% \ulp@cnt\z@ \message{* soulpos - computing points - it may take a few seconds *}% \immediate\openout\ulp@out=\jobname.upb\relax \begingroup \makeatletter \InputIfFileExists{\jobname.upa}{}{}% \endgroup \immediate\closeout\ulp@out}% \makeatother
\end{document}

enter image description here

Ulrike Fischer
  • 327,261