LaTeX, Day 3
2025-09-03
Citations 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 \citep{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!
Allow you to use LaTeX in ways beyond its base features
“Declared” in the preamble with the command \usepackage{packagename}
Can conflict with each other!
For this reason, the order in which you install the packages actually does matter.
lipsum package generates placeholder text.enumitemitemize = black dots, fixed indentation, spacingenumerate = 1., 2., 3. … onlyenumitem to see how it works\documentclass{article}
\usepackage{enumitem} % no options
\begin{document}
% Default enumerate
\begin{enumerate}
\item Alpha
\item Beta
\end{enumerate}
% Customized enumerate (full label syntax)
\begin{enumerate}[label=(\alph*), start=3, nosep, leftmargin=*]
\item starts at (c)
\item then (d)
\end{enumerate}
\end{document}\begin{enumerate}[label=(\alph*), start=3, nosep, leftmargin=*]
shortlabels to the package.\documentclass{article}
\usepackage[shortlabels]{enumitem}
\begin{document}
% Same effect, shorter to type:
\begin{enumerate}[(a)] % shorthand for label=(\alph*)
\item alpha
\item beta
\end{enumerate}
% Start at (c) with shorthand:
\begin{enumerate}[(a), start=3, nosep, leftmargin=*]
\item starts at (c)
\item then (d)
\end{enumerate}
% Other shorthands:
\begin{enumerate}[A.] % -> A., B., C.
\item First
\item Second
\end{enumerate}
\begin{enumerate}[i.] % -> i., ii., iii.
\item One
\item Two
\end{enumerate}
\end{document}tipa
There are two ways you can use TIPA:
\textipa environmentTo find the symbols, check out the TIPA manual
phonrule package\documentclass{article}
\usepackage{phonrule} #phonological rule package
\usepackage{tipa}
\begin{document}
\begin{enumerate}
\item \phonb{s}{z}{V}{V} (\textbackslash phonb)
\item \phonl{k}{c}{i} (\textbackslash phonl)
\item \phonr{t}{ts}{u} (\textbackslash phonr)
\item \phon{\textturnw}{w} (\textbackslash phon)
\item \phonb{\phonfeat{+stop \\ +consonant \\ +alveolar}}{[\textfishhookr]}{ \phonfeat{+vowel \\ +stressed}}{\phonfeat{+vowel \\ +stressed}}
\end{enumerate}
\end{document}| 1sg | 2sg | 3sg |
|---|---|---|
| pagis | pagat | pak |
| tabis | tabat | tap |
| zobis | zobat | zop |
| bagis | bagat | bag |
| zudis | zudat | zud |
\documentclass{article}
\usepackage{tipa} %for ipa
\usepackage[table]{xcolor} %for shading*
\usepackage{pifont} %for pointing hand
\usepackage{arydshln} %for dashed lines
\usepackage{rotating} %for angled text
\begin{document}
\begin{table}[h]
\centering
\renewcommand{\arraystretch}{1.2}
\setlength{\tabcolsep}{6pt}
\begin{tabular}{|rrl||*{3}{c|}}
\hline
\multicolumn{3}{|c||}{\textipa{/tup/}} &
\rotatebox{45}{NoCoda} &
\rotatebox{45}{Dep-V} &
\rotatebox{45}{Max-C} \\
\hline\hline
a. & & \textipa{tup} & $\ast$! & \cellcolor{lightgray} & \cellcolor{lightgray} \\
\hline
b. & \ding{43} & \textipa{tu} & & & \cellcolor{lightgray}$\ast$ \\
\hline
c. & & \textipa{tupi} & & $\ast$! & \cellcolor{lightgray} \\
\hline
\end{tabular}
\renewcommand{\arraystretch}{1}
\end{table}
\end{document}