Changes

Jump to navigation Jump to search
2,650 bytes added ,  19:06, 9 December 2021
m
small fixes
<?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:sequence>
<cd:instances>
<cd:constant value="overbar">for a continuous rule above every line. Not be confused with <code>\overbar</code>in math mode {{gen|mathovertextextensible}} </cd:constant> <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 /cd:description of the command goes here --></cd:descriptionexamples><cd:examplesexample 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><!-- command /cd:example(s)><cd:example title="Nested 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</contextIn MkIV only bars of the same kind are nestable (stacking), in LMTX also mixed.</cd:example><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}$} \overstrike{\input ward}</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:<texcode>\setupalign[hanging,hz]bla bla bla \inframed[frame=off]{\overstrike{striked}} bla bla</texcode> * Turn off microtypography for the paragraph containing the overstrike. Example:<texcode>\setupalign[nothanging,nohz]bla bla bla \overstrike{striked} bla bla \setupalign[hanging,hz]bla bla bla bla bla</texcode></cd:examplesexample><cd:notesexample title="Various parameters demo"><context source="yes" text="gives:"><\setuppapersize[A5] \definebar[BarA][color=red,rulethickness=1.4] \BarA{BarA}\blankHello \startbar[BarA]\input{knuth}\stopbar world!\blank \definebar[BarB][color=green,rulethickness=2.8,order=background] \BarB{BarB}\blankHello \startbar[BarB]\input{knuth}\stopbar world!-- this is for special remarks that do not fit elsewhere\blank \definebar[BarC][color=blue,rulethickness=2.8,order=background,offset=1.5, like discovered bugs in specific continue=yes] \BarC{BarC}\blankHello \startbar[BarC]\input{knuth}\stopbar world!\blank</context versions></cd:example><cd:note authorexample title="Underbar for clozes"><context source="yes" text="gives:">\definebar[ClozeBar][underbar][continue=yes, color=black, offset=-0.5] \starttexdefinition unexpanded Cloze #1 \startbar[ClozeBar] \scratchdimen\widthofstring{#1}\relax \zwj\kern.2\scratchdimen #1 \kern." date="2\scratchdimen\zwj \stopbar\stoptexdefinition \startTEXpageThis is a \Cloze{\color[red]{cloze}} whose underbar is 1.4 times as wide as the text above it.\Cloze{The leading} and trailing spaces are never broken."\stopTEXpage</context></cd:noteexample></cd:examples>--<cd:notes></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.pdf">Everything about rules (lines)</cd:manual></cd:seealso>
</cd:commandgroup>

Navigation menu