Changes

Jump to navigation Jump to search
71 bytes removed ,  19:02, 9 December 2021
explain more instances
<?xml version='1.0'?>
<!-- this file was generated on 2020-08-20T09:05 -->
<cd:commandgroup generated="yes" name="bar" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc><!-- a short command summary goes here -->The instances There are several variants of <tt>\<i>bar</i></tt> are used for ..underlining predefined.</cd:shortdesc>
<cd:sequence>
<cd:instance value="bar"></cd:instance>
<cd:constant value="underbar">for a continuous rule below every line. Not be confused with <code>\underbar</code>in math mode {{gen|mathundertextextensible}}</cd:constant>
<cd:constant value="overstrike">for a continuous rule through every line.</cd:constant>
<cd:constant value="understrike">background color behind the line, like with a marker pen</cd:constant>
<cd:constant value="overbars">for a rule above every word.</cd:constant>
<cd:constant value="underbars">for a rule under every word.</cd:constant>
<cd:constant value="overstrikes">for a continuous rule through every word.</cd:constant>
<cd:constant value="understrikes">background color for every word.</cd:constant> <cd:constant value="underrandom">irregular (randomized) underlining.</cd:constant> <cd:constant value="underrandoms">irregular underlining for every word.</cd:constant> <cd:constant value="underdash">dashed underlining.</cd:constant> <cd:constant value="underdashes">dashed underlining for every word.</cd:constant> <cd:constant value="underdot">dotted underlining.</cd:constant> <cd:constant value="underdots">dotted underlining for every word.</cd:constant>
<cd:constant value="nobar"></cd:constant>
<cd:constant value="hiddenbar"></cd:constant>
</cd:command>
</cd:variants>
<cd:description><!-- the long description In MkIV only those of the command goes here -->same kind are nestable (stacking), in LMTX also mixed.</cd:description><cd:examples><cd:example title="Default style and math"><context source="yes" text="Gives:">
\underbar{This is an example. $c = \sqrt{a^2 + b^2}$}
\underbar{\input ward}
</context>
</cd:example> <cd:example title="Default style nestedNested bars"><context source="yes" text="Gives:">
\setupbar[color=red]
\underbar{A \underbar{B \underbar{Cc} b} a}
\blank
\underbar{A \underdot{B \underdash{Cc} b} a}
\blank
\underrandoms{A \overbar{B \underrandoms{Cc} b} a}
\blank
</context>
</cd:example><cd:example title="Overstrike">Draw a rule through every line of the text.
<cd:example title="Overstrike"> Draw a rule through every line of the text. <context source='"yes'">
\setuppapersize[A5]
\overstrike{This is an example. $c = \sqrt{a^2 + b^2}$}
</context>
If you are using microtypography with <code>\setupalign[hz,hanging]</code>, then with some fonts the rule may end up off-target, above the characters instead of through them. (The problem was experienced with Linux Libertine and mkiv, and not with Latin Modern.) The workarounds are:
* Put the overstriked text in a <code>\inframed[frame=off]{}</code>. Example:
bla bla bla bla bla
</texcode>
</cd:example> <cd:example title="Various parameters demo"><context source="yes" text="Gives:">
\setuppapersize[A5]
\blank
</context>
</cd:example><cd:example title="Underbar for clozes"><context source="yes" text="Gives:">
\definebar[ClozeBar][underbar][continue=yes, color=black, offset=-0.5]
\stopTEXpage
</context>
</cd:example> </cd:examples><cd:notes><!-- this is for special remarks that do not fit elsewhere, like discovered bugs in specific context versions<cd:note author="..." date="..."></cd:note>--></cd:notes>
<cd:seealso>
<!-- one or more of these:
<cd:commandref name="xx"></cd:commandref>
<cd:wikipage page="xx"></cd:wikipage>
<cd:url url="https://xx"></cd:url>
<cd:manual pdf="xx"></cd:manual>
<cd:source file="xx"></cd:source>
-->
<cd:commandref name="definebar" originator="system"></cd:commandref>
<cd:commandref name="setupbar" originator="system"></cd:commandref>
<cd:source file="node-rul.mkiv" originator="system"></cd:source> <cd:wikipage originator="system" page="Category:Rules"></cd:wikipage> <cd:manual pdf="rules-mkiv">Everything about rules (lines)</cd:manual></cd:seealso>
</cd:commandgroup>

Navigation menu