ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Thomas Meyer <thomasgmeyer@t-online.de>
Subject: [NTG-context] Re: Headertext
Date: Tue, 26 Mar 2024 17:12:18 +0100	[thread overview]
Message-ID: <38c66540-ca60-5860-6b90-abeb3106088a@gmail.com> (raw)
In-Reply-To: <5c52560c-a94e-4691-8a4a-c597e174cb42@t-online.de>

Thomas Meyer schrieb am 26.03.2024 um 16:28:
> Hi folks,
> 
> I know, with
> 
> \setuphead[chapter][header=high]
> 
> I can suppress the header text on the first page. But what can I do if I 
> still want to have part of the header text on the first page?
> Is there something I can do with \definetext and if so, how?

When you use "header=high" you can't have a header because the block for 
it no longer exists, compare the results for "header=high" and 
"header=empty" in the following example.

%%%% begin example
\showframe

\starttext

\setuphead[chapter][header=high]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\setuphead[chapter][header=empty]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\stoptext
%%%% end example

As you have guessed \definetext is the way to create a custom header for 
the first page of your \chapter, the command has like \setupheadertexts 
a variable number of arguments.

The third argument with the horizontal position can only be used when 
you use two or four arguments to set texts on the left and right side 
but isn't in my example because a) the text position is the default and 
b) I pass only one argument for the content because I wan't the text in 
the middle.

%%%% begin example
\showframe

\definetext
   [chapterheader] % identifier
   [header]        % vertical position (header/footer)
% [text]          % horizontal position (text/margin)
   [This is a custom header for \tex{chapter}] % content

\setuphead[chapter][header=chapterheader]

\starttext

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\stoptext
%%%% end example

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2024-03-26 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 15:28 [NTG-context] Headertext Thomas Meyer
2024-03-26 16:12 ` Wolfgang Schuster [this message]
2024-03-27  8:27   ` [NTG-context] Headertext Thomas Meyer
2024-03-27 10:14   ` Henning Hraban Ramm

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=38c66540-ca60-5860-6b90-abeb3106088a@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=thomasgmeyer@t-online.de \
    /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).