The Plates Package

Anthony A. Tanbakuchi

atanbakuchi@hotmail.com

v0.1 last revised 2002/3/18

Abstract

The plates package provides a simple facility for inserting color figures in documents when they should be gathered and printed together — just like in books with a section of color plates. The benefit of such a facility is to allow these special figures to be printed separately and later slipped into the final document. The package provides the plates environment to handle this situation. The user need only place these special figures in a plate environment instead of a figure environment and issue a command to print the plates at a chosen location in the document. Additionaly, if the author wishes to have a version of the document where the color figures are included in the text merely including the figures option will change the behavior of the plates environment to a figure environment, causing the plates to be printed directly in the text. Finally, the use of \autoref {...} from the hyperref package will allow references to logically chose the prefix Figure or Plates depending if the figure option has been given.

It is important to note that one could just create a plate appendix in their document and put all their special figures directly in this section of the document, alleviating the need for this package. However, by using the plates package one can turn on and off the functionality, allowing the creation of printed version of the document and possibly on line versions (like PDF’s) where it would be more logical to have the plated near the point referenced in the text. Furthermore, by placing the plates in the document’s text (like figures) the source document is much easier to edit.

1 Usage

The new package can be invoked in the preamble by,

\usepackage[<options>]{plates}

Now the new plate environment is available for use in the document. The plate environment is used just like the figure environment.

\begin{plate}
% Your normal figure commands here eg.
\cation{A caption} \label{...}
\end{plate}

NOTE: it is recommended that you use the hyperref package, the plates package dynamically changes the \autoref {...} command such that if \autoref {...} is issued and no options were used when the package was loaded, then Plate … is printed, however it the package is used with the figures option, then \autoref {...} is properly redefined to output Figure ….

Package Options:

figures Treats plates just like figures. Gathering is turned off, \autoref{plate :...} references as Figure instead of Plate.

onefloatperpage Ensures that one float is on a single page. After each float \cleardoublepage is called, this is particulary useful in a double sided document where the color figures will be one to a page and one sided. If you wish to define your own actions to be taken after each float, you can manually do it, an example of double page clearing is:

\renewcommand{\efloatseparator}{\cleardoublepage}

memoir If the memoir class is being used, then the option will cause \ProcessPlates to create an appendix page called Plates before the plates are printed. If this option is used and the memoir class is not in use an error will occur. If you are not using the memoir package, but wish to define your own actions to create appendix pages and such before the plates are printed, then you can manually define the command: \AtBeginPlates{ Your Actions Here }.

New Commands:

\listofplates Functions just like \listoffigures but prints a list of the plates.

\ProcessPlates At point of issue in document all the gathered plates thus far are printed. Therefore, the command can be used to accumulate plates to the end of each chapter (if issued at the end of each chapter) or at the end of the document in an appendix (if issued at the end). Note, if the command is never issued, then it will dump all the gathered plates at the end of the document.

\atBeginPlates User definable actions that should occur just before the plates are printed. (Eg. \atBeginPlates{\chapter{Plates}}) It is preferable to use this method rather than hard coding the commands into the document in front of the \ProcessPlates so that if the figures option is used the actions will not be executed.

\setplatename Allows user to define the actual name used for the plates environment in the table of contents, caption, etc. The default is \setplatename{Plate}, alternately you could set it to \setplatename{Diagram}. Note, you should use the singular form of the desired name.

2 Examples

The following example shows how the commands are used. The example will print out all figure environments normally, but the plate environments will be gathered and printed at the end of the document where the command \ProcessPlates is issued.

\documentclass{article}
\usepackage{plates}
\usepackage{hyperref}
\setplatename{Photo} \atBeginPlates{\section{Photos}}
\begin{document}
% Print a list of figures and plates
\ listoffigures \ listofplates

\section{Conclusion}
The document text begins. Here we can include a plate and
reference it by \autoref{Plate:1}, yet it won’t appear until we
issue the \ProcessPlates command.
\begin{plate}
This is a plate .
\caption{A plate caption.}
\label{Plate:1}
\end{plate}
Now a figure in our document. \autoref{fig :1} will appear near
our reference to it .
\begin{figure}
A figure to look at.
\caption{A figure}
\label{fig:1}
\end{figure}
Another plate.
\begin{plate}
This is a plate .
\caption{A plate caption.}
\label{Plate:2}
\end{plate}
\section{Conclusion}
Some final text to go with our thoughts.
% Now we wish all the plates to print here.
\ProcessPlates
% The \atBeginPlates command is issued,
% creating a new Photos section.
% Next,

% Plate:1 then Plate:2 is printed.
\end{document}

Thus, the document has contains by order: introduction section, fig:1, concluding section, a new section called Photos, then plate:1 and plate:2.

If we issued the option figures to the plates package, the plates would be printed in the text, the order would be, introduction section, plate:1, fig:1, plate:2, then concluding section. \ listofplates and \ProcessPlates would have no effect.

3 Credits

This package is built from a little new code and some modified code from other packages. Specifically, code from the memoir class is used to define a new float environment, to enable the gathering of the plates modified code from the endfloat package has also been used. I would like to thank the authors of both noted packages for providing much of the needed facilities enabling this package.

4 Closing

If you like this package, find bugs, or just have useful comments please let the me know at atanbakuchi@hotmail.com. Please note that I am not a TeX hack, just someone who had a wish for this type of package and managed to find a solution.