Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

math-econ-template

A LaTeX template repo for mathematics & theoretical economics — lecture notes, research papers, beamer slides, problem sets, and exams — preconfigured for VSCode on macOS.

Every document shares one set of math/econ macros and theorem environments, and a single option flips the bibliography between biblatex (modern, the default) and natbib (for older journal requirements).


1. Repository layout

math-econ-template/
├── styles/                 ← shared packages (edit these to change macros everywhere)
│   ├── mathmacros.sty      ← general math notation
│   ├── econ.sty            ← economics notation
│   ├── theorems.sty        ← theorem/definition/assumption environments
│   ├── mathprelude.sty     ← one-line preamble for articles (loads the above + hyperref/cleveref)
│   ├── meconbib.sty        ← bibliography toggle: biblatex (default) or natbib
│   └── homework.sty        ← problem/solution scaffolding
├── notes/                  ← lecture / study notes        (article + biblatex)
├── paper/                  ← research paper skeleton       (article + bib toggle)
├── slides/                 ← presentation                  (beamer + Metropolis)
├── homework/               ← problem set + separate answer key
├── exam/                   ← exam + separate answer key    (exam class)
├── .vscode/settings.json   ← build recipe (MacTeX 2026, styles path)
└── latexmkrc               ← same settings for terminal builds

The styles/ folder is made visible to every subfolder automatically (via TEXINPUTS), so any document can \usepackage{mathmacros} etc. with no path fuss.


2. Quick start in VSCode

  1. Open the folder (not just a file): File → Open Folder… → pick math-econ-template. (The build settings are per-folder, so this matters.)
  2. Open a template, e.g. notes/notes-template.tex.
  3. Build: press ⌘⌥B, or click the TeX badge in the left sidebar → Build LaTeX project (the ▶ icon). It also rebuilds every time you save (⌘S).
  4. View the PDF: ⌘⌥V (opens beside your source).
  5. Jump around (SyncTeX): ⌘-click in the PDF → jumps to that line in the source; ⌘-click in the source → scrolls the PDF there.
  6. Errors/warnings appear in the Problems panel and the LaTeX Workshop output.

That's it — the green arrow does pdfLaTeX + biber and opens the PDF.


3. Building from the terminal

Run from the repo root, with -cd so output lands next to the source:

latexmk -cd notes/notes-template.tex          # build
latexmk -cd exam/final-solutions.tex          # build the answer key
latexmk -c -cd notes/notes-template.tex       # clean aux files (keep the PDF)
latexmk -C -cd notes/notes-template.tex       # clean everything (incl. PDF)

latexmkrc prepends MacTeX to PATH and points TEXINPUTS at styles/, so this matches the VSCode build exactly.


4. The document types

Article with the full macro/theorem set and citations. Start a new set by copying the file (e.g. notes/game-theory.tex) and editing.

📄 Research paper — paper/paper-template.tex

Economics paper skeleton: title/\thanks, abstract, JEL codes, sections, an \appendix for proofs, and the bibliography toggle. Uncomment \doublespacing for a submission draft.

🖥️ Slides — slides/slides-template.tex

Beamer with the Metropolis theme (compiles with pdfLaTeX here). Use \section{} for section slides and beamer's built-in theorem/block environments. The math/econ macros work on slides too.

📝 Homework — homework/ (problems + separate answer key)

Three files, one source of truth:

  • hw01-content.tex — the problems, each with a \begin{solution}…\end{solution} block.
  • hw01.tex — the assignment (solutions hidden). → hw01.pdf
  • hw01-solutions.tex — the answer key (\showsolutions). → hw01-solutions.pdf

Write each problem once; compile two PDFs. New set: copy the three files to hw02* and change the \input{hw02-content} line.

🧪 Exam — exam/ (uses the exam document class)

Same content + two wrappers pattern, but with the exam class (automatic points, grading table, "page x of N"):


5. Macro cheat-sheet

Defined in styles/mathmacros.sty and styles/econ.sty. Edit those files to add your own.

Sets & delimiters

Macro Output Macro Output
\R \Z \Q \N \C \F ℝ ℤ ℚ ℕ ℂ 𝔽 \Rplus \Rpp ℝ₊ ℝ₊₊
\abs{x} \norm{x} |x| ‖x‖ \floor{x} \ceil{x} ⌊x⌋ ⌈x⌉
\set{...} {…} \setb{x \given x>0} {x | x>0} (bar scales)
\inner{x}{y} ⟨x,y⟩ \parens* \bracks* auto-sized ( ) [ ]

(Add * to any delimiter to auto-size: \abs*{\frac{a}{b}}.)

Operators \argmax \argmin \esssup \supp \dom \rank \tr \diag \sgn \spann \conv \dist \proj \diam \intr \relint

Probability \E[X] \Prob(A) \Var \Cov \Corr \plim \Ind\{·\} (indicator) \Normal \indep \iid \dto \pto \asto (converges in dist./prob./a.s.)

Calculus / linear algebra \dd (upright d) \dv{f}{x} \pdv{f}{x} \grad · \vect{x} \mat{A} A\T (transpose) A\inv

Shorthand \eps \ph (var-epsilon/phi) \ol \ul \wt \wh (over/under-line, wide tilde/hat) \defeq (≔) \st (s.t.)

Economics \pref \prefstr \dpref (⪰ ≻ ⪯) · \Lag (Lagrangian) \maximize \minimize · \BR (best response) x\eqm (equilibrium ⋆) \simplex{A} s_{\negi} (−i) · \MRS \MRT \MU \MC \MB \MR


6. Theorem environments

From styles/theorems.sty. theorem, lemma, proposition, corollary, claim, conjecture, fact, definition, example, exercise, remark, note, notation, and proof. assumption has its own counter (Assumption 1, 2, …), the usual econ convention.

Reference them with cleveref — it prints the type for you:

\begin{theorem}\label{thm:main} ... \end{theorem}
By \Cref{thm:main} and \Cref{as:reg}, ...   % → "By Theorem 1 and Assumption 2, ..."

7. Bibliography — and the natbib toggle

Default is biblatex + biber (modern author–year). To satisfy an older journal that requires bibtex/natbib, change one line in your document's preamble:

\usepackage{meconbib}            % DEFAULT: biblatex + biber
\usepackage[natbib]{meconbib}    % TOGGLE:  natbib + bibtex

Nothing else changes — the citation commands are identical either way:

\bibresource{references}         % your .bib file (without the .bib extension)
...
\citet{akerlof1970}      % → Akerlof (1970)
\citep{akerlof1970}      % → (Akerlof 1970)
\textcite{...} \parencite{...}   % biblatex-style aliases also work in both modes
...
\printrefs                       % prints the bibliography

Under [natbib] you can pick a journal style (put its .bst on your path first):

\usepackage[natbib]{meconbib}
\setbibstyle{aer}                % e.g. aer, ecta, econometrica, chicago; default plainnat

Just rebuild after switching — latexmk automatically runs biber (biblatex) or bibtex (natbib) as appropriate. Defined in styles/meconbib.sty.


8. Customizing

  • Add/edit macros: edit styles/mathmacros.sty or styles/econ.sty. Every document picks up the change on the next build.
  • Change margins/fonts globally: edit styles/mathprelude.sty (e.g. the geometry margin, or link colors LinkNavy/CiteGreen).
  • New document: copy the closest template file/folder and rename. Give notes/papers their own references.bib in the same folder (each folder already has one).

Built for macOS + VSCode (LaTeX Workshop) + MacTeX 2026.

About

My templates in latex for economics and math.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages