28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

7.7. Some float packages 179<br />

rflt (right), lflt (left), or vflt (variable, i.e. p). If no option is given, the<br />

default is vflt.<br />

\begin{floatingtable}[pos]{<br />

\begin{tabular}{table specs}<br />

table entries<br />

\end{tabular}}<br />

Optional \caption comm<strong>and</strong><br />

\end{floatingtable}<br />

To include a table with text,<br />

the usage is slightly different, as<br />

shown at the left. That is, the entire<br />

table appears in place of the<br />

wth for a figure, <strong>and</strong> only the caption<br />

in placed in the environment<br />

itself.<br />

Both these environments are<br />

<strong>to</strong> be placed at the start of the paragraph that is <strong>to</strong> flow around the figure<br />

or table. The flowing cannot start in the middle of a paragraph.<br />

There is some very tricky coding <strong>to</strong> get the flowing text <strong>to</strong> work properly,<br />

<strong>and</strong> needless <strong>to</strong> say, there are many things that can go wrong. Please<br />

read the accompanying manual for more details.<br />

7.7.3 Defining new floats <strong>and</strong> styles<br />

Package: For authors who are not satisfied with the st<strong>and</strong>ard float style, or who<br />

float need additional floating environments, we recommend the float package<br />

by Anselm Lingnau. With this package, one defines a new float type with<br />

\newfloat{name}{loc}{ext}[within]<br />

where name is the name of the new float environment, loc is the default<br />

placement letters (selection of tbhpH), ext is the extension of the file<br />

containing the list of this float type, <strong>and</strong> the optional within is the name<br />

of a counter (e.g., chapter) within which the numbering is reset.<br />

For example, <strong>to</strong> define a plate environment that behaves just like<br />

figure but which is numbered separately as Plate xxx, with the numbers<br />

reset within each chapter, give<br />

\newfloat{plate}{p}{lop}[chapter]<br />

\floatname{plate}{Plate}<br />

The first line defines the new environment, with default placement on a<br />

float page. The second states that the captions associated with this float<br />

are <strong>to</strong> start with the word ‘Plate’; without this, they would be labeled as<br />

‘plate’, the same as the environment name itself.<br />

The information for the list of plates is s<strong>to</strong>red in a file with extension<br />

.lop, in the same way that the list of figures is in a file with extension<br />

.lof (Section 3.4.4). This list is printed by reading in this file with the<br />

comm<strong>and</strong><br />

\lis<strong>to</strong>f{plate}{List of Plates}<br />

where ‘List of Plates’ is the list title.<br />

The default placement parameters for any float environment, including<br />

the st<strong>and</strong>ard figure <strong>and</strong> table ones, can be redefined with

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

Saved successfully!

Ooh no, something went wrong!