Changes

Jump to navigation Jump to search
2,304 bytes added ,  18:28, 19 November 2019
no edit summary
|attributes=
}}
 
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>setuptextrules</syntax>
== [[Help:Reference|Syntax]] ==
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:location|location]]</td> <td>[[Reference/enCommand/value:left|left]] [[Reference/enCommand/value:inmargin|inmargin]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:before|before]]</td> <td>[[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:after|after]]</td> <td>[[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:inbetween|inbetween]]</td> <td>[[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:width|width]]</td> <td>[[Reference/enCommand/value:dimension|dimension]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:distance|distance]]</td> <td>[[Reference/enCommand/value:dimension|dimension]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:bodyfont|bodyfont]]</td> <td>5pt ... 12pt [[Reference/enCommand/value:small|small]] [[Reference/enCommand/value:big|big]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:color|color]]</td> <td>[[Reference/enCommand/value:name|name]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:style|style]]</td> <td>[[Reference/enCommand/value:normal|normal]] [[Reference/enCommand/value:bold|bold]] [[Reference/enCommand/value:slanted|slanted]] [[Reference/enCommand/value:boldslanted|boldslanted]] [[Reference/enCommand/value:type|type]] [[Reference/enCommand/value:cap|cap]] [[Reference/enCommand/value:small...|small...]] [[Reference/enCommand/value:command|command]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:rulecolor|rulecolor]]</td> <td>[[Reference/enCommand/value:name|name]] </td>
</tr>
</table>
== Description == From the [[source:pack-rul.mkiv|source]]:
<texcode>
%D Putting rules before and after a paragraph is very space
%D sensitive, but the next command handles that quite well. It
%D comes in two disguises:
</texcode>
Those two ‘disguises’ are {{cmd|textrule}} and the
{{cmd|starttextrule}} environment.
The command {{cmd|setuptextrules}} is dedicated to controlling the
behaviour of these.
== Example ==
 <texcode>\enableregime[utf]\setupcolors[state=start]\setupcolor[hex]\definecolor[telekommagenta][h=E20074] % RAL 4010 \unexpanded\def\example#1{%\subject{#1}\starttextrule{Albatross!}\starttabulate[|l|l|]\NC{\em A} \NC What flavour is it? \NC\NR\NC{\em B} \NC It’s a bird, isn’t it? It's a bloody sea bird. It’s not any bloody flavour. Albatross! \NC\NR\NC {\em A} \NC Do you get wafers with it? \NC\NR\NC {\em B} \NC Of course you don’t get bloody wafers with it. Albatross!-- Please fill in an \NC\NR\stoptabulate\stoptextrule} \setupbodyfont[9pt]\starttext{\setuptextrules[location=left] \example{Location: Left}} {\setuptextrules[location=inmargin] \example{Location: In Margin}} {\setuptextrules[bodyfont=small,style=italic] \example{Small Bodyfont, Italic Text}} {\setuptextrules[color=telekommagenta,rulecolor=red:2] \example{Colored Rule and Text}} {\setuptextrules[distance=5em] \example{Wide Distance Between Text And Rule}}\stoptext</texcode> <context>\enableregime[utf]\setupcolors[state=start]\setupcolor[hex]\definecolor[telekommagenta][h=E20074] % RAL 4010 \unexpanded\def\example if #1{%\subject{#1}\starttextrule{Albatross!}\starttabulate[|l|l|]\NC{\em A} \NC What flavour is it? \NC\NR\NC{\em B} \NC It’s a bird, isn’t it? It's a bloody sea bird. It’s not any bloody flavour. Albatross! \NC\NR\NC {\em A} \NC Do you get wafers with it? \NC\NR\NC {\em B} \NC Of course you can --don’t get bloody wafers with it. Albatross!\NC\NR\stoptabulate\stoptextrule} \setupbodyfont[9pt]\starttext{\setuptextrules[location=left] \example{Location: Left}} {\setuptextrules[location=inmargin] \example{Location: In Margin}} {\setuptextrules[bodyfont=small,style=italic] \example{Small Bodyfont, Italic Text}} {\setuptextrules[color=telekommagenta,rulecolor=red:2] \example{Colored Rule and Text}} {\setuptextrules[distance=5em] \example{Wide Distance Between Text And Rule}}\stoptext</context>
== See also ==
<!-- something like [[{{cmd:goto|\goto]] }} --> == Help from ConTeXt-Mailinglist/Forum ==All issues with:{{Forum|{{SUBPAGENAME}}}}
[[Category:ReferenceCommand/enRules|setuptextrules]]

Navigation menu