Skip to contents

In addition to the YAML parameters shown in the first example, this letter displays some more parameters

  • lco via this parameter you can specify your own letter layout in a Letter Class Option file or use one of the layouts predefined by KomaScript (see Introduction to komaletter). Here the path to the default lco of the komaletter package is given, resulting in the same layout as without this parameter.
  • image in signature to make it look like it was hand signed.
  • signature-before is for fine tuning the vertical space between closing and signature.
  • return-phone, return-email to supplement sender information.
  • ps, cc includes a post scriptum and a carbon copy address.
  • colorlinks causes URLs and the like to be displayed in color.

RMarkdown of Letter

author: Max Mustermann
  - Musterstr. 12
  - 34567 Musterstadt
return-phone: +49-511-21311212
return-email: max@musterman.tld

  - An Herrn
  - Robert Nuske
  - Hauptstr. 31
  - 30167 Hannover

lco: "`r system.file('rmarkdown', 'templates', 'pdf', 'resources', 'maintainersDelight', package='komaletter')`"
colorlinks: true

date: 2020-12-31
place: Musterstadt

subject: Some Customizations
opening: Hi Robert,
closing: Cheers,
signature: "\\includegraphics{signature}"
signature-before: "0.5\\baselineskip"
cc: Dirk Eddelbuettel
ps: P.S. Beware of the copy editor!

output: komaletter::komaletter


far far away, behind the word mountains, far from the countries 
Vokalia and Consonantia, there live the blind texts. Separated they 
live in Bookmarksgrove right at the coast of the Semantics, a large 
language ocean. A small river named Duden flows by their place and 
supplies it with the necessary regelialia. It is a paradisematic 
country, in which roasted parts of sentences [fly into your mouth](www.example.tld).

Even the all-powerful Pointing has no control about the blind texts it
is an almost unorthographic life One day however a small line of blind
text by the name of Lorem Ipsum decided to leave for the far World of
Grammar. The Big Oxmox advised her not to do so, because there were
thousands of bad Commas, wild Question Marks and devious Semikoli, but
the Little Blind Text didn't listen.

She packed her seven versalia, put her initial into the belt and made
herself on the way. When she reached the first hills of the Italic
Mountains, she had a last view back on the skyline of her hometown
Bookmarksgrove, the headline of Alphabet Village and the subline of
her own road, the Line Lane. Pityful a rethoric question ran over her
cheek, then she continued her way. On her way she met a copy. The copy
warned the Little Blind Text, that where it came from it would have
been rewritten a thousand times.

Resulting PDF Letter

The Letter rendered from above RMarkdown document via rmarkdown::render() or RStudio Knit button is shown below. The original PDF is also available.

Here should be an image of the PDF letter