Data Science Desktop Survival Guide
by Graham Williams |
|||||
Basic LaTeX Template |
20200602 LaTeX is a language for programming, like R—programming over words rather than programming over data. It is what we call a markup language and has its own collection of commands that tell the LaTeX software what to do. Within when we create a new knitr document a skeleton of LaTeX commands will be automatically inserted into the document for us. From this initial script we can readily produce well formatted reports and presentations.
Once we have a new text document with a filename extension of .Rnw we will enter the LaTeX commands intermixed with the text of our narrative intermixed with the R commands performing the data wrangling and the analyses we perform.
\documentclass{article}
\begin{document} \end{document}
This is the most basic of documents—something we often call the Hello World example, though perhaps we would want to include the string Hello World between the begin and end of the document.
|
\documentclass{article}
\begin{document} Hello World. \end{document}
LaTeX provides an extensive collection of commands including the
basics like highlighting text (for example,
|
\begin{itemize}
\item Text for the \bold{first} item. \item Text for the \italic{second} item. \item ... \end{itemize}
We will see many examples as we proceed through this chapter and there are very many guides to LaTeX available on the Internet. Our aim is to quickly be comfortable with using LaTeX and not to let it get in our way, recognising it as a very powerful language.
|