ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Headertext
@ 2024-03-26 15:28 Thomas Meyer
  2024-03-26 16:12 ` [NTG-context] Headertext Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Meyer @ 2024-03-26 15:28 UTC (permalink / raw)
  To: ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 293 bytes --]

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?

Thanks for any help
Greetings Thomas

[-- Attachment #1.2: Type: text/html, Size: 595 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: Headertext
  2024-03-26 15:28 [NTG-context] Headertext Thomas Meyer
@ 2024-03-26 16:12 ` Wolfgang Schuster
  2024-03-27  8:27   ` Thomas Meyer
  2024-03-27 10:14   ` Henning Hraban Ramm
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2024-03-26 16:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Thomas Meyer

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: Headertext
  2024-03-26 16:12 ` [NTG-context] Headertext Wolfgang Schuster
@ 2024-03-27  8:27   ` Thomas Meyer
  2024-03-27 10:14   ` Henning Hraban Ramm
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Meyer @ 2024-03-27  8:27 UTC (permalink / raw)
  To: Wolfgang Schuster, mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1507 bytes --]

Thank you, Wolfgang,

that's exactly what I wanted.

Greetings
Thomas

Am 26.03.24 um 17:12 schrieb Wolfgang Schuster:
> 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 

[-- Attachment #1.2: Type: text/html, Size: 2494 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: Headertext
  2024-03-26 16:12 ` [NTG-context] Headertext Wolfgang Schuster
  2024-03-27  8:27   ` Thomas Meyer
@ 2024-03-27 10:14   ` Henning Hraban Ramm
  1 sibling, 0 replies; 4+ messages in thread
From: Henning Hraban Ramm @ 2024-03-27 10:14 UTC (permalink / raw)
  To: ntg-context

Am 26.03.24 um 17:12 schrieb Wolfgang Schuster:
> %%%% 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]

Thank you, I added that to https://wiki.contextgarden.net/Command/definetext

Hraban

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-27 10:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 15:28 [NTG-context] Headertext Thomas Meyer
2024-03-26 16:12 ` [NTG-context] Headertext Wolfgang Schuster
2024-03-27  8:27   ` Thomas Meyer
2024-03-27 10:14   ` Henning Hraban Ramm

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).