Changes

Jump to navigation Jump to search
1,276 bytes added ,  05:34, 14 August 2006
Added some examples
< [[Visuals]] | [[Graphics]] | [[Using Graphics]] >
Floats are elements like tables or figures that are placed (and numbered) automatically by TeX. They are so called as they can ''float'' around the output pages to a place where TeX thinks they are appropriate (You can influence what TeX thinks as appropriate).
Floats are ConTeXt's "base class" for everything that uses a <tt>\place...</tt> command (table, figure, own floats).
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>.
<pretexcode>
\placefloat[place][reference]{caption}{some float}
</pretexcode>
'''place''' is one or several (comma separated) of:
</table>
(table copied from the manual)
 
<cmd>placefigure</cmd> and <cmd>placetable</cmd> also accept the same set of options, and allow to create floating figures and captions respectively.
'''reference'''
If you don't need to refer to your float, you can leave this parameter out.
'''== Examples ==I will explain the examples in terms of <cmd>placefigure</cmd> but the same set of options are also valid for other floats. * If you do not want a caption'''<texcode>\placefigure {none} {\externalfigure{figurename}}</texcode> or <texcode>\placefigure[none] {} {\externalfigure{figurename}}</texcode>  * If you do not want the figure to be numbered (but still want the caption) <texcode>\placefigure [nonumber] {caption} {\externalfigure{figurename}}</texcode> * Suppose you want the figure to be placed on the right side of the page, a few lines into the paragraph, and want the rest of the paragraph to warp around the figure <texcode>\placefigure [right,2*line] {caption} {\externalfigure{figurename}}</texcode> or  <texcode>\placefigure [right,2*hang] {caption} {\externalfigure{figurename}}</texcode>
You get ''no'' caption with This does not want correctly at a page boundary. The <tt>line</tt> options leaves the space above the figures empty, while the keyword <tt>nonehang</tt>option also wraps texts above the figure.

Navigation menu