ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: jbf <roma83537@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: reduced space below chapter title
Date: Wed, 3 Jun 2020 06:23:22 +0200	[thread overview]
Message-ID: <cddc32f6-c78b-23d5-1e00-8ffb1ba430d2@gmail.com> (raw)
In-Reply-To: <91c898f0-8561-0730-e07f-d61c4b5182c7@gmail.com>


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

jbf schrieb am 03.06.2020 um 01:21:
>
> Thanks Wolfgang. Clearly that fixes the problem. I also came up with 
> another solution which avoids the need to define a MyChapterCommand, 
> by first setting up the normal chapter as:
>
> \setuphead
>   [chapter]
> [header=empty,alternative=middle,style=bold,numbercommand=\groupedcommand{}{\blank[2cm]},after={\blank[3cm]}]
>
> and then setting up a mychapter as:
>
> \definehead[mychapter][chapter]
>
> \setuphead[mychapter][header=empty,alternative=middle,style=bold,numbercommand=\groupedcommand{}{\blank[2cm]},after={\blank[.5cm]}]
>
> That gives me the result I am after as well as maintaining the style 
> of the standard chapter head.
>

You can add a check for odd/even chapter numbers and use only a single 
command.

\startsetups[chapter:after]
   \ifodd\namedheadnumber{chapter}
     \blank[4cm]
   \else
     \blank[1cm]
   \fi
\stopsetups

\setuphead
   [chapter]
   [after=\directsetup{chapter:after}]

% \setuphead
%   [title]
%   [after={\blank[...]}]

\starttext

\dorecurse{10}
   {\chapter{Chapter #1}
    \input knuth}

\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1727 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
___________________________________________________________________________________

      reply	other threads:[~2020-06-03  4:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02  9:41 jbf
2020-06-02 14:58 ` Wolfgang Schuster
2020-06-02 23:21   ` jbf
2020-06-03  4:23     ` Wolfgang Schuster [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=cddc32f6-c78b-23d5-1e00-8ffb1ba430d2@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=roma83537@gmail.com \
    /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).