[NTG-context] Seems `\definedescription' do not work

Vladimir Lomov lomov.vl at gmail.com
Sun Apr 29 14:27:49 CEST 2012


Hello Wolfgang,

** Wolfgang Schuster [2012-04-29 09:14:57 +0200]:


> Am 29.04.2012 um 08:48 schrieb Vladimir Lomov:

>> Hello,

>> I borrow this example from wiki:
>> <example file="ex2.tex">
>> %\setupbodyfont[computer-modern-unicode,12pt]

>> \definedescription
>>  [Desc]
>>  [location=top,hang=20,
>>   headstyle={\bf\color[blue]},
>>   command=\hskip-1cm,margin=1cm]

>> \starttext
>> \startDesc{Tufte}
>> \input tufte
>> \stopDesc
>> \stoptext
>> </example>


> The problem is \color which expects a argument for the text to be colored (e.g. \color[blue]{…}) which is never the case when you put it in a style key but you can use the color key to set the value.

Yes, it is true, I saw some topics about that on ML but forgot (this
example from my old code).

> \definedescription
>  [description]
>  [alternative=top,
>   headstyle=bold,
>   headcolor=blue,
>   headcommand={\offset[x=-1cm]},
>   margin=1cm]

Thanks, this is much "cleaner" solution. (Again, I already saw message
about change from `location=' to `alternative='.)

> \starttext

> \input tufte

> \startdescription{Tufte}
> \input tufte
> \stopdescription

> \stoptext

> Wolfgang

---
WBR, Vladimir Lomov

-- 
Banacek's Eighteenth Polish Proverb:
	The hippo has no sting, but the wise man would rather be sat upon
	by the bee.


More information about the ntg-context mailing list