From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/52102 Path: news.gmane.org!not-for-mail From: Derek CORDEIRO Newsgroups: gmane.comp.tex.context Subject: Re: Layers don't repeat in Mk IV Date: Wed, 5 Aug 2009 14:57:50 +0530 Message-ID: <33c64e670908050227p44765171k5e02deb56f015bd5@mail.gmail.com> References: <33c64e670908040952o1eff5e3cj4196dc28c154d30b@mail.gmail.com> <3C632BB2-253A-4891-A893-EA2F9F7914D7@gmail.com> <33c64e670908050147s3dbf62c9i784ab3857edd3ec4@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0361253015==" X-Trace: ger.gmane.org 1249464528 20960 80.91.229.12 (5 Aug 2009 09:28:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2009 09:28:48 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 05 11:28:41 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1MYcnV-0004Ec-Dv for gctc-ntg-context-518@m.gmane.org; Wed, 05 Aug 2009 11:28:37 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8F9B0C9B07; Wed, 5 Aug 2009 11:28:42 +0200 (CEST) Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.elvenkind.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Avx1R4hT61nV; Wed, 5 Aug 2009 11:28:22 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 27764C9B1A; Wed, 5 Aug 2009 11:28:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D29C2C9B1A for ; Wed, 5 Aug 2009 11:28:20 +0200 (CEST) Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.elvenkind.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14NCh81ixKRw for ; Wed, 5 Aug 2009 11:28:00 +0200 (CEST) Original-Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.244]) by balder.ntg.nl (Postfix) with ESMTP id 328D5C9B07 for ; Wed, 5 Aug 2009 11:27:58 +0200 (CEST) Original-Received: by rv-out-0708.google.com with SMTP id f25so1454377rvb.14 for ; Wed, 05 Aug 2009 02:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=cgV1zOF0/TzAO0y21P5dk1TEXd8rRYRI7NuQwQjWb8E=; b=An4jlTbeaDubKNePpIoQhWIyGtIpiae+XF0Y+5l4yIjth7exACG99ZgsIMlW6wsfH2 W/NI0FtcZOmuAdJQZYzb/tC73wsuucalXnLkEtF/+QDd+gKWiLtVn1B+yTj9qr7dZoNT DlmWXONC30crWtbl77F4u5f9bTGfMqKKas7Po= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Vfaau11REG7TJjbWuyXSzaK6b++z8Z0vGJoDmRBKc4ABnabuHdFul/LHzU7a42YAIp lcdtMoUSZEkaAsv4RyOmiCHneLq79//fBwKqlAwqgXDmJKaVn9lBEmw/MXVGf9SEr8Q/ gBbQWwjyKUsAfvosqomBib98gE9n65Sk0GQfw= Original-Received: by 10.140.255.19 with SMTP id c19mr5928150rvi.24.1249464470491; Wed, 05 Aug 2009 02:27:50 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:52102 Archived-At: --===============0361253015== Content-Type: multipart/alternative; boundary=000e0cd0ed78ec54230470619dee --000e0cd0ed78ec54230470619dee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Aug 5, 2009 at 2:45 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote: > > Am 05.08.2009 um 10:47 schrieb Derek CORDEIRO: > > \definelayer[mybg][width=3D\paperwidth,height=3D\paperheight,state=3Drep= eat] >> \setlayer [mybg] >> [hoffset=3D1cm, voffset=3D1cm] >> {\framed[frame=3Don, width=3D3cm, >> height=3D2cm]{\externalfigure[cow][width=3D1cm] >> }} >> \setupbackgrounds[page][background=3Dmybg] >> >> \starttext >> \dorecurse{6}{\input tufte\par} >> \stoptext >> >> It still does not work(still layer only on first page in Mk IV). What am= I >> doing wrong? >> > > A typo in pack-lyr.mkiv for the \dodoflushlayer macro. > > In MkII a line of the macro is > > \doifnotvalue{\??ll#2\c!position}\v!yes > {\doifvalue{\??ll#2\c!repeat}\v!yes\!!donecfalse > \doifvalue{\??ll#2\c!state}\v!repeat\!!donecfalse}% > > while in MkIV it's > > \ifx\@@currentlayerposition\v!yes > > \edef\@@currentlayerrepeat{\csname\??ll\currentlayer\c!repeat\endcsname}% > % \edef\@@currentlayerstate > {\csname\??ll\currentlayer\c!state\endcsname}% actually this is already s= et > \ifx\@@currentlayerrepeat\v!yes > \!!donecfalse > \else\ifx\@@currentlayerstate\v!repeat > \!!donecfalse > \fi\fi > \fi > > MkII expects position =E2=89=A0 yes while MkIV continues only when positi= on =3D yes > what's wrong, you can add \unless before the \ifx and the layer mechanism > works. > > \unless\ifx\@@currentlayerposition\v!yes > > \edef\@@currentlayerrepeat{\csname\??ll\currentlayer\c!repeat\endcsname}% > % \edef\@@currentlayerstate > {\csname\??ll\currentlayer\c!state\endcsname}% actually this is already s= et > \ifx\@@currentlayerrepeat\v!yes > \!!donecfalse > \else\ifx\@@currentlayerstate\v!repeat > \!!donecfalse > \fi\fi > \fi > \fi > > Thanks a lot, works great. Regards, Derek --000e0cd0ed78ec54230470619dee Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Wed, Aug 5, 2009 at 2:45 PM, Wolfgang Schuste= r <schuster.wolfgang@googlemail.com> wrote:

Am 05.08.2009 um 10:47 schrieb Derek CORDEIRO:


\definelayer[mybg][width=3D\paperwidth,height=3D\paperheight,state=3Drepeat= ]
\setlayer =C2=A0 =C2=A0[mybg]
=C2=A0 =C2=A0 =C2=A0 =C2=A0[hoffset=3D1cm, voffset=3D1cm]
=C2=A0 =C2=A0 =C2=A0 =C2=A0{\framed[frame=3Don, width=3D3cm, height=3D2cm]= {\externalfigure[cow][width=3D1cm]
}}
\setupbackgrounds[page][background=3Dmybg]

\starttext
\dorecurse{6}{\input tufte\par}
\stoptext

It still does not work(still layer only on first page in Mk IV). What am I = doing wrong?

A typo in pack-lyr.mkiv for the \dodoflushlayer macro.

In MkII a line of the macro is

=C2=A0 =C2=A0 =C2=A0 \doifnotvalue{\??ll#2\c!position}\v!yes
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {\doifvalue{\??ll#2\c!repeat}\v!yes\!!donecfal= se
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\doifvalue{\??ll#2\c!state}\v!repeat\!!d= onecfalse}%

while in MkIV it's

=C2=A0 =C2=A0 \ifx\@@currentlayerposition\v!yes
=C2=A0 =C2=A0 =C2=A0 \edef\@@currentlayerrepeat{\csname\??ll\currentlayer\= c!repeat\endcsname}%
=C2=A0 =C2=A0 % \edef\@@currentlayerstate {\csname\??ll\currentlayer\c!sta= te\endcsname}% actually this is already set
=C2=A0 =C2=A0 =C2=A0 \ifx\@@currentlayerrepeat\v!yes
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \!!donecfalse
=C2=A0 =C2=A0 =C2=A0 \else\ifx\@@currentlayerstate\v!repeat
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \!!donecfalse
=C2=A0 =C2=A0 =C2=A0 \fi\fi
=C2=A0 =C2=A0 \fi

MkII expects position =E2=89=A0 yes while MkIV continues only when position= =3D yes
what's wrong, you can add \unless before the \ifx and the layer mechani= sm works.

=C2=A0 =C2=A0 \unless\ifx\@@currentlayerposition\v!yes
=C2=A0 =C2=A0 =C2=A0 \edef\@@currentlayerrepeat{\csname\??ll\currentlayer\= c!repeat\endcsname}%
=C2=A0 =C2=A0 % \edef\@@currentlayerstate {\csname\??ll\currentlayer\c!sta= te\endcsname}% actually this is already set
=C2=A0 =C2=A0 =C2=A0 \ifx\@@currentlayerrepeat\v!yes
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \!!donecfalse
=C2=A0 =C2=A0 =C2=A0 \else\ifx\@@currentlayerstate\v!repeat
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \!!donecfalse
=C2=A0 =C2=A0 =C2=A0 \fi\fi
=C2=A0 =C2=A0 \fi
=C2=A0 \fi



Thanks a lot, works great.

Re= gards,
Derek
--000e0cd0ed78ec54230470619dee-- --===============0361253015== 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0361253015==--