Re: [NTG-context] Overlapping terms in description lists

2016-04-23 Thread Tom Harrop
Thanks for the reply.

> On 21 Apr 2016, at 1:18 pm, luigi scarso  wrote:
> 
> the title is in  a \vtop and not a \vbox, and its height is fixed to \strutht 
> (and the depth to \strutdp)
> so basically the title is one line.

OK, I’ll do my best to stick to one line.

I guess it would be better to use a paragraphs or column environment for long 
labels but the ConTeXt is generated by pandoc, which writes 'definition lists' 
as \startdescription \stopdescription.___
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
___

Re: [NTG-context] Overlapping terms in description lists

2016-04-21 Thread luigi scarso
On Wed, Apr 20, 2016 at 12:58 PM, Tom Harrop  wrote:

> Hello again,
>
> The document I'm typsetting uses description lists. To keep the list
> entries close together I'm using before=\nowhitespace and
> after=\nowhitespace in \definedescription. This is fine so long as the term
> is short, but when the term wraps to two lines it can overlap with the term
> below.
>
> Here's an example:
>
> \setuppapersize[A5]
>> \setupalign[flushleft, nothyphenated]
>>
>> \definedescription[description]
>> [before=\nowhitespace, after=\nowhitespace]
>>
>> \starttext
>>
>> \startdescription{Short term:}
>>   Items with short terms are fine.
>> \stopdescription
>>
>> \startdescription{This is a really long term:}
>>   Long term + short definition
>> \stopdescription
>>
>> \startdescription{This is a really long term:}
>>   ... the long term of the item above the mashes into the term below.
>> \stopdescription
>>
>> \stoptext
>>
>
> And here is an attempt at a plain text representation of what I'm trying
> to achieve:
>
> Short term: Items with short terms are fine.
>> This is a really
>> long term:  Long term + short definition
>> This is a really
>> long term:  ... the long term of the item above the mashes into
>> the
>> term below.
>>
>
> Is this possible using \definedescription? I tried some combinations of
> \vfill and \framed but I couldn't get it to work.
>
> Sorry to repeatedly post newbie questions. Any tips would be appreciated!
>

the title is in  a \vtop and not a \vbox, and its height is fixed to
\strutht (and the depth to \strutdp)
so basically the title is one line.

You can try with hand-tuning, ie

\definedescription[description][before=\nowhitespace,
after=\vskip0.25em,width=7\emwidth]
\starttext
\startdescription[title=This is a really long term:]
\crlf
  Long term + short definition
\stopdescription

\startdescription[title=This is a really long term:]
\crlf
  ... the long term of the item above the mashes into the term below.
\stopdescription
\stoptext
___
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
___

[NTG-context] Overlapping terms in description lists

2016-04-20 Thread Tom Harrop

Hello again,

The document I'm typsetting uses description lists. To keep the list 
entries close together I'm using before=\nowhitespace and 
after=\nowhitespace in \definedescription. This is fine so long as the 
term is short, but when the term wraps to two lines it can overlap with 
the term below.


Here's an example:


\setuppapersize[A5]
\setupalign[flushleft, nothyphenated]

\definedescription[description]
[before=\nowhitespace, after=\nowhitespace]

\starttext

\startdescription{Short term:}
  Items with short terms are fine.
\stopdescription

\startdescription{This is a really long term:}
  Long term + short definition
\stopdescription

\startdescription{This is a really long term:}
  ... the long term of the item above the mashes into the term below.
\stopdescription

\stoptext


And here is an attempt at a plain text representation of what I'm trying 
to achieve:



Short term: Items with short terms are fine.
This is a really
long term:  Long term + short definition
This is a really
long term:  ... the long term of the item above the mashes 
into the

term below.


Is this possible using \definedescription? I tried some combinations of 
\vfill and \framed but I couldn't get it to work.


Sorry to repeatedly post newbie questions. Any tips would be appreciated!

Thanks,

Tom

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