Re: [NTG-context] How to use local layout parameters (instead of global ones)?

2013-11-19 Thread Géry Ogam
 \definemeasure[h1][1.2\measured{w1}+26mm]
 \definemeasure[h2][1.2\measured{w2}+26mm]

\measured gives me this error (*Undefined control sequence*):

*\17h1 ^^@-1.2\measured*
*   {w1}+26mm*
*\measure ...sname \csname \??measure #1\endcsname*
*  \else \zeropoint \fi*
*\page_layouts_synchronize ...tparameter \c!height*
*  }\ifx
\p_page_layouts_heig...*
*inserted text ...yout \previouslayout \page_layouts_synchronize*
*  \page_layouts_check_next
\...*
*\setup_layout ...out :}[#1]\the \everysetuplayout*
*  \the \everyswitchlayout
\l...*
*\syst_helpers_double_empty_one_spaced ...1[{#2}][]*

I am using ConTeXt  ver: 2013.04.20. So I tried to use \dimexpr:

\definemeasure[h1][\the\dimexpr 1.2\measure{w1}+26mm\relax]
\definemeasure[h2][\the\dimexpr 1.2\measure{w2}+26mm\relax]

but it gives me this error (there is a problem with the decimal point in
1.2 because there is no error when I put an integer instead):

*\17w1 .-0.*
*7500\paperwidth*
*\measure ...sname \csname \??measure #1\endcsname*
*  \else \zeropoint \fi*
*\17h1 r-\the \dimexpr 1.2\measure {w1}*
* + 26mm \relax*
*\measure ...sname \csname \??measure #1\endcsname*
*  \else \zeropoint \fi*
*\page_layouts_synchronize ...tparameter \c!height*
*  }\ifx
\p_page_layouts_heig...*
___
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] How to use local layout parameters (instead of global ones)?

2013-11-19 Thread Hans Hagen

On 11/19/2013 11:20 AM, Géry Ogam wrote:

  \definemeasure[h1][1.2\measured{w1}+26mm]

\definemeasure[h2][1.2\measured{w2}+26mm]


then use

\dimexpr\measure{w2}\relax


\measured gives me this error (/Undefined control sequence/):


old context

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] How to use local layout parameters (instead of global ones)?

2013-11-19 Thread Géry Ogam
 then use

 \dimexpr\measure{w2}\relax

It works, thank you.
___
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] How to use local layout parameters (instead of global ones)?

2013-11-18 Thread Géry Ogam
Hello,


Here is my problem:


\setuplayout[%
width=0.75\paperwidth,
height=\dimexpr\paperheight-1.2\paperwidth+1.2\textwidth+26mm]

\definelayout[luxury][%
width=0.6667\paperwidth,
height=\dimexpr\paperheight-1.2\paperwidth+1.2\textwidth+26mm]


\starttext

- textwidth: \the\textwidth \crlf
- textheight: \the\textheight
\page

\setuplayout[luxury]

- textwidth: \the\textwidth \crlf
- textheight: \the\textheight % -- The height (\texteight parameter) which
depends on the width (\textwidth parameter) in my ‘luxury’ layout has NOT
changed though the local width (\textwidth parameter) has changed.
Therefore height used the global parameter \textwidth (defined in
setuplayout) instead of the local parameter \textwidth (defined in
definelayout[luxury]). Question: how to use the local one?

\stoptext


Best regards.
___
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] How to use local layout parameters (instead of global ones)?

2013-11-18 Thread Hans Hagen

On 11/18/2013 11:29 PM, Géry Ogam wrote:

Hello,


Here is my problem:


\setuplayout[%
 width=0.75\paperwidth,
 height=\dimexpr\paperheight-1.2\paperwidth+1.2\textwidth+26mm]

\definelayout[luxury][%
 width=0.6667\paperwidth,
 height=\dimexpr\paperheight-1.2\paperwidth+1.2\textwidth+26mm]


\starttext

- textwidth: \the\textwidth \crlf
- textheight: \the\textheight
\page

\setuplayout[luxury]

- textwidth: \the\textwidth \crlf
- textheight: \the\textheight % -- The height (\texteight parameter)
which depends on the width (\textwidth parameter) in my ‘luxury’ layout
has NOT changed though the local width (\textwidth parameter) has
changed. Therefore height used the global parameter \textwidth (defined
in setuplayout) instead of the local parameter \textwidth (defined in
definelayout[luxury]). Question: how to use the local one?

\stoptext


best do that indirect:

\definemeasure[w1][0.7500\paperwidth]
\definemeasure[w2][0.6667\paperwidth]
\definemeasure[h1][1.2\measured{w1}+26mm]
\definemeasure[h2][1.2\measured{w2}+26mm]

\setuplayout
  [width=\measure{w1},
   height=\measure{h1}]

\definelayout
  [luxury]
  [width=\measure{w2},
   height=\measure{h2}]


--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___