Changes

Jump to navigation Jump to search
3,122 bytes added ,  08:55, 22 November 2021
Created page with "Documentation for \thinrule"
<cd:commandgroup name="thinrule" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\thinrule</tt> is used to draw a line.
</cd:shortdesc>
<cd:variants>
<cd:command category="rules" file="pack-mrl.mkiv" interfacedate="2020-06-19T13:41" interfacefile="i-thinrule.xml" level="document" name="thinrule" variantnumber="1"></cd:command>
</cd:variants>
<cd:description><tt>\thinrule</tt>s are very similar to {{cmd|hairline}}s in that
they provide means handle TeX's primitives <tt>\hrule</tt> and <tt>\vrule</tt>
conveniently, or -- as the ConTeXt [[source:pack-rul.mkiv|source]] puts it --
“free us from some specifications”.

The <tt>\thinrule</tt> command draws a rule on the ''current'' baseline, whereas
an <tt>\hairline</tt> does exactly the same except that it ''creates a new paragraph''
for the rule alone. To the extent that the outcome of <tt>\hairline</tt> might
depend on your paragraph settings and that they will always span the whole surrounding
box horizontally, while <tt>\thinrule</tt>s stay subordinate to the paragraph they
occur inside.

</cd:description>
<cd:examples><cd:example title="">The following example demonstrates the behaviour of <tt>\thinrule</tt> versus <tt>\hairline</tt> (MkII and MkIV).

<texcode>
\setupcombinations[style=\em]
\starttext
\startcombination[2*1]
{\framed[width=5cm,align=left,frame=off]{%
I have elsewhere explained,
\hairline
though it is a thing perhaps not yet well understood by all;
that the very substance of things,
consists in the power of acting and being acted upon.
\hairline}}
{Hairlines in action.}
%
{\framed[width=5cm,align=left,frame=off]{%
I have elsewhere explained,
\thinrule
though it is a thing perhaps not yet well understood by all;
that the very substance of things,
consists in the power of acting and being acted upon.
\thinrule}}
{Thinrules in action.}
\stopcombination
\stoptext
</texcode>

<context>
\setupcombinations[style=\em]
\setuppapersize[A7,landscape]
\starttext
\startcombination[2*1]
{\framed[width=5cm,align=left,frame=off]{%
I have elsewhere explained,
\hairline
though it is a thing perhaps not yet well understood by all;
that the very substance of things,
consists in the power of acting and being acted upon.
\hairline}}
{Hairlines in action.}
%
{\framed[width=5cm,align=left,frame=off]{%
I have elsewhere explained,
\thinrule
though it is a thing perhaps not yet well understood by all;
that the very substance of things,
consists in the power of acting and being acted upon.
\thinrule}}
{Thinrules in action.}
\stopcombination
\stoptext
</context>
</cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:source file="pack-mrl.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Rules"></cd:wikipage>
<cd:commandref name="hairline"></cd:commandref>
<cd:commandref name="fillinrules">for rules for multiple-line answers.</cd:commandref>
<cd:commandref name="filinlines">for a 'write your answer here' rule at the end of the current line</cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu