I'm using markdown to write a book with pandoc. Pandoc can generate headings using #
, ##
and so on, but I also want book parts (equivalent to \part
in LaTeX). I tried using #-
(a markup that some sites such as Leanpub use) but it doesn't work. So, how can I generate book parts?
If you use the raw_tex
extension, you can simply add \part
wherever you want it, e.g.:
\part{Part I}
# Heading
Blah
Add +raw_tex
to the input format when you run Pandoc to enable it:
pandoc --from markdown+raw_tex --to pdf -o book.pdf *.md