Chapter 3 Introduction to LaTex
This is a brief introduction to LaTeX, with a heavy focus on how you can understand and start using LaTeX. For a more detailed introduction, see the intro offered by Overleaf. I emphasize one advantage: to produce beautiful and reliable documents. In short, you should write academic papers using LaTeX.
3.1 General Structure
Every LaTeX document consist of the following general form. Unlike R, comments are added by the % sign – the % and everything following it (till the end of the paragraph) will be ignored.
prologue % usually empty
\documentclass[options-list]{document-class}
preamble
\begin{document}
document-body
\end{document}
Commands start with a backslash. The \documentclass command with the argument in the curly braces telling LaTeX what kind of document we are creating. For instance, \documentclass{article} tells it to create an article. The square brackets further specify the details. For instance, \documentclass[11pt]{article} tells LaTeX to make the font size 11pt.
preamble includes commands that define information about and influence the style of the document. It can also include commands that load add-on packages to be used in the document.
3.2 Commands and Environments
3.3 Additional Information
For additional commands, environments, and packages, you can also google. You can also consult the wiki for LaTeX. Websites such as CrossValidated and stackoverflow will be your friends for the years to come where you can ask questions and search for answers. These two sites are also great places for statistic and programming questions. Finally, google will typically leads you to these sites.