Difference between revisions of "Command/definefloat"

From Wiki
Jump to navigation Jump to search
Line 77: Line 77:
 
<cd:source file="strc-flt.mkvi" originator="system"></cd:source>
 
<cd:source file="strc-flt.mkvi" originator="system"></cd:source>
 
<cd:wikipage originator="system" page="Category:Structure"></cd:wikipage>
 
<cd:wikipage originator="system" page="Category:Structure"></cd:wikipage>
<cd:wikipage page="Floating objects"></cd:wikipage>
+
<cd:wikipage page="Floating Objects"></cd:wikipage>
 
<cd:commandref name="setupcaption"></cd:commandref></cd:seealso>
 
<cd:commandref name="setupcaption"></cd:commandref></cd:seealso>
 
</cd:commandgroup>
 
</cd:commandgroup>

Revision as of 18:39, 7 September 2020


\definefloat

Summary

The command \definefloat defines floating object classes.

Bug report: there are backslashes in front of the instance names below, which is misleading. Until I find a solution for the incorrect visual, just pretend the backslashes are not there. --Taco (talk) 20:35, 7 September 2020 (CEST) (See: Bug List)


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: