Difference between revisions of "Command/definefloat"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \definefloat")
(No difference)

Revision as of 18:33, 7 September 2020


\definefloat

Summary

The command \definefloat defines floating object classes.

Instances

\chemical
\figure
\table
\intermezzo
\graphic

Settings

\definefloat[...][...][...=...,...]
[...]singular
[...]singular plural
...=...,...inherits from \setupfloat

Settings name

\definefloat[...][...][...]
[...]singular
[...]plural
[...]singular

Description

Define a new float type additional to predefined types "chemical", "graphic", "figure", "table" and "intermezzo". When invoked as \definefloat[remark][remarks][intermezzo], the following commands are defined, with defaults taken from the intermezzo environment, and the "intermezzo" counter will be used for "remark" floats:
  • \setupremark to set up the new environment
  • \placeremark to place a remark block
  • \startplaceremark...\stopplaceremark is the same, as an environment
  • \placelistofremarks for a 'table of remarks'.
  • \completelistofremarks for a table of remarks with a header
  • \startremarktext...\stopremarktext

It also defines:

  • the counter 'remark' (inherits from intermezzo)
  • the label 'remark' (inherits from intermezzo)

If no parent is given, then the label is the \Word value of the name (so: Remark) in this case.


TODO: there are some more commands and internals automatically generated (See: To-Do List)


Examples

Example 1

\definefloat[rightfigure][rightfigures][figure]

\setupcaption[rightfigure][location=right]

\starttext
\placefigure{caption 1}{\framed{figure 1}} % old one
\placerightfigure{caption 2}{\framed{figure 2}} % new one
\placefigure{caption 3}{\framed{figure 3}}
\stoptext

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: