From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107605 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: reduced space below chapter title Date: Wed, 3 Jun 2020 06:23:22 +0200 Message-ID: References: <07e5025e-2a5f-f621-3e1c-9b13090ec323@gmail.com> <91c898f0-8561-0730-e07f-d61c4b5182c7@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8469118255467499970==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="96486"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.17 Cc: mailing list for ConTeXt users To: jbf Original-X-From: ntg-context-bounces@ntg.nl Wed Jun 03 06:23:42 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jgKwH-000Oz9-R2 for gctc-ntg-context-518@m.gmane-mx.org; Wed, 03 Jun 2020 06:23:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F05F01847F7; Wed, 3 Jun 2020 06:23:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WqmOizLaPJNA; Wed, 3 Jun 2020 06:23:26 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 197BE1847EE; Wed, 3 Jun 2020 06:23:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EF6FE1847EE for ; Wed, 3 Jun 2020 06:23:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HrSJwc5v1vam for ; Wed, 3 Jun 2020 06:23:24 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.48; helo=mail-ed1-f48.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Original-Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 5E6A91847BD for ; Wed, 3 Jun 2020 06:23:24 +0200 (CEST) Original-Received: by mail-ed1-f48.google.com with SMTP id l1so542068ede.11 for ; Tue, 02 Jun 2020 21:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=BuhiBALEwB963xmpCfGES+0I8OfB8mzZAR0vpID7ywM=; b=Bw2MDiSV+yOWqrzhvLRfCN4pOa+hEhu2g17NqDY2UGyv4X8dwDly5V8sxGvTaXM9kZ jTHLSD4TyieaHiSFOr4tr1dQZ1DsbzpAkJBs7PaoHgKarLUI6QpxkxACrhlTFC22oJJs jxbRgfoiWSIzmVZzNauWwvCn2wif3nw9YxtOWiQjXh5Gifgd/YGWqjuyOi9/Idy3LitB y0xwjO6hJjssGpk8G6W0fwSU+DWCq4tYQH16n+ZcY7kIBjAt8FagXMTDMABfrcMRt4XZ blXO6Ubiq1W6uhVG8J7G4n/6PUHAQcEYpyXQ1T9afdZJinlPdotOnpEomDIKfyDflDIy Ok5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=BuhiBALEwB963xmpCfGES+0I8OfB8mzZAR0vpID7ywM=; b=bfZhlEHIRIBhTgPU635h6HJESi6mvd5cV1WP48OitUBUnz2dme+4AG9kSyZvWbRAoL F4XC5wud2JOruG6n5lwW91hl282iWOylhzKAPLucJnp2vIV3ryESGW0rykiRkF7Uksqb B6TnKWrv/qoZ3ZVRYyWfm+Gp5BNzzHP82naPxQ5j6bVk+0x/5yWqNr6L/rtltoUo5TzS mKIpICxcA8qCmV61wbNltcjbnYwRV3u6M6K9FUhH30r14B9WRYnTW7Edb2c7DUpqejYi ta1b7JthD2RziY0kxWviWFCcBTo1NKtN2tSSbxAgcRHD+29htAaWkmfXVcrX3V03b9Wz qiHg== X-Gm-Message-State: AOAM531SzXFQpvnLEZKf+xHRjlO2Ec7+E+iedE6gAiSbMxOUhEAm/hQz 05ylEdJU11ybPeRkVQIPxgKFS8Od X-Google-Smtp-Source: ABdhPJzE5pfNucvd4s5ogXbBLt6wxuPP177bpMORHQtF5mC7GJ9Ip292KWYfQmGHcQLd+gAYNwCJFg== X-Received: by 2002:a50:ec0f:: with SMTP id g15mr22085993edr.359.1591158203696; Tue, 02 Jun 2020 21:23:23 -0700 (PDT) Original-Received: from [192.168.1.6] (x5f75035b.dyn.telefonica.de. [95.117.3.91]) by smtp.gmail.com with ESMTPSA id rp21sm451722ejb.97.2020.06.02.21.23.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2020 21:23:23 -0700 (PDT) In-Reply-To: <91c898f0-8561-0730-e07f-d61c4b5182c7@gmail.com> Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:107605 Archived-At: This is a multi-part message in MIME format. --===============8469118255467499970== Content-Type: multipart/alternative; boundary="------------04D0F060ED65B706F2C5DFD9" Content-Language: en-US This is a multi-part message in MIME format. --------------04D0F060ED65B706F2C5DFD9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------04D0F060ED65B706F2C5DFD9 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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

--------------04D0F060ED65B706F2C5DFD9-- --===============8469118255467499970== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8469118255467499970==--