Skip to content
Pandoc template for writing letters in markdown
Branch: master
Clone or download
wzel and aaronwolen Add subject (#23)
* Add subject
* Document subject
Latest commit c6d9f4c Jun 19, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Revert "Remove coloured links from example" Nov 4, 2017
.travis.yml Add xcolor to Travis Nov 4, 2017
LICENSE Add LICENSE Nov 3, 2017 Add subject (#23) Jun 19, 2019
template-letter.tex Add subject (#23) Jun 19, 2019

A simple letter template for Pandoc

Build Status Package-License

Authors: Aaron Wolen and Andrew Dunning

This template allows you to write letters in Markdown and convert them to nice looking PDFs using Pandoc and LaTeX. It accepts arguments used in the LaTeX letter class, including:

  • opening
  • closing
  • address
  • return-address
  • postscript
  • enclosures list
  • carbon-copy list

All of which can be specified in a YAML metadata block. Additional Pandoc/LaTex options can be configured directly in the metadata block. For example:

author: Aaron
opening: To whom it may concern,
closing: Sincerely,
- 123 Street Rd
- Chicago, IL
- My Home
- 456 Road St.
- New York, NY

links-as-notes: true

Note that each address component should start with a hyphen. The provided example letter can be compiled with the following command:

pandoc --template=template-letter.tex example/ -o example/letter.pdf

You can see the PDF output here.


The following can be set either as variables when executing pandoc or added to the YAML metadata.

address : Name and address of the recipient; takes a list for a multi-line address.

subject : Subject of the letter.

author : Writer of the letter; can take a list for a multi-line signature.

blockquote : Changes style of block quotations to match bootstrap (requires the mdframed package).

cc : Recipients to be carbon-copied; can take a list for multiple recipients.

closing : Text for the complementary close.

closing-indentation : Amount for closing signature block to be intended from left margin.

date : Custom date (current date will be automatically inserted if not specified).

encl : List of enclosures.

letterhead : Image file to be used as letterhead (requires the wallpaper package), applied only to the first page.

opening : Text for the salutation.

ps : Text to be added at the end of the letter as a postscript.

return-address : Address of the sender: takes a list to allow a multi-line address.

signature : Image file for a signature.

signature-before, signature-after : Allows adjustment of vertical space surrounding signature.

signature-width : Specify width of signature image file.


GPL-3 for pandoc-letter and the underlying Pandoc template.

You can’t perform that action at this time.