Dear All, I’d like to use a mechanism that allows me to create an itemized list with my own labels like one can with descriptions: \definedescription[outline][ headstyle=bold,style=normal,alternative=hanging,margin=1cm,distance=-.8cm] \starttext \outline[Welcome] Tea \outline[Introduction] Tufte or Knuth? \outline[Snack] Chocolate Cake \outline[Discussion] Knuth or Tufte? \outline[Open End] Bear and wine \stoptext However, instead of the above I would like to — have the result “packed”, i.e. without lines between the descriptions — have a stopper (“:”) after the label — have the text of the description begin after the stopper and not at a fixed indentation (distance=…) How do I do that? Thanks, Matthias
On 2014-07-25 14:56, Matthias Weber wrote:
Dear All,
I’d like to use a mechanism that allows me to create an itemized list with my own labels like one can with descriptions:
\definedescription[outline][ headstyle=bold,style=normal,alternative=hanging,margin=1cm,distance=-.8cm]
\starttext
\outline[Welcome] Tea
\outline[Introduction] Tufte or Knuth?
\outline[Snack] Chocolate Cake
\outline[Discussion] Knuth or Tufte?
\outline[Open End] Bear and wine
\stoptext
However, instead of the above I would like to
— have the result “packed”, i.e. without lines between the descriptions — have a stopper (“:”) after the label — have the text of the description begin after the stopper and not at a fixed indentation (distance=…)
How do I do that?
Thanks,
Matthias
The following works, but I suspect that there may be a better way to get the packing. \define[1]\outlinehead{#1:} \definedescription[outline] \setupdescription [outline] [headstyle=bold, style=normal, % alternative=hanging, width=fit, distance=1ex, before={\blank[back]}, headcommand=\outlinehead, ] \starttext \outline{Welcome} Tea \outline{Introduction} Tufte or Knuth? and more and more and more and more to see what hanging does. \outline{Snack} Chocolate Cake \outline{Discussion} Knuth or Tufte? \outline{Open End} Bear and wine \stoptext Try it both with and without the hanging alternative. And for me, beer is preferable to bear. -- Rik
Thanks Rik,
that does exactly what I want.
Matthias
On Jul 25, 2014, at 4:03 PM, Rik Kabel
On 2014-07-25 14:56, Matthias Weber wrote:
Dear All,
I’d like to use a mechanism that allows me to create an itemized list with my own labels like one can with descriptions:
\definedescription[outline][ headstyle=bold,style=normal,alternative=hanging,margin=1cm,distance=-.8cm]
\starttext
\outline[Welcome] Tea
\outline[Introduction] Tufte or Knuth?
\outline[Snack] Chocolate Cake
\outline[Discussion] Knuth or Tufte?
\outline[Open End] Bear and wine
\stoptext
However, instead of the above I would like to
— have the result “packed”, i.e. without lines between the descriptions — have a stopper (“:”) after the label — have the text of the description begin after the stopper and not at a fixed indentation (distance=…)
How do I do that?
Thanks,
Matthias
The following works, but I suspect that there may be a better way to get the packing. \define[1]\outlinehead{#1:} \definedescription[outline] \setupdescription [outline] [headstyle=bold, style=normal, % alternative=hanging, width=fit, distance=1ex, before={\blank[back]}, headcommand=\outlinehead, ]
\starttext
\outline{Welcome} Tea
\outline{Introduction} Tufte or Knuth? and more and more and more and more to see what hanging does.
\outline{Snack} Chocolate Cake
\outline{Discussion} Knuth or Tufte?
\outline{Open End} Bear and wine
\stoptext Try it both with and without the hanging alternative.
And for me, beer is preferable to bear. -- Rik ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Am 26.07.2014 um 02:02 schrieb Matthias Weber
Thanks Rik,
that does exactly what I want.
When you want more control about the spacing before and after the description entries the following modification can help: \definedescription [outline] [style=normal, width=fit, distance=1ex, before=, % before=\endgraf after=, headcommand=\groupedcommand{}{:}] \definestartstop [outlines] [before={\blank[line]}, after={\blank[line]}] \starttext \input ward \startoutlines \outline{Welcome} Tea \outline{Introduction} Tufte or Knuth? and more and more and more and more to see what hanging does. \outline{Snack} Chocolate Cake \outline{Discussion} Knuth or Tufte? \outline{Open End} Bear and wine \stopoutlines \input weisman \stoptext Wolfgang
participants (3)
-
Matthias Weber
-
Rik Kabel
-
Wolfgang Schuster