# New figure environment

I am writing my PhD thesis. In my manuscript I have Figures in the text and Photographic plates (a figure of figures) in the annexes. The two elements are different and I would like create a new environment of Plate that follows the same structure of the Figure environment. Where can I find the Figure environment to modify it?

The new environment table should have exactly the same structure than the figure environment but replacing the word figure by the word Planche (in French).

-
Please comment concerning whether you also need to create a list of figures that will be separate from the list of planche's, as this would complicate (I imagine) the answer. Presumably, you would want a separate counter as well. – Yossi Farjoun Dec 3 '10 at 15:35

To do this in the raw, use the float or floatrow packages.

\newfloat{plate}{tbp}{lop}


Alternatively, the trivfloat package aims to wrap up the complexities of float(row) so that you only have to do

\usepackage{trivfloat}
\trivfloat{plate}


(Note: I wrote trivfloat.)

As you might guess, trivfloat makes things easy but at the cost of flexibility. If you want full control over the process, use float (or floatrow).

-
 One drawback of float IMHO is that it forces a certain style. Apparently it collects the content of the float in a box and places the caption afterwards (which got only stored by \caption). You loose the possibility to place multiple entries with own captions in one floats using minipages etc. – Martin Scharrer♦ Jul 2 '11 at 15:44

The caption package also masters to create new float environments with corresponding lists.

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{blindtext}

\DeclareCaptionType[fileext=los,placement={!ht}]{scheme}

\begin{document}
\listofschemes

\bigskip
\blindtext

\begin{scheme}
\centering
\rule{0.75\textwidth}{0.5\textwidth}
\caption{Dummy scheme}\label{sch:dummy}
\end{scheme}

\blindtext
\end{document}

-

There is now a new dedicated package newfloat which allows the definition of new floats. It does this in the same format like the original floats figure and table without forcing a specific format, like the float package does.

The newfloat package is part of the caption bundle and was extracted from the related code of the caption package by its author (on my request).

An example of define a new floating environment is:

\usepackage{newfloat}
\DeclareFloatingEnvironment[
fileext=los,
listname=List of Schemes,
name=Scheme,
placement=tbhp,
within=section,
]{scheme}

-

You probably want to look at the float package, which allows you to define and set up new floats with quite simple commands.

In your preamble: \usepackage{float}

Then, you define new floats using the following syntax:

\newfloat{<type>}{<placement>}{<ext>}[<within>]


<type> is the ‘type’ of the new class of floats, like program or algorithm. After the appropriate \newfloat, commands like \begin{program} or \end{algorithm*} will be available. <placement> gives the default placement parameters for this class of floats. The placement parameters are the same as in standard LATEX, i.e., t, b, p and h for ‘top’, ‘bottom’, ‘page’ and ‘here’, respectively. When LATEX writes the captions to an auxiliary file for the list of figures (or whatever), it’ll use the job name followed by <ext> as a file name. Finally, the optional argument <within> determines whether floats of this class will be numbered within some sectional unit of the document. For example, if <within>=chapter, the floats will be numbered within chapters. (Source: package documentation)

Thus, you could do something like

\usepackage{float}
\newfloat{Planche}{hbtp}{lop}[section]

...

\begin{Planche}
...
\end{Planche}


There are many more configuration options, so please go to the documentation and see what you can do! =)

-
 Could you please add some code to show how the definition of new floats is done. Just stating the package is not a good answer. – Martin Scharrer♦ May 23 '12 at 13:19 @MartinScharrer: better? =) – Tomas Lycken May 23 '12 at 13:36 Much better!!!! – Martin Scharrer♦ May 23 '12 at 13:42

Since there aren't enough possibilities (and I haven't praised KOMA-Script today), yet, let me present another possibility. The package tocbasic (which is part of the KOMA-Script bundle and already loaded if you happen to use a KOMA class) let's you define new floating environments through its command

\DeclareNewTOC[<options>]{<extension>}


It is explained in detail in the KOMA-Script documentation. Here is an example how one could use it:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}

\usepackage{tocbasic}
\DeclareNewTOC[%
type=plate,%
types=plates,% used in the \listof.. command
float,% define a floating environment
floattype=4,% see below
name=Planche,%
listname={Table des planches}%
]{lop}

% About the floattype' option:
% The numerical float type of the defined floats. Float types with common bits
% cannot be reordered. At the standard classes figures has float type 1 and tables
% has floatype 2. If no float type was given, 16 will be used.

\begin{document}

\listofplates

\begin{plate}
whatever
\caption{a caption}
\end{plate}

\end{document}
`

-