LaTeX and Overleaf

GT 1000 · Lecture 7

Andrew J. Steinmetz

2026-10-09

Due dates

What When Points
Team Project Contract Tonight, Oct. 9, 11:59 PM ET 50 (5%) · Team Project
Homework in LaTeX — Lastname-Firstname-LaTeX.pdf and .tex Oct. 16, 11:59 PM ET 50 (5%) · Academic Planning
Online Profile Oct. 23, 11:59 PM ET 75 (7.5%) · Career Readiness
Advising Meeting & Spring 2027 Plan Oct. 30, 11:59 PM ET 60 (6%) · Academic Planning
Team Project Slides and Presentation Slides Nov. 6; talk Nov. 6 or Nov. 13 100 + 100 (20%) · Team Project

What is LaTeX, and why Overleaf?

  • LaTeX is plain text with markup, compiled into a PDF.
  • You write what you mean; LaTeX does the layout.
  • Physicists use it for equations, numbering, cross-references, and bibliographies.
  • Overleaf is LaTeX in your browser. Free with your GT email; nothing to install.
\section{Newton's second law}
The net force is $F = ma$, so
\begin{equation}
  a = \frac{F}{m}.
\end{equation}

1  Newton’s second law

The net force is \(F = ma\), so \[a = \frac{F}{m}. \tag{1}\]

Anatomy of a LaTeX document

\documentclass[12pt, letterpaper]{article}
\usepackage{amsmath}   % better math
\usepackage{graphicx}  % images
\title{PHYS 2211, HW 5, Problem 3}
\author{Your Name}
\date{\today}

\begin{document}
\maketitle
\section{Problem Statement}
A ball is launched at speed $v_0$ and
angle $\theta$ above level ground.
Find its \textbf{range} $R$.
\end{document}
  • Preamble: class, packages, title.
  • Body: what appears on the page.
  • Commands start with \.
  • {} holds arguments; [] holds options.
  • Environments: \begin … \end.
  • % starts a comment.

Live demo: building a homework note

  1. New Project → Blank Project
  2. Title, author, \maketitle
  3. Three \sections
  4. A list: itemize
  1. Equations: \label, \eqref
  2. A figure with a \caption
  3. Break it; read the error
  4. Download PDF and source

Open Overleaf and follow along. By the end, you will have a starting point for the Homework in LaTeX assignment.

Writing math

You type You get
x^2, v_0, x_{\max} \(x^2\), \(v_0\), \(x_{\max}\)
\frac{a}{b}, \sqrt{2gh} \(\frac{a}{b}\), \(\sqrt{2gh}\)
\theta, \omega, \Delta E \(\theta\), \(\omega\), \(\Delta E\)
\vec{F}, \hat{x} \(\vec{F}\), \(\hat{x}\)
\int_0^T v\,dt \(\int_0^T v\,dt\)
\approx, \pm, \times \(\approx\), \(\pm\), \(\times\)
9.8~\text{m/s}^2 \(9.8~\text{m/s}^2\)

Inline, inside a sentence: $...$

Displayed and numbered:

\begin{equation}
  R = \frac{v_0^2 \sin 2\theta}{g}
  \label{eq:range}
\end{equation}

Refer back: Eq.~\eqref{eq:range} gives “Eq. (1)”, and the number updates itself.

Use equation* or \[...\] for unnumbered equations.

Source: (Overleaf, n.d.-c) · Can’t find a symbol? Draw it in Detexify (Kirsch, n.d.).

When it won’t compile

Message Usual cause Fix
Undefined control sequence Typo in a command, or a missing package Check spelling; add the \usepackage
Missing $ inserted ^, _, or Greek outside math Wrap it in $...$
Runaway argument A { with no matching } Find and close the brace
Text vanishes after % % starts a comment Write \% (also \&, \$, \#, \_)
File not found Image not uploaded, or the name differs Match the file name exactly

Recompile often. Fix the first error first; the log gives you the line number.

Writing up a solution

  • Write for a reader who has not seen the assignment.
  • Define every symbol the first time it appears, with units.
  • Put words between equations. Equations are part of sentences and take punctuation.
  • Check your answer, units, size, and limiting cases.
  • Give every figure a caption and refer to it in text.

Less effective

\(y = v_0 \sin\theta \, t - \tfrac{1}{2} g t^2 = 0\)
\(t = 2 v_0 \sin\theta / g\)
\(R = v_0^2 \sin 2\theta / g\)

More effective

The ball lands when its height returns to zero, \(v_0 \sin\theta \, t - \tfrac{1}{2} g t^2 = 0\), so its flight time is \(t = 2 v_0 \sin\theta / g\). Multiplying by its horizontal speed \(v_0 \cos\theta\) gives the range \[R = \frac{v_0^2 \sin 2\theta}{g}. \tag{1}\] At \(\theta = 0\) the range is zero, as expected, and it is largest at \(\theta = 45^\circ\).

References

Kirsch, Daniel. n.d. “Detexify: LaTeX Handwritten Symbol Recognition.” Accessed October 9, 2026. https://detexify.kirelabs.org/classify.html.
Oetiker, Tobias, Hubert Partl, Irene Hyna, and Elisabeth Schlegl. 2021. The Not So Short Introduction to LaTeX2e. Version 6.4. https://ctan.org/pkg/lshort-english.
Overleaf. n.d.-a. “Inserting Images.” Accessed October 9, 2026. https://www.overleaf.com/learn/latex/Inserting_Images.
Overleaf. n.d.-b. “Learn LaTeX in 30 Minutes.” Accessed October 9, 2026. https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes.
Overleaf. n.d.-c. “Mathematical Expressions.” Accessed October 9, 2026. https://www.overleaf.com/learn/latex/Mathematical_expressions.
The LaTeX Project. n.d. “LaTeX: A Document Preparation System.” Accessed October 9, 2026. https://www.latex-project.org/.