git.iko.soy/typeable/pandoc
on master help sign in
LaTeX template: Use `footnotehyper` if available (#5234)

Use the [`footnotehyper`](https://ctan.org/pkg/footnotehyper/) package if available. This is a rewrite of `footnote` that is compatible with `hyperref` and `babel-frenchb`. This patch also addresses the incompatibility with `xcolor` noted in #4861, but the new package has only been available since 2016, so this template still loads `xcolor` earlier for compatibility with older distributions. Note that the `footnote` package is part of `collection-latexrecommended` in TeX Live, so there shouldn't be any problem loading it unconditionally as we now do if `footnotehyper` is not available.

commit3707bed4c1f211f5cebc22820ad6d70e36c04fcc authorAndrew Dunning <adunning@users.noreply.github.com> dateWed 23 Jan 2019, 00:13 (8 years ago) parent3ad2255
2 files changed+8−6
MANUAL.txt+5−4 data/templates/default.latex+3−2
MANUAL.txt+5−4
@@ -145,11 +145,11 @@ When using LaTeX, the following packages need to be available
145145[`ifxetex`], [`ifluatex`], [`listings`] (if the
146146`--listings` option is used), [`fancyvrb`], [`longtable`],
147147[`booktabs`], [`graphicx`] and [`grffile`] (if the document
148−contains images), [`hyperref`], [`xcolor`] (with `colorlinks`),
148+contains images), [`hyperref`], [`xcolor`],
149149[`ulem`], [`geometry`] (with the `geometry` variable set),
150150[`setspace`] (with `linestretch`), and
151151[`babel`] (with `lang`). The use of `xelatex` or `lualatex` as
152−the LaTeX engine requires [`fontspec`]. `xelatex` uses
152+the PDF engine requires [`fontspec`]. `xelatex` uses
153153[`polyglossia`] (with `lang`), [`xecjk`], and [`bidi`] (with the
154154`dir` variable set). If the `mathspec` variable is set,
155155`xelatex` will use [`mathspec`] instead of [`unicode-math`].
@@ -166,7 +166,7 @@ pandoc does not require them to be present:
166166[`parskip`] (for better inter-paragraph spaces),
167167[`xurl`] (for better line breaks in URLs),
168168[`bookmark`] (for better PDF bookmarks),
169−and [`footnote`] (to fix footnotes in tables).
169+and [`footnotehyper`] or [`footnote`] (to allow footnotes in tables).
170170
171171[TeX Live]: http://www.tug.org/texlive/
172172[`amsfonts`]: https://ctan.org/pkg/amsfonts
@@ -182,6 +182,7 @@ and [`footnote`] (to fix footnotes in tables).
182182[`fancyvrb`]: https://ctan.org/pkg/fancyvrb
183183[`fontspec`]: https://ctan.org/pkg/fontspec
184184[`footnote`]: https://ctan.org/pkg/footnote
185+[`footnotehyper`]: https://ctan.org/pkg/footnotehyper
185186[`geometry`]: https://ctan.org/pkg/geometry
186187[`graphicx`]: https://ctan.org/pkg/graphicx
187188[`grffile`]: https://ctan.org/pkg/grffile
@@ -203,6 +204,7 @@ and [`footnote`] (to fix footnotes in tables).
203204[`upquote`]: https://ctan.org/pkg/upquote
204205[`weasyprint`]: http://weasyprint.org
205206[`wkhtmltopdf`]: https://wkhtmltopdf.org
207+[`xcolor`]: https://ctan.org/pkg/xcolor
206208[`xecjk`]: https://ctan.org/pkg/xecjk
207209[`xurl`]: https://ctan.org/pkg/xurl
208210
@@ -1606,7 +1608,6 @@ LaTeX variables are used when [creating a PDF].
16061608[`book`]: https://ctan.org/pkg/book
16071609[KOMA-Script]: https://ctan.org/pkg/koma-script
16081610[`memoir`]: https://ctan.org/pkg/memoir
1609−[`xcolor`]: https://ctan.org/pkg/xcolor
16101611[LaTeX Font Catalogue]: http://www.tug.dk/FontCatalogue/
16111612[`mathpazo`]: https://ctan.org/pkg/mathpazo
16121613[LaTeX font encodings]: https://ctan.org/pkg/encguide
data/templates/default.latex+3−2
@@ -247,8 +247,9 @@ $if(beamer)$
247247\def\fnum@table{\tablename~\thetable}
248248\makeatother
249249$else$
250−% Fix footnotes in tables (requires footnote package)
251−\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{longtable}}{}
250+% Allow footnotes in longtable head/foot
251+\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
252+\makesavenoteenv{longtable}
252253$endif$
253254$endif$
254255$if(graphics)$