From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85325 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?G=C3=A9ry_Ogam?= Newsgroups: gmane.comp.tex.context Subject: Re: How to use local layout parameters (instead of global ones)? Date: Tue, 19 Nov 2013 11:20:00 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1418972086==" X-Trace: ger.gmane.org 1384856403 5380 80.91.229.3 (19 Nov 2013 10:20:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Nov 2013 10:20:03 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 19 11:20:09 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ViiPh-0007MI-IE for gctc-ntg-context-518@m.gmane.org; Tue, 19 Nov 2013 11:20:09 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0C5B110250; Tue, 19 Nov 2013 11:20:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2qJYPm1G0bdl; Tue, 19 Nov 2013 11:20:06 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id A916E1022B; Tue, 19 Nov 2013 11:20:04 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2661010202 for ; Tue, 19 Nov 2013 11:20:03 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5EKiNNCwDs70 for ; Tue, 19 Nov 2013 11:20:01 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 6A711101EA for ; Tue, 19 Nov 2013 11:20:01 +0100 (CET) Original-Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rAJAK0FF031493 for ; Tue, 19 Nov 2013 11:20:00 +0100 Original-Received: by mail-wi0-f176.google.com with SMTP id f4so5171640wiw.15 for ; Tue, 19 Nov 2013 02:20:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=BhlhwMlJ66glRMiPLSvGjmVXBedtEm1GoDLmAez867E=; b=dJ+iLSICzjQ6Rd6N7HxQ3PjvJwGFazCd5i05YeCuuCxX9wHdCstPZzsZWMDSHwknK+ OLR83rbF33CIxfSrcBEz1J5/pbey7GQy/WbU1SMSPyI07+9z/Tg2ZY88ehut1aiWEFVe kE+Oz7slCnaMINKU3KM+8JzZzfUidEtHymxcOUDQ3nddWahCTARKcm4IVKasTGI5XOLD CcI73DKEnGWQUcC2MUCSne7tJJXWqIWpkwUul11Y5qEMDcYjowr4UzcRG8VDgbukUXrU XGT4hUh7q86DDNZyVGzNLhEfDSyJauAnmQtrnz6ljo8HkNArR5SwovP5IZJG1EoKy8vo GhWQ== X-Received: by 10.180.95.202 with SMTP id dm10mr20264882wib.62.1384856400462; Tue, 19 Nov 2013 02:20:00 -0800 (PST) Original-Received: by 10.216.244.4 with HTTP; Tue, 19 Nov 2013 02:20:00 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::230; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03KPmk0QW - 35546f54217d - 20131119 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85325 Archived-At: --===============1418972086== Content-Type: multipart/alternative; boundary=f46d044304ced08cbb04eb8501b2 --f46d044304ced08cbb04eb8501b2 Content-Type: text/plain; charset=UTF-8 > \definemeasure[h1][1.2\measured{w1}+26mm] > \definemeasure[h2][1.2\measured{w2}+26mm] \measured gives me this error (*Undefined control sequence*): *\17>>h1 ^^@-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...* * ...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): *\17>>w1 .-0.* * 7500\paperwidth* *\measure ...sname \csname \??measure #1\endcsname* * \else \zeropoint \fi* *\17>>h1 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...* --f46d044304ced08cbb04eb8501b2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
>=C2=A0\definemeasure[h1][1.2\measured{w1}+26mm]
> \definemea= sure[h2][1.2\measured{w2}+26mm]

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

\17>>h1 ^^@-1.2\measured
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{w1}+26mm
\measure ...sname \csname \??measure #1\endcsname
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \else \zeropoint \fi
\page_layouts_synchronize ...tparameter \c!height
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 }\ifx \p_page_layouts_heig...
= <inserted text> ...yout \previouslayout \page_layouts_synchronize=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \page_layouts_check_next \...
<= div>\setup_layout ...out :}[#1]\the \everysetuplayout
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 \the \everyswitchlayout \l...
\syst_helpers_double_empty_one_spaced ...1[{#2}][]
I am using ConTeXt =C2=A0ver: 2013.04.20. So I tried to use \d= imexpr:

\definemeasure[h1][\the\dimexpr 1.2\meas= ure{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):

\17>>w1 .-0.
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 7500\paperwidth
\measure .= ..sname \csname \??measure #1\endcsname
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 \else \zeropoint \fi
\17>>h1 r-\the \dimexpr 1.2\measure {w1}
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+ 26mm= \relax
\measure ...sname \csname \??measure #1\endcsname<= /i>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \else \zeropoint \fi
\page_layouts_synchronize ...tparameter \c!height
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 }\ifx \p_page_layouts_heig...
--f46d044304ced08cbb04eb8501b2-- --===============1418972086== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1418972086==--