I’ve been trying to use \pdfmarkupcomment from the pdfcomment package as the tooltip-cmd for the acro package. However, I’m getting an error and don’t quite understand where it’s coming from. The following minimal example:


% This doesn’t work:

\DeclareAcronym{test}{short=test-short, long=test-long}


produces the following error:

! Argument of \use:c has an extra }.
<inserted text> 
l.16  \ac{test}

With \acsetup{tooltip-cmd=\pdftooltip} instead, everything works OK. (As you can see, I’m using \acsetup instead of package options such as \usepackage[tooltip-cmd=\...]{acro} because that doesn’t work at all, even with \pdftooltip. Shouldn’t both ways work?)

Since \pdftooltip works, I’m assuming \pdfmarkupcomment is different somehow. Is there a way to fix this?

I’m using TeX Live 2016/Linux and the problem is with either pdfLaTeX/LuaLaTeX.

  • 1
    The first mandatory argument of \pdfmarkupcomment seems to be passed on to a command from the soul package which seems to be the problem here… acro does not pass the pure string to the tooltip command but something like \use:c {acro_write_short:nv}{test}{l__acro_short_tl}\acro_endings:nn {test}{short}. The soul command doesn't seem to be able to handle this input… – clemens Nov 26 '16 at 14:18

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.