I have generated an easy-to-read PDF of William Petty’s Taxes and Contributions. You can download it here.

Hard copies of the book, comprising poor photocopies of older editions, make difficult work on the eyes. This edition is typeset as a modern document. I did write a script to generate it though, so it’s likely that there are some errors in there. Please let me know if you find any.

Due credit to the nice people from McMaster University who transcribed the plain-text copy.

//

Economists often denote a Lagrangian maximization problem with a scripted L. Unless you exert a little bit of effort, this looks poorly when produced by LaTeX. The code below allows you to easily typeset the symbol in a larger font-size.

The code creates four new commands: \lagrange1, \lagrange2, \lagrange3, and \lagrange4. They produce the “Lagrangian L” with increasing size.

\documentclass{article}

\usepackage{relsize}
\usepackage{mathrsfs}
\usepackage{xstring}

\newcommand{\lagrange}[1]{\IfEqCase{#1}{{1}{\mathscr{L}}{2}{\mathlarger{\mathscr{L}}}{3}{\mathlarger{\mathlarger{\mathscr{L}}}}{4}{\mathlarger{\mathlarger{\mathlarger{\mathscr{L}}}}}}}

\begin{document}
$$ \lagrange1 $$
$$ \lagrange2 $$
$$ \lagrange3 $$
$$ \lagrange4 $$
\end{document}


//
Ever have the problem of Stata regression output being a little too wide? Worry no more. I use Ben Jann's excellent esttab to export Stata regressions into LaTeX documents. My only problem with esttab is that the tables can be too wide, i.e. wider than the width of the text in the PDF. So I made a few edits to esttab that automatically scale the tables to the text-width. I have called this program estwide. You can download it here. As it is based on estout, Ben Jann should be considered a co-author. Click here to see an example of its effect. (If you wish to replicate the above example, you can download the associated do-file here and the TeX file here.) To use estwide: 1. Make sure estout is installed. To do this, in Stata type ssc inst estout, replace 2. Save estwide.ado to the same folder that estout is now installed in. You can check the folder by typing which estout 3. Restart Stata. 4. Rather than exporting your tables using the esttab command, simply replace esttab with estwide, e.g. estwide using hello.tex, style(tex) replace 5. Make sure you have both the adjustbox and booktabs LaTeX packages installed. 6. Make sure you have called both of these packages up by including \usepackage{booktabs} and \usepackage{adjustbox} in the header of your LaTeX file. 7. Include your tables as normal. You can copy and paste the output into your TeX file, or have the tables update automatically when you make changes by using \input{myfilename}. Update, September 2017: after some emails from people, I have two things to add. Firstly, estwide seems to work much better if you include a caption to the table. Secondly, if you have a problem with the caption appearing on one page and the table itself on another, wrap the input in a LaTeX table. For example, this code works well for me: \begin{table}[ht] \input{myfilename} \end{table}
//
This is incredibly simple code but may be of use to some people. Typing out derivatives in LaTeX (e.g. \(\frac{\partial y}{\partial x}\)) can be shortened. Add this line of code to the header of your document: [code] \newcommand{\dydx}[2]{\frac{\partial{#1}}{\partial{#2}}} [/code] This creates a new command \dydx that takes two arguments, e.g. \dydx{P}{\tau}. Include this command in math mode (e.g. encased in dollar signs) and it will produce \(\frac{\partial P}{\partial \tau}\).
//
What's the easiest way to include a graphic (or graph, diagram, figure etc.) in my document?
[code] \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure}[h] \centering \caption{This is my picture} \includegraphics[width=5in,height=3in]{adamsmith.jpg} \end{figure} \end{document} [/code] Then compile using pdflatex.
I'm getting a "no BoundingBox" error when I compile my document.
Have you tried compiling the document with pdflatex? In WinEdt, select PDFLaTeX from the dropdown menu that's below 'Accessories' on the menu bar, and to the right of the recycle bin icon. If you're compiling from the command prompt and your document is named thesis.tex, type pdflatex thesis.
I'm trying to compile my document and I am using natbib to do the references, but the document won't compile with PDFLaTeX.
It's unfortunate that natbib (as far as I can see) relies on latex (not pdflatex) but latex gets confused if you have graphics in the document. My workaround for this is to temporarily place a % sign in front of any graphics to turn them into comments, rather than code. This means the graphics are initially excluded, and you can run latex/bibtex and natbib will work. Once all the references are good and ready, you can remove the % signs (a quick Find > Replace All will do the trick) and compile using pdflatex.
//
I had a problem set where each question had multiple sub-parts: a, b, c; etc. I was typing the solution up in LaTeX and it wasn't obvious what was the cleanest way to identify my answers. I ended up with code like this: \section*{Question 1} \new This is my answer to part a. \new This is my answer to part b This formatting results in something like this: That's exactly what I was looking for. It requires two lines of code at the start of your document: \newcounter{my_count} \newcommand{\new}{\vspace{0.3cm}\addtocounter{my_count}{1} (\alph{my_count}) }
//

I find it cumbersome to typeset \({\mathbb E}[x]\), “the expectation of x”, in LaTeX. I’ve simplified the code a little.

First, include these lines in the header of your document:

\usepackage{amsmath}
\usepackage{amsfonts}
\newcommand{\e}[1]{{\mathbb E}\left[ #1 \right]}

This calls on the necessary packages and makes a new function \e which takes one argument. The outcome is that argument within appropriately-sized square brackets and prefaced with the expectation sign.

For example, the code \e{x^2}=10 results in \({\mathbb E}[x^2]=10\).

//
I was writing a series of practice multi-choice questions for the class I teach when I decided I wanted to write a LaTeX function to automate the formatting. I wanted to include the answer as an argument of that function (possibly with room for an explanation) but not to display the answer until the end of the document. (This is a reasonably simple process. For a more hardcore setup, see the eqexam package.) I hacked away at the endnotes package until I got what I wanted. Editing packages is a pain though, so I summarized the changes into a Questions and Answers class: qanda.cls. This does the dirty work in the background and defines two new commands: \q and \qtf. The former takes six arguments: the question, four multi-choice options, and the answer. The latter takes four arguments: the question, two multi-choice options (e.g. true and false, thus the tf in command name), and the answer. This makes writing multi-choice questions very easy. Here is some sample code. [sourcecode] \documentclass{qanda} \title{An Example of the qanda Class} \author{Enda Hargaden} \begin{document} \maketitle This document is an example of the output of the qanda (``q and a'') class. \q{Who wrote \textit{Animal Farm}?}{Hargaden}{Orwell}{Marx}{Huxley}{Orwell} \qtf{There are subtle historical parallels in \textit{Animal Farm}.}{True}{False}{True; it is an allegory for the unfortunate route Communism took.} \q{Who wrote \textit{Capital}?}{Hargaden}{Orwell}{Marx}{Huxley}{Marx} \newpage \theendnotes \end{document} [/sourcecode] This produces this nifty document. To use the qanda class:
  1. Download qanda.cls
  2. Place it in the folder your .tex is in
  3. Start your document with \documentclass{qanda}
To produce the answers to your questions, simply include the \theendnotes command where you want them in your document. Preface this with \newpage if you want them on a new page. Note that the qanda class is based on the scrartcl class, so you need that on your computer. You also will need to have installed the enumerate and setspace packages. Enjoy!
//
Latin phrases for economists
Phrase Translation
A priori Pre-supposed; your "priors beliefs".
Ad infinitum To infinity; and so on.
Ad valorem Per value; a 10% tax is an ad valorem tax, whereas a duty per gallon of gasoline is not.
Ceteris paribus All else equal e.g. "We would expect, ceteris paribus, that an increase in price would lower quantity demanded."
De facto For all practical purposes, but not officially.
De jure By law.
Ex ante Before the event; in anticipation.
Ex post After the event; in retrospect.
Per se Literally; by itself.
Prima facie In the first instance; at first glance.
QED As has been asked to be shown; done.
Ultra vires Beyond their power, e.g. the court ruled that Congress were acting ultra vires.
Greek letters for economists
Lower-case Upper-case Pronunciation Economic meaning
\(\alpha\)A Alpha Capital share of income
\(\beta\)B Beta Regression coefficient (econometrics), or rate of time discounting (economic theory)
\(\gamma\) \(\Gamma\) Gamma N/A
\(\delta\) \(\Delta\) Delta Depreciation
\(\epsilon\) E Epsilon Elasticity
\(\zeta\) Z Zeta N/A
\(\eta\) H Eta N/A
\(\theta\) \(\Theta\) Theta Type, e.g. \(\theta_H\) might represent a "high type"
\(\iota\) I Iota N/A
\(\kappa\) K Kappa N/A
\(\lambda\) \(\Lambda\) Lambda The Lagrange multiplier
\(\mu\) M Mu Mean
\(\nu\) N Nu N/A
\(\xi\) \(\Xi\) Xi N/A
o O Omicron N/A
\(\pi\) \(\Pi\) Pi Inflation, or profit (lower-case) or the product of a series (upper-case)
\(\rho\)R Rho The coefficient of autoregression
\(\sigma\) \(\Sigma\) Sigma Standard deviation (lower-case) or the sum of series (upper-case)
\(\tau\) T Tau Tax
\(\upsilon\) \(\Upsilon\) Upsilon N/A
\(\phi\) \(\Phi\) Fy N/A
\(\chi\) X Chi (rhymes with `guy') Used in statistics
\(\psi\) \(\Psi\) Psi (like `Si') N/A
\(\omega\) \(\Omega\) Omega N/A
Some Useful Latin and Greek (PDF) Some Useful Latin and Greek (TeX)
//
Just in case you've googled me and wondered why I happily link to something called LaTeX, I should clarify that LaTeX (most commonly pronounced "Lay-tek") is a computer language for typesetting documents. (Well, it's officially called \(\LaTeX\) and is a markup language rather than a standard computer language, but that's splitting hairs.) Most people use Microsoft Word to write documents. That's fine. I prefer to use LaTeX, particularly if there is any mathematics in the document. The primary reason for this is ease. LaTeX can "read" math and I find it easier to type \sum x_i to obtain \(\sum x_i\) than to mess around with the equation editor. LaTeX also produces remarkably beautiful documents. I appreciate that this sounds particularly nerdy, but it's true: ask Dario for proof. Moreover, its settings are defaulted to look just right, so there's no messing around with fonts, margins, line-spacing, etc. Andrew Roberts has a thorough outline of the benefits of LaTeX. Here's my summary:
  1. Math(s) is much easier to write.
  2. Presentations (via beamer) are cooler.
  3. The documents look better.
  4. You don't have to worry about how it looks, so you can focus on content.
I admit the name is unfortunate, though.
//
Scroll to Top