Git Product home page Git Product logo

letter-template-simpler's Introduction

A letter template in LaTeX (using scrlttr2) that can be used with pandoc

This project does not try to implement all features provided by the scrlttr2 package but rather give you a template that is usable on a personal day to day basis.

Setup

  1. Install pandoc for your platform.
  2. Place the letter.latex file inside the ~/.pandoc/templates directory (create the directory if it does not exist yet).

Usage

You can tell pandoc to use the letter template using the --template letter argument. The most basic pandoc command hence looks like this:

pandoc example.md -o example.pdf --template letter

Example output

Parameters

The template provides some variables you can set inside the YAML meta data block. The block is surrounded by --- and can be located anywhere inside your markdown document. In most cases the block is located at the beginning of your document.

Please note: All parameters, except the opening parameter, are optional. However to make good use of this template you should define most of the parameters.

The following code block shows a YAML meta data block that contains all parameters.

from:
  - name: Alice Diffie
  - address: Example Road 1, 12345 Town
to:
  - company: Crypto Company
  - name: Bob Hellman
  - street: Key Avenue 2
  - town: 12345 Town
place: Town
date: 10.10.2018
opening: Dear Bob,
closing: Best regards
subject: Let's talk about keys
signature: ./signature.pdf

  • from: A list of information identifying the sender.
    • name: The sender's name.
    • address: The sender's address.
  • to: A list of information identifying the receiver.
    • company: If the receiver is a company, you can specify the company's name.
    • name: The receiver's name.
    • street: The receiver's street (including the house number).
    • town: The receiver's town (including the postal ode).
  • place: The place where the letter was written. If no place is supplied, no place is rendered next to the letter's date.
  • date: The date when the letter was written. If no date is supplied, today's date will be used instead. Please note: If no date is provided each time the letter is recompiled, the current date is used. If you thus plan to compile the letter on multiple days you should always specify a date.
  • opening: The letter's opening (e.g. Dear Bob,).
  • closing: The letter's closing (e.g. Best regards).
  • subject: The letter's subject rendered in a bold font (14pt) above the opening and below the letter's date.
  • signature: The sender's signature rendered below the opening and above the sender's name. The signature's image is shifted a few millimeters above the sender's name to create the "feeling" of a handwritten signature. The signature's height is limited to 1.8cm (the width is not limited). If the signature parameter is not provided only the sender's name is rendered below the closing. Please note: The path to the signature must not include non-alphanumerical characters (except space, slash and dot).

letter-template-simpler's People

Contributors

mariuskiessling avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.