slides document style.\small in the beginning of each
\caption almost works, but there is a better
solution.
\special or if you have problems getting the
figure to hit the right spot you may not be doing it the easiest
way.\itemsep to -2mm (experiment to find the
right length) inside the thebibliography environment:
\begin{thebibliography}\setlength{\itemsep}{-2mm}
This is not practical if bibTeX is used, as the
thebibliography environment will be in the
.bbl file, which is overwritten each time bibTeX is run.
A better solution is a redefinition of thebibliography.
I have cut out and modified the original definition, just include the
bibspacing.sty package to
set the spacing to zero.
Another spacing may be selected by setting the
\bibspacing length. To set the spacing to one line, use:
\usepackage{bibspacing}
\setlength{\bibspacing}{\baselineskip}
NOTE: If you use the natbib package, you should
use natbibspacing.sty
instead, and be sure to load it
after natbib:
\usepackage{natbib,natbibspacing}
list environment. The list
environment contains a large number of adjustable parameters, setting
the margins, spacing between items etc. etc. Some of these, such as
\itemsep can be set immediately after the
\begin command:
\begin{itemize}\addtolength{\itemsep}{-0.5\baselineskip}
Others, such as \topsep, cannot be adjusted in this way
as it is used inside the \begin statement. Anyway, in
the spirit of LaTeX these spacings should be adjustable in a global
way.
Solution: The
tweaklist.sty package redefines
the itemize, enumerate and
description packages, so that all parameters can be
adjusted. This was done by copying the original definitions, and
adding "hook commands" that are executed when entering the
environment. The hook commands are initially empty, but can be
redefined with \renewcommand.
Example: to set \topsep and \itemsep to 0 in
the enumerate environment, use:
\usepackage{tweaklist}
\renewcommand{\enumhook}{\setlength{\topsep}{0pt}%
\setlength{\itemsep}{0pt}}
The following hook commands are defined: enumhook for the
enumerate environment, itemhook for the
itemize environment, and descripthook for
the description environment.
LaTeX keeps track of nested enumerate and itemize environments. If
you only want to modify a specific nesting level, you should not use
enumhook or itemhook. Special hooks are
defined that are only called at the specific level. For the
enumerate environment they are enumhooki,
enumhookii, enumhookiii, and
enumhookiv. For the itemize environment
they are itemhooki, itemhookii,
itemhookiii, and itemhookiv. The
level-specific hooks are called after the global hook, so they can
redefine a setting in the global hook. As LaTeX does
not keep track of the nesting level of description
environments, there are no level-specific hooks for that
environment.
For a list of which parameters you can change, see the section on lists in a LaTeX book. Suggestions:
\small in the beginning of each
\caption almost works, but there are a few
problems.
\caption is used
to make a different (shorter) caption for the list of figures.
% Different font in captions
\newcommand{\captionfonts}{\small}
\makeatletter % Allow the use of @ in command names
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{{\captionfonts #1: #2}}%
\ifdim \wd\@tempboxa >\hsize
{\captionfonts #1: #2\par}
\else
\hbox to\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
\makeatother % Cancel the effect of \makeatletter
Fortunately, you don't have to understand it to use it! Change the
first line to choose another font change. NOTE: I cannot get
this to work with new-style font commands, so use the old style in the
\captionfont definition, i.e. use \em instead of
\emph.
\renewcommand{\figurename}{Fig.}
For tables, redefine \tablename.
\renewcommand{\topfraction}{0.85}
\renewcommand{\textfraction}{0.1}
This helps, but sometimes LaTeX puts a figure on a page by itself,
although it would fit perfectly well on the top of a page. This
happens when the figure will not fit on the page where it was
defined. LaTeX then attempts to put it on a figures-only page
before it attempts to put it at the top of the next page. A
page may contain figures alone if the figure(s) use at least half the
page. To prevent half-empty pages this limit should probably be
increased to around 75%.
\renewcommand{\floatpagefraction}{0.75}
Be careful not to make \floatpagefraction larger than
\topfraction, then you risk to produce a figure that can
neither go on the top of a text page, nor on a page by itself. If
that happens, the figure and all later figures will be
postponed until next time a \clearpage is executed
(typically at the end of a chapter or the end of the document). This
will also happen if a figure is too large to fit on a page.
minipage
environment is useful. The following example puts the figure on the
left side using 58% of the with, and the caption on the rigth using
38% of the with. The remaining 4% of the page width ends up
separating the two due to the \hfill command.
\begin{figure}
\begin{center}
\begin{minipage}[t]{0.58\linewidth}
\epsfig{file=somefile.ps, width=\linewidth}
\end{minipage}\hfill
\begin{minipage}[t]{0.38\linewidth}
\caption{This is the caption.\label{fig:rawss}}
\end{minipage}
\end{center}
\end{figure}
Note the placement of the \label command, it must appear
inside the \caption command, or after it but still inside
the minipage environment. Otherwise references to the
figure will be wrong.
The vertical alignment of the figure and the caption may be
troublesome, you may have to put the figure inside a
\raisebox command.
\raisebox{2cm}{\epsfig{file=somefile.ps, width=\linewidth}}
Or change the [t] optional argument to the minipage
environments to [c] or [b]. Experiment!
\epsfig command, which calls
\includegraphics. You may prefer to use
\includegraphics directly, or to use the
\epsf package, it is a matter of taste.
\usepackage{epsfig}
bbox command can calculate the bounding
box, it works in 95% of the cases. You can also measure it yourself
by printing it or using ghostview
(preferred). The bounding box command is in the beginning of the file
and looks like this:
%%BoundingBox: 0 10 612 792this means that the figure fits inside a rectangle with lower left corner at (0,10) and upper right corner (612,792). The unit is 1/72 inches (.3528 mm) measured from the lower left corner of the paper. Ghostview shows the coordinates of the cursor in the upper left corner, it makes it easy to measure bounding boxes.
bb= argument to \epsfig.
\epsfig{file=graph.ps, angle=-90, width=\linewidth}
this command includes the figure in graph.ps, rotates it 90 degrees
clockwise (good for Xmgr graphs) and scales it to the current line
width. LaTeX automatically reserves space for the figure
\epsfig:
width=0.5\linewidth
Note when rotating figures: In TeX a box has three dimensions: width,
height and depth. Height is how much it goes above the baseline,
depth how much it goes below. Epsfig rotates around the lower left
corner, so if you rotate by -90 degrees the entire figure ends up
below the baseline, i.e. the height is zero but it has a depth. For
this reason the height= will not work, but
totalheight= does. You may want to use
\raisebox to move it above the line.
Examples:
\epsfig{file=graph.ps, angle=-90, width=0.7\linewidth}
\epsfig{file=a0000.ps, bb=48 62 505 486, clip=, width=8cm}
The clip= is necessary to prevent the white background
from causing trouble.
\hyphenpenalty=5000 \tolerance=1000You may have to experiment a bit (adjusting
\tolerance
appears to be most promising). A \hyphenpenalty of 10000
(almost) prevents hyphenation, but produces overlong and/or ugly lines.