ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Is this possible for the Frames
@ 2013-10-18  9:25 Keith J. Schultz
  2013-10-18 12:56 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Keith J. Schultz @ 2013-10-18  9:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi everbody,

I would like to do some very special settings using frames possibly structures to!

NMW
% declartion of MyFarme and setup
\defineframed[MyFrame][framed]
\setupframed[MyFrame][\rulethickness=3pt, frameoffset=.8 rulethickness]
…
startext


\MyFrame[\rulethickness=3pt{What goes into the frame}
stop

I would like to adjust the frameoffset according to the value of \rulethickness,
to be exact I would prefer using a command that calulates a value.

How do I go about it. According to the Manuals and the Wiki I can use a command

How can I access rulethickness in such a manner?

I know I could right a command in lua that injects the proper output into the TeX stream,
but I am afraid that the the side effects. 

Could do it in TeX to, but I am not that comfortable with TeX and processing key values therein.

Any help and ideas appriciated.

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
___________________________________________________________________________________


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

* Re: Is this possible for the Frames
  2013-10-18  9:25 Is this possible for the Frames Keith J. Schultz
@ 2013-10-18 12:56 ` Wolfgang Schuster
  2013-10-21  6:41   ` Keith J. Schultz
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2013-10-18 12:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 18.10.2013 um 11:25 schrieb "Keith J. Schultz" <schultzk@uni-trier.de>:

> Hi everbody,
> 
> I would like to do some very special settings using frames possibly structures to!
> 
> NMW
> % declartion of MyFarme and setup
> \defineframed[MyFrame][framed]
> \setupframed[MyFrame][\rulethickness=3pt, frameoffset=.8 rulethickness]
> …
> startext
> 
> 
> \MyFrame[\rulethickness=3pt{What goes into the frame}
> stop
> 
> I would like to adjust the frameoffset according to the value of \rulethickness,
> to be exact I would prefer using a command that calulates a value.
> 
> How do I go about it. According to the Manuals and the Wiki I can use a command
> 
> How can I access rulethickness in such a manner?
> 
> I know I could right a command in lua that injects the proper output into the TeX stream,
> but I am afraid that the the side effects. 
> 
> Could do it in TeX to, but I am not that comfortable with TeX and processing key values therein.
> 
> Any help and ideas appreciated.

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


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

* Re: Is this possible for the Frames
  2013-10-18 12:56 ` Wolfgang Schuster
@ 2013-10-21  6:41   ` Keith J. Schultz
  2013-10-21  7:38     ` Keith J. Schultz
  0 siblings, 1 reply; 4+ messages in thread
From: Keith J. Schultz @ 2013-10-21  6:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.wolfgang@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
___________________________________________________________________________________


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

* Re: Is this possible for the Frames
  2013-10-21  6:41   ` Keith J. Schultz
@ 2013-10-21  7:38     ` Keith J. Schultz
  0 siblings, 0 replies; 4+ messages in thread
From: Keith J. Schultz @ 2013-10-21  7:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi All,


Am 21.10.2013 um 08:41 schrieb "Keith J. Schultz" <schultzk@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
___________________________________________________________________________________


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

end of thread, other threads:[~2013-10-21  7:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-18  9:25 Is this possible for the Frames Keith J. Schultz
2013-10-18 12:56 ` Wolfgang Schuster
2013-10-21  6:41   ` Keith J. Schultz
2013-10-21  7:38     ` Keith J. Schultz

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).