Quarto for letters? #2010
Replies: 4 comments 2 replies
-
|
This could be adapted for use with Quarto as a custom format (https://quarto.org/docs/extensions/formats.html). See also some more LaTeX specific documentation here: https://quarto.org/docs/journals/formats.html |
Beta Was this translation helpful? Give feedback.
-
|
@sammo3182 As far as I can tell, Note, the letters document class is highly restrictive. It doesn't have a figure environment, so none of the niftly quarto features for figure layout is going to work. Creating an extension that extends the letter document class to allow a few more standard latex environments will be needed. ---
format:
pdf:
documentclass: letter
keep-tex: true
geometry:
- "top=1in"
- "bottom=1in"
- "left=2in"
- "right=2in"
include-in-header:
text: |
\usepackage{hyperref}
\signature{Joe Bloggs}
\address{21 Bridge Street \\ Smallville \\ Dunwich DU3 4WE}
---
```{=tex}
\begin{letter}{Director \\ Doe \& Co \\ 35 Anthony Road
\\ Newport \\ Ipswich IP3 5RT}
\opening{Dear Sir or Madam:}
```
I am writing to you about a project I am doing. I hope you like this table:
```{r echo=FALSE}
knitr::kable(mtcars[1:2,])
```
The figure is also informative.
```{r echo=FALSE, warning=FALSE, fig.height=2}
library(ggplot2)
df <- data.frame(
gp = factor(rep(letters[1:3], each = 10)),
y = rnorm(30)
)
ds <- do.call(rbind, lapply(split(df, df$gp), function(d) {
data.frame(mean = mean(d$y), sd = sd(d$y), gp = d$gp)
}))
ggplot(df, aes(gp, y)) +
geom_point() +
geom_point(data = ds, aes(y = mean), colour = 'red', size = 3)
```
Thank you for your time and consideration.
I look forward to your reply.
```{=tex}
\closing{Yours Faithfully,}
\vfill
\ps
P.S. You can find the full text of GFDL license at
\url{http://www.gnu.org/copyleft/fdl.html}.
\encl{Copyright permission form}
\end{letter}
```
|
Beta Was this translation helpful? Give feedback.
-
|
I started
|
Beta Was this translation helpful? Give feedback.
-
|
Closing this as completed, as now there are several Quarto extension providing letter format. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
I used to use
linlpackage to create dynamic letters in r. Is there a way to do that in Quarto?Beta Was this translation helpful? Give feedback.
All reactions