Jul 08

Including eps files in pdfLaTeX

Tag: latex, windowsadmin @ 11:11 am

By default, you cannot include eps files in latex files complied and built into pdfs. To do so, include the following command in your preamble

\usepackage{epstopdf}

which converts any eps files to pdf before the file is compiled. I encountered some problems after this and had to modify the TeX->PDF commands in TeXNicCenter (hit Alt+F7) so that under “Command line arguments to pass to the complier” read:

--enable-write18 -interaction=nonstopmode "%pm"


Jul 08

Install LaTeX on Windows

Tag: latex, windowsadmin @ 9:28 am

Installing TeX and a LaTeX editor on Windows is simple. There are two steps. First, install the TeX packages, DVI reader and more with MiKTeX. Next, download TeXnicCenter, my preferred editor in Windows (just select the TeXnicCenter download). Finally, when installing the TeXnic, make sure that you set the TeX directory as

C:\Program Files\MiKTeX 2.6\miktex\bin


Jun 22

Textmate as the ultimate editor

Tag: latex, mac, os x, php, stataadmin @ 4:10 pm

With dozens of “bundles” that allow for application-specific editing, the Mac text editor TextMate is a great tool for the researcher. I posted four screenshots below for Stata, LaTeX, Matlab and PHP. The most powerful is PHP as there is a default bundle that lets you run the script directly from the file. With a little work (install TeX on your Mac), you can easily compile and view your LaTeX files. The quick command(e.g. “begin + “tab”) make editing a breeze. What I like most is the syntax highlighting that it brings to editing .m and .do files.  Moreover, you can create “projects” that let you easily handle multiple files.

Textmate with Stata

Textmate and Stata

Textmate with LaTeX

Textmate and Latex

Textmate with PHP

Textmate and PHP

Textmate with Matlab

Textmate and Matlab


Jun 20

Writing "converges in probability" in LaTeX

Tag: latex, tricksadmin @ 1:59 pm

Ella posted a comment on the site that shows how to write “converges in probability” in LaTeX:

\stackrel{p}{\longrightarrow}

with either “$ $” or “\[ \]” or “\begin{equation}” around it. Thanks Ella.


Jun 08

Inserting figures in LaTeX

Tag: latex, tricksadmin @ 7:17 pm

…is a non-trivial exercise. This page has a great summary of the various options. The basic form is:

\begin{figure}[htp]
\centering
\includegraphics[totalheight=0.3\textheight]{amount_raised.png}
\caption{Amount invested in venture capital rounds 1987 - 2006}\label{fig:araised}
\end{figure}