Changes

Jump to navigation Jump to search
5,346 bytes added ,  19:48, 11 September 2020
Created page with "Documentation for \setupbar"
<cd:commandgroup name="setupbar" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\setupbar</tt> sets up parameters for rules (lines)
</cd:shortdesc>
<cd:variants>
<cd:command category="rules" file="node-rul.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-bar.xml" level="style" name="setupbar" variantnumber="1">
<cd:arguments>
<cd:keywords list="yes" optional="yes" ordinal="1">
<cd:keywordsdoc>Name of the bar. </cd:keywordsdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:keywords>
<cd:assignments list="yes" ordinal="2">
<cd:assignmentsdoc></cd:assignmentsdoc>
<cd:parameter name="color">
<cd:paramdoc>color of the bar itself</cd:paramdoc>
<cd:constant type="cd:color"></cd:constant>
</cd:parameter>
<cd:parameter name="continue">
<cd:paramdoc>controls split based on words</cd:paramdoc>
<cd:constant type="yes">split on words</cd:constant>
<cd:constant default="yes" type="no">continuous bar</cd:constant>
<cd:constant type="all"></cd:constant>
</cd:parameter>
<cd:parameter name="empty">
<cd:paramdoc></cd:paramdoc>
<cd:constant type="yes"></cd:constant>
<cd:constant default="yes" type="no"></cd:constant>
</cd:parameter>
<cd:parameter name="unit">
<cd:paramdoc>unit to use for <cd:iref name="offset"/> and <cd:iref name="dy"/></cd:paramdoc>
<cd:constant default="yes" type="ex"></cd:constant>
<cd:constant type="em"></cd:constant>
<cd:constant type="pt"></cd:constant>
<cd:constant type="in"></cd:constant>
<cd:constant type="cm"></cd:constant>
<cd:constant type="mm"></cd:constant>
<cd:constant type="sp"></cd:constant>
<cd:constant type="bp"></cd:constant>
<cd:constant type="pc"></cd:constant>
<cd:constant type="dd"></cd:constant>
<cd:constant type="cc"></cd:constant>
<cd:constant type="nc"></cd:constant>
</cd:parameter>
<cd:parameter name="order">
<cd:paramdoc>but the rules in front of, or behind the text.</cd:paramdoc>
<cd:constant default="yes" type="foreground"></cd:constant>
<cd:constant type="background"></cd:constant>
</cd:parameter>
<cd:parameter name="rulethickness">
<cd:paramdoc></cd:paramdoc>
<cd:constant type="cd:dimension"></cd:constant>
</cd:parameter>
<cd:parameter name="method">
<cd:paramdoc>switch between centred and baseline-based vertical aligment</cd:paramdoc>
<cd:constant type="cd:number">0 = centred vertically. Leave empty / omit for <cd:iref name="offset"/> to be based on the text's baseline.</cd:constant>
</cd:parameter>
<cd:parameter name="offset">
<cd:paramdoc>vertical shift</cd:paramdoc>
<cd:constant type="cd:number"></cd:constant>
</cd:parameter>
<cd:parameter name="dy">
<cd:paramdoc>vertical shift when used nested</cd:paramdoc>
<cd:constant type="cd:number"></cd:constant>
</cd:parameter>
<cd:parameter name="max">
<cd:paramdoc>maximum nesting level</cd:paramdoc>
<cd:constant type="cd:number"></cd:constant>
</cd:parameter>
<cd:parameter name="foregroundstyle">
<cd:paramdoc>useful if <cd:iref name="order" type="background"/>
</cd:paramdoc>
<cd:constant type="cd:style"></cd:constant>
<cd:constant type="cd:command"></cd:constant>
</cd:parameter>
<cd:parameter name="foregroundcolor">
<cd:paramdoc>useful if <cd:iref name="order" type="background"/>
</cd:paramdoc>
<cd:constant type="cd:color"></cd:constant>
</cd:parameter>
<cd:parameter name="mp">
<cd:paramdoc>Use a named {{cmd|startuseMPgraphic}} to create the bar. See the definition of e.g. <code>underdash</code> in <code>node-rul.mkiv</code> for an example.</cd:paramdoc>
<cd:constant type="cd:name"></cd:constant>
</cd:parameter>
<cd:parameter name="left">
<cd:paramdoc></cd:paramdoc>
<cd:constant type="cd:text"></cd:constant>
</cd:parameter>
<cd:parameter name="right">
<cd:paramdoc></cd:paramdoc>
<cd:constant type="cd:text"></cd:constant>
</cd:parameter>
<cd:parameter name="repeat">
<cd:paramdoc>Originally used for leader-style 'bars' (dotted or dashed). Used in combination with the (undocumented) option <cd:iref name="text"/>. Replaced by the much more powerful <cd:iref name="mp"/> option.</cd:paramdoc>
<cd:constant type="yes"></cd:constant>
<cd:constant default="yes" type="no"></cd:constant>
</cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>Set up options for 'bars': rule- and dots based decorations for running text.

See {{gen|bar}} for the predefined instances. You can define your own instances with {{cmd|definebar}}.

</cd:description>
<cd:examples><cd:example title=""><context source="yes">
\setupbar[overstrike][color=red]
some \overstrike{stricken} text.
</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:commandref name="definebar" originator="system"></cd:commandref>
<cd:source file="node-rul.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Rules"></cd:wikipage>
<cd:commandref name="_bar"></cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu