Difference between revisions of "Command/setupcolumns"
< Command
Jump to navigation
Jump to search
m (Text replace - "ConTeXt-Forum " to "Help from ConTeXt-Forum ") |
m (→Description: added term 'gutter" to distance definition) |
||
(17 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
}} | }} | ||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>setupcolumns</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
<table cellspacing="4" cellpadding="2" class="cmd"> | <table cellspacing="4" cellpadding="2" class="cmd"> | ||
Line 19: | Line 21: | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
<td class="cmd">[[Command/keyword:rule|rule]]</td> | <td class="cmd">[[Command/keyword:rule|rule]]</td> | ||
− | <td>[[Command/value:on|on]] [[Command/value:off|off]] </td> | + | <td>[[Command/value:on|on]] [[Command/value:off|off]] – DEPRECATED - use "separator=rule" instead </td> |
</tr> | </tr> | ||
<tr valign="top" class="first"> | <tr valign="top" class="first"> | ||
Line 58: | Line 60: | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
== Description == | == Description == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Consider using paragraphs or column sets instead of | + | Consider using paragraphs ({{cmd|defineparagraphs}} or column sets ({{cmd|startcolumnset}} instead of ‘simple’ columns. |
− | + | {| class="wikitable" | |
− | height is unclear to me | + | |- |
+ | | n | ||
+ | | Number of columns. Default is n=2. | ||
+ | |- | ||
+ | | rule | ||
+ | | DEPRECATED: Draw a line between the columns. Default is off. | ||
+ | |- | ||
+ | | separator=rule | ||
+ | | Add vertical line between columns. | ||
+ | |- | ||
+ | | tolerance | ||
+ | | Affects spacing. Narrow columns should be set tolerant, verytolerant or stretch | ||
+ | |- | ||
+ | | distance | ||
+ | | Size of the gap (gutter) between the columns. | ||
+ | |- | ||
+ | | balance | ||
+ | | Should the columns be balanced, i.e. should they get the same number of lines? | ||
+ | |- | ||
+ | | align | ||
+ | | Left, right (raggedleft, raggedright). | ||
+ | |- | ||
+ | | blank | ||
+ | | Amount of whitespace between paragraphs set in columns. Also accepts a dimension as an argument. Column equivalent of {{cmd|setupwhitespace}}. | ||
+ | |- | ||
+ | | option | ||
+ | | With option=background you can use everything that \setupframed offers. | ||
+ | |- | ||
+ | | direction | ||
+ | | Default is right, i.e. the first column is on the left; 'left' means the first column is the rightmost. | ||
+ | |- | ||
+ | | height | ||
+ | | height is unclear to me. | ||
+ | |- | ||
+ | | ntop | ||
+ | | ntop contains the minimum number of lines a column should have. If, when a new set of columns starts (e.g. at the start of a page), there are 12 lines to distribute and <code>ntop=7</code>, then ConTeXt will produce one 12-line column rather than two 6-line columns. Note that <code>ntop=6</code> will result in one 7-line column and one 5-line column: ConTeXt seems to prefer that the last column be shorter, as long as its length is at least <code>ntop - n + 1</code>. | ||
+ | |} | ||
== Example == | == Example == | ||
− | < | + | <context source=yes> |
+ | \setupcolumns | ||
+ | [n=3, | ||
+ | rule=on, % DEPRECATED | ||
+ | separator=rule, % need newly instead "rule=on" | ||
+ | ntop=4,background=color,backgroundcolor=green, | ||
+ | ] | ||
+ | |||
+ | \startcolumns | ||
+ | % 12 lines, please | ||
+ | \dorecurse{12}{line\crlf} | ||
+ | \stopcolumns | ||
+ | </context> | ||
== See also == | == See also == | ||
− | + | * {{cmd|startcolumns}} to start a columnar environment. | |
+ | * {{cmd|column}} to move to the next column. | ||
+ | * {{cmd|setupparagraphs}} for the analogous command for side-by-side paragraphs | ||
− | == Help from ConTeXt-Forum == | + | == Help from ConTeXt-Mailinglist/Forum == |
+ | All issues with: | ||
{{Forum|{{SUBPAGENAME}}}} | {{Forum|{{SUBPAGENAME}}}} | ||
− | [[Category: | + | {{Columns navbox}} |
+ | |||
+ | [[Category:Command/Columns|setupcolumns]] |
Latest revision as of 02:36, 25 September 2020
\setupcolumns
Syntax (autogenerated)
\setupcolumns[...=...,...] | |
...=...,... | inherits from \setupmixedcolumns |
Syntax
\setupcolumns[...,...=...,...] | |
n | number |
ntop | number |
rule | on off – DEPRECATED - use "separator=rule" instead |
height | dimension |
tolerance | verystrict strict tolerant verytolerant stretch |
distance | dimension |
balance | yes no |
align | yes no text |
blank | fixed halfline line flexible big medium small |
option | background |
direction | left right |
[...,...=...,...] | see \setupframed |
Description
Consider using paragraphs (\defineparagraphs or column sets (\startcolumnset instead of ‘simple’ columns.
n | Number of columns. Default is n=2. |
rule | DEPRECATED: Draw a line between the columns. Default is off. |
separator=rule | Add vertical line between columns. |
tolerance | Affects spacing. Narrow columns should be set tolerant, verytolerant or stretch |
distance | Size of the gap (gutter) between the columns. |
balance | Should the columns be balanced, i.e. should they get the same number of lines? |
align | Left, right (raggedleft, raggedright). |
blank | Amount of whitespace between paragraphs set in columns. Also accepts a dimension as an argument. Column equivalent of \setupwhitespace. |
option | With option=background you can use everything that \setupframed offers. |
direction | Default is right, i.e. the first column is on the left; 'left' means the first column is the rightmost. |
height | height is unclear to me. |
ntop | ntop contains the minimum number of lines a column should have. If, when a new set of columns starts (e.g. at the start of a page), there are 12 lines to distribute and ntop=7 , then ConTeXt will produce one 12-line column rather than two 6-line columns. Note that ntop=6 will result in one 7-line column and one 5-line column: ConTeXt seems to prefer that the last column be shorter, as long as its length is at least ntop - n + 1 .
|
Example
\setupcolumns [n=3, rule=on, % DEPRECATED separator=rule, % need newly instead "rule=on" ntop=4,background=color,backgroundcolor=green, ] \startcolumns % 12 lines, please \dorecurse{12}{line\crlf} \stopcolumns
See also
- \startcolumns to start a columnar environment.
- \column to move to the next column.
- \setupparagraphs for the analogous command for side-by-side paragraphs
Help from ConTeXt-Mailinglist/Forum
All issues with:
- setupcolumns on the mailing list (all results)
- setupcolumns on the mailing list (subject only)
- setupcolumns on stack exchange
- setupcolumns in ConTeXt's source
|