Bonus: Customization¶
The following material is not part of the assignment but is useful to know.
Custom Section Headers¶
The titlesec package provides tools for customizing section headings.
\documentclass{article}
\usepackage{titlesec}
\usepackage{xcolor}
% custom \section headers
\titleformat{\section}{
\large % text size
\color{brown} % text color
\bfseries % bold text
\sffamily} % sans serif font
{\thesection}{1em} % Section numbering + space after number
{} % no code before the heading
[\titlerule] % horizontal line after the heading
% custom \subsection headers
\titleformat{\subsection}[runin]{ % No newline after subsection heading
\normalsize % text size
\color{blue} % text color
\scshape % small capitals
\rmfamily} % serif font
{\thesubsection}{0.5em} % Subsection numbering + space after number
{\underline} % underline heading
[] % no horizontal line after the heading
\begin{document}
\section{Introduction}
This is the introduction.
\subsection{Subintroduction}
This is a subsection within the introduction.
\end{document}
In the context of titlesec, the following commands format the font.
Command |
Description |
|---|---|
|
Bold |
|
Italics |
|
Slanted |
|
Small Capitals |
|
Roman (Serif) |
|
Sans Serif |
|
Typewriter |
The font size can be set to one of the following choices, from smallest to largest:
\tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, \Large, \LARGE, \huge, \Huge.
Citations with BibTex¶
LaTeX has a companion tool called bibtex for automatically handling citations to outside sources.
To use bibtex, list biographical information on sources in a separate .bib file.
% references.bib
@book{poole2015linear,
title = {Linear algebra: {A} modern introduction},
author = {Poole, David},
volume = {279},
year = {2015},
publisher = {Cengage Learning Florence, KY}
}
@article{shannon1948communication,
author = {Shannon, C. E.},
title = {A mathematical theory of communication},
journal = {The Bell System Technical Journal},
volume = {27},
number = {3},
pages = {379-423},
year = {1948},
doi = {10.1002/j.1538-7305.1948.tb01338.x}
}
Individual items in the .bib file are referenced with \cite{} in the body of the .tex file.
\documentclass{article}
\begin{document}
The curious student should may refer to the course textbook~\cite{poole2015linear}.
Shannon's seminal paper on information theory~\cite{shannon1948communication}
may be the most highly cited mathematics paper of all time.
\bibliographystyle{abbrvurl} % Set the bibliography style.
\bibliography{references.bib} % Link to the citation file.
\end{document}