Tuesday, March 2, 2010

LaTeX things I keep forgetting

Itemize and enumerate spacing 

To change the spacing of an itemize environment (or of anything, really, it's just most annoying with itemize):
\setlength{\itemsep}{2pt}
\setlength{\parskip}{0pt}

If you're going to do a lot, then you can define a new environment
\newenvironment{name}
{
   \begin{enumerate}
   \setlength ...
}
{
   \end{enumerate}
}

Graphics
To crop:
[trim=95 25 95 15,clip]
It's left, bottom, right, top

To define a bounding box:
[bb=0 0 719 570]
It's x,y,width,height

Header

\documentclass[12pt,letterpaper]{article}
%\parindent0em
\usepackage{graphicx}
%\usepackage{subfigure}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{float}
\usepackage{lscape}
%\usepackage{mcode}
\addtolength{\oddsidemargin}{-.75in}
\addtolength{\evensidemargin}{-.75in}
\addtolength{\textwidth}{1.5in}
\addtolength{\topmargin}{-.25in}
\addtolength{\textheight}{1.25in}


Note that the length adjustments are based on my LaTeX=>ps always outputting in A4 paper rather than letter...

Hmm...had an issue this time with LaTeX=>ps turning my .jpg into black & white...odd...
But the rest of these tips should work!

No comments:

Post a Comment