LaTeX, Day 2
2025-08-29
Documentclass
Preamble
Packages
Comments
Commands
Environments
Load up your “example_project”. There are lots of features in this document. Scan the code, and identify how to do the following:
“Math Mode”
Changing the margins & paper size
Changing the document language
Spell check settings
Adding citations & references
Identify their type: commands or environments or something else?
When would you use math mode in Linguistics?
Easy Superscripts & Subscripts
Semantic Formulae
Greek Letters
Primes for intermediate projections / traces in Syntax
L(n, j) ∨ C(j)
Remember “alpha notation” from phonology? We need a way to use these symbols.
We’ll learn in a bit how to input Greek letters outside of mathmode.
These are all lowercase – how do you think we can make them uppercase?
Return to your “301-LaTeX-practice” project. Create the following semantic notation formula in LaTeX using math mode. Refer to page 31 of Anke Himmelreich’s pdf for the commands.
\textit{words in italics}
\textsl{words slanted}
\textsc{words in smallcaps}
\textbf{words in bold}
\texttt{words in teletype}
\textsf{sans serif words}
\textrm{roman words}
\underline{underlined words}
\uuline{doubly underlined text}
\uwave{wavy underlined text}
\sout{crossed out text}
\xout{x'd out text}\textit{words in italics}
\par \textsl{words slanted}
or
\textit{words in italics}
\textsl{words slanted}\begin{bfseries}
blah blah blah
\end{bfseries}
\begin{itshape}
blah blah blah
\end{itshape}
\begin{em}
blah blah blah
\end{em}{\tiny tiny words} tiny words
{\scriptsize scriptsize words} scriptsize words
{\footnotesize footnotesize words} footnotesize words
{\small small words} small words
{\normalsize normalsize words} normalsize words
{\large large words} large words
{\Large Large words} Large words
{\LARGE LARGE words} LARGE words
{\huge huge words} huge wordsCitations in LaTeX will refer to a .bib file
Let’s create one in our “301-LaTeX-practice” project folder
Call this .bib file “refs.bib”
@article{smith2017,
author = {Smith, John},
title = {Some paper},
year = {2017},
journal = {Journal of Research},
volume = {2},
number = {1},
pages = {1--69}
}
@book{knuth1986,
author = "Donald E. Knuth",
title = "The {TeX} Book",
year = "1986",
publisher = "Addison-Wesley Professional",
address = "Massachusetts"
}With these two references now in the system, let’s practice citing them.
Edit your preamble with the following text, after the documentclass command.
\documentclass{article}
\usepackage{natbib}
\bibliographystyle{apalike}
\begin{document}
\bibliography{refs}
\end{document}
\documentclass{article}
\usepackage{natbib}
\bibliographystyle{apalike}
\begin{document}
\title{My First Document}
\author{My Name}
\date{December 6, 2017}
\maketitle
\section{Introduction}
This is the introduction.\cite{smith2017}
\section{Methods}
\subsection{Stage 1}
The first part of the methods.\nocite{knuth1986}
\subsection{Stage 2}
The second part of the methods.\cite[p. 215]{smith2017}
\section{Results}
Here are my results.\cite{knuth1986,smith2017}
\bibliography{refs}
\end{document}A much more user-friendly reference platform is Zotero.
Click here to sign up for the platform or log into your account.
Add at least one reference if you do not have one already.
Select all of the references to export
Click the “upwards arrow” icon
You now have a .bib file!
\(\forall w^{'} (wRw^{'} \rightarrow \exists e^{'} \land Ag(e^{'}, x)))_{nuclearscope}\)