top of page

Using LaTeX for Mathematics/Physics Classes

  • Writer: Leenie Wilcox
    Leenie Wilcox
  • Aug 21, 2023
  • 2 min read

This is one of those If-Only-I’d-Known-Earlier sorts of posts. For any physics or mathematics student out there: LaTeX is a very important presentation software which requires some small amount of coding to manipulate. The struggle of learning the language, I believe, is well worth the effort.


Writing in LaTeX gives one the ability to word-search notes, to parse notes into ideas or specific derivations as zettels, to write papers faster through copy-paste shortcuts, and (most significantly for an undergraduate) to write up homework sets. Homework sets written in LaTeX are truly key; graders have an easier time reading solutions, you can look at your own answers even while the grader has a copy, you can organize the question prompts such that they appear directly overtop of the solutions you create, and you can easily insert corrections, or draw lines through incorrect solutions. What is more, there are serious benefits of organizing thoughts for a second time rather than simply writing them down once and being done with it.


I have encountered very few student peers who get half as excited about LaTeX as I do, but when I began writing everything I possibly could in LaTeX it was an absolute game-changer. The learning curve may seem prohibitive, but once you have mastered the basics there is little difference in the time and energy commitment it takes to write with a pencil.


The most obnoxious quality of LaTeX coding, in my mind, is the cumbersome math-mode language. Like a Russian nesting doll, there is often code within code within code. It becomes hard to check, and harder to find bugs. For example, \frac{\vec{v}}{\phi+\frac{\pi}{2}}. Not too complicated an expression, but even that can make me go a little cross-eyed. Not everything can be simplified, but it is important to ruthlessly simplify all that can be.



In the video which accompanies this post, I go through the basic set up of a homework LaTeX file, and then go through some time-saving tips and tricks. Remember, specific math symbols are usually pretty easy to find in the LaTeX documentation. If they can’t be found there, a general google search usually provides the answer.


Below is the code for the homework template I created in the video


\documentclass{article}

\usepackage{graphicx} % Required for inserting images 

%%%%%%% So I can write in non-ASCII

\usepackage[utf8]{inputenc}

%%%%%%% Page Styling

\usepackage[margin=0.6in]{geometry}

\usepackage{multicol,titling}

%%%%%%% Font/Text

\usepackage[T1]{fontenc}

\usepackage{hyperref,calligra}

%%%%%%% Math/Physics

\usepackage{amsmath,amssymb,bm,mathtools,mathdots,braket}

 

%%%%%%%%%%%%%%%%%%%%%%%%%% Personalized Commands %%%%%%%%%%%%%%%%%%%%%%%%%%

 

%%%%%%%%%% script r

\newcommand{\scr}{\textbf{{\calligra{\Large{r}}}}}

%%%%%%%%%% script s

\newcommand{\scrs}{\textbf{{\calligra{\Large{s}}}}}

%%%%%%%%%% Lagrangian L

\newcommand{\lag}{\mathcal{L}}

%%%%%%%%%% Equation Arrays

\newcommand{\be}{\begin{eqnarray}}

\newcommand{\ee}{\end{eqnarray}}

%%%%%%%%%% Partial Derivative

\newcommand{\pde}[2]{\frac{\partial{#1}}{\partial{#2}}}

%%%%%%%%%% Ordinary Derivative

\newcommand{\ode}[2]{\frac{d{#1}}{d{#2}}}

 

\title{Homework Template}

\author{Your Name}

\date{\today}

\begin{document}

\maketitle

 

\begin{multicols}{2}

\section{Problem}

WRITE DOCUMENT HERE.

\end{multicols}

\end{document}

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

Stay up to date on new posts

Thanks for submitting!

bottom of page