I’ve been using LaTeX a lot recently and I thought I would write a quick post since I wish I would have found out about it earlier. LaTeX is a really powerful document (pdf and others) creation program. It’s sort of like HTML and CSS for paper publishing. As a first warning, LaTeX, like HTML, is not WYSIWYG. You have to code in things like \textbf{This will be bold}
. This takes some getting used to after programs like MS Word but after using LaTeX, I really can’t stand working in Word for anything longer than a page or two.
So why would you want to give up the convenience of Word for the (initially) more difficult LaTeX. Well one immediate benefit is it looks better. LaTeX does ligatures and kerning. To tell the truth, I never even knew what these were until I switched but they do seem to make documents look better.
The main benefit to me was the easy handling of figures and references. I would often insert a figure into Word only to have to update it with new data or adjusted labels. Somehow reinserting the figure always seemed to mess up its size or spacing or the surrounding text. In LaTex, you can just type \includegraphics{graph.eps}
and LaTeX will include the current version of graph.eps
each time it is compiled and automatically place it in an aesthetic place. LaTeX also comes with its own bibliography and reference manager, BibTex. This makes references as simple as typing \citep{SmithJohnsonetal1999}. You just need to make a main bibliography file with the details on SmithJohnsonetal1999
and all your other references and BibTex will select the ones referenced in your document and make a bibliography in just about any style.
If you are on Windows, MikTex seems like best solution for implementing TeX. It’s free too. WinEdt (shareware) is a handy editor for LaTeX. It integrates very well with LaTeX and makes the first steps in the switch from Word much easier. Java-based JabRef (free) is handy for managing bibliography data.
Links:
gioby | 23-Apr-09 at 5:43 am | Permalink
Do you know of a way to include examples of python code in LaTeX?
I find it very difficult because of how it manages the indentation.
ScottS-M | 23-Apr-09 at 11:20 am | Permalink
Did
verbatim
work for you? A simple beamer slide might look like:If you want to highlight within a verbatim, then you’d probably want to use the
fancyvrb
package (and thecolor
package) and do something like:The
Pygments
package in Python will also output syntax highlighted latex code with something like:pygmentize -f latex -O full test.py >py.tex
.Hmm this ended up getting pretty long. I may have to throw this into a post this evening.