ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to place "Content" and other chapter-level titles the same vertical distance from the top?
       [not found] <1824062514.395281.1651978172584.ref@mail.yahoo.com>
@ 2022-05-08  2:49 ` Joel via ntg-context
  2022-05-08  7:24   ` Denis Maier via ntg-context
  2022-05-09 10:04   ` Willi Egger via ntg-context
  0 siblings, 2 replies; 7+ messages in thread
From: Joel via ntg-context @ 2022-05-08  2:49 UTC (permalink / raw)
  To: ntg-context; +Cc: Joel


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

I created a chapter title style with a large number telling the chapter number, and below it the title of the chapter.
It looks like this:
---------------------        1               <--really big chapter number=========== <-- there is a border created by a background image between these
    How to keep  <--chapter title
    fish
This is the article <-- the article begins
about how to keepfish ---------------------

\definefontsize[a]%
\definefontsize[b]%
\definefontsize[c]%
\definefontsize[l]%
\setupbodyfontenvironment[default]%
    [%
        a=1.200,
        b=1.440,
        c=1.728,
        l=8.916
    ]%
%

\setuplabeltext[chapter=\strut]
\setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
numbercommand=\groupedcommand{}{\blank[1cm]},
alternative=middle,
numberstyle=ssl,
numbercolor=green,
strut=yes]

\starttext

    \completecontent
    
    \chapter{Test}
        \input knuth

    \chapter{Test}
        \input knuth

\stoptext
The problem I'm facing, is anytime a chapter title is called, such as "Content" in complete content, or something in the appendix, such as one of the indexes, no number is printed above, so the vertical distance from the top of the page to the top of the chapter title changes. I need these to be consistent, as there is a background image, with vertical lines.
Basically, if I call \chapter{}, it appears perfectly aligned vertically on the page, with no other settings. But when calling \completecontent or a similar title that won't get a number, because the number isn't placed, it is vertically higher on the page, but I need it to be printed the same height, as it it had an invisible number.
I've tried adding strut (the code has it in two places), but don't know if I've used it appropriately, and it didn't solve the problem.
--Joel

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

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

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to place "Content" and other chapter-level titles the same vertical distance from the top?
  2022-05-08  2:49 ` How to place "Content" and other chapter-level titles the same vertical distance from the top? Joel via ntg-context
@ 2022-05-08  7:24   ` Denis Maier via ntg-context
  2022-05-08  7:27     ` Denis Maier via ntg-context
  2022-05-09 10:04   ` Willi Egger via ntg-context
  1 sibling, 1 reply; 7+ messages in thread
From: Denis Maier via ntg-context @ 2022-05-08  7:24 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier

Maybe define your own chapter command and use a vbox.
Look at this example from the wiki:

\setuppapersize[A6][A6]
\setupbodyfont[8pt]
\def\MyChapterCommand#1#2%
  {\vbox to 4cm\bgroup
     {#1\hskip.75em #2}
     \vss
     \egroup}
\setuphead[chapter][header=nomarking, command=\MyChapterCommand]
\starttext
\chapter{test} \input tufte
\stoptext

That's not exactly what you want, but you can adapt it.

Denis
________________________________________
Von: ntg-context <ntg-context-bounces@ntg.nl> im Auftrag von Joel via ntg-context <ntg-context@ntg.nl>
Gesendet: Sonntag, 8. Mai 2022 04:49:32
An: ntg-context@ntg.nl
Cc: Joel
Betreff: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?

I created a chapter title style with a large number telling the chapter number, and below it the title of the chapter.

It looks like this:

---------------------
        1               <--really big chapter number
=========== <-- there is a border created by a background image between these
    How to keep  <--chapter title
    fish

This is the article <-- the article begins
about how to keep
fish
---------------------

\definefontsize[a]%
\definefontsize[b]%
\definefontsize[c]%
\definefontsize[l]%
\setupbodyfontenvironment[default]%
    [%
        a=1.200,
        b=1.440,
        c=1.728,
        l=8.916
    ]%
%

\setuplabeltext[chapter=\strut]
\setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
numbercommand=\groupedcommand{}{\blank[1cm]},
alternative=middle,
numberstyle=ssl,
numbercolor=green,
strut=yes]

\starttext

    \completecontent

    \chapter{Test}
        \input knuth

    \chapter{Test}
        \input knuth

\stoptext

The problem I'm facing, is anytime a chapter title is called, such as "Content" in complete content, or something in the appendix, such as one of the indexes, no number is printed above, so the vertical distance from the top of the page to the top of the chapter title changes. I need these to be consistent, as there is a background image, with vertical lines.

Basically, if I call \chapter{}, it appears perfectly aligned vertically on the page, with no other settings. But when calling \completecontent or a similar title that won't get a number, because the number isn't placed, it is vertically higher on the page, but I need it to be printed the same height, as it it had an invisible number.

I've tried adding strut (the code has it in two places), but don't know if I've used it appropriately, and it didn't solve the problem.

--Joel
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to place "Content" and other chapter-level titles the same vertical distance from the top?
  2022-05-08  7:24   ` Denis Maier via ntg-context
@ 2022-05-08  7:27     ` Denis Maier via ntg-context
  2022-05-09  7:45       ` Denis Maier via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: Denis Maier via ntg-context @ 2022-05-08  7:27 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier

Or change the setup of unnumbered chapter titles...
Add a forced blank before there.

Denis


________________________________________
Von: Maier, Denis Christian (UB)
Gesendet: Sonntag, 8. Mai 2022 09:24:51
An: mailing list for ConTeXt users
Cc: Joel
Betreff: AW: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?

Maybe define your own chapter command and use a vbox.
Look at this example from the wiki:

\setuppapersize[A6][A6]
\setupbodyfont[8pt]
\def\MyChapterCommand#1#2%
  {\vbox to 4cm\bgroup
     {#1\hskip.75em #2}
     \vss
     \egroup}
\setuphead[chapter][header=nomarking, command=\MyChapterCommand]
\starttext
\chapter{test} \input tufte
\stoptext

That's not exactly what you want, but you can adapt it.

Denis
________________________________________
Von: ntg-context <ntg-context-bounces@ntg.nl> im Auftrag von Joel via ntg-context <ntg-context@ntg.nl>
Gesendet: Sonntag, 8. Mai 2022 04:49:32
An: ntg-context@ntg.nl
Cc: Joel
Betreff: [NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?

I created a chapter title style with a large number telling the chapter number, and below it the title of the chapter.

It looks like this:

---------------------
        1               <--really big chapter number
=========== <-- there is a border created by a background image between these
    How to keep  <--chapter title
    fish

This is the article <-- the article begins
about how to keep
fish
---------------------

\definefontsize[a]%
\definefontsize[b]%
\definefontsize[c]%
\definefontsize[l]%
\setupbodyfontenvironment[default]%
    [%
        a=1.200,
        b=1.440,
        c=1.728,
        l=8.916
    ]%
%

\setuplabeltext[chapter=\strut]
\setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
numbercommand=\groupedcommand{}{\blank[1cm]},
alternative=middle,
numberstyle=ssl,
numbercolor=green,
strut=yes]

\starttext

    \completecontent

    \chapter{Test}
        \input knuth

    \chapter{Test}
        \input knuth

\stoptext

The problem I'm facing, is anytime a chapter title is called, such as "Content" in complete content, or something in the appendix, such as one of the indexes, no number is printed above, so the vertical distance from the top of the page to the top of the chapter title changes. I need these to be consistent, as there is a background image, with vertical lines.

Basically, if I call \chapter{}, it appears perfectly aligned vertically on the page, with no other settings. But when calling \completecontent or a similar title that won't get a number, because the number isn't placed, it is vertically higher on the page, but I need it to be printed the same height, as it it had an invisible number.

I've tried adding strut (the code has it in two places), but don't know if I've used it appropriately, and it didn't solve the problem.

--Joel
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to place "Content" and other chapter-level titles the same vertical distance from the top?
  2022-05-08  7:27     ` Denis Maier via ntg-context
@ 2022-05-09  7:45       ` Denis Maier via ntg-context
  2022-05-09  7:48         ` Taco Hoekwater via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: Denis Maier via ntg-context @ 2022-05-09  7:45 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier

This example from the wiki does not run anymore with LMTX:
You get the error message:
I've run across a '}' that doesn't seem to match anything. For example,
'\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just
inserted will cause me to report a runaway argument that might be the root of the
problem.

Maybe some expansion thing. Don't know, but consider this :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setuppapersize[A6][A6] 
\setupbodyfont[8pt] 
\define[2]\MyChapterCommand{#1 #2} % does work
%\def\MyChapterCommand#1#2{#1 #2} % does not work
\setuphead[chapter][ 
        command=\MyChapterCommand, 
        ] 
\starttext 
\startchapter{test} 
\input tufte 
\stopchapter 
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

So, this here should get you started:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\showframe
\setuppapersize[A6][A6]
\setupbodyfont[8pt]
\define[2]\MyChapterCommand%
  {\vbox to 15mm\bgroup
    \vss
    {#1\blank #2}
    \egroup}
\define[1]\MyTitleCommand%
  {\vbox to 15mm\bgroup
    \vss
    {#1}
    \egroup}
                
\setuphead[chapter][command=\MyChapterCommand]
\setuphead[title][command=\MyTitleCommand]
\starttext
\chapter{test} \input tufte
\title{test} \input tufte
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I bet there are easier solutions, maybe use framed instead of vbox.

Denis

 
> 
> ________________________________________
> Von: Maier, Denis Christian (UB)
> Gesendet: Sonntag, 8. Mai 2022 09:24:51
> An: mailing list for ConTeXt users
> Cc: Joel
> Betreff: AW: [NTG-context] How to place "Content" and other chapter-level
> titles the same vertical distance from the top?
> 
> Maybe define your own chapter command and use a vbox.
> Look at this example from the wiki:
> 
> \setuppapersize[A6][A6]
> \setupbodyfont[8pt]
> \def\MyChapterCommand#1#2%
>   {\vbox to 4cm\bgroup
>      {#1\hskip.75em #2}
>      \vss
>      \egroup}
> \setuphead[chapter][header=nomarking, command=\MyChapterCommand]
> \starttext \chapter{test} \input tufte \stoptext
> 
> That's not exactly what you want, but you can adapt it.
> 
> Denis
> ________________________________________
> Von: ntg-context <ntg-context-bounces@ntg.nl> im Auftrag von Joel via ntg-
> context <ntg-context@ntg.nl>
> Gesendet: Sonntag, 8. Mai 2022 04:49:32
> An: ntg-context@ntg.nl
> Cc: Joel
> Betreff: [NTG-context] How to place "Content" and other chapter-level titles
> the same vertical distance from the top?
> 
> I created a chapter title style with a large number telling the chapter number,
> and below it the title of the chapter.
> 
> It looks like this:
> 
> ---------------------
>         1               <--really big chapter number
> =========== <-- there is a border created by a background image between
> these
>     How to keep  <--chapter title
>     fish
> 
> This is the article <-- the article begins about how to keep fish
> ---------------------
> 
> \definefontsize[a]%
> \definefontsize[b]%
> \definefontsize[c]%
> \definefontsize[l]%
> \setupbodyfontenvironment[default]%
>     [%
>         a=1.200,
>         b=1.440,
>         c=1.728,
>         l=8.916
>     ]%
> %
> 
> \setuplabeltext[chapter=\strut]
> \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
> numbercommand=\groupedcommand{}{\blank[1cm]},
> alternative=middle,
> numberstyle=ssl,
> numbercolor=green,
> strut=yes]
> 
> \starttext
> 
>     \completecontent
> 
>     \chapter{Test}
>         \input knuth
> 
>     \chapter{Test}
>         \input knuth
> 
> \stoptext
> 
> The problem I'm facing, is anytime a chapter title is called, such as "Content"
> in complete content, or something in the appendix, such as one of the
> indexes, no number is printed above, so the vertical distance from the top of
> the page to the top of the chapter title changes. I need these to be
> consistent, as there is a background image, with vertical lines.
> 
> Basically, if I call \chapter{}, it appears perfectly aligned vertically on the
> page, with no other settings. But when calling \completecontent or a similar
> title that won't get a number, because the number isn't placed, it is vertically
> higher on the page, but I need it to be printed the same height, as it it had an
> invisible number.
> 
> I've tried adding strut (the code has it in two places), but don't know if I've
> used it appropriately, and it didn't solve the problem.
> 
> --Joel
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to place "Content" and other chapter-level titles the same vertical distance from the top?
  2022-05-09  7:45       ` Denis Maier via ntg-context
@ 2022-05-09  7:48         ` Taco Hoekwater via ntg-context
  2022-05-09  7:51           ` Denis Maier via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater via ntg-context @ 2022-05-09  7:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater



> On 9 May 2022, at 09:45, Denis Maier via ntg-context <ntg-context@ntg.nl> wrote:
> 
> This example from the wiki does not run anymore with LMTX:

Still worked ok in:  ConTeXt  ver: 2022.04.19 19:53 LMTX

> You get the error message:
> I've run across a '}' that doesn't seem to match anything. For example,
> '\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just
> inserted will cause me to report a runaway argument that might be the root of the
> problem.
> 
> Maybe some expansion thing. Don't know, but consider this :
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \setuppapersize[A6][A6] 
> \setupbodyfont[8pt] 
> \define[2]\MyChapterCommand{#1 #2} % does work
> %\def\MyChapterCommand#1#2{#1 #2} % does not work
> \setuphead[chapter][ 
>        command=\MyChapterCommand, 
>        ] 
> \starttext 
> \startchapter{test} 
> \input tufte 
> \stopchapter 
> \stoptext
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
> So, this here should get you started:
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
> \showframe
> \setuppapersize[A6][A6]
> \setupbodyfont[8pt]
> \define[2]\MyChapterCommand%
>  {\vbox to 15mm\bgroup
>    \vss
>    {#1\blank #2}
>    \egroup}
> \define[1]\MyTitleCommand%
>  {\vbox to 15mm\bgroup
>    \vss
>    {#1}
>    \egroup}
> 
> \setuphead[chapter][command=\MyChapterCommand]
> \setuphead[title][command=\MyTitleCommand]
> \starttext
> \chapter{test} \input tufte
> \title{test} \input tufte
> \stoptext
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
> I bet there are easier solutions, maybe use framed instead of vbox.
> 
> Denis
> 
> 
>> 
>> ________________________________________
>> Von: Maier, Denis Christian (UB)
>> Gesendet: Sonntag, 8. Mai 2022 09:24:51
>> An: mailing list for ConTeXt users
>> Cc: Joel
>> Betreff: AW: [NTG-context] How to place "Content" and other chapter-level
>> titles the same vertical distance from the top?
>> 
>> Maybe define your own chapter command and use a vbox.
>> Look at this example from the wiki:
>> 
>> \setuppapersize[A6][A6]
>> \setupbodyfont[8pt]
>> \def\MyChapterCommand#1#2%
>>  {\vbox to 4cm\bgroup
>>     {#1\hskip.75em #2}
>>     \vss
>>     \egroup}
>> \setuphead[chapter][header=nomarking, command=\MyChapterCommand]
>> \starttext \chapter{test} \input tufte \stoptext
>> 
>> That's not exactly what you want, but you can adapt it.
>> 
>> Denis
>> ________________________________________
>> Von: ntg-context <ntg-context-bounces@ntg.nl> im Auftrag von Joel via ntg-
>> context <ntg-context@ntg.nl>
>> Gesendet: Sonntag, 8. Mai 2022 04:49:32
>> An: ntg-context@ntg.nl
>> Cc: Joel
>> Betreff: [NTG-context] How to place "Content" and other chapter-level titles
>> the same vertical distance from the top?
>> 
>> I created a chapter title style with a large number telling the chapter number,
>> and below it the title of the chapter.
>> 
>> It looks like this:
>> 
>> ---------------------
>>        1               <--really big chapter number
>> =========== <-- there is a border created by a background image between
>> these
>>    How to keep  <--chapter title
>>    fish
>> 
>> This is the article <-- the article begins about how to keep fish
>> ---------------------
>> 
>> \definefontsize[a]%
>> \definefontsize[b]%
>> \definefontsize[c]%
>> \definefontsize[l]%
>> \setupbodyfontenvironment[default]%
>>    [%
>>        a=1.200,
>>        b=1.440,
>>        c=1.728,
>>        l=8.916
>>    ]%
>> %
>> 
>> \setuplabeltext[chapter=\strut]
>> \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
>> numbercommand=\groupedcommand{}{\blank[1cm]},
>> alternative=middle,
>> numberstyle=ssl,
>> numbercolor=green,
>> strut=yes]
>> 
>> \starttext
>> 
>>    \completecontent
>> 
>>    \chapter{Test}
>>        \input knuth
>> 
>>    \chapter{Test}
>>        \input knuth
>> 
>> \stoptext
>> 
>> The problem I'm facing, is anytime a chapter title is called, such as "Content"
>> in complete content, or something in the appendix, such as one of the
>> indexes, no number is printed above, so the vertical distance from the top of
>> the page to the top of the chapter title changes. I need these to be
>> consistent, as there is a background image, with vertical lines.
>> 
>> Basically, if I call \chapter{}, it appears perfectly aligned vertically on the
>> page, with no other settings. But when calling \completecontent or a similar
>> title that won't get a number, because the number isn't placed, it is vertically
>> higher on the page, but I need it to be printed the same height, as it it had an
>> invisible number.
>> 
>> I've tried adding strut (the code has it in two places), but don't know if I've
>> used it appropriately, and it didn't solve the problem.
>> 
>> --Joel
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

— 
Taco Hoekwater              E: taco@bittext.nl
genderfluid (all pronouns)



___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to place "Content" and other chapter-level titles the same vertical distance from the top?
  2022-05-09  7:48         ` Taco Hoekwater via ntg-context
@ 2022-05-09  7:51           ` Denis Maier via ntg-context
  0 siblings, 0 replies; 7+ messages in thread
From: Denis Maier via ntg-context @ 2022-05-09  7:51 UTC (permalink / raw)
  To: taco, ntg-context; +Cc: denis.maier

> -----Ursprüngliche Nachricht-----
> Von: Taco Hoekwater <taco@bittext.nl>
> Gesendet: Montag, 9. Mai 2022 09:48
> An: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Cc: Maier, Denis Christian (UB) <denis.maier@unibe.ch>
> Betreff: Re: [NTG-context] How to place "Content" and other chapter-level
> titles the same vertical distance from the top?
> 
> 
> 
> > On 9 May 2022, at 09:45, Denis Maier via ntg-context <ntg-
> context@ntg.nl> wrote:
> >
> > This example from the wiki does not run anymore with LMTX:
> 
> Still worked ok in:  ConTeXt  ver: 2022.04.19 19:53 LMTX

Or better yet, works again in current LMTX versions. (Looks like I need to update again.) 

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to place "Content" and other chapter-level titles the same vertical distance from the top?
  2022-05-08  2:49 ` How to place "Content" and other chapter-level titles the same vertical distance from the top? Joel via ntg-context
  2022-05-08  7:24   ` Denis Maier via ntg-context
@ 2022-05-09 10:04   ` Willi Egger via ntg-context
  1 sibling, 0 replies; 7+ messages in thread
From: Willi Egger via ntg-context @ 2022-05-09 10:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

Hi Joel,

I think you can achieve what you want by using \placelist[chapter,section] instead of \completecontent. Then you can start the TOC by \startchapter[Content] \placelist…. \stopchapter. The same approach can be used for other lists/indexes.

Kind regards

Willli

> On 8 May 2022, at 04:49, Joel via ntg-context <ntg-context@ntg.nl> wrote:
> 
> I created a chapter title style with a large number telling the chapter number, and below it the title of the chapter.
> 
> It looks like this:
> 
> ---------------------
>        1               <--really big chapter number
> =========== <-- there is a border created by a background image between these
>    How to keep  <--chapter title
>    fish
> 
> This is the article <-- the article begins
> about how to keep
> fish
> ---------------------
> 
> \definefontsize[a]%
> \definefontsize[b]%
> \definefontsize[c]%
> \definefontsize[l]%
> \setupbodyfontenvironment[default]%
>    [%
>        a=1.200,
>        b=1.440,
>        c=1.728,
>        l=8.916
>    ]%
> %
> 
> \setuplabeltext[chapter=\strut]
> \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
> numbercommand=\groupedcommand{}{\blank[1cm]},
> alternative=middle,
> numberstyle=ssl,
> numbercolor=green,
> strut=yes]
> 
> \starttext
> 
>    \completecontent
> 
>    \chapter{Test}
>        \input knuth
> 
>    \chapter{Test}
>        \input knuth
> 
> \stoptext
> 
> The problem I'm facing, is anytime a chapter title is called, such as "Content" in complete content, or something in the appendix, such as one of the indexes, no number is printed above, so the vertical distance from the top of the page to the top of the chapter title changes. I need these to be consistent, as there is a background image, with vertical lines.
> 
> Basically, if I call \chapter{}, it appears perfectly aligned vertically on the page, with no other settings. But when calling \completecontent or a similar title that won't get a number, because the number isn't placed, it is vertically higher on the page, but I need it to be printed the same height, as it it had an invisible number.
> 
> I've tried adding strut (the code has it in two places), but don't know if I've used it appropriately, and it didn't solve the problem.
> 
> --Joel
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2022-05-09 10:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1824062514.395281.1651978172584.ref@mail.yahoo.com>
2022-05-08  2:49 ` How to place "Content" and other chapter-level titles the same vertical distance from the top? Joel via ntg-context
2022-05-08  7:24   ` Denis Maier via ntg-context
2022-05-08  7:27     ` Denis Maier via ntg-context
2022-05-09  7:45       ` Denis Maier via ntg-context
2022-05-09  7:48         ` Taco Hoekwater via ntg-context
2022-05-09  7:51           ` Denis Maier via ntg-context
2022-05-09 10:04   ` Willi Egger via ntg-context

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