# Setting up a LaTeX document using the Uggedall or tufte-latex templates

I’ve used LaTex before for a while, but (1) it’s been ages, and (2) I’ve only really had to import minor packages for a basic template.

Having come across templates/classes like Uggedal’s and tufte-latex, I want to take it one step further.

The problem is that I have either completely forgotten how to do this or have never had to do anything like it. I use Windows 7 with MikTeX and TeXnicCenter, and can’t find anything telling me what to do, or how to do it properly.

It may be a lot to ask, but could someone write a step-by-step guide to using the templates and writing a simple example document free of a slew of LaTeX errors? It doesn’t seem like a simple slam dunk, and I should probably throw files like .cls into some system folders.

-

Suppose you want to use a New! Shiny! LaTeX package. First you'll need to make sure that the LaTeX program can find the important files. Usually, you'll get a .cls file or a .sty file, sometimes more things. These need to go into the search path of LaTeX.

Now, if you only use it for one single project, you can (on most installations) just put the files in the same directory as you keep your .tex files in, since . will be part of the search path.

For a better installation, though, you'll want the package to sit somewhere in your texmf hierarchy.

Both TeXlive and MikTeX come with package managers that can install most CTAN packages for you automatically. On TeXlive, it'll be called tlmgr, and on MikTeX it'll be called the MikTeX Package Manager (MPM). The tufte-latex package is available in both systems under this name, and so for MPM, you'll open the package manager, search for tufte-latex and use the interface to install the package.

On TeXlive, you'll need to do tlmgr install tufte-latex, possibly with administrator privileges.

If you're on neither of these systems, or are trying to install something that doesn't come in a neat package like this, it's a bit more involved.

First, you need to unpack your files in the right part of the texmf tree. There's a global directory somewhere in your filesystem — depending on which distribution you use — called texmf, and under this the structure is standardized by the TeX directory structure project. LaTeX packages go in under texmf/tex/latex/<package name>, or if the package doesn't depend on LaTeX (or any other particular dialect or subsystem) under texmf/tex/generic/<package name>. There may also be user-specific texmf locations — on MacOSX there is ~/Library/texmf, and there might be a ~/.texmf under various Linux/UNIX dialects.

Once your files are unpacked, you'll need to tell TeX about the new files. You do this by triggering a rebuild of the internal file location hash table, by running texhash with administrator privileges. MikTeX has instead, somewhere, a button in the administration tools called something like Update FNDB which will do the corresponding work for you.

After this, you can just go on to include packages in your .tex files, and compile away. As an example, this skeleton works for me, and produces a pretty little silly page.

\documentclass{tufte-handout}

\begin{document}

\section{Demonstrating the Tufte classes}

\newthought{ This document} demonstrates a compiling document with the
\texttt{tufte-latex} classes.

A rather minimal version will compile easy enough.

\newthought{For more details} on tweaks and tricks, refer to the documentation.

\end{document}

-
Fantastic answer—that, ironically, I can’t upvote. I think I got it to work, but then again, I have no idea what the hell I am doing, and if something would go awry again. Bookmarked for future travails! –  Kiwi Dec 3 '10 at 23:56

There is one more option: the easiest way is to copy:

tufte-book.cls tufte-common.def
tufte-handout.cls

to the directory you're working in. And then install the needed packages.

-