LATEX RESOURCES
This page contains some information on the LaTeX typesetting system mentioned in my LaTeX workshops at CU's Political Science department and at CU's Gemmill Engineering, Math & Physics Library.
Why use LaTeX?
LaTeX allows to separate your writing from concerns about formatting and looks. This saves time and worries, and will (almost always) produce improved documents in a more efficient manner. Some more specific reasons, including a discussion of the higher quality of typographic features in LaTeX, can be found here, in the Chronicle of Higher Education.LaTeX also makes it easier move your writings to different document types (e.g., article and dissertation), and will not require substantial (manual) adjustment of formatting, bibliographies, etc.
You will never depend on proprietary software to edit or recover your documents; you will never run the risk of not being able to open your work, should you not have a your preferred processing software available (for instance, on a different or new computer).
Presentation slides
Here are slides from my workshop at CU Boulder's Gemmill Engineering, Math & Physics Library. The source code for these slides is here (.zip).Examples for LaTeX output
- Papers and article manuscripts (examples).
- Dissertations (at UAlbany, at CU-Boulder).
- CVs (examples: Kieran Healy, Modern CV).
- Presentation slides (examples).
- Conference posters (examples: 1, 2, 3)
Installation
More or less all-in-one installations:- Mac: MacTeX (Note: MacTeX links to a 2+ GB download)
- Windows: proTeXt (Note: proTeXt links to a 1+ GB download)
What does the workflow look like?
Write your text in a text editor with LaTeX integration. Some examples: Some of these editors may come with your LaTeX installation. A good way to start is to use templates, and adjust them to your needs. When you open TeXworks, you can use an article template via File > New from Template. To compile a document containing citations, use the sequencepdfLaTeX
, BibTeX
, pdfLaTeX
, pdfLaTeX
. In some LaTeX editors (e.g. TeXstudio), simply pressing "compile" will initiate this compilation sequence for you; in others (e.g. TeXShop), you have to do each step yourself. Incorporating output from statistical software
You can export output from your favorite statistical software directly to LaTeX, and minimize the time spent on making tables, drastically reduce the probability of errors in writing up results, and easily update tables when needed. Some options for this:- For R: apsrtable, stargazer, xtable, texreg, memisc.
- For Stata: outreg2, outtex, estout, sutex.
- To export a table from Excel to LaTeX: Excel2LaTeX.
\includegraphics
command from the graphicx package. More information on the intricacies of figures in LaTeX can be found in the LaTeX Wikibook, which is a great resource overall.
To fully integrate your statistical analysis and your writing, LaTeX offers two great options: Sweave (Info, demo) and knitr (Info, demo). See Simon Jackman's replication analysis for Jackman and Vavreck (2011) for an example of Sweave.
Customizing how your documents look
You can change fonts (including math type) by typing one of the following commands in the preamble. For instance:- Times:
\usepackage{mathptmx}
- Palatino:
\usepackage[sc]{mathpazo}
\linespread{1.05}
\usepackage[T1]{fontenc}
Managing citations
Mac: BibDesk or Papers; Windows: JabRef, and many others. LaTeX allows you to use one master bibliography that you can access for each individual document you're compiling. For instance, Jamie Monogan's page provides a version of Jim Stimson's master bibliography with thousands of political science citations that you can easily expand for your own work, for instance by using one of the programs listed above.Collaborating with others
Aside from using general collaboration platforms such as Dropbox, overleaf.com offers a convenient solution to simultaneously work on LaTeX documents with coauthors.Converting LaTeX to .doc or .rtf
I have had good success using htlatex to generate HTML documents, which can then be opened in Word and edited as necessary. After compiling a manuscript namedmyarticle.tex
using pdfLaTeX
and BibTeX
, the following code (run via the command line) will produce an HTML document with footnotes that will be ready to use in Word with only few modifications:
htlatex myarticle.tex "xhtml,fn-in"