From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 28A5E297E6 for ; Thu, 30 May 2024 17:07:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 6C8444840FE for ; Thu, 30 May 2024 17:06:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=flump.de Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NwDNa8VUWHFc for ; Thu, 30 May 2024 17:06:30 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id DEC51484B8C for ; Thu, 30 May 2024 17:05:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 22FF9484B8B for ; Thu, 30 May 2024 17:04:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tEl7YOsAsiN1 for ; Thu, 30 May 2024 17:04:53 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=185.163.118.210; helo=flump.de; envelope-from=gerion.entrup@flump.de; receiver= Received: from flump.de (flump.de [185.163.118.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 8E234484B8A for ; Thu, 30 May 2024 17:04:53 +0200 (CEST) Received: from falbala.localnet (unknown [77.22.146.221]) by flump.de (Postfix) with ESMTPSA id 41B06F56D84; Thu, 30 May 2024 17:04:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=flump.de; s=mail; t=1717081493; bh=0osZ9w7iZmaj6877oH8egBfTpjkXyGyxin1V7BtcLtE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZnroJURZkzizVRuQHCq7eeZUfWpp/QtT3ZilTHeYJ+u92GmSNHw/gwXf6LXOnxPDe dCO233hHaRoqJA0Dl/VI8vqzudgtrar6dyLCSkdq0x6HtjT29urUlR0q7WVKUPZo+Y jbUP7lG8ArWwxkpYG0dXX37DOO+KYQiejEDBioPU= From: Gerion Entrup To: =?utf-8?B?VG9tw6HFoSBIw6FsYQ==?= Date: Thu, 30 May 2024 17:04:44 +0200 Message-ID: <4589502.1IzOArtZ34@falbala> In-Reply-To: <20240530144736.GA10499@thala.cz> References: <20240530144736.GA10499@thala.cz> MIME-Version: 1.0 Message-ID-Hash: 4UFCCVUEBKFM2WZUTGPHYDZ2JUHMR6MT X-Message-ID-Hash: 4UFCCVUEBKFM2WZUTGPHYDZ2JUHMR6MT X-MailFrom: gerion.entrup@flump.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: mailing list for ConTeXt users X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: setuphead in connection with the command argument List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============5627373770748832887==" --===============5627373770748832887== Content-Type: multipart/signed; boundary="nextPart3049383.BddDVKsqQX"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPart3049383.BddDVKsqQX Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Gerion Entrup To: =?utf-8?B?VG9tw6HFoSBIw6FsYQ==?= Cc: mailing list for ConTeXt users Date: Thu, 30 May 2024 17:04:44 +0200 Message-ID: <4589502.1IzOArtZ34@falbala> In-Reply-To: <20240530144736.GA10499@thala.cz> MIME-Version: 1.0 Hi Tom=C3=A1=C5=A1, first, thank you for the answer. Am Donnerstag, 30. Mai 2024, 16:47:36 MESZ schrieb Tom=C3=A1=C5=A1 H=C3=A1l= a: > Hi Gebrion, >=20 > > ## Font size + ## Bold text >=20 > for font size etc., you can use=20 > \setuphead [chapter] [style=3D{\setupbodyfont[11pt]}] or > \setuphead [chapter] [style=3D\tf] >=20 > \setuphead [chapter] [style=3D\bf] So this sentence of the wiki [1] is wrong (documentation of the command arg= ument)?: > Command to use for typesetting the title; overrules all other styling. Fi= rst argument is the number, second the title text. If I see it right, `style=3D` only affects the typesetting of `#1` and `#2`= , so I need setupbodyfont _and_ switchtobodyfont, didn't I? Also, when I want #1 and #2 to be in different sizes, I choose the "base" s= ize with style=3D\setupbodyfont and adjust it further with switchtobodyfont= just for one the the argument? All in all, the correct documentation would be: > Command to use for typesetting the title. First argument is the number, s= econd the title text. Styling of these parameters can be achieved only by s= pecifying style=3D. > > ## Line breaks + ## Framed > > How can I achieve line breaks? >=20 > \define[2]\MyChapter{% > \framedtext{% > #1 #2:\\ > \structureuservariable{subtitle}\\ > (\structureuservariable{intro}) > } > } This produces an extra line break between '#2' and ':', I don't get why. Ot= herwise, it looks quite nice. > > I also want to set everything except of the intro in a flushright envir= onment but do not know how. I tried: >=20 > As above:=20 > \framedtext[align=3Dflushright]{% That works, thank you! Best, Gerion > ------ >=20 > On Thu, May 30, 2024 at 02:15:01PM +0000, Gerion Entrup wrote: > > Hi, > >=20 > > I'm trying to adapt the format of chapters in my document and have a fe= w questions regarding setuphead. > > My aim is to have the chapter (title) on a separate page with an additi= onal intro in different text sizes for title, subtitle and the intro. > > I chose to use the "command=3D" argument in setuphead for that. > > However, I'm not quite sure about it's internals. > >=20 > > Let's begin with a minimal example: > > ``` > > \define[2]\MyChapter{% > > #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro}) > > } > >=20 > > \setuphead[title, chapter][command=3D\MyChapter] > >=20 > > \setupbodyfont[11pt] > >=20 > > \starttext > > \startchapter[title=3Dfoo][subtitle=3Dbar, intro=3D{some explanation}] > > some text > > \stopchapter > > \stoptext > > ``` > > This produces 1.pdf. > >=20 > >=20 > > ## Font size > >=20 > > What is the reason that that the font of the chapter is bigger? How can= I reset it to normal size? This does not work at all: > > ``` > > \define[2]\MyChapter{% > > \setupbodyfont[11pt] #1 #2: \structureuservariable{subtitle} (\structu= reuservariable{intro}) > > } > > ``` > > However, changing to a bigger font works somehow. Is there a factor app= lied to the font size internally? For example: > > ``` > > \define[2]\MyChapter{% > > \setupbodyfont[20pt] #1 #2: \structureuservariable{subtitle} (\structu= reuservariable{intro}) > > } > > ``` > > produces 2.pdf (the chapter font is not 20pt). > >=20 > >=20 > > ## Line breaks > >=20 > > How can I achieve line breaks? > > This does not work: > > ``` > > \define[2]\MyChapter{% > > #1 #2:\\ > > \structureuservariable{subtitle}\\ > > (\structureuservariable{intro}) > > } > > ``` > > (see 3.pdf) > >=20 > > I also want to set everything except of the intro in a flushright envir= onment but do not know how. I tried: > > ``` > > \define[2]\MyChapter{% > > \startalignment[flushright] > > #1 #2:\\ > > \structureuservariable{subtitle}\\ > > \stopalignment > > \structureuservariable{intro} > > } > > ``` > > (see 4.pdf, no change) > >=20 > >=20 > > ## Bold text > >=20 > > I tried to get the text bold. However, `#1` and `#2` does not seem to f= ollow this. > > ``` > > \define[2]\MyChapter{% > > \bold #1 #2: \structureuservariable{subtitle} (\structureuservariab= le{intro}) > > } > > ``` > >=20 > > ## Makeups > >=20 > > The best solution, I had so far, was to define a makeup, but I don't ge= t it to work with text with mixed alignment and it does not solve the font = size problem: > > ``` > > \definemakeup[chapter][align=3Dleft, top=3D] > > \define[2]\MyChapter{% > > \startmakeup[chapter] > > #1 #2:\\ > > \structureuservariable{subtitle}\\ > > \stopmakeup > > (\structureuservariable{intro}) > > } > > ``` > > (see 5.pdf) > >=20 > > ## Framed > >=20 > > I also have tried this but it does not bring any linebreaks: > > ``` > > \define[2]\MyChapter{% > > \framed[frame=3Doff, offset=3D0pt]{#1\\#2:\\ \structureuservariable= {subtitle}\\ (\structureuservariable{intro})} > > } > > ``` > > (see 6.pdf) > >=20 > > I hope you can shed some light into setuphead with command. I search on= the wiki, Stackoverflow and the manuals but didn't really find anything. > >=20 > > Best, > > Gerion > >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 > > % 1.pdf > > \define[2]\MyChapter{% > > #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro}) > > } > >=20 > > % % 2.pdf > > % \define[2]\MyChapter{% > > % \setupbodyfont[20pt] #1 #2: \structureuservariable{subtitle} (\struc= tureuservariable{intro}) > > % } > >=20 > > % % 3.pdf > > % \define[2]\MyChapter{% > > % #1 #2:\\ > > % \structureuservariable{subtitle}\\ > > % (\structureuservariable{intro}) > > % } > >=20 > > % % 4.pdf > > % \define[2]\MyChapter{% > > % \startalignment[flushright] > > % #1 #2:\\ > > % \structureuservariable{subtitle}\\ > > % \stopalignment > > % \structureuservariable{intro} > > % } > >=20 > > % % 5.pdf > > % \definemakeup[chapter][align=3Dleft, top=3D] > > % \define[2]\MyChapter{% > > % \startmakeup[chapter] > > % #1 #2:\\ > > % \structureuservariable{subtitle}\\ > > % \stopmakeup > > % (\structureuservariable{intro}) > > % } > >=20 > >=20 > > % % 6.pdf > > % \define[2]\MyChapter{% > > % \framed[frame=3Doff, offset=3D0pt]{#1\\#2:\\ \structureuservariab= le{subtitle}\\ (\structureuservariable{intro})} > > % } > >=20 > > \setuphead[title, chapter][command=3D\MyChapter] > >=20 > > \setupbodyfont[11pt] > >=20 > > \starttext > > \startchapter[title=3Dfoo][subtitle=3Dbar, intro=3D{some explanation}] > > some text > > \stopchapter > > \stoptext >=20 >=20 > > _______________________________________________________________________= ____________ > > If your question is of interest to others as well, please add an entry = to the Wiki! > >=20 > > maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/n= tg-context.ntg.nl > > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirr= or) > > archive : https://github.com/contextgarden/context > > wiki : https://wiki.contextgarden.net > > _______________________________________________________________________= ____________ >=20 >=20 --nextPart3049383.BddDVKsqQX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEM/tVN9WpYYHnPZHxloeAdSYJHeoFAmZYlYwACgkQloeAdSYJ Heo8LAv/XonjOMORd8/w5WnZiQocKy4I26seS904ygHJo/4SfVMECNuDA+02Dzqw 646/HGdG4wZXp+w/KL2r0ztl5/qcxqJrSvhYvYyATqpCab5p/OXumlwqw0wIN+qF Jjr/GYbTPJ0NkynsZmHjvfwtzJ8am5iIfxODZ2jEHDWaPQDkaaxOCcBPcDm0fcZW HMDEVSzSDS8wpLfpO2tcld6WB01n018zksJ88j9w+xykXTQanCCHpY66nKjEM2lE QnFCLkmXmpEub/yGo1DLFCEL0Q+idQbr2WGBJE2GUH6PoU73c9Pk/1ZdIHKqt5pw 2Y/Hf7QnW0w6dI416vQBTS09AKVCiIi3FtyqGi55WXFnm8OTUmWo1XMm6rcBVlXU Fg9Fsp37TC7pZTh53U0lnn/ISJkgbgAABvvRcOAupI5kpbsHiqGFADctkcXpHTKd Fm9evtS9vFWwb/H6SfYJcEjXlXRsE0GRmevF1jrFYCeQ1hZDC7wiMX3G4Rbf0zj/ TxxcGHKC =GLJc -----END PGP SIGNATURE----- --nextPart3049383.BddDVKsqQX-- --===============5627373770748832887== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ --===============5627373770748832887==--