From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107603 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: jbf Newsgroups: gmane.comp.tex.context Subject: Re: reduced space below chapter title Date: Wed, 3 Jun 2020 09:21:12 +1000 Message-ID: <91c898f0-8561-0730-e07f-d61c4b5182c7@gmail.com> References: <07e5025e-2a5f-f621-3e1c-9b13090ec323@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0713783336942574794==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="55561"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cc: mailing list for ConTeXt users To: Wolfgang Schuster Original-X-From: ntg-context-bounces@ntg.nl Wed Jun 03 01:21:45 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 1jgGE4-000EM8-U2 for gctc-ntg-context-518@m.gmane-mx.org; Wed, 03 Jun 2020 01:21:44 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A3D0D184837; Wed, 3 Jun 2020 01:21:23 +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 WFn4FnkF0QSq; Wed, 3 Jun 2020 01:21:21 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3971E184838; Wed, 3 Jun 2020 01:21:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 90806184837 for ; Wed, 3 Jun 2020 01:21:20 +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 aAkR706JA62M for ; Wed, 3 Jun 2020 01:21:19 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.210.180; helo=mail-pf1-f180.google.com; envelope-from=roma83537@gmail.com; receiver= Original-Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (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 16A3B1847BD for ; Wed, 3 Jun 2020 01:21:18 +0200 (CEST) Original-Received: by mail-pf1-f180.google.com with SMTP id x22so244851pfn.3 for ; Tue, 02 Jun 2020 16:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=9s9ickx9tOUhe2CPOMmipfDDGWzGgeLl1LUVh+ps0Y0=; b=dwmMD2mccdtNa9iseEt5+GsFb377WJJBfxS1z0TFlPFl9QYKu9D5xLRZjDeqvXE5M1 QaNEjGNz8DPhA3OUUWETXo1f+vbn56Q4Hf1MKvCz8Y65vyKt+p0H8POy3avNmNZAyOYH psmccDQka38UKRqGxtd+ZammlYnbvbMPoNeJ/QQP1n/9yBU1yHvbDVwCWrFvesa0SKf7 g81CqGh292HiXVPGzc77LZIxAhKubfBRCPoIGBFCZ0ZyHNy/G0K7pVMpfUTez7XzSunh 4hFbE7bqtpAksFvAfYVdchMjfOOeKr/T8pV73ABC2BjRlrydTTk/qhYodjvP1F5lFWG4 ZeMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=9s9ickx9tOUhe2CPOMmipfDDGWzGgeLl1LUVh+ps0Y0=; b=toEwdK6I/vjuytXs5BzEATCMc6OxMGUsOZCLoGYsDPebvymxK2XH1vUM9rUNWS1s6M MuPlHz0dYMs9q+bfFNpQ00dH5DMiU1sJVrgoFrinSmjKI9+wteIgX5lVqDX2OGIgmgYk q7wYTFI3/XLMrjzvIX+nxbegke9mdXStIjwZ7ts7qtAcam+kszFCUdiMJ92kinfCeWVb LvzqWgCbzN5/wGSBcYyzFubHxeh9uOEy5VqWZ+J6nc7WyJhtN/qduFVXxqQazt5FSa4t XRRXBLH3xAjDh2qBNIpjGtAXCm71zRGDJvkxfRaNq9JhtYJ63Scrc0AJSOA8fNGLAs4Y xapA== X-Gm-Message-State: AOAM532A/8hMXXmxqXMDMovv+Tnrnu9ERIjhJVyStaZOuItXl2AOXPxw zoAas+Z8pxA6s71/pHtsuK1iDfBXS3w= X-Google-Smtp-Source: ABdhPJzbRb3LCy3jpVW/ZUbpe+i3i5a5pC7gEaBHttGIWim19sx2nk6OuppmgQsJm/7UkmlJWKzwLA== X-Received: by 2002:a63:e549:: with SMTP id z9mr27128539pgj.213.1591140076937; Tue, 02 Jun 2020 16:21:16 -0700 (PDT) Original-Received: from [192.168.0.100] ([120.21.40.17]) by smtp.gmail.com with ESMTPSA id j6sm140896pjb.0.2020.06.02.16.21.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Jun 2020 16:21:16 -0700 (PDT) In-Reply-To: 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:107603 Archived-At: This is a multi-part message in MIME format. --===============0713783336942574794== Content-Type: multipart/alternative; boundary="------------97AA01F97C117AA0ECD2913A" Content-Language: en-US This is a multi-part message in MIME format. --------------97AA01F97C117AA0ECD2913A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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. Julian On 3/6/20 12:58 am, Wolfgang Schuster wrote: > jbf schrieb am 02.06.2020 um 11:41: >> Hi list, >> >> I am attempting to achieve, for every second chapter, to have only >> one line of space between the chapter title and the text that follows. >> >> I looked at the following example in 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 >> >> and presumed that I could adjust that to something like 1cm instead >> of 4cm. >> >> The problem is that when I try to process the original example, I get >> a fatal error at the line which reads \chapter{test} \input tufte. >> >> I'm not sure why that error, but that aside, would the >> \def\MyChapterCommand approach suggested above be the right way to >> achieve my purpose? In other words, I want the text that follows the >> chapter title to follow immediately for specific chapters, rather >> than the considerable vertical space that follows the default setup >> for chapter titles. >> >> Julian > > Change > >     \def\MyChapterCommand#1#2% > > to > >     \unexpanded\def\MyChapterCommand#1#2% > > or > >     \define[2]\MyChapterCommand > > Wolfgang --------------97AA01F97C117AA0ECD2913A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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.

Julian

On 3/6/20 12:58 am, Wolfgang Schuster wrote:
jbf schrieb am 02.06.2020 um 11:41:
Hi list,

I am attempting to achieve, for every second chapter, to have only one line of space between the chapter title and the text that follows.

I looked at the following example in 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

and presumed that I could adjust that to something like 1cm instead of 4cm.

The problem is that when I try to process the original example, I get a fatal error at the line which reads \chapter{test} \input tufte.

I'm not sure why that error, but that aside, would the \def\MyChapterCommand approach suggested above be the right way to achieve my purpose? In other words, I want the text that follows the chapter title to follow immediately for specific chapters, rather than the considerable vertical space that follows the default setup for chapter titles.

Julian

Change

    \def\MyChapterCommand#1#2%

to

    \unexpanded\def\MyChapterCommand#1#2%

or

    \define[2]\MyChapterCommand

Wolfgang
--------------97AA01F97C117AA0ECD2913A-- --===============0713783336942574794== 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== --===============0713783336942574794==--