From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/98884 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: About \setupheadertexts : simplify a code Date: Sat, 19 Aug 2017 11:55:37 +0200 Message-ID: References: <2C9FC0BA-21C1-4779-9A45-7EADEA58CDEE@me.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5144582205404081707==" X-Trace: blaine.gmane.org 1503136579 8763 195.159.176.226 (19 Aug 2017 09:56:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Aug 2017 09:56:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 19 11:56:10 2017 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 esmtp (Exim 4.84_2) (envelope-from ) id 1dj0UA-0001di-0N for gctc-ntg-context-518@m.gmane.org; Sat, 19 Aug 2017 11:56:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EE41D10567C; Sat, 19 Aug 2017 11:55:52 +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 WSCAoM8Hawr8; Sat, 19 Aug 2017 11:55:52 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 3F067105677; Sat, 19 Aug 2017 11:55:52 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BC934105677 for ; Sat, 19 Aug 2017 11:55:50 +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 SA0XYXTMDqfy for ; Sat, 19 Aug 2017 11:55:49 +0200 (CEST) Original-Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id A05C4105675 for ; Sat, 19 Aug 2017 11:55:39 +0200 (CEST) Original-Received: by mail-wm0-f51.google.com with SMTP id m85so15744412wma.0 for ; Sat, 19 Aug 2017 02:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=yQg9LdSfBCKW2jnjwOxPlKthldwm2Jgz5PaMZOA+JuM=; b=eQ0bYgFqY8xTnKwk4IBltX9x9Q2IWlRhk9n+D1jqxTnontVna0PE8UrrJyVOw0hpF3 MpzFEDKj8Oyl2Ld+OG7GgAQl9zxOm+UMHn0hqRdvU4lM6BJ0x71klGtsGd8xMncfhQM/ YcsUoBfq9bebzxxlqnTyTZb6HAyjWftdnlXFkpw/xNNi3xUNSqnRVRsccZy0iqGFHbcv 0bIJbvfwE+y4vSc8L9BsT81Q1kzwOfp7OckSOxVT0PfYrKPL++zlUuHZCfpFUzb8sgZK L+Ub3pPPt5YWDVabKsTSyBM288kWQO0vZGxNdZwMTHoZHh55C1KBRveFRD14H9kYSUTO GjLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=yQg9LdSfBCKW2jnjwOxPlKthldwm2Jgz5PaMZOA+JuM=; b=URFs5Xgie367/jp7tVQbvqkIyCs+aH9aGsfnqeXPFNl07DfGg2+Kd6K+Ly18q2xMrZ I7bDVDiLBc4j0nmjT8RFILhHA1QW0dNgCOFglWibGAA04u/X8eqSqZFhzM1YmcUh5tzS zjXiEnGkfC1moCtjmvI7MGqg50GRzqjPbEnnCC1fBvAfvEDPL4El7nXkXhub8y7C6wr8 eOabdxNoaWd4uV/yLHzm8QCVPIxX918y+9L8U275pHMAR4TiqAse345wtndVKMZ7eQcP RUDs/Un8+9PXVYQ0UWJYiXXyc89KzW9d68q24XkzyEFVtKZiro3jX6LmFUkzHoowrFKJ Bg2g== X-Gm-Message-State: AHYfb5j4B7zrLqMbUg39HYuGv+BXPqidxbSnFD/Cf6zO4Lxx/ccOxklY OqfOzvRHAhvxSkYtGE/EvkFg+08cvnLT X-Received: by 10.80.136.129 with SMTP id d1mr6928566edd.130.1503136538760; Sat, 19 Aug 2017 02:55:38 -0700 (PDT) Original-Received: by 10.80.205.92 with HTTP; Sat, 19 Aug 2017 02:55:37 -0700 (PDT) In-Reply-To: <2C9FC0BA-21C1-4779-9A45-7EADEA58CDEE@me.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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:98884 Archived-At: --===============5144582205404081707== Content-Type: multipart/alternative; boundary="94eb2c194a207119760557183fcc" --94eb2c194a207119760557183fcc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I have tried many approaches, but it still does not work. Everything is passed to the dm-1.tex file (font, footer) but not the header. Have you tested the files, does it work for you ? Sorry to insist, but I really need this way of doingThank you Fabrice ########## MyLayout.mkvi ########## \startenvironment MyLayout \setupbodyfont[12pt,pagella] \definelayout [noheader] [header=3D2\lineheight, headerdistance=3D\lineheight, backspace=3D2cm, width=3Dmiddle, topspace=3D\dimexpr 2cm-\headerheight-\headerdistance\relax, footer=3D\lineheight, height=3Dmiddle] \setuplayout [header=3D\zeropoint, headerdistance=3D\lineheight, backspace=3D2cm, width=3Dmiddle, topspace=3D\dimexpr 2cm-\headerheight-\headerdistance\relax, footer=3D\lineheight, height=3Dmiddle] \definelayout[1][noheader] \setuppagenumbering[alternative=3Ddoublesided,location=3D] \setupfootertexts[\tfxx Page \pagenumber\,/\,\lastpage][] \definecolor[darkgray] [s=3D.25] \setupbackgrounds [header] [text] [ frame=3Doff, bottomframe=3Don, framecolor=3Ddarkgray, rulethickness=3D2pt, ] \defineframed[headerframed] [ frame=3Doff, % For visualization set this to on height=3Dfit, width=3Dfit, location=3Dbottom, boffset=3D\lineheight, ] \starttexdefinition MyHeader #where #day #month #year #title #number #time \setupheadertexts [{\headerframed[align=3Dmiddle, foregroundstyle=3Dbold, foregroundcolor=3Dred] {#title n\high{o}\,#number}}] \setupheadertexts [{\headerframed[align=3Dflushleft, foregroundstyle=3D\ssx] {Lyc=C3=A9e JANSON DE SAILLY \\ \date[d=3D#day,m=3D#month,y=3D#ye= ar]}}] [{\headerframed[align=3Dflushright, foregroundstyle=3D\ssx] {#where \\ {#time}}}] \stoptexdefinition \stopenvironment ####### dm-1.tex ####### \startcomponent dm-1 \component MyLayout \MyHeader{Seconde}{17}{08}{2017}{Devoir surveill=C3=A9}{1}{1h\,30m} \input knuth \stopcomponent 2017-08-19 1:29 GMT+02:00 Jeong Dal : > Hi, Otared, > > I am also able to typeset Aditya=E2=80=99s example without problem, so ex= ample > file is OK for me. > There may be something which is not in the file. > I am using MKIV beta 6. 21 version under OSX. > > This is LuaTeX, Version 1.05.0 (TeX Live 2017) > system commands enabled. > open source > level 1, order 1, name '/Users/graph/ConTeXt/tex/ > texmf-context/tex/context/base/mkiv/cont-yes.mkiv' > system > > system > ConTeXt ver: 2017.06.21 23:03 MKIV beta fmt: > 2017.6.25 int: english/english > > Best regards, > > Dalyoung > > > 2017. 8. 19. =EC=98=A4=EC=A0=84 7:14, ntg-context-request@ntg.nl =EC=9E= =91=EC=84=B1: > > About \setupheadertexts : simplify a code > > > > ____________________________________________________________ > _______________________ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ____________________________________________________________ > _______________________ > --94eb2c194a207119760557183fcc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,
I have tried many approaches, but it still does no= t work. Everything is passed to the dm-1.tex file (font, foote= r) but not the header.
Have you tested the files, does it w= ork for you ?
<= span class=3D"gmail-">Sorry to insist, but I really need this way of doing<= /span>Thank you
Fabrice

##########
<= /span>
MyLayout.mkvi
##########

\startenvironment MyL= ayout
=C2=A0
\setupbodyfont[12pt,pagella]

\definelayout
= =C2=A0=C2=A0 [noheader]
=C2=A0=C2=A0 [header=3D2\lineheight,
=C2=A0= =C2=A0=C2=A0 headerdistance=3D\lineheight,
=C2=A0=C2=A0=C2=A0 backspace= =3D2cm,
=C2=A0=C2=A0=C2=A0 width=3Dmiddle,
=C2=A0=C2=A0=C2=A0 topspac= e=3D\dimexpr 2cm-\headerheight-\headerdistance\relax,
=C2=A0=C2=A0=C2=A0= footer=3D\lineheight,
=C2=A0=C2=A0=C2=A0 height=3Dmiddle]

\setup= layout
=C2=A0=C2=A0 [header=3D\zeropoint,
=C2=A0=C2=A0=C2=A0 headerdi= stance=3D\lineheight,
=C2=A0=C2=A0=C2=A0 backspace=3D2cm,
=C2=A0=C2= =A0=C2=A0 width=3Dmiddle,
=C2=A0=C2=A0=C2=A0 topspace=3D\dimexpr 2cm-\he= aderheight-\headerdistance\relax,
=C2=A0=C2=A0=C2=A0 footer=3D\lineheigh= t,
=C2=A0=C2=A0=C2=A0 height=3Dmiddle]

\definelayout[1][noheader]=

\setuppagenumbering[alternative=3Ddoublesided,location=3D]

\= setupfootertexts[\tfxx Page \pagenumber\,/\,\lastpage][]

\definecolo= r[darkgray]=C2=A0=C2=A0 [s=3D.25]

\setupbackgrounds
=C2=A0 [heade= r]
=C2=A0 [text]
=C2=A0 [
=C2=A0=C2=A0=C2=A0 frame=3Doff,
=C2= =A0=C2=A0=C2=A0 bottomframe=3Don,
=C2=A0=C2=A0=C2=A0 framecolor=3Ddarkgr= ay,
=C2=A0=C2=A0=C2=A0 rulethickness=3D2pt,
=C2=A0 ]

\definefr= amed[headerframed]
=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=C2=A0 frame=3Doff, % For visualization set t= his to on
=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 height=3Dfit,
=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 width=3Dfit,
=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 location=3Dbottom,
=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 boffset=3D\lineheight,
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ]

\star= ttexdefinition MyHeader #where #day #month #year #title #number #time
=C2=A0=C2=A0=C2=A0 \setupheadertexts
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [{= \headerframed[align=3Dmiddle, foregroundstyle=3Dbold, foregroundcolor=3Dred= ]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {#t= itle n\high{o}\,#number}}]

=C2=A0=C2=A0=C2=A0 \setupheadertexts
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [{\headerframed[align=3Dflushleft, foregroun= dstyle=3D\ssx]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {L= yc=C3=A9e JANSON DE SAILLY \\ \date[d=3D#day,m=3D#month,y=3D#year]}}]
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [{\headerframed[align=3Dflushright, foregrou= ndstyle=3D\ssx]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {= #where \\ {#time}}}]

\stoptexdefinition

\stopenvironment
<= br>
#######
dm-1.tex
#######

\startcomponent dm-1
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0 \component MyLayout

=C2=A0 \M= yHeader{Seconde}{17}{08}{2017}{Devoir surveill=C3=A9}{1}{1h\,30m}

= =C2=A0 \input knuth

\stopcomponent

2017-08-19 1:29 GMT+02:00 Jeong Dal= <h= aksan@me.com>:
Hi, Otared,

I am also able to = typeset Aditya=E2=80=99s example without problem, so example file is OK for= me.
There may be something which is not in the file.
I= am using MKIV beta 6. 21 version under OSX.

Th= is is LuaTeX, Version 1.05.0 (TeX Live 2017)=C2=A0
=C2=A0system com= mands enabled.
open source =C2=A0 =C2=A0 > level 1, order 1, nam= e '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mk= iv/cont-yes.mkiv'
system=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >= =C2=A0
system=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > ConTeXt=C2=A0 = ver: 2017.06.21 23:03 MKIV beta=C2=A0 fmt: 2017.6.25=C2=A0 int: english/eng= lish

Best regards,

Dalyou= ng


2= 017. 8. 19. =EC=98=A4=EC=A0=84 7:14, ntg-context-request@ntg.nl =EC=9E=91=EC=84=B1= :

About \set= upheadertexts : simplify a code

<= /div>

_______________________________________________________= ____________________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context=
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
_________________________________________________________________= __________________

--94eb2c194a207119760557183fcc-- --===============5144582205404081707== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============5144582205404081707==--