Package graphfig This is version 2.2, last revised 1997/12/15; documentation date 2005/04/09.

Author: F. Bosisio
E-mail: fbosisio@bigfoot.com
CTAN location: macros/latex/contrib/bosisio

Abstract

Documentation for the package graphfig.

Introduction

This package provides some commands to make the use of graphic files in LaTeX simpler.

It declares the Figure'' environment (capitalized!) and the two commands \graphfile'' and \graphfile*''. Combining this commands, it is possible to include graphic files in a LaTeX document very simply.

Required packages

This package uses the \includegraphics*'' command defined in the standard graphics package. Moreover, it uses the package subfigure when the subfigure option is specified, and the float package if the AllowH option is used.

The options

At now, two options are available: subfigure'' and AllowH''.

The subfigure'' option allow the use of sub-figures inside a Figure environment, in order to place multiple pictures in a single LaTeX figure (cfr. the subfigure standard package).

The AllowH'' option allow the use of the H'' float specifier for the Figure environment, in order to place the figure exaclty where the command is placed (cfr. the float standard package).

The Figure environment and its relatives

The Figure'' environment (capitalized!) is somewhat different from the standard LaTeX figure'' environment: besides an optional argument used to specify the placement parameters (which now defaults to [htbp]''), it has a mandatory agrument specifying the caption'' and another optional argument, used as a label'' for cross-referencies:

		\begin{Figure}[<htbpH>]{<caption>}[<label>]
...
\end{Figure}


The use of the H'' specifier (i.e. I want my float here!'') is possible only if the AllowH'' option has been specified.

The graphfile command

Inside the Figure'' environment, are available the commands:

		\graphfile[<width>]{<file>}[<sub-caption>]
\graphfile*[<heigth>]{<file>}[<sub-caption>]


which are a simplified version of the \includegraphics*'' command (which is automatically included by this package; see the graphics package for reference), since you don't have to worry about scaling: the mandatory argument is the name of the graphic file to include, whereas the first optional argument specifies the desired width (in the non *-form) or heigth (in the *-form) of the figure as a fraction of \linewidth'' (e.g. |50|'' means .50\linewidth'', i.e. half a line! ), so no unit of measure (as cm'' or pt'') is required.

Moreover, since the *-form'' of \includegraphics'' is used, the regions outside the bounding-box of postscript files are not drawn.

Another advantage of the combined use of the Figure'' environment and the \graphfile'' commands is that the picture is automatically centered horizontally, so no \centering'' or similar declartion is required.

		\begin{Figure}[<htbpH>]{<caption>}[<label>]
\graphfile[<width>]{<file>}
\end{Figure}


Sub-figures

If you want to include more than one file in a single figure, you may specify the subfigure'' option, which includes the subfigure package and provides the authomatic placement of a sub-caption below each picture.

If the subfigure'' option is not specified, multiple graphs are still allowed but no sub-caption will appear.

		\graphfile[<width_1>]{<file_1>}[<sub-caption_1>]
...
\graphfile[<width_N>]{<file_N>}[<sub-caption_N>]


This is a combined version of \subfigure'' and \includegraphics*'' (see the subfigure and graphics packages for reference): the last optional argument specify a caption'' for the sub-figure under consideration, while the first two arguments work exactly like as described above in the case of one only picture (indeed, you can use the last optional argument even if the subfigure option was not specified, in which case it is simply ignored).

Each individual caption is printed preceded by a bracketed letter, which is the sub-figure counter and is printed even if no caption is specified. Using only a series of \graphfile[...]{...}[...]'' commands inside a Figure'' environment provides an equal spacing beetween the pictures and around them, without the need for any extra command.

Finally, if a <label>'' was specified as the last optional argument to the Figure'' environment, you can reference to each individual sub-figure by the labels <label>:a'', <label>:b'', and so on, without the need for declaring them.

	\begin{Figure}[<htbpH>]{<caption>}[<label>]
\graphfile[<width_1>]{<file_1>}[<sub-caption_1>]
\graphfile[<width_2>]{<file_2>}[<sub-caption_2>]
:
:
\end{Figure}


F. Bosisio
E-mail: fbosisio@bigfoot.com