Command/setupbar

Unofficial ConTeXt Wiki mirror

Last modified: 2024-03-28

Summary

The command \setupbar sets up parameters for rules (lines)

Settings

\setupbar[...,...][...=...,...]
[...,...] name
color color
continue yes no all
empty yes no
unit ex em pt in cm mm sp bp pc dd cc nc
order foreground background
rulethickness dimension
method number
offset number
dy number
max number
foregroundstyle style command
foregroundcolor color
mp name
left text
right text
repeat yes no

Option Explanation
Name of the bar. See for predefined bars \_bar
color
color of the bar itself
continue
controls split based on words
yes split on words
no continuous bar
unit
unit to use for offset and dy
order
put the rules in front of, or behind the text.
method
switch between centred and baseline-based vertical aligment
number 0 = centred vertically. Leave empty / omit for offset to be based on the text's baseline.
offset
vertical shift
dy
vertical shift when used nested
max
maximum nesting level
foregroundstyle
useful if order=background
foregroundcolor
useful if order=background
mp
Use a named \startuseMPgraphic to create the bar. See the definition of e.g. underdash in node-rul.mkiv for an example.
repeat
Originally used for leader-style 'bars' (dotted or dashed). Used in combination with the (undocumented) option text. Replaced by the much more powerful mp option.

Description

Set up options for 'bars': rule- and dots based decorations for running text.

See bar for the predefined instances. You can define your own instances with \definebar.

Examples

Example 1

  • \setupbar[overstrike][color=red]
    some \overstrike{stricken} text.
    

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: