From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112387 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joey McCollum via ntg-context Newsgroups: gmane.comp.tex.context Subject: Setting a heading text on its own page with \setuphead Date: Fri, 6 Aug 2021 13:12:19 -0400 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7212919088534013388==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12791"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joey McCollum To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 06 19:13:17 2021 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 1mC3PJ-00037N-6u for gctc-ntg-context-518@m.gmane-mx.org; Fri, 06 Aug 2021 19:13:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E13F82863CE; Fri, 6 Aug 2021 19:12:43 +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 FUS9khKq7kNH; Fri, 6 Aug 2021 19:12:42 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 104842864B3; Fri, 6 Aug 2021 19:12:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3C8772864B3 for ; Fri, 6 Aug 2021 19:12:40 +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 9Tk0v6tBmh0y for ; Fri, 6 Aug 2021 19:12:39 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.53; helo=mail-io1-f53.google.com; envelope-from=jmccollum20140511@gmail.com; receiver= Original-Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (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 CB63F2863CE for ; Fri, 6 Aug 2021 19:12:38 +0200 (CEST) Original-Received: by mail-io1-f53.google.com with SMTP id a13so12541173iol.5 for ; Fri, 06 Aug 2021 10:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=JQdJeWeEgUX9ScwCYzPLBMjSFfcP0dLvLxeq6GIGTwE=; b=b/S38Al7B8DZI0vZ1eu7rUgYEtb0g3O9LGfo9HfB/3z28P16LV8xm/lDt9H8DLaecb pykMg+qsKRngfkVBnFH1bQnmwlbhqCFxsgfjaRqtq1TbHeL0La+CZjENK1z8BcEsnLmb giZoDoTSningLRDonwqMAIAvOrAUuUGHds9EjtA7S/K/tDeQiZk5MEYqU3WGNqzf1jbw NY6tdD1GsixWm/qooL61xux07OK8tSUBkUEF0oFtAI5d1Zz81yxMvfAjEkUv5SBebXOR QnVn93rLh494T2WW3qOPe7S4/QNCxvhfwjgc+coQ9jvmmRL5SwVAi44tut67/ShrMZWJ xCbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=JQdJeWeEgUX9ScwCYzPLBMjSFfcP0dLvLxeq6GIGTwE=; b=SGhrrcbNqIlsKt5IMz0QBF3I4HFcBCODN4xaeJ2CCTub0diSk7Q+BmDrjR8XsoPluN CH3Uw3D8g0+uxqKXyUJpNHSyaqMzjhtf+pNvyBYNfU7Tz30wvEPy6xbI5jdjdTuee4Sw g5JGID8F+NsdcqukKcxYhBEtUGktbaNqDMzEs9UuMtA//F34TSUkZSRv3XwkFbdp4xgS hKXBosUDklYuMn5nJKA9E/qAxmDwureGRihBKiG5cPbcPKXxavJAs87uikbqLBjeS9sC Xi/XbfNodvVpBX0ff+pHzVY3gidhjL+GZKfDTIO3sIKTtIjRATOAt7Wya0nDFQvp3TDb 17lQ== X-Gm-Message-State: AOAM53140EQsSrzN075+tsR9fBV7n9WCCcQ9Gaeaneu5hnhDOu9xHq34 yUEYpYqJm1izf1/Q8G0sTle6nhP1DiIazLNUKJoHA/6rU68= X-Google-Smtp-Source: ABdhPJyhUf70kkZUmbpIZDWu90ncBsUdlrx2Ev3GdhXI8+kCeY3eHwyLtVcMtvG+tiSUU6Rk8ntHGZ8YousRM8rrYFU= X-Received: by 2002:a02:9082:: with SMTP id x2mr7159482jaf.44.1628269957366; Fri, 06 Aug 2021 10:12:37 -0700 (PDT) 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:112387 Archived-At: --===============7212919088534013388== Content-Type: multipart/alternative; boundary="0000000000006848a705c8e72442" --0000000000006848a705c8e72442 Content-Type: text/plain; charset="UTF-8" Hi, I'd like to define my own class of heading derived from the "part" heading; in the MWE below, it's called "MyPart". I'd like this heading to have the following features: - Its title should appear in the ToC, but its number should never be printed in the ToC or in the text. - It should always start on an odd page. - Its text should be in a larger size than the text of the body, set in all caps, and set with extra letterspacing. - Most importantly, the title of the heading should appear on its own page without a header or footer. The text of the body should begin on the next odd page. I was hoping to accomplish all of this within the \setuphead command, and it seems like this should be possible, but in the following example, I'm not getting the text of the header at all: ``` \setuppagenumbering [alternative=doublesided, location=] %undo default page numbering in middle of header; doublesided option will ensure that the document has an even number of pages %Define an odd page break between books that omits headers and footers in blank pages \definepagebreak[blankpagebreak][yes,header,footer,right] %Setup body and title fonts (is any of this redundant, or can it be consolidated?): \definefontsynonym [EBGaramond] [name:EBGaramond-Regular] [features=default] \definefontfamily[garamond] [rm] [EBGaramond] [features={default}] \setupbodyfont[garamond, 12pt] \setupinterlinespace[18pt] %text line spacing \definefont[MyPartFont][EBGaramond at 24pt][line=36pt] %font command to be used for setting MyPart heading texts %Macro for adjusting kerning of MyPart heading texts (can any of this can be handled in the \definefont call?): \define[1]\MyPartTextCommand{% \kerncharacters[0.6666]%increase letterspacing \WORDS{#1}%set all letters in uppercase } %Macro for page break after MyPart headings: \define\AfterMyPart{% \page[blankpagebreak]% } %Define a new heading at the level of a part: \definehead[MyPart][part] \setuphead[MyPart][ number=no,%do not add a number to this heading page=blankpagebreak,%always start this on an odd page header=empty,%disable headers for this page footer=empty,%disable footers for this page align={flushleft, nothyphenated},%titling alignment settings textstyle=\MyPartFont,%set text style textcommand=\MyPartTextCommand,%set text formatting command commandafter=\AfterBookTitle%add a double page break afterwards ] %Setup header and footer text: \setupheadertexts[{\structureuservariable{booktitle}}\hfill][][][\hfill {\structureuservariable{booktitle}}] %even left, even right, odd left, odd right \setupfootertexts[\pagenumber][][][\pagenumber] %even left, even right, odd left, odd right %Ensure that whitespace respects the grid layout: \setupblank[line,fixed] \starttext \startMyPart[title={Title for Title Page}][booktitle={Title for Header}] \input knuth\par \input knuth\par \input knuth\par \input knuth\par \input knuth\par \input knuth \stopMyPart \stoptext ``` I expect there's something obvious that I'm missing, but any help is appreciated. Thank you! Joey --0000000000006848a705c8e72442 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I'd like to define my own class= of heading derived from the "part" heading; in the MWE below, it= 's called "MyPart". I'd like this heading to have the fol= lowing features:
  • Its title=C2=A0should=C2=A0appear in the ToC, b= ut its number should never be printed in the ToC or in the text.
  • It= should always start on an odd page.
  • Its text should be in a larger= size than the text of the body, set in all caps, and set with extra letter= spacing.
  • Most importantly, the title of the heading should appear o= n its own page without a header or footer. The text of the body should begi= n on the next odd page.
I was hoping to accomplish all of thi= s within the \setuphead command, and it seems like this should be possible,= but in the following example, I'm not getting the text of the header a= t all:

```

\setuppag= enumbering [alternative=3Ddoublesided, location=3D] %undo default page numb= ering in middle of header; doublesided option will ensure that the document= has an even number of pages


%Define an odd page break betw= een books that omits headers and footers in blank pages

\definepagebreak[blankpagebrea= k][yes,header,footer,right]


%Setup body and title fonts (i= s any of this redundant, or can it be consolidated?):

\definefontsynonym [EBGaramond= ] [name:EBGaramond-Regular] [features=3Ddefault]

\definefontfamily[garamond] [r= m] [EBGaramond] [features=3D{default}]

\setupbodyfont[garamond, 12pt]=

\setupinterlinespace[18pt] %te= xt line spacing

\definefont[MyPartFont][EBGara= mond at 24pt][line=3D36pt] %font command to be used for setting MyPart head= ing texts


%Macro for adjusting kerning o= f MyPart heading texts (can any of this can be handled in the \definefont c= all?):

\define[1]\MyPartTextCommand{%=

\kerncharacters[0.6666]%incre= ase letterspacing

\WORDS{#1}%set all letters in= uppercase

}


%Macro for page break after My= Part headings:

\define\AfterMyPart{%

\page[blankpagebreak]%

}


%Define a new heading at the l= evel of a part:

\definehead[MyPart][part]

\setuphead[MyPart][

number=3Dno,%do not add a num= ber to this heading

page=3Dblankpagebreak,%always= start this on an odd page

header=3Dempty,%disable heade= rs for this page

footer=3Dempty,%disable foote= rs for this page

align=3D{flushleft, nothyphen= ated},%titling alignment settings

textstyle=3D\MyPartFont,%set = text style

textcommand=3D\MyPartTextComm= and,%set text formatting command

commandafter=3D\AfterBookTitl= e%add a double page break afterwards

]


%Setup header and footer text:=

\setupheadertexts[{\structureu= servariable{booktitle}}\hfill][][][\hfill {\structureuservariable{booktitle= }}] %even left, even right, odd left, odd right

\setupfootertexts[\pagenumber]= [][][\pagenumber] %even left, even right, odd left, odd right


%Ensure that whitespace respec= ts the grid layout:

\setupblank[line,fixed]

\starttext

\startMyPart[title=3D{Title fo= r Title Page}][booktitle=3D{Title for Header}]

\input knuth\par

\input knuth\par

\input knuth\par

\input knuth\par

\input knuth\par

\input knuth

\stopMyPart

\stoptext

```

I expect there's something obvious that I'm missi= ng, but any help is appreciated.

Thank you!
<= div>
Joey
--0000000000006848a705c8e72442-- --===============7212919088534013388== 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== --===============7212919088534013388==--