Changes

Jump to navigation Jump to search
2,036 bytes added ,  10:41, 3 December 2021
Created page with "Documentation for \testcolumn"
<cd:commandgroup name="testcolumn" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\testcolumn</tt> checks for free space in a column
</cd:shortdesc>
<cd:variants>
<cd:command category="structure" file="page-brk.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-pagebreak.xml" keywords="columns" level="document" name="testcolumn" variantnumber="1">
<cd:arguments>
<cd:keywords ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:number"></cd:constant>
</cd:keywords>
<cd:keywords optional="yes" ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:dimension"></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>The command {{cmd|testcolumn}}[n] causes a column break if there are not at least n lines of space remaining in the current column.

This helps avoid orphans (clubs) at the bottom of columns, by ensuring sufficient room for a given number of lines prior to starting a new heading or paragraph.

This command does not work in the simple column modes, as it needs to be able to know the desired height of the column, and that is only possible with full page style columns.</cd:description>
<cd:examples><cd:example title=""><context source="yes">
\setuppapersize[A7]

\setuphead[section][before={\testcolumn[3]}]

\starttext
\startpagecolumns
\section[title={Section}]
\startitemize
\dorecurse{6}{ \startitem List item. \stopitem }
\stopitemize

\dorecurse{2}{
\section[title={Section}]
\startitemize
\dorecurse{3}{ \startitem List item. \stopitem }
\stopitemize
}
\stoppagecolumns

\stoptext
</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:source file="page-brk.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Structure"></cd:wikipage>
<cd:wikipage originator="system" page="Keywords:Columns"></cd:wikipage></cd:seealso>
</cd:commandgroup>

Navigation menu