Add \protect to \hyperlink in LaTeX export

This should fix issues where \hyperlink ends up being inserted inside
fragile commands (e.g. \caption{...}).
This commit is contained in:
TEC 2023-02-28 00:47:41 +08:00
parent 8ac176c068
commit d8071ef6ed
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ at least three terms that start with the same letter."
:definition-structure ""
:category-heading ""
:letter-heading ""))
(latex (t :use "\\hyperlink{gls-%K}{\\label{gls-%K-use-%r}%t}"
(latex (t :use "\\protect\\hyperlink{gls-%K}{\\label{gls-%K-use-%r}%t}"
:definition "\\hypertarget{gls-%K}{%t}"
:backref "\\pageref{gls-%K-use-%r}"))
(html (t :use "<a class=\"org-gls\" href=\"#gls.%K\" id=\"glsr.%K.%r\">%t</a>"