LaTeX and BibTeX Information
Both mathematicians and statisticians tend to use LaTeX to typeset their results. This ubiquity came about for several reasons. One is that LaTeX is entirely free. A second is that the LaTeX file is just a text file, so it can be edited on every computer. A third is that LaTeX is “easily” customizable to meet the particular needs of the academic journal. Journals that encourage LaTeX also provide a stylefile which takes your work and formats it for the particular journal. A fourth reason is that it produces nice-looking pdf documents. A fifth reason is that it is much easier to create mathematical (and statistical) equations. A sixth reason… well, you get the idea. There are many reasons to use LaTeX.
One of my favorite reasons to use LaTeX over any other writing program is that it makes handling figures so easy. If you update a dozen figures in Word, then you need to re-attach each of those dozen figures if you change them at all. In LaTeX, you just have to recompile once. Updates are almost automatic.
I use the MiKTeX distribution on my desktop computer. On my MacBook Air, I (apparently) use the TeXShop distribution. In class, feel free to use Overleaf as your primary LaTeX engine. Using an online engine is less flexible than downloading the distribution to your own machine. However, it takes disk space to download and install your selected distribution.
Informational Links
The following are videos that help to explain LaTeX and how to use it. It is broken into three parts: introduction to LaTeX, using LaTeX to typeset mathematics, and using LaTeX to typeset bibliographies.
Introduction to LaTeX
- About LaTeX (LaTeX Project)
- About LaTeX (MIT presentation)
- Learn LaTeX in 30 minutes (Overleaf)
- Introduction to latex for beginners (video)
- Introduction to LaTeX and Overleaf Tutorial (video)
- How to Write Research Papers in Latex (video)
Typesetting Mathematics
- Intro to LaTeX : Learn to write beautiful math equations (video)
- Introduction to Latex Equations (video)
LaTeX Blog
Bibliographies in LaTeX
- An Introduction to BibTeX
- using bibtex: a short guide (Univ. Toronto)
- Bibliography in LaTeX with Bibtex/Biblatex
- How to Use Reference, Citation and BibTex in LaTex, Overleaf, ShareLatex (video)
- How to Use Reference, Citation and BibTex in LaTex, Overleaf, ShareLatex (video)
- LaTex & BibTex Basics (video)
- The 14 BibTeX entry types
Style Files
To help preparing you for a mathematical/statistical future, this web page provides stylefiles for various courses you can take at Knox. Note that not all courses using LaTeX are listed here. For those courses, see the professor for additional information.
These are the style files for Math @Knox. A style file contains LaTeX commands that help to make the document-creation process easier and more uniform. To use these files, download it/them to your course folder. Then, if you are using Overleaf, upload it to each project (assignment) folder. In the preamble of your LaTeX document, please make sure to include the line \usepackage{xxxxxxxxx}
(where xxxxxxxxx
is the file name provided).
Faculty | Homework | Paper | |
---|---|---|---|
Forsberg | fHomework.sty | fPaper.sty |
The part of the file that is before the \begin{document}
line is called the “preamble.” This is where the parameters of the document are defined. For your assignments, you will just want to change the \title
, \author
, and \date
. Everything else can remain the same.
Always, make sure you read over your compiled document to make sure it represents your best work. Since it is what the professor reads, you need to make sure it is what you want your professor to read.
The Cheat Sheet
One thing that makes LaTeX so important is that it makes typesetting mathematics quite simple. A second thing is that book publishers can go directly from the LaTeX file to the printed page (my STAT 225 book is 100% LaTeX, as is my Understanding Elections through Statistics book).
The third thing is that LaTeX is very extensible. If base LaTeX does not have an easy command for the “distribution tilde,” one can create a code for it, \dist
, for instance. This allows one to create shortcuts as well as set the style of the page to be uniform throughout. The fHomework.sty and the fPaper.sty are examples of this. Both create a uniform output style. They also have several shortcut commands to make typesetting for our course much easier.
This is a cheat sheet for the extra functionality offered by these two stylesheets. The file provides a listing of most of the features of the course style files. It was last updated on January 5, 2024.
File Examples
These files are example .tex
files. Feel free to use them as templates for all of your assignments in the appropriate course. In each, add your work between the \maketitle
and \end{document}
lines. Also, make sure that you change the course number and name, as appropriate.
Faculty | Course | Homework | Project |
---|---|---|---|
Forsberg | 225 | exHomework225.tex | exPaper.tex |
Forsberg | 312 | exHomework312.tex | exPaper.tex |
Forsberg | 321 | exHomework321.tex | exPaper.tex |
Forsberg | 322 | exHomework322.tex | exPaper.tex |
Each of these examples makes use of an image. Here is that image (download). You will need to upload this to your Overleaf folder. The key in including graphics in your work is the \includegraphics[]{}
function in LaTeX. The part in []
helps to define the size of the graphic in the pdf. The part in the {}
is a path to the graphic.
The Bibliography
This file is an example .bib
file, which provides the information for the bibliography for your paper. Feel free to use it as a template for all of your papers in the appropriate course. This file is entirely separate from the other files.
If you are including a bibliography for your paper (as you should), then you will need to also include the following lines just before the \end{document}
in your .tex
file. Thus, when including a bibliography, the final lines in your .tex
file should be
% The bibliography
\clearpage
\bibliographystyle{alpha}
\bibliography{references}
\end{document}
The file to download/upload: references.bib
By the way, there are several types of sources. Here is a link to important BibTeX information: http://www.bibtex.org/Format/. It is not the only BibTeX source; Ecosia will give you many more.
I remember working on my bibliography for my comprehensive examination in Political Science. I guarantee that I spent at least five hours on those bibliographies. Had I known about LaTeX back then, I would have been able to reduce my time to less than an hour. Efficiencies are important when writing 200 pages in a week!
BibTeX Cheatsheet
The vast majority of the source types are books, articles, data and software, and websites. I created this page to help you create the BibTeX entries easier. Please make proper use of it.