From f8e286b82328b545172f0f9ab6b26530837c06b2 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 25 Jul 2018 18:01:22 +0200 Subject: [PATCH] Use footnotehyper rather than footnote if hyperref is used Fixes: #11212 --- lib/chkconfig.ltx | 1 + src/LaTeXFeatures.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index ec140bb8cd..be2972011c 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -318,6 +318,7 @@ \TestPackage{fontspec} \TestPackage{footmisc} \TestPackage{footnote} +\TestPackage{footnotehyper} \TestPackage{forest} \TestPackage{framed} \TestPackage{geometry} diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 5f83283460..c78e735730 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -996,7 +996,6 @@ char const * simplefeatures[] = { "todonotes", "forest", "varwidth", - "footnote", "tablefootnote", "afterpage", "tabularx", @@ -1123,6 +1122,13 @@ string const LaTeXFeatures::getPackages() const // The rest of these packages are somewhat more complicated // than those above. + if (mustProvide("footnote")) { + if (isRequired("hyperref")) + packages << "\\usepackage{footnotehyper}\n"; + else + packages << "\\usepackage{footnote}\n"; + } + // [pdf]lscape is used to rotate longtables if (mustProvide("lscape")) { if (runparams_.flavor == OutputParams::LATEX