Difference between revisions of "Floating Objects"

From Wiki
Jump to navigation Jump to search
m (Added linkback)
(explanation of placements, added cmd links)
Line 5: Line 5:
 
Floats are ConTeXt's "base class" for everything that uses a <tt>\place...</tt> command (table, figure, own floats).
 
Floats are ConTeXt's "base class" for everything that uses a <tt>\place...</tt> command (table, figure, own floats).
  
If you search options of e.g. <tt>\placeexternalfigure</tt> you must look after <tt>\placefloat</tt> in the manual! (same for <tt>\setup...</tt> etc.)
+
If you search options of e.g. <cmd>placeexternalfigure</cmd> you must look after <cmd>placefloat</cmd> in the manual! (same for <tt>\setup...</tt> etc.)
 +
 
 +
The float types "graphic", "figure", "table" and "intermezzo" are readily defined. If you need more (i.e. if you need another numbering or table of something), you can easily define your own floats with <cmd>definefloat</cmd>.
  
 
<pre>
 
<pre>
\placefloat[place]{caption}{some float}
+
\placefloat[place][reference]{caption}{some float}
 
</pre>
 
</pre>
  
'''place''' is one of: (PLEASE SOMEONE ADD DESCRIPTIONS!)
+
'''place''' is one or several (comma separated) of:
* left
+
<table>
* right
+
<tr bgcolor="#AAAAAA"><th>preference</th><th align="left">result</th></tr>
* here
+
<tr bgcolor="#DDDDDD"><td>left</td><td>left of text</td></tr>
* top
+
<tr><td>right</td><td>right of text</td></tr>
* bottom
+
<tr bgcolor="#DDDDDD"><td>here</td><td>preferably here</td></tr>
* inleft
+
<tr><td>top</td><td>at top of page</td></tr>
* inright
+
<tr bgcolor="#DDDDDD"><td>bottom</td><td>at bottom of page</td></tr>
* inmargin
+
<tr><td>inleft</td><td>in left margin</td></tr>
* margin
+
<tr bgcolor="#DDDDDD"><td>inright</td><td>in right margin</td></tr>
* page
+
<tr><td>inmargin</td><td>in the margin (left or right)</td></tr>
* opposite
+
<tr bgcolor="#DDDDDD"><td>margin</td><td>in the margin (margin float)</td></tr>
* always
+
<tr><td>page</td><td>on a new (empty) page</td></tr>
* force
+
<tr bgcolor="#DDDDDD"><td>opposite</td><td>on the left page</td></tr>
* tall
+
<tr><td>always</td><td>precedence over stored floats</td></tr>
 +
<tr bgcolor="#DDDDDD"><td>force</td><td>per se here</td></tr>
 +
</table>
 +
(table copied from the manual)
 +
 
 +
'''reference'''
 +
 
 +
If you don't need to refer to your float, you can leave this parameter out.
  
 
'''caption'''
 
'''caption'''
 +
 
You get ''no'' caption with <tt>none</tt>.
 
You get ''no'' caption with <tt>none</tt>.

Revision as of 21:19, 24 August 2004

< Using Graphics

Floats are elements like tables or figures that are placed (and numbered) automatically by TeX.

Floats are ConTeXt's "base class" for everything that uses a \place... command (table, figure, own floats).

If you search options of e.g. \placeexternalfigure you must look after \placefloat in the manual! (same for \setup... etc.)

The float types "graphic", "figure", "table" and "intermezzo" are readily defined. If you need more (i.e. if you need another numbering or table of something), you can easily define your own floats with \definefloat.

\placefloat[place][reference]{caption}{some float}

place is one or several (comma separated) of:

preferenceresult
leftleft of text
rightright of text
herepreferably here
topat top of page
bottomat bottom of page
inleftin left margin
inrightin right margin
inmarginin the margin (left or right)
marginin the margin (margin float)
pageon a new (empty) page
oppositeon the left page
alwaysprecedence over stored floats
forceper se here

(table copied from the manual)

reference

If you don't need to refer to your float, you can leave this parameter out.

caption

You get no caption with none.