From: Willi Egger via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Willi Egger <w.egger@boede.nl>
Subject: CLD setupheadertexts
Date: Thu, 25 Aug 2022 19:32:10 +0200 [thread overview]
Message-ID: <27FD2817-947B-418F-9961-A2D702823558@boede.nl> (raw)
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
Hello!
I have a ConTeXt Lua Document where I need to have headertexts.
When running the enclosed file I get 6 pages where only page 1 and 2 have header texts and the others none. — Why is that?
Thanks for hints!
Kind regards
Willi
[-- Attachment #2: Test-headertexts.pdf --]
[-- Type: application/pdf, Size: 16577 bytes --]
[-- Attachment #3: Test-headertexts.tex --]
[-- Type: application/octet-stream, Size: 1283 bytes --]
% Context file
% Filename: Test-headertexts.tex
%
% 25-08-2022
\setuppagenumbering[alternative=doublesided,location=footer]
\setuppapersize[A5][A5]
\setuplayout
[topspace=.6cm,
backspace=1.5cm,
header=2\bodyfontsize,
headerdistance=.5\bodyfontsize,
footer=1.2\bodyfontsize,
footerdistance=.5\bodyfontsize,
margin=0pt,
height=middle,
width=middle,
location=middle]
\startluacode
thirddata = thirddata or { }
thirddata.diary = { }
local diary = thirddata.diary
local report = logs.reporter("Test")
function thirddata.diary.blocks(year)
report("Working in function: diary.blocks")
for i= 1,2 do
local monthname = string.lower(os.date
("%B",os.time{year=year,month=i,day=1}))
context.strut()
context.setupheadertexts(
{function()
context("\\bf")
context(monthname)
end},
{function()
context(year)
end},
{function()
context("\\bf")
context(monthname)
end},
{function()
context(year)
end})
for i = 1,20 do
context.input("ward")
context.crlf()
end
end
end
\stopluacode
\define[1]\Test{\ctxlua{thirddata.diary.blocks(#1)}}
\starttext
\strut
\Test{2022}
\stoptext
[-- Attachment #4: Type: text/plain, Size: 496 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
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
___________________________________________________________________________________
next reply other threads:[~2022-08-25 17:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 17:32 Willi Egger via ntg-context [this message]
2022-08-25 17:45 ` Hans Hagen via ntg-context
2022-08-25 17:56 ` Willi Egger via ntg-context
2022-08-25 18:48 ` Willi Egger via ntg-context
-- strict thread matches above, loose matches on Subject: below --
2011-12-24 10:10 CLD: setupheadertexts Willi Egger
2011-12-24 11:02 ` Wolfgang Schuster
2011-12-24 13:32 ` Willi Egger
2011-12-24 14:25 ` Wolfgang Schuster
2011-12-24 17:09 ` Willi Egger
2011-12-25 9:21 ` Wolfgang Schuster
2011-12-26 12:49 ` Willi Egger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27FD2817-947B-418F-9961-A2D702823558@boede.nl \
--to=ntg-context@ntg.nl \
--cc=w.egger@boede.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).