Up one level
Random LaTex/PDFLaTex comments
Spencer Stirling

The following is an eclectic mix of random LaTex and PDFLaTex-related hints. Go in peace...

Placing graphics in LaTex/PDFLaTex documents
Here I have written instructions telling you how to include graphics into your documents (and using cool LaTex fonts in your figures - impress your friends).

GUI Frontends
I have experience with two graphical frontends for LaTex:


These frontends strive to achieve VERY different things, and hence it is difficult to say which is "better". In fact, I like them BOTH very much. LyX is probably easier for the novice user - it strives to make LaTex as WYSIWYG as possible (while still maintaining much of the power of LaTex). Kile, on the other hand, still edits in straight latex code. However, it provides a lot of tools to automate code placement (which is VERY handy). Both are awesome, but at this point I find it cleaner to just edit with my crappy little text editor. UPDATE: ever since I discovered Kile's QuickBuild and ForwardDVI features I use Kile instead of my little text editor. In Settings->Configure Kile->Tools-> Build->QuickBuild choose "Latex+ForwardDVI" (make sure KDVI is installed). In Settings->......->ForwardDVI choose "KDVI". In Settings->...->LaTex make sure to choose "Modern" instead of "Default" configuration. QuickBuild (Alt+1) will bring up the document right where you are editing. Conversely, you can scroll to any place in the compiled document in KDVI and press the middle button on your mouse - this will take you to the corresponding place in the code in Kile. VERY NICE!

Converting LaTex to HTML
Sometimes you might want to convert LaTex to HTML. For example, you might write a paper and compile it into PDF. This is the best way for publication and/or distribution, but not necessarily for placement on the web. In that case you may want an HTML document, instead. Fortunately this can be done by using the standard utility "latex2html". I have been very impressed with latex2html in the past - I'm amazed at how well it handles complicated figures, etc.

A skeleton LaTex/PDFLaTex document
Here is a skeleton document that I use to get my papers going. Since I usually work with the AMS packages (automatically included below since the documentclass is amsart) I find the official AMS documents very helpful.

Note in the examples below that the figures are in MetaPost (mps) format, but I no longer prefer that. Also note the XY-Pic example. You can learn more about LaTex and PDFLaTex graphics here.

At the end I have included a sample BibTex file. You can compile and get a PDF with the commands (sometimes running multiple times is necessary):

pdflatex skeleton
bibtex skeleton
pdflatex skeleton
pdflatex skeleton
Good luck. Note that, since I'm using MetaPost (mps) figures, this example works in BOTH plain LaTex AND PDFLaTex! UPDATE: Now I use a better technique as outlined in my other article.
\documentclass[12pt]{report} % sometimes it's necessary to use [psamsfonts]

\usepackage{amsmath} % already loaded, but doesn't hurt
\usepackage{amsthm} % already loaded, but doesn't hurt
\usepackage{amsfonts} % already loaded, but doesn't hurt
\usepackage{amssymb} % extra symbols not included in amsfonts
\usepackage{bbold} % good for those double-struck NUMBERS using \mathbb{}
%\usepackage{mathbbol} % alternative to bbold package... slightly better?
\usepackage{mathrsfs} % provides better \mathscr{} font than standard
\usepackage{setspace} % allows you to set 1.5x spacing, 2x spacing, etc
\usepackage{natbib} % expands bibliography citation considerably
\usepackage{hyperref} % references get hyperlinks in PDF file
\usepackage{tocbibind} % expanded table of contents
\usepackage[usenames,dvipsnames]{color} % color text
\usepackage{graphicx} % obvious
\usepackage{verbatim} % gives \begin{verbatim} environment
\usepackage[all]{xy} % commutative diagrams
\usepackage{tabularx} % for better tables
%\usepackage{fullpage} % much smaller margins

\date{November 15, 2006}
\title{A Brief Guide to Ordinary K-Theory}
\author{Spencer Stirling}
\address{Department of Mathematics, University of Texas at Austin}



% set up a new command macro

% this controls equation numbering within sections - CUSTOMIZE ME

% set up some amsthm theorem environments



In this paper we describe some basic notions behind ordinary K-theory.


\chapter{Vector Bundles}

Here is my introduction \cite{bakalov_kirillov:book}
\xymatrix{ % sample XY-Pic command
  f:\mathbb{1}\ar[r]^-{A}_-{B} & H \\
That was a very simple commutative diagram, huh?  Notice that I used
the special "double-struck 1" in the above commutative diagram... THIS
REQUIRED THE "bbold" package.

Here are more examples (except I don't think that you need bbold for these)
$\mathbb{R}$, $\mathbb{C}$, $\mathbb{H}$, $\mathbb{RP}^2$. 

Now I'll include a random figure.  See figure \ref{pairofpants}.  Note
that I used the MetaPost "mps" format.  This should work in both
PDFLaTex and plain LaTex.
	\caption{A manifold with some primitive notion of causality}

Now I think that I'll put a random empty axis in... this is how some
simple pictures can be drawn using native LaTex commands
  % The horizontal axis
  % On the horizontal axis, a tick mark every 10 milimeters
  % The vertical axis
  % On the vertical axis, a tick mark every 10 milimeters

In conclusion, this paper sucks.


\chapter{Appendix A}



Here is a sample BibTex file mybib.bib (multiple entries are, of course, allowed):

author = {B. Bakalov and A. Kirillov},
title = {Lectures on Tensor Categories and Modular Functor},
publisher = {American Mathematical Society},
series = {University Lecture Series},
year = {2000},
note = {Also available online at http://www.math.sunysb.edu/$\sim$kirillov/tensor/tensor.html}

This page has been visited   times since November 17, 2005