TeXnik - Tips TeX and LaTeX

Welcome to the TeXnik website (under construction)

 Main page Index UK FAQ Documentation Software CTAN Search CTAN: Statistics Google c.t.t. Google d.c.t.t.

New Type of Floats The package float may be part of your local TeX-Installation or available at CTAN. Be sure that you have a version higher than 1.2, otherwise the floats don't work as wide ones in a twocolumn mode.

Creating a new type of float is very simple.
As an example for a type messages:

in latex preamble

\usepackage{float}
\newfloat{messages}{htb}{loM}[chapter]
The arguments are:
1. messages: the name of the float. Important for the caption and the latex-syntax (see below)
2. htb: Placement, valid for all floats of type Messages
3. loM: the name of the file which stores the captions for a list of Messages
4. chapter: numbering inside chapters, makes sense for the book-classes.

In the text the enw float-type Messages is called as an environment:

\begin{messages}

text, figure, table or anything else

\caption{text text}
\end{messages}
Changing the name of the caption is possible with (for example):
\floatname{messages}{Mitteilungen}
Changing the list-of-title is a little bit complicated. if you have only one new-defines float, write in preamble:
\let\myListof\listof
\renewcommand\listof[2]{%
\myListof{#1}{Here comes my list of Messages}%
}
For the list of ... write always
\listof{messages}{Here comes my list of Messages}

local time: Thu Jul 9 11:18:36 CEST 2020 ; file is: 378.763865740741 days old
contact webmaster _at_ TeXnik.de