POSTS

LaTeX I always forget

Blog
renewcommand{labelenumi}{Alph{enumi}.}
renewcommand{labelenumii}{alph{enumii}.}

This is used to define the classes of glyphs you want to use in an outline. In this case, the top-level points will be majuscule, Latin ( no for once I don’t mean the language, but the letter-forms ). The first level sub-set of that will be Latin minuscule. There are a number of classes that are available.

LaTeX recognizes 4 levels of sub-idententation ( thus no labelnumxix ), but 4 is usually sufficient ( yes, I strained to type that, but if it’s not sufficient, odds are you’re not as clear in your thinking as you ought be ).

The renewcommand operator is used to **re-**define standard operators. newcommand is sufficient for a non-extant operator.

Taken from Jeff Krimmel’s excellent resource

You can also use

Roman,  alph,  arabic, roman, and Alph as formats

Here’s the one I tend to use, which I would call “traditional.”

\renewcommand{\labelenumi}{\Roman{enumi}.}
\renewcommand{\labelenumii}{\Alph{enumii}.}
\renewcommand{\labelenumiii}{\arabic{enumiii}.}
\renewcommand{\labelenumiv}{\alph{enumiv}.}

Define new commands that take arguments

Sometimes you want to create a new command, here’s how to do it. Here was a command i wrote that produced small-caps-ified large text:

\newcommand{\verbatimTask}[1]{begin{sc}begin{large}{{#1}}end{large}end{sc}}

I modeled this off of devdaily.com

Adding new styles

If you need to add a new style, on my system, you do it in:

/usr/local/texlive/texmf-local/tex/latex

You add your style there. Subsequently, you need to execute “texhash” to rebuild the database so that you can use it.

Thereafter, by using:

\usepackage{packagename}

Will allow you access to your commands.

Inter-linear spacing

To double-space a LaTeX document, you should include the line

\usepackage{setspace}

after your \documentclass line.

Before your \begin{document} command,

\doublespacing

will make the text of the whole document double-spaced. Footnotes, figures, and tables will still be single-spaced, however. For one-and-a-half spacing, instead use the command

\onehalfspacing

In order to make a part of the text of your document singlespaced, you can put:

\begin{singlespace}

at the beginning of the text you want singlespaced, and

\end{singlespace}

at the end.

You can also set the spacing to be something other than doublespaced; for example, if you wanted to have one-and-a-quarter spacing between lines, use the line

\setstretch{1.25}

before your \begin{document} command, and after the \usepackage{setspace} line.

(NOTE: there is another package, called “doublespace” which will usually work exactly the same way as setspace. However, it interacts poorly with some graphics packages.)

From MIT

Adding a style

On my OSX machine copy it into a subdirectory off of /usr/local/texlive/texmf-local/tex/latex.