Changes

Jump to navigation Jump to search
3,709 bytes added ,  18:33, 7 September 2020
Created page with "Documentation for \definefloat"
<cd:commandgroup name="definefloat" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\definefloat</tt> defines floating object classes.
</cd:shortdesc>
<cd:instances>
<cd:constant value="chemical"></cd:constant>
<cd:constant value="figure"></cd:constant>
<cd:constant value="table"></cd:constant>
<cd:constant value="intermezzo"></cd:constant>
<cd:constant value="graphic"></cd:constant>
</cd:instances>
<cd:variants>
<cd:command category="structure" file="strc-flt.mkvi" interfacedate="2020-07-14T09:24" interfacefile="i-floats.xml" level="style" name="definefloat" variantnumber="1">
<cd:arguments>
<cd:keywords ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:singular"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:singular"></cd:constant>
<cd:constant type="cd:plural"></cd:constant>
</cd:keywords>
<cd:assignments list="yes" optional="yes" ordinal="3">
<cd:assignmentsdoc></cd:assignmentsdoc>
<cd:inherit name="setupfloat"></cd:inherit>
</cd:assignments>
</cd:arguments>
</cd:command>
<cd:command category="structure" file="strc-flt.mkvi" interfacedate="2020-07-14T09:24" interfacefile="i-floats.xml" level="style" name="definefloat" variant="name" variantnumber="2">
<cd:arguments>
<cd:keywords ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:singular"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:plural"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="3">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:singular"></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>Define a new float type additional to predefined types "chemical", "graphic", "figure", "table" and "intermezzo". When invoked as {{cmd|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:

* <code>\setupremark</code> to set up the new environment
* <code>\placeremark</code> to place a remark block
* <code>\startplaceremark...\stopplaceremark</code> is the same, as an environment
* <code>\placelistofremarks</code> for a 'table of remarks'.
* <code>\completelistofremarks</code> for a table of remarks with a header
* <code>\startremarktext...\stopremarktext</code>

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 {{cmd|Word}} value of the name (so: Remark) in this case.

{{todo|there are some more commands and internals automatically generated}}</cd:description>
<cd:examples><cd:example title=""><context source="yes">
\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
</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:commandref name="setupfloat" originator="system"></cd:commandref>
<cd:source file="strc-flt.mkvi" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Structure"></cd:wikipage>
<cd:wikipage page="Floating objects"></cd:wikipage>
<cd:commandref name="setupcaption"></cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu