From 9ede3d0fafdfc15f764efce07dde66898f9b0e9a Mon Sep 17 00:00:00 2001 From: etclub <76145445+etclub@users.noreply.github.com> Date: Fri, 14 Mar 2025 11:03:48 +0800 Subject: [PATCH] Latex: allow phantomsection in captions https://tex.stackexchange.com/questions/228973/argument-of-captionydblarg-has-an-extra --- src/Text/Pandoc/Writers/LaTeX/Util.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Writers/LaTeX/Util.hs b/src/Text/Pandoc/Writers/LaTeX/Util.hs index da5fb9cd391e..c1f16001bbaa 100644 --- a/src/Text/Pandoc/Writers/LaTeX/Util.hs +++ b/src/Text/Pandoc/Writers/LaTeX/Util.hs @@ -267,7 +267,7 @@ hypertarget ident = do return $ text "\\protect\\hypertarget" <> braces ref <> "{}" else do label <- labelFor ident - return $ text "\\phantomsection" <> label + return $ text "\\protect\\phantomsection" <> label labelFor :: PandocMonad m => Text -> LW m (Doc Text) labelFor "" = return empty