12.07.2015 Views

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

10. FLOATS AND CAPTIONS<strong>The</strong> \newfloat command generates several new commands, some of which are internalLa<strong>TeX</strong> commands. For convenience, assume that the command was called as\newfloat{F}{X}{capname}so F is the name of the float environment and also the name of the counter for the caption,and X is the file extension. <strong>The</strong> following float environment and related commands arethen created.\begin{F} float material \end{F}\begin{F*} float material \end{F*}<strong>The</strong> new float environment is called F, and can be used as either \begin{F} or\begin{F*}, with the matching \end{F} or \end{F*}. It is given the standard defaultposition specification of [tbp].Xdepth<strong>The</strong> Xdepth counter is analogous to the standard tocdepth counter in that it specifies thatentries in a listing should not be typeset if their numbering level is greater than Xdepth.<strong>The</strong> default definition is\setcounter{Xdepth}{1}To have a subfloat of X appear in the listing do\setcounter{Xdepth}{2}As an example, suppose you wanted both figures (which come with the <strong>class</strong>), anddiagrams. You could then do something like the following.\newcommand{\diagramname}{Diagram}\newcommand{\listdiagramname}{List of Diagrams}\newlistof{listofdiagrams}{dgm}{\listdiagramname}\newfloat{diagram}{dgm}{\diagramname}\newlistentry{diagram}{dgm}{0}\begin{document}...\listoffigures\listfofdiagrams...\begin{diagram}\caption{A diagram} \label{diag1}...\end{diagram}As diagram~\ref{diag1} shows ...\setfloatadjustment{〈floatname〉}{〈code〉}Often it is useful to add some global configuration to a given type of float such that onewill not have to add this to each and every float. For example to have all (floating) figuresand tables automatically centered plus have all (floating) tables typeset in \small use\setfloatadjustment{figure}{\centering}\setfloatadjustment{table}{\small\centering}170

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!