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

2012-04-29 Thread Wolfgang Schuster

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.

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

\starttext

\input tufte

\startdescription{Tufte}
\input tufte
\stopdescription

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


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

2012-04-29 Thread Vladimir Lomov
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.
___
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
___