The LaTex letter classes maybe not supported and may need some special treatments in Quarto.

With a minimal example,
```markdown
---
format:
  pdf:
    documentclass: scrlttr2
---

Dear Quarto:

```
I got the following messages:

```
❯ quarto preview letter.qmd
pandoc
  to: latex
  output-file: letter.tex
  standalone: true
  pdf-engine: xelatex
  variables:
    graphics: true
    tables: true
  default-image-extension: pdf
  filters:
    - crossref

metadata
  documentclass: scrlttr2
  classoption:
    - DIV=11
    - numbers=noendperiod
  papersize: letter
  header-includes:
    - '\KOMAoption{captions}{tableheading}'

runnning xelatex - 1
  This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020/Debian) (preloaded for
mat=xelatex)
   restricted \write18 enabled.
  entering extended mode

updating tlmgr

updating existing packages

compilation failed- error
Package scrbase Error: unknown option `captions=tableheading'.

See the scrbase package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.76 \KOMAoption{captions}{tableheading}


see letter.log for more information.
ERROR: Error
    at renderFiles (file:///home/julian/quarto-cli/src/command/render/render.ts:244:23
)
    at async render (file:///home/julian/quarto-cli/src/command/render/render-shared.t
s:75:18)
    at async renderForPreview (file:///home/julian/quarto-cli/src/command/preview/prev
iew.ts:171:24)
    at async render (file:///home/julian/quarto-cli/src/command/preview/preview.ts:70:
12)
    at async preview (file:///home/julian/quarto-cli/src/command/preview/preview.ts:72
:18)
    at async Command.fn (file:///home/julian/quarto-cli/src/command/preview/cmd.ts:233
:7)
    at async Command.execute (https://deno.land/x/cliffy@v0.19.3/command/command.ts:99
7:7)
    at async Command.parse (https://deno.land/x/cliffy@v0.19.3/command/command.ts:918:
16)
    at async Command.parse (https://deno.land/x/cliffy@v0.19.3/command/command.ts:870:
16)
    at async quarto (file:///home/julian/quarto-cli/src/quarto.ts:93:3)

```

I also tried to use a tex template and included more fields (e.g., fromname, toname...) in the yaml header, it did not work neither, with an error:

```
compilation failed- error
LaTeX Error: Command \figurename undefined.
```

2022-01-08T19:44:18Z
juliantao
closed
LaTex letter classes
https://github.com/quarto-dev/quarto-cli/issues/257