[NTG-context] Struggling with cld document...

Willi Egger context at boede.nl
Thu Dec 22 23:23:01 CET 2011


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?

Thank you

Willi
On 22 Dec 2011, at 22:38, Wolfgang Schuster wrote:

> 
> Am 22.12.2011 um 22:31 schrieb Willi Egger:
> 
>> Hello all,
>> 
>> While preparing a cld-document I need to setup the headertexts on each new page. I tried to do this with the following code:
>> 
>> \setuplayout
>> 	[topspace=2.5cm,
>> 	backspace=1.5cm,
>> 	header=40pt,
>> 	footer=20ptpt,
>> 	height=middle,
>> 	width=middle]
>> 
>> \setuppagenumbering[location=footer]
>> %\showframe
>> \startluacode
>> function myheadertext(s)
>>    context.setupheadertexts{context(s)} --context.labeltext(s)
>> end   
>> \stopluacode
> 
> \startluacode
> function documentdata.myheadertext(s)
>    context.setupheadertexts{s}
> end   
> \stopluacode
> 
>> \starttext
>> \ctxluamyheadertext{"Headertext"}}
> 
> String are passed with braces.
> 
> \ctxlua{documentdata.myheadertext("Headertext")}
> 
> Wolfgang
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at 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
> ___________________________________________________________________________________



More information about the ntg-context mailing list