Changes

Jump to navigation Jump to search
1,674 bytes added ,  12:11, 19 November 2019
no edit summary
|attributes=
}}
 
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>setuptab</syntax>
== [[Help:Reference|Syntax]] ==
<td class="cmd">[[Command/keyword:headstyle|headstyle]]</td>
<td>'''[[Command/value:normal|normal]]''' [[Command/value:bold|bold]] [[Command/value:slanted|slanted]] [[Command/value:boldslanted|boldslanted]] [[Command/value:type|type]] [[Command/value:cap|cap]] [[Command/value:small...|small...]] [[Command/value:command|command]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Command/keyword:headcolor|headcolor]]</td>
<td>''color''</td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Command/keyword:style|style]]</td>
<td>'''[[Command/value:normal|normal]]''' [[Command/value:bold|bold]] [[Command/value:slanted|slanted]] [[Command/value:boldslanted|boldslanted]] [[Command/value:type|type]] [[Command/value:cap|cap]] [[Command/value:small...|small]]...]] ''[[Command/value:command|command]] </td> </tr> <tr valign="top" class="first"> <td class="cmd">[[Command/keyword:color|color]]</td> <td>''color''</td>
</tr>
<tr valign="top" class="first">
<tr valign="top" class="first">
<td class="cmd">[[Command/keyword:width|width]]</td>
<td>[[Command/value:dimension|dimension]] default: '''broad'''</td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Command/keyword:sample|sample]]</td>
<td>[[Command/value:dimension|dimension]] default: '''\hskip4em'''</td>
</tr>
<tr valign="top" class="first">
<td class="cmd">MkII: [[Command/keyword:location|location]]<br /> MkIV: [[Command/keyword:alternative|alternative]]</td>
<td>'''left'''</td>
</tr>
<tr valign="top" class="first">
<td class="cmd">...=...</td>
<td>''see'' {{cmd|setupdescriptions}}</td>
</tr>
</table>
== Description ==
<code>\tab</code> (a <code>description</code> created with <code>{{cmd|definedescription}}[tab]</code>) starts an indented paragraph with a word or two (the 'key') in front of it. <code>\setuptab</code> configures styles and dimensions for <code>\tab</code>. By default, it leaves 4em for the key and 2em of space between the key area and the paragraph, the latter thanks to <code>width=broad</code>. <code>width=fit</code> leaves no space in between. In mkiv, <code>width=fit</code> leaves 1em of space between the key space and the paragraph; this is probably a bug.
== Example ==
<context source=yes>
\setupwhitespacedef\ruler{% \dorecurse{8}{% \dontleavehmode% \blackrule[bigwidth={\dimexpr1em-0.5pt}, height=0.5pt]% \dontleavehmode% \blackrule[width=0.5pt, height=1ex]% }}
asdfx asdfx asdfx asdfx adsfx\def\testpara{% They might have called Sunday the super-man. If any such creature be conceivable, he looked, indeed, somewhat like it, with his earth-shaking abstraction, as of a stone statue walking.}
(The ruler is marked in ems. The quotation is from G.K. Chesterton's {\tab{11em The Man who was Thursday} asdfx asdfx.)
\ruler \par\setuptab[width=0cmbroad, sample={\blackrule[width=2em]}, headstyle=slanted]\tab{11\blackrule[width=2em]} asdfx asdfx(Sample of 2em wide, broad width.) \testpara \par
\ruler \par\setuptab[width=broad, sample={asdfx asdfx\blackrule[width=4em]}, headstyle=slanted]\tab{11\blackrule[width=4em]} asdfx asdfx(Sample of 4em wide, broad width.) \testpara \par
\ruler \par\setuptab[width=fit, sample=asdfx{\blackrule[width=2em]}, headstyle=slanted]\tab{11\blackrule[width=2em]} asdfx asdfx(Sample of 2em wide, fit width.) \testpara \par
\ruler \par
\setuptab[width=3em, sample={thisisaverylongsample}, headstyle=slanted]
\tab{\blackrule[width=3em]} (Exact width of 3em overrides long sample.) \testpara \par
</context>
== See also ==
<!-- something like * {{cmd|tab}}* {{cmd|gotosetupdescriptions}} * [[source:core-mis.mkii|core-mis.mkii]], [[source:core:mis.mkiv|core->mis.mkiv]]
== Help from ConTeXt-Mailinglist/Forum ==
{{Forum|{{SUBPAGENAME}}}}
[[Category:CommandsCommand/Paragraphs|setuptab]][[Category:Command/td>Descriptions|setuptab]]

Navigation menu