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\).

//
Here's a list of things that the Efficient Market Hypothesis does not say:
  1. All traders are rational investors
  2. The stock market is predictable
  3. The stock market is a safe investment
  4. Regulation is a bad thing

Here's a list of things that the Efficient Market Hypothesis does say:
  1. Stock markets are extremely unpredictable

That's about it. And here's a panel of economists who agree. I'd be much happier if something along the lines of "the efficient market hypothesis, with its faith in the rationality of markets and encouragement of unregulated free market capitalism, caused the financial crisis" didn't enter the conversation anymore.
//
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!
//
Somebody said, “I see Sargent and Sims won the Nobel. Why did they leave out Lars Hansen?” “Because then they’d have to include Ken Singleton as well”, came the reply. Somebody else wondered, “What’s so wrong with that?” “He has to win it on his own.”
//
I teach tutorials in Economics 101. Yesterday an international student asked me to explain why "one of the American political parties" thinks cutting tax rates will increase fiscal revenues. I explained that their theory is that lowering taxes will encourage people to work, spend, and invest more; that this would spur economic growth; and that even a lower tax rate on this higher GDP could actually generate higher revenues. "Oh, that's interesting. Is it true?" was his reply. I thought about it for a second. I briefly considered the implications of answering a politically-charged question. I worried a little that this was a student whose interest in economics was piqued, and that I ran the risk of blunting that interest. After contemplating whether I should answer whether it was theoretically possible or empirically verifiable, I gave him the most honest answer I could: "No." The consensus among economists is that although this "bigger cake" idea has some truth to it, lowering taxes does not increase the cake anywhere near enough to make a significant difference. Harald Uhlig thinks higher tax rates could increase American income tax revenue by 30%; the Congressional Budget Office thinks that although lowering tax rates would lead to more economic activity, the revenue generated by these new activities would only be a quarter of the revenue lost in the initial tax cut; and even Greg Mankiw, chairman of the Council of Economic Advisers to President Bush (the second), thinks this thesis is a bit silly.
//
Scroll to Top