Closed kwohlfahrt closed 10 years ago
I'm surprised this hasn't popped up before as it looks like the current implementation isn't right. If you want a quick fix then change \documentclass{article}
to \documentclass{scrartcl}
in the default template. See here for more description about the scrartcl
class.
That's quite funny; I just came across the same issue myself (though when defining a subtitle using the YAML block). Thanks for the fix.
It should be noted that one can simply add documentclass: scrartcl
to the YAML metadata to override it. Doing this significantly changes the appearance of the document (though its defaults are probably better than the standard article
document class).
Rather than depending on KOMA-Script (which provides scrartcl), I think I'd rather just change the default template to something like:
$if(title)$
\title{$title$$if(subtitle)$\\\vspace{1em}{\large $subtitle$}$endif$}
$endif$
+++ mpickering [Jun 09 14 10:05 ]:
I'm surprised this hasn't popped up before as it looks like the current implementation isn't right. If you want a quick fix then change \documentclass{article} to \documentclass{scrartcl} in the default template. See [1]here for more description about the scrartcl class.
— Reply to this email directly or [2]view it on GitHub.
References
Whatever you think: using \subtitle is certainly more elegant, and it might not be much of an issue, since KOMA-Script is even included with BasicTeX. But I'm still very new to TeX. It would, overall, be really nice to have something that provides better PDFs by default in pandoc (and one that didn't trip so often over Unicode), but scrartcl isn't an incredible improvement over the standard article class.
pandoc 1.12.2.1
pandoc -f rst document.rst --smart -o document.pdf
pandoc: Error producing PDF from TeX source.
! Undefined control sequence.
l.67 \subtitle
You need to upgrade to 1.13.2 to get the fix.
The following reStructuredText document causes an error (note addition of the subtitle):
The
rst2latex.py
provided by docutils works as expected, thePandoc User's Guide
is generated as a large title, withPandoc Subtitle
below that as a subtitle.Synopsis
is then a top-level header.The issue occurs both with pandoc 1.12 and 1.12.4, installed from gentoo repository.