From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Struggling with cld document...
Date: Thu, 22 Dec 2011 23:36:57 +0100 [thread overview]
Message-ID: <02D5AB06-17DA-4DF9-8DD3-51D7A70B8F9E@googlemail.com> (raw)
In-Reply-To: <732B304F-FBC8-4D5E-938E-9314F479672C@boede.nl>
Am 22.12.2011 um 23:23 schrieb Willi Egger:
> Hi Wolfgang,
>
>
> thank you very much for your reply.
>
> This works but I am still not there. I need to use this construct with context.labeltext()
> So do you know how to achieve the context.setupheadertext with the context.labeltext() as its argument?
You need “function() … end” around the inner content, it’s explained in the cld manual.
\setuppagenumbering[location=footer]
\setuplabeltext[en][willi=Willi Egger]
\startluacode
function documentdata.myheadertext(s)
context.setupheadertexts{ function()
context.labeltext("willi")
-- context.space()
context(": ")
context(s)
end }
end
\stopluacode
\ctxlua{documentdata.myheadertext("Headertext")}
\starttext
\input knuth
\stoptext
Wolfgang
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2011-12-22 22:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 21:31 Willi Egger
2011-12-22 21:38 ` Wolfgang Schuster
2011-12-22 22:23 ` Willi Egger
2011-12-22 22:36 ` Wolfgang Schuster [this message]
2011-12-23 21:05 ` 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=02D5AB06-17DA-4DF9-8DD3-51D7A70B8F9E@googlemail.com \
--to=schuster.wolfgang@googlemail.com \
--cc=ntg-context@ntg.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).