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
This commit is contained in:
Albert Krewinkel
2022-05-17 16:12:53 +02:00
parent 6eb77586b4
commit 9c29d840ff
+4 -4
View File
@@ -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$