From 9c29d840ff4e33e0925bee60fb4d9aeba968c5d0 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Tue, 17 May 2022 16:12:53 +0200 Subject: LaTeX template: fix links-as-notes The redefinition of `\href` when using `links-as-notes` must happen after the hyperref package has been loaded. Fixes: #8077 --- data/templates/default.latex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'data/templates') diff --git a/data/templates/default.latex b/data/templates/default.latex index 44d527490..202db4f81 100644 --- a/data/templates/default.latex +++ b/data/templates/default.latex @@ -270,10 +270,6 @@ $if(graphics)$ \def\fps@figure{htbp} \makeatother $endif$ -$if(links-as-notes)$ -% Make links footnotes instead of hotlinks: -\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} -$endif$ $if(strikeout)$ $-- also used for underline \usepackage[normalem]{ulem} @@ -378,6 +374,10 @@ $endif$ \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available \urlstyle{same} % disable monospaced font for URLs +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ $if(verbatim-in-note)$ \VerbatimFootnotes % allow verbatim text in footnotes $endif$ -- cgit v1.2.3