From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112535 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur via ntg-context Newsgroups: gmane.comp.tex.context Subject: Adjustment for header and footer Date: Sun, 22 Aug 2021 13:13:38 +0200 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3229748836792140799==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33018"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Fabrice Couvreur To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Aug 22 13:16:15 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mHlSZ-0008Pa-4G for gctc-ntg-context-518@m.gmane-mx.org; Sun, 22 Aug 2021 13:16:15 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C14AF286B47; Sun, 22 Aug 2021 13:15:44 +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 00vWbjc-n-nq; Sun, 22 Aug 2021 13:15:43 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 445BA286B2A; Sun, 22 Aug 2021 13:15:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id AA9F1286B28 for ; Sun, 22 Aug 2021 13:15:41 +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 J0YBMkDIi3LO for ; Sun, 22 Aug 2021 13:15:40 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.210.53; helo=mail-ot1-f53.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (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 A197E286ACE for ; Sun, 22 Aug 2021 13:15:40 +0200 (CEST) Original-Received: by mail-ot1-f53.google.com with SMTP id m7-20020a9d4c87000000b0051875f56b95so27764516otf.6 for ; Sun, 22 Aug 2021 04:15:40 -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=nybpEf3LFx18g1pxx7f0qrApSMuWSwsukkoaWMgvuBE=; b=hOZpSpl8San3inSWUF/d81SmoVtmNHMJftwAMMOMBYqIx3tlL3xN3OShCjASw+y/1s Xm8zLqvhf/UsUi+wGqKhlaWCwQbkblwFIld6RryORBKv+YcHHz2JH6rHU8yk4Phl+5Jo zF3kRF6n2+mEsnQwtZqeFg/UpDpxgZj+AkoUAKgNPffKjwU7Zm5wn+EQNJYV2KMMJeYt 5M8mEMZBMrE4VtWap93lA7u7jRHDaJMPrGb/mLWlq4PHZGdceLWCuZNHnDV56S1ZjX6n Rr8CY4fVTHhFR/k7QY3gL1aKlUDoxMyUIrg2K5KY8xmHALu11IynrMn+VB+Jt9HcM5mb dF0A== 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=nybpEf3LFx18g1pxx7f0qrApSMuWSwsukkoaWMgvuBE=; b=lvvOLQ92JW9//Z26+iKcvrKe+92R1e3gzIYwnFMSlnVvUL4c7zNrz/qwPfIg7D8vp1 zhXDHiKW+IWb355qOm1E3dmXOz1BL41g2DdJJPaCiOV1TqAE4eBUx8fIqWmPPviL/yD9 PVpE7q4JGxNB95ClRtQKFJu1goX2ZcxoZ48B3cAh9QhQFsFAWb6XJnveA1IQ7CyAkNmZ KLoLO5aLTNEf8rY4/QwoQYgm3MulDfA1KfqVAcY4KLh/iMpx/4tWKfltX2FcGo6mcwMG eINa8shzcH1K3NNusn1vkdwipJU0YmnJXoleySxxA4d0pfrNmlY03f8/f7bXfxk8J3ja Ed7Q== X-Gm-Message-State: AOAM531KJpRbjhwRsMS/T7PK+13lSs5riTuxKm/p3MeBbIrbxJH/TzFa YyKsYgS/E0n8vttFRZAs4hF8baeezcOWuVoPiM7MrrSnHnI= X-Google-Smtp-Source: ABdhPJxjVXieKqa03E8L8/eHaQXBEqWkkvtgEUqVJ/phlBDa+XdqFWMB/WPzCIrnhxo8oxPoWXM/UBQ9AIV6isIr4+I= X-Received: by 2002:aca:bec2:: with SMTP id o185mr8289305oif.151.1629630938862; Sun, 22 Aug 2021 04:15:38 -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.io gmane.comp.tex.context:112535 Archived-At: --===============3229748836792140799== Content-Type: multipart/alternative; boundary="00000000000039d96e05ca240547" --00000000000039d96e05ca240547 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, In the file below (not minimal, sorry!) I am using commands from Wolfgang in different threads. We can see that the top frame overflows into the text: how to correct this ? I would also like the top and bottom stroke to be adjusted to the width of the paper. Thanks Fabrice \useMPlibrary[dum] \setuplayout [topspace=3D1cm, backspace=3D3cm, cutspace=3D3cm, leftmargin=3D.75cm, leftmargindistance=3D.5cm, rightmargin=3D1.25cm, rightmargindistance=3D1cm, header=3D20mm, headerdistance=3D1cm, footer=3D20mm, footerdistance=3D1cm, width=3Dmiddle, height=3Dmiddle, location=3Dmiddle] \setupbodyfont [newcomputermodern-book,11pt] \definefont [TextStyle] [SansBold*default sa 1.2] \defineframed [headerframed] [frame=3Doff, height=3Dfit, width=3Dfit, ] \setupbackgrounds [header] [text] [frame=3Doff,bottomframe=3Don,width=3D\widthpaper, framecolor=3Ddarkred,rulethickness=3D1pt] \setupbackgrounds [footer] [text] [frame=3Doff,bottomframe=3Don,width=3Dmax, framecolor=3Ddarkred,rulethickness=3D1pt] \setupfootertexts [margin] [] [{\offset[y=3D\strutdp]{\externalfigure[dum][factor=3Dmax]}}] [] [{\offset[y=3D\strutdp]{\externalfigure[dum][factor=3Dmax]}}] \startsetups [headertext] \setupheadertexts [{ \startframed [headerframed] [foregroundstyle=3DTextStyle,align=3Dmiddle] \getvariable{headertext}{location}\\ Sp=C3=A9cialit=C3=A9 math=C3=A9matiques\\ \getvariable{headertext}{title} n\high{\tfxx \bf o}\,\getvariable{headertext}{number} \stopframed }] \setupheadertexts [{ \startframed [headerframed] [align=3Dflushleft,foregroundstyle=3D\ssx] Lyc=C3=A9e LA SALLE\\ Dur=C3=A9e : \getvariable{headertext}{time}\\ \date[d=3D\getvariable{headertext}{day},m=3D\getvariable{headertext}{month}= ,y=3D\getvariable{headertext}{year}] \stopframed }] [{ \startframed [headerframed] [align=3Dflushright,foregroundstyle=3D\ssx] \externalfigure[dum] [factor=3Dmax] \stopframed }] \stopsetups \setvariable{headertext}{set}{\directsetup{headertext}} \setvariables [headertext] [title=3D{Devoir maison}, number=3D{2}, day=3D{22}, month=3D{08}, year=3D{2021}, location=3D{Terminale}, time=3D{2 heures}] \starttext \samplefile{lorem} \stoptext --00000000000039d96e05ca240547 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
In the file below (not minimal, sorry!) I am usin= g commands from Wolfgang in different threads. We can see that the top frame overflows i= nto the text: how to correct this ?
I would also like the top and bottom stroke to be adjusted to the width o= f the paper.
Thanks
Fabrice

=
\useMPlibrary[dum]

\setuplayout
=C2=A0 =C2= =A0[topspace=3D1cm,
=C2=A0 =C2=A0 backspace=3D3cm,
=C2=A0 =C2=A0 cuts= pace=3D3cm,
=C2=A0 =C2=A0 leftmargin=3D.75cm,
=C2=A0 =C2=A0 leftmargi= ndistance=3D.5cm,
=C2=A0 =C2=A0 rightmargin=3D1.25cm,
=C2=A0 =C2=A0 r= ightmargindistance=3D1cm,
=C2=A0 =C2=A0 header=3D20mm,
=C2=A0 =C2=A0 = headerdistance=3D1cm,
=C2=A0 =C2=A0 footer=3D20mm,
=C2=A0 =C2=A0 foot= erdistance=3D1cm,
=C2=A0 =C2=A0 width=3Dmiddle,
=C2=A0 =C2=A0 height= =3Dmiddle,
=C2=A0 =C2=A0 location=3Dmiddle]
=C2=A0
\setupbodyfont<= br>=C2=A0 =C2=A0[newcomputermodern-book,11pt]

\definefont
=C2=A0 = =C2=A0[TextStyle]
=C2=A0 =C2=A0[SansBold*default sa 1.2]


\def= ineframed
=C2=A0 [headerframed]
=C2=A0 [frame=3Doff,
=C2=A0 =C2=A0= height=3Dfit,
=C2=A0 =C2=A0width=3Dfit,
=C2=A0 ]

\setupbackgro= unds [header] [text]
=C2=A0 =C2=A0[frame=3Doff,bottomframe=3Don,width=3D= \widthpaper,
=C2=A0 =C2=A0 framecolor=3Ddarkred,rulethickness=3D1pt]
=
\setupbackgrounds [footer] [text]
=C2=A0 =C2=A0[frame=3Doff,bottomfr= ame=3Don,width=3Dmax,
=C2=A0 =C2=A0framecolor=3Ddarkred,rulethickness=3D= 1pt]

=C2=A0\setupfootertexts
=C2=A0 [margin]
=C2=A0 []
=C2= =A0 [{\offset[y=3D\strutdp]{\externalfigure[dum][factor=3Dmax]}}]
=C2=A0= []
=C2=A0 [{\offset[y=3D\strutdp]{\externalfigure[dum][factor=3Dmax]}}]=

\startsetups [headertext]

=C2=A0 =C2=A0 \setupheadertexts=C2=A0 =C2=A0 =C2=A0 =C2=A0 [{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 \startframed [headerframed] [foregroundstyle=3DTextStyle,align=3Dmiddle= ]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \getvariable{h= eadertext}{location}\\
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0Sp=C3=A9cialit=C3=A9 math=C3=A9matiques\\
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \getvariable{headertext}{title} n\hi= gh{\tfxx \bf o}\,\getvariable{headertext}{number}
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 \stopframed
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }]

= =C2=A0 =C2=A0 \setupheadertexts
=C2=A0 =C2=A0 =C2=A0 =C2=A0 [{
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \startframed [headerframed] [align=3Dfl= ushleft,foregroundstyle=3D\ssx]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 Lyc=C3=A9e LA SALLE\\
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 Dur=C3=A9e : \getvariable{headertext}{time}\\
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \date[d=3D\getvaria= ble{headertext}{day},m=3D\getvariable{headertext}{month},y=3D\getvariable{h= eadertext}{year}]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \stopframed<= br>=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 \startframed [headerframed] [align= =3Dflushright,foregroundstyle=3D\ssx]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 \externalfigure[dum] [factor=3Dmax] =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \stopframed
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 }]

\stopsetups

\setvariable{headerte= xt}{set}{\directsetup{headertext}}


\setvariables
=C2=A0 [head= ertext]
=C2=A0 [title=3D{Devoir maison},
=C2=A0 =C2=A0number=3D{2},=C2=A0 =C2=A0day=3D{22},
=C2=A0 =C2=A0month=3D{08},
=C2=A0 =C2=A0ye= ar=3D{2021},
=C2=A0 =C2=A0location=3D{Terminale},
=C2=A0 =C2=A0time= =3D{2 heures}]


\starttext
\samplefile{lorem}
\stoptext
--00000000000039d96e05ca240547-- --===============3229748836792140799== 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== --===============3229748836792140799==--