ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Three questions about descriptions
@ 2014-07-25 18:56 Matthias Weber
  2014-07-25 20:03 ` Rik Kabel
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Weber @ 2014-07-25 18:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 767 bytes --]

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


[-- Attachment #1.2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 842 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Three questions about descriptions
  2014-07-25 18:56 Three questions about descriptions Matthias Weber
@ 2014-07-25 20:03 ` Rik Kabel
  2014-07-26  0:02   ` Matthias Weber
  0 siblings, 1 reply; 4+ messages in thread
From: Rik Kabel @ 2014-07-25 20:03 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1790 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2440 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Three questions about descriptions
  2014-07-25 20:03 ` Rik Kabel
@ 2014-07-26  0:02   ` Matthias Weber
  2014-07-26  8:34     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Weber @ 2014-07-26  0:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1.1: Type: text/plain, Size: 2470 bytes --]

Thanks Rik,

that does exactly what I want.

Matthias


On Jul 25, 2014, at 4:03 PM, Rik Kabel <context@rik.users.panix.com> wrote:

> 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
> ___________________________________________________________________________________


[-- Attachment #1.1.2: Type: text/html, Size: 4473 bytes --]

[-- Attachment #1.2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 842 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Three questions about descriptions
  2014-07-26  0:02   ` Matthias Weber
@ 2014-07-26  8:34     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2014-07-26  8:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 26.07.2014 um 02:02 schrieb Matthias Weber <matweber@indiana.edu>:

> 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

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-26  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-25 18:56 Three questions about descriptions Matthias Weber
2014-07-25 20:03 ` Rik Kabel
2014-07-26  0:02   ` Matthias Weber
2014-07-26  8:34     ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).