Difference between revisions of "Command/setupfloat"

From ConTeXt wiki
(add some links and missing margin parameter)
(Example)
Line 69: Line 69:
  
 
== Example ==
 
== Example ==
<!-- Please fill in an example if you can -->
+
 
 +
<context source=yes>
 +
\setupfloat[table][default={here,split}]
 +
 
 +
\setupxtable[frame=off,split=yes,header=repeat,footer=repeat]
 +
\setupxtable[head][topframe=on,bottomframe=on]
 +
\setupxtable[body][]
 +
\setupxtable[foot][bottomframe=on]
 +
 
 +
\starttext
 +
\startplacetable[title={Average Annual Temperatures}]
 +
\startxtable
 +
\startxtablehead[head]
 +
\startxrow
 +
\startxcell[align=middle,width={0.10\textwidth}] Year \stopxcell
 +
\startxcell[align=middle,width={0.14\textwidth}] Value \stopxcell
 +
\stopxrow
 +
\stopxtablehead
 +
\startxtablebody[body]
 +
\dorecurse{100}{%
 +
\startxrow
 +
\startxcell[align=middle,width={0.10\textwidth}] 1880 \stopxcell
 +
\startxcell[align=middle,width={0.14\textwidth}] 0.1146 \stopxcell
 +
\stopxrow}
 +
\stopxtablebody
 +
\startxtablefoot[foot]
 +
\startxrow
 +
\startxcell[align=middle,width={0.10\textwidth}] 2018 \stopxcell
 +
\startxcell[align=middle,width={0.14\textwidth}] 1.014 \stopxcell
 +
\stopxrow
 +
\stopxtablefoot
 +
\stopxtable
 +
\stopplacetable
 +
\stoptext</context>
  
 
== See also ==
 
== See also ==

Revision as of 02:43, 11 July 2019

\setupfloat

Syntax

\setupfloat[...][...,...=...,...]
[...] name
height dimension
width dimension
maxheight dimension
maxwidth dimension
minwidth dimension
default name
pageboundaries list
margin dimension (only since MkIV 2018-04-??)
leftmargindistance dimension
rightmargindistance dimension
location left middle right
[...,...=...,...] see \setupframed


Description

Example

\setupfloat[table][default={here,split}]

\setupxtable[frame=off,split=yes,header=repeat,footer=repeat]
\setupxtable[head][topframe=on,bottomframe=on]
\setupxtable[body][]
\setupxtable[foot][bottomframe=on]

\starttext
\startplacetable[title={Average Annual Temperatures}]
\startxtable
\startxtablehead[head]
\startxrow
\startxcell[align=middle,width={0.10\textwidth}] Year \stopxcell
\startxcell[align=middle,width={0.14\textwidth}] Value \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\dorecurse{100}{%
\startxrow
\startxcell[align=middle,width={0.10\textwidth}] 1880 \stopxcell
\startxcell[align=middle,width={0.14\textwidth}] 0.1146 \stopxcell
\stopxrow}
\stopxtablebody
\startxtablefoot[foot]
\startxrow
\startxcell[align=middle,width={0.10\textwidth}] 2018 \stopxcell
\startxcell[align=middle,width={0.14\textwidth}] 1.014 \stopxcell
\stopxrow
\stopxtablefoot
\stopxtable
\stopplacetable
\stoptext

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: