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

Formatting text in Stata figures

This is not really new, but still comes in handy when formatting text in Stata figures. With a relatively simple code, you can make write text bold, in italics, and even greek letters

This special text is entered in curly brackets “{…}”:

  • Greek letters: {&alpha}, {&beta}, etc.
  • Text in italics: {it:Text in italics}
  • Text in bold: {bf: Text in bold}
  • Operators: {&le} (less than or equal to), {&ne} (unequal)
  • Subscripts and superscripts: e.g., write y{sup:2}{sup:ij}

Formatting Tables in Latex

There are a lot of sources giving advice on how to format your Latex tables. Adrian P. Robson (adrian.robson@nepsweb.co.uk) wrote a very good and comprehensive guide on formatting tables in Latex. Just follow the following link to download the PDF file:

LATEX Table Hints and Tips (by Adrian P. Robson, adrian.robson@nepsweb.co.uk)