Examples

Worked letters.

Front matter for an English letter, a French one, and one with a letterhead and a signature.

The rendered letter on this site is built by the format as the site is published. This page is the front matter behind it, and three variations.

The letter on this site

author:
  - name: John Doe
    affiliation:
      - name: Dummy org
        department: Cool Dep
        address: Somewhere
        city: Magic city
        country: best one
        postal-code: 9999
format:
  letter-pdf:
    address:
      - Director Doe & Co
      - 35 Anthony Road
      - Newport
      - Ipswich IP3 5RT
    subject: collaboration
    opening: "Dear Sir or Madam,"
    closing: "Yours Faithfully,"
    cc:
      - Recipient 1
      - Recipient 2
    encl:
      - Enclosure 1
      - Enclosure 2
    ps: |
      PS: Lorem ipsum dolor sit amet, *consectetur* adipiscing elit.

address is the only required option. The author block is Quarto’s own, and supplies the sender’s name and address at the head of the letter. The date under it is today in the document language, which the format sets by default.

Carbon copies, enclosures, and a postscript

format:
  letter-pdf:
    cc:
      - Recipient 1
      - Recipient 2
    encl:
      - Enclosure 1
      - Enclosure 2
    ps: |
      PS: Lorem ipsum dolor sit amet, *consectetur* adipiscing elit.

Each is omitted from the letter when it is not given, and all three are set below the closing, in the order enclosures, carbon copies, postscript.

A French letter

format:
  letter-pdf:
    subject-title: Objet
    subject-suffix: " :"

French typography puts a non-breaking space before the colon, which is what the suffix is for. The meta-fr snippet writes this block for you.

A letterhead and a signature

format:
  letter-pdf:
    header-image: letterhead.png
    header-image-width: "0.5\\textwidth"
    signature-image: signature.png
    signature-image-width: 4cm

The letterhead sits above the opening salutation, the signature between the closing and the printed name.

Important

The backslash is doubled because the string is double-quoted in YAML. Written as "0.5\textwidth" the backslash is consumed and the width is lost.

The meta-sig snippet writes this block.

Source

The repository ships a complete starting point you can copy: template.qmd.

Back to top