# ThesisTeX FAQ list

This is a compliation of several FAQs plus other issues which have come up. Latest update: March 17, 2004.

#### I get an error when I use \thebibliography. It says \newblock undefined. What gives?

Yep, \newblock is undefined. Include the following, for example in your mydefs.sty, or modify it if you like:
\def\newblock{\hskip .11em plus .33em minus .07em}

Before you include the bibliography, add the following:
"toc" means the table of contents (you can arbitrarily add to table and figure lists as well) and "chapter" means to add it as a chapter. If you had a bibliography at the end of a chapter, you could use "section" instead.

#### What's the difference between \include and \input?

\include{blah} starts a new page and inserts the file blah.tex while \input{blah} simply inserts blah.tex. I use \include only for top-level items like chapters where you want to start a new page. \input simply drops in a block of LaTeX code as-is. It's useful for inserting tables which are machine-generated, for instance. Also, you can't do nested \includes while you can do nested \inputs.

#### How do I reference the chapter numbers in my thesis?

Just add a \label to the chapter heading like you do with sections, etc. For example:
\chapter{Introduction\label{mythesisintro}}

#### My section headings/captions in the table of contents/figure list/table list look funny. It doesn't like a change in fonts. For example \ion looks totally wrong.

I don't know how to fix this. The toc evidently forces certain fonts and doesn't like the smaller font used by \ion. One solution is just to change \ion{C}{4} to C~IV. This probably doesn't give the spacing you want. You could define a command like \ion just for use in captions, like this:
\newcommand\capion[2]{\mbox{#1\hspace{0.2em}{\rmfamily\@Roman{#2}}}}
The font still won't be the smaller font, but the difference is very small.

#### How do I add a dedication to my thesis?

Not everyone does this, but if you want to, the usual place is after the abstract. There is a dedication environment. Do this:
\begin{dedication}For fluffy the hamster...\end{dedication}

#### I want my figures to be on the same page with text, but LaTeX puts each figure on its own page. How can I change the way figures are embedded in the text?

(CD) This is a tricky one. As you probably know from previous experience, figure placement in LaTeX can be a pain. The basics of figure placement are covered here. You also need to read this. Basically, you put a positional marker at the end of the begin figure line, vis
\begin{figure}[]
In the square brackets go either h (here), t (page top), b (page bottom), or p (separate page of floats). LaTeX will try to do this, but will balk at large figures. If you feed a [t] position indicator to a full-page figure, it will get put at the end of the chapter. Use a blank pair of brackets instead. Positioning can be fine-tuned by moving the figure code back and forth through the text. I typically put the code for a figure immediately before the first paragraph which cites it.

(RT) There are float placement parameters that LaTeX uses that are defined in thesis.cls. What they do are, to say the least, not obvious, as their definitions in the LaTeX manual seem fairly weakly correlated with the effects they have on figure placement. Anyway, these environment variables are in the thesis.cls after where it says FIGURES AND TABLES. For my dissertation, I changed \topfraction and \floatpagefraction in thesis.cls. Alternatively, you should be able to redefine them later with \renewcommand. I have
\def\topfraction{.9}
\def\floatpagefraction{.8}

The others I left the same as the original thesis.cls. This should embed more figures and tables in the text (i.e. permit the floats to take up more of the page.) Experiment with the variables to get what you want.

#### How do I put tables where I want them?

This is one I haven't figured out yet. Normal tables can be placed just like figures (see above). But this trick doesn't work with deluxetables. LaTeX is fairly intelligent about it. Small tables will be put at the top of a page near where they are in the text. Large tables, especially multi-page ones, will start a new page when called (often leaving a half-page of text before them). For some reason, multipage tables will sometimes interlace with text. For instance, it might go [text], [table], [table], [table], [text], [table], [text]... This can be fixed by putting a \clearpage right after the table.

#### It takes forever to compile my LaTeX code. Is there anything I can do?

Yes! Put the command \includeonly{blah} in the preamble where blah.tex is one of the files mentioned in and \include commands in the document. This will keep the same .aux, .toc, .lof and so forth files and compile only blah. This goes much faster, especially for a long thesis with lots of figures. Multiple files can be used: \includeonly{blah,foo,blatz}.

#### My references have an extra comma in them.

Normal astronomical referencing is usually in the form (Smith 1999). Instead, \citep causes it to come out (Smith, 1999). If this is not to your liking, but the following line in the preamble:
\bibstyle{aa}

#### I have three-digit figure numbers (ex. Figure 1.123) and the List of Figures doesn't allow enough space for that.

There is probably an elegant solution to this one, but I don't know what it is. Instead, I just changed the short figure captions to be start with a couple of forced spaces (shown as ~~). For example...
\caption[~~Short caption for the List of Figures]{--- A longer caption which is more descriptive would go here.}

#### The bibliography is double-spaced. How do I prevent that?

In the official thesis guidelines, it's supposed to be that way. But for your own purposes, it's quite easy to render this list (or any enumerated list) single space by using the \setlength command.
\begin{thebibliography}\setlength{\itemsep}{-2mm} See Jakob's LaTeX tricks for more details.

#### The margins aren't right. I get too much margin on top and not enough on the bottom.

These macros were created to conform to the JHU guidelines which specifically state (in fact there is someone who actually measures this!) that the left margin shall be 1.5" and the rest shall be 1" exactly. The margins are apparently set in the jhu*.clo files. I editted the one I am using (jhu10.clo). Look for this line and change it to look like this:
\topmargin -0.5in % Nominal distance from top of page to top

#### How do I get the wide margins to alternate for two-sided printing?

JHU doesn't let you do this for the official copies that gets turned in to the library. But for the extra bound copies for your advisor and so forth, duplexing is allowed, even encouraged. Less trees killed, less shelf space, etc. It's very easy! Just include the option 'twoside' in the \documentclass line:
\documentclass[10pt,twoside]{thesis}

#### I can't get \lessim and \gtrsim to work

For some reason, these aren't defined as they are in AASTeX. Try defining these instead somewhere in the preamble:
\newcommand {\apgt} {\ {\raise-.5ex\hbox{$\buildrel>\over\sim$}}\ }
\newcommand {\aplt} {\ {\raise-.5ex\hbox{$\buildrel<\over\sim$}}\ }

#### Why can't I get a deluxetable to rotate?

This is a really weird one. For some reason the UNIX version of LaTeX which many of us use doesn't let you do this. Linux versions of LaTeX using the same code are fine and produce admirable results. If anyone figures this out, let me know.

#### How do I prevent the entire figure caption from appearing in the List of Figures?

Easy! Include a short and long caption in each figure. The short caption goes in the LOF while the long one will appear with the figure. The syntax is:
\caption[short caption]{long caption}