I am trying to link an acronym I am using in a figure caption to the nomenclature list in the beginning of my document where it is defined, e.g.:

Fig. 1. This process makes use of ACRONYM to do etc.

In my nomenclature list I of course define ACRONYM. I am trying to achieve this linking using the hyperref package, so naturally, at my list of nomenclature I have something like:

\hypertarget{ACRONYM}{Its definition...}

And at the appropriate figure (where I have a centering command that I have tried to contain with {}, which I don't know how "correct" that may be):

    \caption{This process makes use of \hyperlink{ACRONYM}{ACRONYM} to do etc.}

But, upon compiling, I get the error:

Argument of \caption@ydblarg has an extra }

and Paragraph ended before \caption@ydblarg was complete.

Does anyone know what may be causing this issue?

I also use the caption package if that is perhaps relevant.

I have tried using \protect before the \hyperlink command too, but then I get additional errors along the lines of paragraph ended before \contentsline was complete and more on extra }.

EDIT: I swear I don't know how this worked, but just tried \protect\hyperlink... again and now it compiles no problem!

So, problem solved I guess.


Protect the command:


\hypertarget{ACRONYM}{Its definition...}

   \caption{This process makes use of \protect\hyperlink{ACRONYM}{ACRONYM} to do etc.}
|improve this answer|||||

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.