Difference between revisions of "Command/ placefloat"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \<i>placefloat</i>")
 
Line 4: Line 4:
 
<cd:shortdesc>
 
<cd:shortdesc>
 
<!-- a short command summary goes here -->
 
<!-- a short command summary goes here -->
The instances of  <tt>\<i>placefloat</i></tt> are used for ...
+
The instances of  <tt>\<i>placefloat</i></tt> are used for placing floating objects.
 
</cd:shortdesc>
 
</cd:shortdesc>
 
<cd:sequence>
 
<cd:sequence>
Line 21: Line 21:
 
   <cd:arguments>
 
   <cd:arguments>
 
     <cd:keywords list="yes" optional="yes" ordinal="1">
 
     <cd:keywords list="yes" optional="yes" ordinal="1">
     <cd:keywordsdoc></cd:keywordsdoc>
+
     <cd:keywordsdoc>optional positioning key. There are a great many positioning keys defined, and they can be combined (although not all combinations make sense).</cd:keywordsdoc>
 
     <cd:constant type="split"></cd:constant>
 
     <cd:constant type="split"></cd:constant>
     <cd:constant type="always"></cd:constant>
+
     <cd:constant type="always">precedence over stored floats</cd:constant>
     <cd:constant type="left"></cd:constant>
+
     <cd:constant type="left">To the left of text</cd:constant>
     <cd:constant type="right"></cd:constant>
+
     <cd:constant type="right">To the right of the text</cd:constant>
 
     <cd:constant type="inner"></cd:constant>
 
     <cd:constant type="inner"></cd:constant>
 
     <cd:constant type="outer"></cd:constant>
 
     <cd:constant type="outer"></cd:constant>
 
     <cd:constant type="backspace"></cd:constant>
 
     <cd:constant type="backspace"></cd:constant>
 
     <cd:constant type="cutspace"></cd:constant>
 
     <cd:constant type="cutspace"></cd:constant>
     <cd:constant type="inleft"></cd:constant>
+
     <cd:constant type="inleft">In left margin</cd:constant>
     <cd:constant type="inright"></cd:constant>
+
     <cd:constant type="inright">In right margin</cd:constant>
     <cd:constant type="inmargin"></cd:constant>
+
     <cd:constant type="inmargin">In the margin (left or right)</cd:constant>
 
     <cd:constant type="leftmargin"></cd:constant>
 
     <cd:constant type="leftmargin"></cd:constant>
 
     <cd:constant type="rightmargin"></cd:constant>
 
     <cd:constant type="rightmargin"></cd:constant>
Line 42: Line 42:
 
     <cd:constant type="outeredge"></cd:constant>
 
     <cd:constant type="outeredge"></cd:constant>
 
     <cd:constant type="text"></cd:constant>
 
     <cd:constant type="text"></cd:constant>
     <cd:constant type="opposite"></cd:constant>
+
     <cd:constant type="opposite">on the opposite page of a spread</cd:constant>
 
     <cd:constant type="reset"></cd:constant>
 
     <cd:constant type="reset"></cd:constant>
 
     <cd:constant type="height"></cd:constant>
 
     <cd:constant type="height"></cd:constant>
Line 56: Line 56:
 
     <cd:constant type="270"></cd:constant>
 
     <cd:constant type="270"></cd:constant>
 
     <cd:constant type="nonumber"></cd:constant>
 
     <cd:constant type="nonumber"></cd:constant>
     <cd:constant type="none"></cd:constant>
+
     <cd:constant type="none">Suppress the caption, including the "<i>FLOAT 1</i>" label.</cd:constant>
 
     <cd:constant type="local"></cd:constant>
 
     <cd:constant type="local"></cd:constant>
     <cd:constant type="here"></cd:constant>
+
     <cd:constant type="here">Preferably here</cd:constant>
     <cd:constant type="force"></cd:constant>
+
     <cd:constant type="force">Force placement here</cd:constant>
     <cd:constant type="margin"></cd:constant>
+
     <cd:constant type="margin">In the margin (margin float)</cd:constant>
 
     <cd:constant method="none" prefix="cd:sign" type="hang"></cd:constant>
 
     <cd:constant method="none" prefix="cd:sign" type="hang"></cd:constant>
 
     <cd:constant type="hanging"></cd:constant>
 
     <cd:constant type="hanging"></cd:constant>
Line 67: Line 67:
 
     <cd:constant type="middle"></cd:constant>
 
     <cd:constant type="middle"></cd:constant>
 
     <cd:constant type="offset"></cd:constant>
 
     <cd:constant type="offset"></cd:constant>
     <cd:constant type="top"></cd:constant>
+
     <cd:constant type="top">At the top of the page</cd:constant>
     <cd:constant type="bottom"></cd:constant>
+
     <cd:constant type="bottom">At the bottom of the page</cd:constant>
 
     <cd:constant type="auto"></cd:constant>
 
     <cd:constant type="auto"></cd:constant>
     <cd:constant type="page"></cd:constant>
+
     <cd:constant type="page">on a new (empty) page</cd:constant>
 
     <cd:constant type="leftpage"></cd:constant>
 
     <cd:constant type="leftpage"></cd:constant>
 
     <cd:constant type="rightpage"></cd:constant>
 
     <cd:constant type="rightpage"></cd:constant>
Line 90: Line 90:
 
     </cd:keywords>
 
     </cd:keywords>
 
     <cd:keywords list="yes" optional="yes" ordinal="2">
 
     <cd:keywords list="yes" optional="yes" ordinal="2">
     <cd:keywordsdoc></cd:keywordsdoc>
+
     <cd:keywordsdoc>optional reference label</cd:keywordsdoc>
 
     <cd:constant type="cd:reference"></cd:constant>
 
     <cd:constant type="cd:reference"></cd:constant>
 
     </cd:keywords>
 
     </cd:keywords>
 
     <cd:keywords delimiters="braces" ordinal="3">
 
     <cd:keywords delimiters="braces" ordinal="3">
     <cd:keywordsdoc></cd:keywordsdoc>
+
     <cd:keywordsdoc>caption content</cd:keywordsdoc>
 
     <cd:constant type="cd:text"></cd:constant>
 
     <cd:constant type="cd:text"></cd:constant>
 
     </cd:keywords>
 
     </cd:keywords>
Line 102: Line 102:
 
</cd:variants>
 
</cd:variants>
 
<cd:description>
 
<cd:description>
<!-- the long description of the command goes here -->
+
With <code>\place''float''[''location''][''ref'']{''caption''}{''contents''}</code> you can declare that you want to take certain contents, and place them on the page as a (numbered) figure, table, graphic, or intermezzo, or as some other ''float'' type that you defined using {{cmd|definefloat}}.
 
</cd:description>
 
</cd:description>
 
<cd:examples>
 
<cd:examples>
<!--  command example(s)
+
 
 
<cd:example title="">
 
<cd:example title="">
</cd:example>
+
 
-->
+
<context source="yes">
 +
% Tell ConTeXt where the cow picture is stored
 +
\setupexternalfigures[location={local,default}]
 +
 
 +
\startcolumns[n=3]
 +
    caption=none
 +
    \placefigure{none}{\externalfigure[cow][height=1cm]}
 +
\column
 +
    key=none
 +
    \placefigure[none]{}{\externalfigure[cow][height=1cm]}
 +
\column
 +
    empty caption
 +
    \placefigure{}{\externalfigure[cow][height=1cm]}
 +
\stopcolumns
 +
</context></cd:example>
 +
 
 
</cd:examples>
 
</cd:examples>
 
<cd:notes>
 
<cd:notes>
Line 132: Line 147:
 
<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:commandref name="startcombination">to place multiple figures.</cd:commandref>
 +
<cd:commandref name="setupcaption">to place the caption differently than 'below and centered'.</cd:commandref>
 
</cd:seealso>
 
</cd:seealso>
 
</cd:commandgroup>
 
</cd:commandgroup>

Revision as of 13:01, 21 August 2020


\placefloat

Summary

The instances of \placefloat are used for placing floating objects.

Instances

\placechemical
\placefigure
\placetable
\placeintermezzo
\placegraphic

Settings instance

\placeFLOAT[...,...][...,...]{...}{...}
[...,...]split always left right inner outer backspace cutspace inleft inright inmargin leftmargin rightmargin leftedge rightedge innermargin outermargin inneredge outeredge text opposite reset height depth [+-]line halfline grid high low fit 90 180 270 nonumber none local here force margin [+-]hang hanging tall both middle offset top bottom auto page leftpage rightpage somewhere effective header footer tblr lrtb tbrl rltb fxtb btlr lrbt btrl rlbt fxbt fixd
[...,...]reference
{...}text
{...}content

OptionExplanation
optional positioning key. There are a great many positioning keys defined, and they can be combined (although not all combinations make sense).
always precedence over stored floats
left To the left of text
right To the right of the text
inleft In left margin
inright In right margin
inmargin In the margin (left or right)
opposite on the opposite page of a spread
none Suppress the caption, including the "FLOAT 1" label.
here Preferably here
force Force placement here
margin In the margin (margin float)
top At the top of the page
bottom At the bottom of the page
page on a new (empty) page
optional reference label
caption content

Description

With \placefloat[location][ref]{caption}{contents} you can declare that you want to take certain contents, and place them on the page as a (numbered) figure, table, graphic, or intermezzo, or as some other float type that you defined using \definefloat.

Examples

Example 1


% Tell ConTeXt where the cow picture is stored
\setupexternalfigures[location={local,default}]

\startcolumns[n=3]
    caption=none
    \placefigure{none}{\externalfigure[cow][height=1cm]}
\column
    key=none
    \placefigure[none]{}{\externalfigure[cow][height=1cm]}
\column
    empty caption
    \placefigure{}{\externalfigure[cow][height=1cm]}
\stopcolumns

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: