TeXnik - Tips TeX and LaTeX

Welcome to the TeXnik website (under construction)

Non Floats
TUG logo

Main page

Search CTAN:


Google c.t.t.

Google d.c.t.t.



Figures with Caption |  Subfigures with Caption |  Tables with Caption | 

If you want always nonfloats with captions, than use package nonfloat, available at CTAN. If you have only one float which is longer than one page, try one of the following
Tables with Caption
Standard-floats like figure/table/algorithm do not support a pagebreak! In this case you must define your own semi-float-environment, because these ones supports a pagebreak. They are not real floats, because they are allways there where the command appears. In latex-preamble this new environment is defined as:
\newenvironment{myTables}[1] {% caption as parameter 
  \addcontentsline{lot}{section}{\thetable\hspace{0.75em} #1} 
  \center{\textbf{Table \thetable : }#1}% 
This environment is called by the structure:

\begin{myTables}{a very long table}

... the table ... or anything else


The reason why this "float" can be interrupted by another "real" float is that the placement-options have a high priority. Therefore it may be possible, that you have to correct the text-structure "by hand", means inserting some \newpage-commands or something else.

Figures with Caption
It's just the same than the above tables, if you change table against figure

Subfigures with Caption
You can use this environment if you need subfigures with special captions. Remember that there is a package subfigure at CTAN. The following subfigure-environments uses the figure counter, so that couting of the floats is continuing. To get correct counting choose the environments in correct order:
\begin{myFirstSubfigure}{ --- any Caption --- }
--- the figure ---
--- any text or not ---
\begin{mySubfigure}{ --- any Caption --- }
--- the figure ---
--- any text or not ---

.... so much sunbfigures as you like ....

\begin{myLastSubfigure}{ --- any Caption --- }
--- the figure ---
--- any text or not ---
between these subfigures there can not be any other float!!
in LaTeX preamble write
\newenvironment{myFirstSubFigure}[1] {% caption as parameter 
  \addtocounter{figure}{1}% increase the float figure counter
\newenvironment{mySubFigure}[1] {% caption as parameter 
  \addtocontents{lof}{\protect\contentsline %
  \hfill\textbf{Figure \thefigure\alph{mySubCounter} : }\mySubCaption\hfill% 
\newenvironment{myLastSubFigure}[1] {% caption as parameter 
  \setcounter{mySubCounter}{0}% resetting the subcounter
Look at subfigure page.

local time: Mon May 27 06:11:47 CEST 2024 ; file is: 1796.55079861111 days old
contact webmaster _at_ TeXnik.de