From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/104903 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Problem of displaying a date with a macro Date: Wed, 28 Aug 2019 11:10:56 +0200 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8793887741860993028==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="204088"; mail-complaints-to="usenet@blaine.gmane.org" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 28 11:11:41 2019 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i2tzR-000qz9-F1 for gctc-ntg-context-518@m.gmane.org; Wed, 28 Aug 2019 11:11:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B36E0153A22; Wed, 28 Aug 2019 11:11:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oJ_Kpko_OtIM; Wed, 28 Aug 2019 11:11:19 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3B200153A2F; Wed, 28 Aug 2019 11:11:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2BC5B153A26 for ; Wed, 28 Aug 2019 11:11:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HpkjW9wqoLvW for ; Wed, 28 Aug 2019 11:11:17 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.41; helo=mail-wm1-f41.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 969DF153A22 for ; Wed, 28 Aug 2019 11:11:17 +0200 (CEST) Original-Received: by mail-wm1-f41.google.com with SMTP id o184so1198091wme.3 for ; Wed, 28 Aug 2019 02:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=cbkLMo9HARESmCdfvkf6op6v79eEIddDiC+01kaMhaM=; b=kXK4Q2Mvg7+9GR+nvGCuS0O50Tf0E4Fxd8kLbBpGm68+XfcHVgsnRiflMewaI1qVQ9 kfW9I0dszXHsXi5NzYShcuWjAtksvklfGBhS0GWOM2aV9weMak3VCgO9ekzIlL2AKDMJ 8s9nu8gMWvH0AmWJfkxPQL/DA5nQe4LkxLNS87CsN71b63vFbw/TvQ2cMClGySiaPcV5 QI8joFqWmbkULR0QDeKv+4tnWRXfpSysdXNqmoRvHDIYATpV3/uAyQYUahxQv87RcMtp H8JD08nPTqOjxdVhnVlFodG9g2fReDy23v7RdmHbXXFIhDaLgiYLE2zEIuQVj6RMnyY/ PvwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=cbkLMo9HARESmCdfvkf6op6v79eEIddDiC+01kaMhaM=; b=KJjWgfHmluk93JzZ6vFBhgkOAdPDbcVw4v/nofx9il2M0U1EFI1GRStocthlXdpz3P eSkYZHs89dx8pNNWrkW072cOHMSxB8Y3zlpqWXorBFVAkvF25w0Y8pMPvcEg04A7MLrm 6NtMCm686XaWVJqKf+lbfG5eBy7os6tjQF6vG/TlXJGH1nY+BgRjrs2c9oelQRIhVwLS htMKGhAZ24Ts8uYKBq/vET9ZyTukfuNY4vj6GkZrblj+FJ7Rbr42MbqRQyaZ6QL7Vhjt sSebddbFDwWesiZnWFSRvb1+cxCAImLjgkY7yTfoPJAoX1yRsRsUw8xmh3KmmKY7Qh4R 78Mw== X-Gm-Message-State: APjAAAWJu9q1HBgdgP8kfsDX1nnl7wPfP34EnXGKsBgcWYFkJJiiD+5m o6C56Rts0ck25ihy2MDjIctNaPi9smPR2C8FuXgu9KyomJ8= X-Google-Smtp-Source: APXvYqzkqLsqErdcHje4LDyBMwqHtPxUjPLupBzbDQkx96tzSzbu1vo6/+JTAs3N7CxKHmQ5MGrP8eJm/pTI9IoTEzw= X-Received: by 2002:a1c:9c45:: with SMTP id f66mr3579471wme.38.1566983476900; Wed, 28 Aug 2019 02:11:16 -0700 (PDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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" Xref: news.gmane.org gmane.comp.tex.context:104903 Archived-At: --===============8793887741860993028== Content-Type: multipart/alternative; boundary="0000000000008275b2059129c586" --0000000000008275b2059129c586 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, The date display is incorrect : I get day 28 instead of day 2. Thank you Fabrice \defineframed [headerframed] [frame=3Doff, height=3Dfit, width=3Dfit] \definecolor[ColorA][0.8(white)] \startsetups [headertext] \setupheadertexts [{\startframed [headerframed] [foregroundstyle=3Dbold,background=3Dframewithshadow] \getvariable{headertext}{title} n\high{o}\,\getvariable{headertext}{number} \stopframed}] \setupheadertexts [{\startframed [headerframed] [align=3Dflushleft,foregroundstyle=3D] Lyc=C3=A9e LA SALLE, Lille\\ \getvariable{headertext}{location} \stopframed}] [{\startframed [headerframed] [align=3Dflushright,foregroundstyle=3D] \date[d=3D\getvariable{headertext}{day},m=3D\getvariable{headertext}{month}= ,y=3D\getvariable{headertext}{year}] \stopframed}] \stopsetups \setvariable{headertext}{set}{\directsetup{headertext}} \startuseMPgraphic{framewithshadow} path p; p:=3Dorigin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeig= ht)--cycle; fill p shifted (2,-2); fill p withcolor 0.8white; draw p; setbounds currentpicture to p; \stopuseMPgraphic \defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}] \starttext \setvariables [headertext] [title=3D{Devoir maison}, number=3D{6}, day=3D{02}, month=3D{09}, year=3D{2019}, location=3D{Seconde B}, time=3D{}] \input knuth \stoptext --0000000000008275b2059129c586 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,
The date display is incorrect : I get day 28 instead of day 2.
<= span title=3D"">Thank you

Fabrice<= /div>
=
\defineframed
=C2=A0 =C2=A0 [he= aderframed]
=C2=A0 =C2=A0 [frame=3Doff,
=C2=A0 =C2=A0 =C2=A0height=3D= fit,
=C2=A0 =C2=A0 =C2=A0width=3Dfit]

=C2=A0 \definecolor[ColorA]= [0.8(white)]
=C2=A0

=C2=A0 \startsetups [headertext]

=C2= =A0 =C2=A0 \setupheadertexts
=C2=A0 =C2=A0 =C2=A0 [{\startframed [header= framed]
=C2=A0 =C2=A0 =C2=A0 [foregroundstyle=3Dbold,background=3Dframew= ithshadow]
=C2=A0 =C2=A0 =C2=A0 \getvariable{headertext}{title} n\high{o= }\,\getvariable{headertext}{number}
=C2=A0 =C2=A0 =C2=A0 \stopframed}]
=C2=A0 =C2=A0 \setupheadertexts
=C2=A0 =C2=A0 =C2=A0 [{\startframe= d [headerframed]
=C2=A0 =C2=A0 =C2=A0 [align=3Dflushleft,foregroundstyle= =3D]
=C2=A0 =C2=A0 =C2=A0 =C2=A0Lyc=C3=A9e LA SALLE, Lille\\
=C2=A0 = =C2=A0 =C2=A0 =C2=A0\getvariable{headertext}{location}
=C2=A0 =C2=A0 =C2= =A0 =C2=A0\stopframed}]
=C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 [{\startf= ramed [headerframed]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [align=3Dflushri= ght,foregroundstyle=3D]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \date[d=3D\ge= tvariable{headertext}{day},m=3D\getvariable{headertext}{month},y=3D\getvari= able{headertext}{year}]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \stopframed}]=

=C2=A0 \stopsetups

=C2=A0 \setvariable{headertext}{set}{\dir= ectsetup{headertext}}

\startuseMPgraphic{framewithshadow}
path p;=
p:=3Dorigin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,Overlay= Height)--cycle;
fill p shifted (2,-2);
fill p withcolor 0.8white;
= draw p;
setbounds currentpicture to p;
\stopuseMPgraphic

\defi= neoverlay[framewithshadow][\useMPgraphic{framewithshadow}]

\starttex= t
\setvariables
=C2=A0 =C2=A0[headertext]
=C2=A0 =C2=A0[title=3D{D= evoir maison},
=C2=A0 =C2=A0 number=3D{6},
=C2=A0 =C2=A0 day=3D{02},<= br>=C2=A0 =C2=A0 month=3D{09},
=C2=A0 =C2=A0 year=3D{2019},
=C2=A0 = =C2=A0 location=3D{Seconde B},
=C2=A0 =C2=A0 time=3D{}]
\input knuth<= br>\stoptext
--0000000000008275b2059129c586-- --===============8793887741860993028== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8793887741860993028==--