Basically I have the same problem as in the closed thread \pdfmarkupcomment works in MWE, but doesn't work in my thesis.

Simple MWE, even longer files work fine, the text gets highlighted as it is supposed to.

My main paper consists out of several .tex-files (in different subdirectories) that get included (or not) depending on boolean variables. Wheras other pdfcomment-commands work fine, the pdfmarkupcomment does not work at all.

Anybody seen something similar?


I can reproduce the problem. There seems to be a bug in soulpos.sty, which is used in \pdfmarkupcomment. When used in included files soulpos.sty only produces a .upa file but no .upb file. Therefore there are no positions to place the PDF annotation.




foo \ulflag{Test} bar

I already filed a bug report to Javier Bezos. Hopefully, he will be able to fix it asap.

As a workaround, which might break other features the usage of \myinclude instead of \include will work:

  • Is there by chance any update on this? I was able to reproduce this issue in my thesis where I structured several sections across multiple files, included with \input. I don't really want to change all of the occurences... – ChrisK Dec 12 '16 at 14:54

I had a similar problem without using include files, but using some combination of packages (including, among many others, lastpage). I was able to fix the problem of the missing upb file by changing the following line in soulpos.sty




(I've also suggested this as a bugfix to Javier Bezos, the author of soulpos.sty).

  • Welcome to TeX.SX! Changing a distributed file is not really recommended. – egreg Jan 5 '18 at 16:02
  • @egreg You're right - the author of soulpos.sty needs to change it, because it's a bug :-) As a workaround, add to the preamble of your own file(s) \makeatletter \AtEndDocument{\immediate\write\@auxout{\string\ulp@afterend}} \makeatother (where \ulp@afterend is defined by soulpos.sty) – ThV Jan 5 '18 at 16:39
  • Coming back to this, I had another case where the upa file was never written: using revtex4-1 together with pdfcomments did not work. This time, the fix was to include \AtBeginDocument{\immediate\openout\ulp@out=\jobname.upa\relax}. – ThV May 4 '18 at 12:04

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.