我必须坦白,今天是我第一次使用Sweave或LaTeX。是的,这是真的。今天我意识到,在我的参与缺失的情况下,“40岁前”桶清单不会自行解决。像我们这一代人中的许多男性一样,学习Sweave和LaTeX也在我的桶清单上。
有了这个冗长的前言,我写了一个非常好的首个Sweave文档:
\documentclass{article}
\begin{document}
\title{Look Mom! I'm doing \LaTeX}
\author{JD Long}
\maketitle
\section{Where I get both funky and fresh}
<<make some randomness>>=
set.seed(12)
t <- rnorm(100)
@
and an example plot
\begin{center}
<<fig=TRUE,echo=FALSE>>=
plot(density(t))
@
\end{center}
This is a very simple example of how we might get started with Sweave. You know what comes next, right? That's right... Lorem Ipsum, ladies!
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sed sem est. Pellentesque massa magna, ullamcorper eget lacinia sit amet, dignissim ac leo. Fusce hendrerit elit vitae lacus mollis suscipit.
\end{document}
这会产生令人惊叹的输出结果:
![enter image description here](https://istack.dev59.com/KA9E7.webp)
那么我该如何将 Tufte-LaTeX 引入我的 Sweave 文档,并使用它使我的文档更加神奇呢?