aboutsummaryrefslogtreecommitdiff
path: root/test/writers-lang-and-dir.latex
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-03-13 10:48:09 -0700
committerJohn MacFarlane <[email protected]>2022-03-13 10:48:09 -0700
commitf3fcdd52c8bc722862ea73958d41fe53ec03ec1d (patch)
tree045a3cbb879d9826da1e7bebd36f5abc38b4080c /test/writers-lang-and-dir.latex
parent6b79e944bb3fba348fc23455e00b18558f8e17ab (diff)
LaTeX template: move hyperref near end of preamble.
It now comes after header-includes and right before title, author, date, abstract. The hyperref documentation says: “Make sure it comes last of your loaded packages”. The reason is that it redefines many LaTeX commands. For example, loading it after titlesec (which might be loaded in header-includes) causes links in the table of contents to point to the wrong page (#7960). Closes #5811. Note: Users who presuppose hyperref in their header-includes will now have to add `\usepackage{hyperref}` to their header-includes to make it available there. (The redundant `\usepackage` will do no harm in this case.)
Diffstat (limited to 'test/writers-lang-and-dir.latex')
-rw-r--r--test/writers-lang-and-dir.latex10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex
index 1f7ce262b..eb466c266 100644
--- a/test/writers-lang-and-dir.latex
+++ b/test/writers-lang-and-dir.latex
@@ -34,11 +34,6 @@
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
-\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
-\hypersetup{
- pdflang={en},
- hidelinks,
- pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
@@ -68,6 +63,11 @@
\newenvironment{RTL}{\beginR}{\endR}
\newenvironment{LTR}{\beginL}{\endL}
\fi
+\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
+\hypersetup{
+ pdflang={en},
+ hidelinks,
+ pdfcreator={LaTeX via pandoc}}
\author{}
\date{}