From 43140ba0432b30571bcb524ce8c5641835c16f6c Mon Sep 17 00:00:00 2001 From: Salim B Date: Thu, 3 Oct 2019 19:20:22 +0200 Subject: [PATCH] Improve formatting of footnotes. (#107) - improve footnote formatting using package `footmisc` - make the references from the footnotes at the bottom of the page into links back to the occurence of the footnotes in the main text and introduce an option `disable-footnote-backlinks` to disable this new behaviour. - load pkg footnotebackref after pkg footnotehyper - make footnote prettifying optional using template var --- README.md | 8 ++++++++ eisvogel.tex | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/README.md b/README.md index 7ac5481..330a863 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,14 @@ This template defines some new variables to control the appearance of the result the text on the right side of the footer + - `footnotes-pretty` (defaults to `false`) + + prettifies formatting of footnotes (requires package `footmisc`) + + - `footnotes-disable-backlinks` (defaults to `false`) + + disables making the reference from the footnote at the bottom of the page into a link back to the occurence of the footnote in the main text. + - `book` (defaults to `false`) typeset as book diff --git a/eisvogel.tex b/eisvogel.tex index 3bd2531..48d0974 100644 --- a/eisvogel.tex +++ b/eisvogel.tex @@ -248,6 +248,14 @@ $endif$ \definecolor{default-citecolor}{HTML}{4077C0} \definecolor{default-urlcolor}{HTML}{4077C0} \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available +$if(footnotes-pretty)$ +% load footmisc in order to customize footnotes (footmisc has to be loaded before hyperref, cf. https://tex.stackexchange.com/a/169124/144087) +\usepackage[hang,flushmargin,bottom,multiple]{footmisc} +\setlength{\footnotemargin}{0.8em} % set space between footnote nr and text +\setlength{\footnotesep}{\baselineskip} % set space between multiple footnotes +\setlength{\skip\footins}{0.3cm} % set space between page content and footnote +\setlength{\footskip}{0.9cm} % set space between footnote and page bottom +$endif$ \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} \hypersetup{ $if(title-meta)$ @@ -342,6 +350,11 @@ $else$ \makesavenoteenv{longtable} $endif$ $endif$ +% add backlinks to footnote references, cf. https://tex.stackexchange.com/questions/302266/make-footnote-clickable-both-ways +$if(footnotes-disable-backlinks)$ +$else$ +\usepackage{footnotebackref} +$endif$ $if(graphics)$ \usepackage{graphicx,grffile} \makeatletter