Home

Awesome

Letter Boilerplate

A boilerplate to quickly and painlessly generate high-quality letters through LaTeX.

Why settle for MS Word when you can get the job done using your text editor?

preview

Dependencies

  1. LaTeX with the following extra packages: fontspec geometry ragged2e enumitem xunicode xltxtra hyperref polyglossia footmisc (also, datetime2 plus its language modules if you want to use a custom date, see below in the settings section)
  2. Pandoc, the universal document converter.

I highly recommend TinyTeX as LaTeX distribution. All additional packages can be installed with tlmgr as needed.

Getting started

  1. Open letter.md and fill the YAML frontmatter with your details, your recipient's details, optional subject line, and the desired settings.
  2. Write your letter in markdown below.
  3. Run make to compile the PDF.

If a file named signature.pdf is present in the directory, the boilerplate will automatically print it after the letter's body as a final touch. Follow this method to import your own signature.

Note: this template needs to be compiled with XeTeX.

Note for Windows users

Although I didn't test it, you can probably use this on Windows, too. Both Pandoc and LaTeX can be installed on Windows and you should be able to run makefiles on Windows through Cygwin. If that's too much hassle, this command should do the trick in Powershell:

pandoc letter.md -o output.pdf --template=template.tex --pdf-engine=xelatex

Available settings

Custom letterhead

If you have already designed your own letterhead and want to use it with this template, including it should be easy enough. Set the letterhead option to true to activate the wallpaper package in the template. wallpaper will look for a file named letterhead.pdf in the project root folder and print it on the PDF before compiling the document. Change the fonts to match the ones in your letterhead, adjust the margins with geometry and you should be all set.

Recommended readings

Resources

See also

License

MIT