Change background lists, independently from each other
Background
I would like to vary the style of multiple itemized lists on the same
page, independently from one another.
Code
A short example:
\setuppapersize[A5]
\setupcolors[state=start]
% Itemized in a bullet list by default.
\definestartstop[RegularList][
before={\startitemize[joinedup]},
after={\stopitemize},
]
\defineframed[StyleBulletFramed][
frame=off,
height=0.5em,
width=0.5em,
background=color,
backgroundcolor=red,
]
% First level of indenting (regular bullets) use the bullet style.
\setupitemize[1][broad][
stopper=,
width=\zeropoint,
symbol=,
command=\StyleBulletFramed{},
]
\define[3]\regularlist{\item #1 #2 #3}
\startnotmode[ModeCompactInstructions]
\definestartstop[Instructions][
before={\startitemize[n,joinedup]},
after={\stopitemize},
]
% First level of indenting (regular bullets) use the bullet style.
\setupitemize[1][][
stopper=,
width=\zeropoint,
% ???
%command={\StyleBulletFramed[width=1em,height=1em]{}\hskip0.5em},
]
\define[1]\instruction{\item #1.}
\starttext
\startbodymatter
Chemicals
\startRegularList
\regularlist{80}{ml}{water}
\regularlist{20}{ml}{sodium}
\stopRegularList
Instructions
\startInstructions
\instruction{Drop sodium into water}
\instruction{Run away}
\stopInstructions
\stopbodymatter
\stoptext
This produces:
Problem
The red bullets in the first list are perfect for the first list. However,
the red bullets have issues in the second list:
The bullet size should be larger (large enough to hold a two-digit number)
The bullets should be behind the number
Questions
The first question has me stumped; the second question I can probably use
\defineitemlist to resolve. How would you:
ensure the number is drawn on top of the bullet?
format the lists independently (i.e., larger bullet in second list)?
Missing Resource
I thought I could define a named group, but the \defineitemgroup
documentation is non-existent.
No comments:
Post a Comment