Line spacing in footnotes

When submitting papers, journals often require double-spaced footnotes. While there seem to be different approaches to it, this one worked quite well. It requires the `footnotemisc` package. You simply need to enter the following code in the preamble of your LaTeX file:

```\usepackage{footmisc}
\renewcommand{\footnotelayout}{\setstretch{2}}```

Changing font color in table columns

In my ongoing search to further improve table layout for my beamer-presentations, I just came across a simple way to change the font color in tables. This comes in handy, for example, to highlight results regression results in specific tables.

Subfigures in LaTeX

To combine multiple figures in one figure environment in LaTeX, e.g. to show scatter plots for different groups, the usepackage `subfig` is there to help. It allows to create several subfigures while also adjusting the subtitles of each of the subfigures. Simple call the package in the preamble by adding

Avoiding widows and orphans in LaTeX documents

To avoid paragraphs ending with a single line on the following page often looks a bit ugly. Especially when they are then followed by figures or tables. Single lines of a page-overlapping paragraph are called “widows” and “orphans”. How can we tell TeX to avoid those? With the following code, you tell TeX that it should put a penalty on these types of layouts. Setting this penalty very high (typically 10.000) avoids widows and orphans almost entirely. Just add the following code in the preamble of your document.

`\clubpenalty = 10000\widowpenalty = 10000 \displaywidowpenalty = 10000`

Routine to export tables from Stata to LaTeX

When it comes to exporting regression tables from Stata to LaTeX, there are several packages that can be used. For a long time, I used outreg2, but now improved my code for the the estout package by Ben Jann. The remainder of this post describes the routine that works best for, you might want to adjust it for your own purposes. (I actually have written about this package before, this post presents a more elaborated code.) Continue reading

Use images from pdf documents in Latex

While you can simply drag & drop images in MS Word or Powerpoint, doing this in Latex requires a few more steps. An important difference is that in Latex, you first need to save the copied file as a separate image file which can then be included in the Latex code. For this purpose, we need a decent image editor. I recommend using Continue reading

Turning Footnotes into Endnotes …

Submitting (LaTeX) written papers has some advantages: one usually does not have to change any formatting manually. LaTeX does that for us if it is instructed to do so. Journals often want the submissions to be formatted in a peculiar way. My challenge was to change footnotes to endnotes. I did remember that it was easy in LaTeX, but not how it was done, so Google had to help me …