From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/115533 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Willi Egger via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: How to setup a headertext in a doublesided document in a cld? Date: Wed, 20 Jul 2022 20:35:42 +0200 Message-ID: <510C7499-53D6-42EF-B4E9-0052E4423FD8@boede.nl> References: <34063184-1014-492A-A629-7D2D40B9444A@boede.nl> <3a22c838-4413-bd2b-bcd1-ef1cdbe45582@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_9818E333-2A6B-4B7E-BDF8-CEF0060E72C8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18034"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Willi Egger To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 20 20:36:35 2022 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 1oEEYl-0004RV-LL for gctc-ntg-context-518@m.gmane-mx.org; Wed, 20 Jul 2022 20:36:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D50442A3C9B; Wed, 20 Jul 2022 20:35:51 +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 3EKnFMMuF-kP; Wed, 20 Jul 2022 20:35:49 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id AF0792A3C8E; Wed, 20 Jul 2022 20:35:49 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 188862A3C8D for ; Wed, 20 Jul 2022 20:35:48 +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 eRTgtt4KVM00 for ; Wed, 20 Jul 2022 20:35:46 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=185.233.34.20; helo=outbound.soverin.net; envelope-from=context@boede.nl; receiver= Original-Received: from outbound.soverin.net (outbound.soverin.net [185.233.34.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 0EC952A3C54 for ; Wed, 20 Jul 2022 20:35:45 +0200 (CEST) Original-Received: from smtp.soverin.net (c04smtp-lb01.int.sover.in [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 4Lp4C51d6vzFc for ; Wed, 20 Jul 2022 18:35:45 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.99]) by soverin.net In-Reply-To: <3a22c838-4413-bd2b-bcd1-ef1cdbe45582@gmail.com> 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:115533 Archived-At: --Apple-Mail=_9818E333-2A6B-4B7E-BDF8-CEF0060E72C8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Wolfgang, Thanks for your respons! Tonight I prepared a simplified version of the issue. It appears, that = the header as I set it up in my previous mail works correclty on odd and = even pages. However the struggle is, that after setting up the header on = a odd page, there follows a table which is split over two pages. Now on = the even page there is no header. So the question is how to convince cld = to setup the header when the table is split =E2=80=A6. I attach my =E2=80=9Cminimal=E2=80=9D example, which shows the problem. Kind regards Willi= --Apple-Mail=_9818E333-2A6B-4B7E-BDF8-CEF0060E72C8 Content-Disposition: attachment; filename=test.tex Content-Type: application/octet-stream; x-unix-mode=0644; name="test.tex" Content-Transfer-Encoding: 7bit % Context file % filename: test.tex % How to setup a CLD as a doublsided docuemnt with headers on odd and even pages... \setuppagenumbering[alternative=doublesided] \setuplayout [topspace=15mm, backspace=15mm, width=150mm, height=middle] % the following lua-code is in the actual project in a separate lua file. \startluacode function year_of_monthtables(year) --in project: thirddata.diary for i= 1,4 do local monthname = string.lower(os.date ("%B",os.time{year=year,month=i,day=1})) context.setupheadertexts({ function() context("\\bf") context.labeltext(monthname) context("\\hfill") context(year) end}, {function() context("\\bf") context.labeltext(monthname) context("\\hfill") context(year) end}) context.strut() context.bTABLE({"split=yes"}) for day =1,50 do context.bTR() context.bTD() context("This is a test page") context.eTD() context.eTR() end context.eTABLE() context.page() end end \stopluacode \define[1]\Test{\ctxlua{year_of_monthtables(#1)}} \starttext \Test{2022} \stoptext --Apple-Mail=_9818E333-2A6B-4B7E-BDF8-CEF0060E72C8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 18 Jul 2022, at 22:05, Wolfgang Schuster via ntg-context = wrote: >=20 > Willi Egger via ntg-context schrieb am 16.07.2022 um 17:03: >> Hello! >>=20 >> I tried to setup a headertext in a context-lua-document. =E2=80=94 No = problem for the singlesided version, however hoe to pass the info for a = double sided version? >> Unfortunately the cld-mkiv manual contains an example for a = singlesided document. >>=20 >> It ried >>=20 >> context.setupheadertexts({ >> function() >> context("\\bf=E2=80=9D) >> context.labeltext(monthname) >> context("\\hfill=E2=80=9D) >> context(year) >> end}, >> {function() >> context("\\bf=E2=80=9D) >> context.labeltext(monthname) >> context("\\hfill=E2=80=9D) >> context(year) >> end}) >>=20 >> but this is apparently not the good approach. >>=20 >> Does someone of you have experience how to do this correctly? >=20 > What is the desired layout/content for the header? >=20 > You're using monthname and year in your example but do they come from, = a proper minimal example can help here. >=20 > Is it even necessary to set the header with Lua or can't you use a = regular TeX file and load it afterwards as environment file when you = process your document (context --environment=3Dmystyle.tex = mydocument.cld). >=20 > Wolfgang >=20 > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > maillist : ntg-context@ntg.nl / = https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > = __________________________________________________________________________= _________ --Apple-Mail=_9818E333-2A6B-4B7E-BDF8-CEF0060E72C8 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --Apple-Mail=_9818E333-2A6B-4B7E-BDF8-CEF0060E72C8--