Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math Notes Template

A LaTeX template for writing mathematics and computer science lecture notes. Built on the AMS Book class with theorem environments, figures, algorithms, commutative diagrams and bibliography support.

This repository provides a complete Real Analysis example project with 3 chapters, an appendix, and bibliography demonstrating every feature, plus a clean reusable template inside template/ for starting your own projects.

Title page

Quick Start

git clone https://github.com/devesh8090/math-notes-template-latex.git MyMathNotes
cd MyMathNotes/template

Edit notes.tex and start writing chapters.

Repository Structure

math-notes-template/
  notes.tex              main document (metadata, chapter includes)
  notes-preamble.sty     shared style file (macros, formatting)
  refs.bib               bibliography
  chapters/              chapter content (.tex files)
  images/                figure files
  assets/                README screenshots (not in the document)
  template/              clean starter template for new projects
  README.md

Features

Title Page

Fill in metadata at the top of notes.tex. Fields left as {} are hidden.

Title page

\notestitle{Real Analysis Lecture Notes}
\notesauthor{Your Name}
\notesemail{[email protected]}
\noteswebsiteone{https://github.com}
\notesversion{v1.0 \today}
\notespreamble{A short description of these notes.}

Table of Contents

Generated automatically. Chapters, sections and subsections appear; subsubsections are numbered but hidden from the ToC.

Table of Contents

Theorem Environments

Eight environments are predefined. Theorem, Proposition, Lemma, Corollary, Definition and Example share a single counter reset per section. Remark and Notation are unnumbered.

Theorem environments

\begin{theorem}[Intermediate Value Theorem]
\label{theorem:ivt}
Let $f\colon[a,b]\to\R$ be continuous with $f(a)<0<f(b)$.
Then there exists $c\in(a,b)$ with $f(c)=0$.
\end{theorem}

Reference with \cref{theorem:ivt} which produces "Theorem 3.1.1" or \Cref{theorem:ivt} for a capital start. Label prefixes follow environment names: theorem:, proposition:, lemma:, corollary:, definition:, example:.

Custom environments are supported:

\createtheorem[numbered]{axiom}{Axiom}
\createtheorem[unnumbered]{claim}{Claim}

Figures

Place images in images/ and use the convenience macros. Figures are numbered per section (Figure 2.1, 2.2, ...).

Figures

\figone{0.6\textwidth}{images/foo.png}{Caption.}{fig:label}
\figtwo{images/a.png}{images/b.png}{Cap A}{Cap B}{fig:a}{fig:b}
\figtwoshared{images/a.png}{images/b.png}{One caption.}{fig:both}
\figthree{images/a.png}{images/b.png}{images/c.png}
         {Cap A}{Cap B}{Cap C}{fig:a}{fig:b}{fig:c}
\figfour{{images/a.png}{Cap A}{fig:a}}{{images/b.png}{Cap B}{fig:b}}
        {{images/c.png}{Cap C}{fig:c}}{{images/d.png}{Cap D}{fig:d}}

Algorithms

The algorithm float with a thin algobox frame. Numbered per section.

Algorithms and TikZ diagrams

\begin{algorithm}[H]
\caption{Bisection Method}
\label{alg:bisection}
\begin{algobox}
\begin{algorithmic}[1]
\Require continuous $f$ on $[a,b]$ with $f(a)f(b)<0$, tolerance $\varepsilon$
\Ensure $c$ with $|f(c)|$ small and $|b-a|<\varepsilon$
\While{$b-a>\varepsilon$}
  \State $c\gets(a+b)/2$
  \If{$f(a)\cdot f(c)<0$}
    \State $b\gets c$
  \Else
    \State $a\gets c$
  \EndIf
\EndWhile
\State \Return $(a+b)/2$
\end{algorithmic}
\end{algobox}
\end{algorithm}

TikZ Commutative Diagrams

The tikz-cd package is loaded and ready to use.

\[
\begin{tikzcd}
  \Q \arrow[r, hook] \arrow[dr, "\text{incl.}"'] & \R \\
  & \Q \arrow[u, hook]
\end{tikzcd}
\]

Bibliography

BibTeX with amsalpha.bst style. Citations produce compact keys like [Rud76].

Bibliography

\cite{key}          % inline citation
\footcite{key}      % citation in a footnote

Using the Template

1. Edit Metadata

Open template/notes.tex and fill in the fields:

\notestitle{Your Notes Title}
\notesauthor{Your Name}
\notesemail{[email protected]}
\notespreamble{A short description.}

2. Write Chapters

Create .tex files in chapters/. Start with \section{} and use the theorem environments. No preamble needed.

\section{My Section}

\begin{definition}
A widget is a ...
\end{definition}

\begin{theorem}
Every widget is frobnicated.
\end{theorem}

3. Register Chapters

In notes.tex, add a block for each chapter:

\chapter{Chapter Title}
\chapterdesc{One-sentence description.}
\input{chapters/your_file}

4. Add Content

  • Place figures in images/ and use \figone, \figtwo, etc.
  • Add citations to refs.bib and use \cite{key} or \footcite{key}.
  • Use \begin{algorithm}[H] with an algobox for algorithms.
  • Use tikzcd environments for commutative diagrams.

Numbering Reference

Element Format Resets At
Chapter 1, 2, 3 Never
Section 2.1, 3.4 Each chapter
Subsection 2.1.3 Each section
Subsubsection 2.1.3.4 Each subsection
Theorem, Proposition, Lemma, Corollary, Definition, Example 2.1.5 Each section (shared counter)
Remark, Notation unnumbered None
Figures 2.1, 2.2 Each section
Algorithms 2.1, 2.2 Each section
Equations (1), (2), (3) Global

Compiling

Overleaf

Upload the folder as a new project. Set compiler to pdfLaTeX and main file to notes.tex.

Local

pdflatex notes.tex
bibtex notes
pdflatex notes.tex
pdflatex notes.tex

Run all four the first time and whenever you add citations or new sections. After that, one pdflatex notes.tex is usually enough.

Math Macros

Category Commands
Number sets \R \Z \Q \C \N \F
Font shortcuts \cali{C} \got{g} \mbb{R} \scr{F}
Common symbols \eqdef \defeq \mto \dd \pd{f}{x} \ppd{f}{x}{y} \wt{x} \wh{x}
Delimiters \abs{x} \norm{x} \ip{x}{y} \set{x}
Operators \im \rank \Span \supp \diam \dist \Int \Ext \cl \interior \bd \codim \coker \Hom \End \Aut \Inn \Ad \ad \GL \SL \sgn \grad \divg \curl \esssup \essinf
Draft \todo{note}
Footnote cite \footcite{key}

Tips

  • Add oneside to avoid blank pages: \documentclass[11pt,oneside]{amsbook}.
  • All headings are left-aligned and minimal.
  • The compiled notes.pdf is committed so readers can view the output without LaTeX.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages