ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
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: Re: CLD setupheadertexts
Date: Thu, 25 Aug 2022 19:56:11 +0200	[thread overview]
Message-ID: <53A17BB6-7E46-4B3C-A625-BA6ED505E0D6@boede.nl> (raw)
In-Reply-To: <5c3d65c9-a9d6-e032-362f-b49b9d45527d@freedom.nl>

Hans! Thank you so much for your help and quick answer. Indeed now all header texts appear as expected :-)

I will wikify this of course!

Kind regards

Willi

> On 25 Aug 2022, at 19:45, Hans Hagen <j.hagen@freedom.nl> wrote:
> 
> On 8/25/2022 7:32 PM, Willi Egger via ntg-context wrote:
>> 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!
> you use a function but headertexts are not frozen which meand that you need to do this:
> 
> 	context.setupheadertexts(
>            {
>                function()
>                    context("\\bf")
>                    context(monthname)
>                    return true
>                end
>            },
>            {
>                function()
>                    context(year)
>                    return true
>                end
>            },
> 	  		{
>                function()
>                    context("\\bf")
>                    context(monthname)
>                    return true
>                end
>            },
>            {
>                function()
>                    context(year)
>                    return true
>                end
>            }
>        )
> 
> the "return true" makes sure that the function stays around
> 
> I'm sure that you will wikify this ...
> 
> Hans
> 
> 
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2022-08-25 17:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 17:32 Willi Egger via ntg-context
2022-08-25 17:45 ` Hans Hagen via ntg-context
2022-08-25 17:56   ` Willi Egger via ntg-context [this message]
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=53A17BB6-7E46-4B3C-A625-BA6ED505E0D6@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).