I'm trying to use pandoc and context to convert a markdown file to a pdf. The command I'm using is:

pandoc -t context -o sample.pdf sample.md

The sample markdown file I'm using is:

# Hello
* Trying to drop the page numbers

Which makes for a nice PDF, but has undesired page numbers at the top of the page. How can I get rid of the page numbers (see top of screenshot)?

enter image description here

2 Answers 2


Your self-answer works in principle but might render your document unportable, i.e. you might not be able to produce clean HTML output anymore. I rather suggest you create a new file preamble.tex with the content


And then run pandoc with

pandoc -t context --include-in-header=preamble.tex -o sample.pdf sample.md

Figured it out. Was able to do with including commands into the markdown file like this:


\setuplayout [header=0pt]

# Hello
* Trying to drop the page numbers

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .