Skip to content

Undefined control sequence \setstretch when enabling title page #431

@gabrieldevillers

Description

@gabrieldevillers

I am getting this error when using titlepage: true in metadata fragment:

Error producing PDF.
! Undefined control sequence.
l.398   \setstretch

My command:


pandoc.exe metadata.md README.md  -o doc.pdf --template eisvogel --listings --lua-filter=my_filter.lua --resource-path=mydir --variable colorlinks=true

This might be related to this pandoc issue.

Seems like a bug to me, but I found a workaround:

Add this to the metadata:

header-includes: |
    \usepackage{setspace}

I got help from here.

Environment:

MS Windows 24H2

$ pandoc --version
pandoc.exe 3.7.0.2
Features: +server +lua
Scripting engine: Lua 5.4

$ latex --version
pdfTeX 3.141592653-2.6-1.40.28 (TeX Live 2025)
kpathsea version 6.4.1
Copyright 2025 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.46; using libpng 1.6.46
Compiled with zlib 1.3.1; using zlib 1.3.1
Compiled with xpdf version 4.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions