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 <context@boede.nl>
Subject: Re: How to place "Content" and other chapter-level titles the same vertical distance from the top?
Date: Mon, 9 May 2022 12:04:28 +0200	[thread overview]
Message-ID: <35091E4A-8D44-4C1C-BE47-DBB4304A8DC4@boede.nl> (raw)
In-Reply-To: <1824062514.395281.1651978172584@mail.yahoo.com>

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
___________________________________________________________________________________

      parent reply	other threads:[~2022-05-09 10:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  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-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 message]

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=35091E4A-8D44-4C1C-BE47-DBB4304A8DC4@boede.nl \
    --to=ntg-context@ntg.nl \
    --cc=context@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).