I am converting a markdown file to pdf using pandoc. How can I suppress page numbers in the pdf file?
There are actually two steps involved in converting a Markdown file to a PDF file: The Markdown source file is converted to a LaTeX source file. Pandoc invokes the pdflatex or xelatex or other TeX command and converts the . tex source file to a PDF file.
You can't. You can try opening the PDF in Word or Google Docs and saving in a format from which pandoc can convert directly.
The default LaTeX template of Pandoc can be found at https://github.com/jgm/pandoc/tree/master/data/templates (named default.
Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. Pandoc can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx.
I will answer my own question here:
I learned in this post that pandoc markdown understands standard latex commands. Take for example the following markdown file called test.md
:
% A pdf file without page numbers created from pandoc markdown % sieste % June 2013 \pagenumbering{gobble} # First header etc
and the command
pandoc test.md -o test.pdf
produces the desired pdf without page numbers.
I tried to use \pagestyle{empty}
at first, but it did not work: If I put it where \pagenumbering{gobble}
is now, page numbering is only turned off from page 2 on, and the first page is still numbered. And if I put it before the title block, the title in the pdf is messed up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With