Re: [NTG-context] Is this possible for the Frames

2013-10-21 Thread Keith J. Schultz
Hi Wolfgang, all,

Thanx for the example/help.

I have a few questions sothat I understand properly what is going on and
how to maybe do some more fancy things.

1) \dimexpr allows the calculation of a dimention

2)  \dimexpr is closed by \relax or if I need more complicated calculation 
something like:
frameoffset=\dimexpr{\framedparameter{rulethickness}*3/10}  + 
\framedparameter{\frameoffset}}\relax

3)  How would access a value of a DIFFERENT frame?
   
4) I could use my own command whose result is a dimension:
  \def\MyCommand#1{#1\textwidth}
and use it as:
frameoffset=\dimexpr\Mycommand{.05}\relax

regards
Keith


Am 18.10.2013 um 14:56 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

 
 
 \defineframed
  [MyFrame]
  [rulethickness=3pt,
   frameoffset=\dimexpr\framedparameter{rulethickness}*3/10\relax]
 
 \starttext
 
 \MyFrame{What goes into the frame}
 
 \blank
 
 \MyFrame[rulethickness=1pt]{What goes into the frame}
 
 \blank
 
 \MyFrame[rulethickness=10pt]{What goes into the frame}
 
 \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
 ___

___
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] Is this possible for the Frames

2013-10-21 Thread Keith J. Schultz
Hi All,


Am 21.10.2013 um 08:41 schrieb Keith J. Schultz schul...@uni-trier.de:

 Hi Wolfgang, all,
 
 Thanx for the example/help.
 
 I have a few questions sothat I understand properly what is going on and
 how to maybe do some more fancy things.
 
 1) \dimexpr allows the calculation of a dimention
 
 2)  \dimexpr is closed by \relax or if I need more complicated calculation 
 something like:
   frameoffset=\dimexpr{\framedparameter{rulethickness}*3/10}  + 
 \framedparameter{\frameoffset}}\relax
Found the answer use \dimexpr(…). the \relax is so that TeX behaves!

 3)  How would access a value of a DIFFERENT frame?
 
 4) I could use my own command whose result is a dimension:
  \def\MyCommand#1{#1\textwidth}
   and use it as:
   frameoffset=\dimexpr\Mycommand{.05}\relax
 
 regards
   Keith
 

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