Skip to content

Instantly share code, notes, and snippets.

@lf-araujo
Last active April 14, 2019 20:22
Show Gist options
  • Save lf-araujo/f9334cbfe5b8d401febf8f86e6be61e9 to your computer and use it in GitHub Desktop.
Save lf-araujo/f9334cbfe5b8d401febf8f86e6be61e9 to your computer and use it in GitHub Desktop.
Letter Template Update

Letter Template Update

It's been a while since the creation of Mighty_Make and I have learned more about creating a builder with GNU's Make. The last published example on quickly creating a document with pandoc was a letter pandoc template. Here it will be revisited, as the template received alterations over the last year. As usual the division between style, content, and tool will be followed and this small text will mainly discuss the style.

This is how it looks:

![]( /images/Captura de tela de 2017-12-26 20-18-27.png )

For the production of the pandoc generated documents a strikingly effective workflow uses Sublime Text 3. This alone should take care of most text edition needs.

The styling of letters in LaTeX can be done with multiple classes. However, these are usually an overkill for such a simple task. The template previously published among these notes was inspired by Mattia Tezzele’s work and the following will still be.

The following template is published in the same github repository as before. It consists of the latest version of Mighty_Make where the user will only need to change two files. The first file is the source/letter.md and the second is the style/letterhead.md. The latter should only be edited/used in case the user represents a company or has a small company for which she wants to create a letterhead.

In the yaml header a letterhead: true options is available. If present it will create a letterhead, similar to Mattia Tezzele’s letter with letterhead and if absent it will create a letter with a simpler but elegant titling (more like a header).

To follow the example one needs to have git, pandoc, pandoc-citeproc, and pandoc-crossref installed in the system. It starts by installing the package:

git clone https://github.com/lf-araujo/pandoc-letter.git

Or one can simply import the letter theme with:

make fetch THEME="https://github.com/lf-araujo/pandoc-letter"

Edit the aforementioned files and cd into the base directory and run make. The tool now runs in Windows (it is probably quicker to install it in the Linux Subsystem for Windows), Mac and Linux. That is it, the make command will open the document produced at the output directory once it is finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment