Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.01k stars 957 forks source link

Setting 'linestretch' variable affects footer spacing #300

Open studoot opened 1 year ago

studoot commented 1 year ago

I have a situation where I'm using eisvogel.tex (from current HEAD) with linestretch set to 1.1, with a table-of-contents on its own page (as defined in my attached Pandoc defaults file, a.yaml). When I convert the attached Markdown file to PDF, using the command line below, I find that the footer on the ToC page has different spacing between footer rule and text than the following pages.

pandoc a.md -o a.pdf --defaults a.yaml

a.md a.yaml a.pdf

When I look at the template, I see that if the linestretch variable is used, the associated \setstretch macro is used at a different place within the code than if no linestretch variable is set. When I change the template to use the following code instead, my problem goes away:

\usepackage{setspace}
\setstretch{$if(linestretch)$ $linestretch$ $else$ 1.2 $endif$ }

When I look at the commit history, I find that linestretch was previously applied at the same place that the default value is, but that use was deleted during a merge of Pandoc's default template.

Anyway - if this fix is OK, I'll raise a PR for it - just let me know...