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.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 D3FA32380B for ; Sat, 1 Jun 2024 09:56:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 05450484F0D for ; Sat, 1 Jun 2024 09:55:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=gmail.com 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 aYMtTr5nXWlz for ; Sat, 1 Jun 2024 09:55:30 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 48EFD484F0F for ; Sat, 1 Jun 2024 09:54:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 322CA484D6F for ; Sat, 1 Jun 2024 09:53:50 +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 AkLnkAfjO8Xk for ; Sat, 1 Jun 2024 09:53:49 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.45; helo=mail-lf1-f45.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 C3845484D63 for ; Sat, 1 Jun 2024 09:53:49 +0200 (CEST) Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-52b8f5d811aso603085e87.3 for ; Sat, 01 Jun 2024 00:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717228429; x=1717833229; darn=ntg.nl; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=x/8Uj72gLGDvGOxrtu3YaWgN6qvMAB7E3AVO2vuOqo0=; b=LNPAvs8uasdZORs2jiwWGWokrDxbrDy/MsjcfIS/IH9Ni04ONzPoxrH4PrnZ5LVCac quHJ/8tG2N5bhcl5S0eC0gtB4h3pC2Y7MXHpFYohmIR/A8PrJBRsDL5VjKR4jeu+gVot IOXJnw+vK9gR9/TaD9lsHx8AbDPO7sHNYDkV4es3nzvhTHottxDIQEQUCQWSgltdTL2w WCqqwa4YJfxdPb3sh8GbP4S1b1thzMX+LGMpekX1UDjMU0+BiSWYoYEzsW6bdzDFoK6K yx3NrBzaa9fHdWs7I48rlAGHKlPJETld1egFQQSBq92NFRiEPWYqyrWiQG68h0lBckfN 5cPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717228429; x=1717833229; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=x/8Uj72gLGDvGOxrtu3YaWgN6qvMAB7E3AVO2vuOqo0=; b=jo104g9NvS4uz6jnUm8eZacE4XCsX/jGoqx5qjZC+vl5nk4sCr1XRsTHBmu1LCIbLx e8PGu16pkCyMyu2ktYR67ByEcQ2/M5K3IJgH5r5OIOZjkuaaEZ1MTV/R77MYb13+XEBq vX6Xsbs1ksP0ezU/u270rMOdB/yAwpYjiwOpiESoGqRyQF/U3a1VIRko5AMqGQEicQzK oGMl0XaEQYrb6U737JhRQ+TtaMTSKoObHTfumJNDkaytLxes5zQySBIySuzYo9p6aFDa TD6taExcQmOR6qXR9muwLbSkXnxVRJyOdAtSS3z0SlFLwAXBaPFw4MBGseGGcClxRjzO f6wA== X-Gm-Message-State: AOJu0Yx9clfmd94Ls4qzI/Xp+6YM4RzuV7x5uyFjU1OMKISlxvUlhYpZ DWWA/Agy1z+kYbJnzTATZi2IIrAEDH0SfIa4kKqBHIgbk1mi++T3CnvM2A== X-Google-Smtp-Source: AGHT+IFg4mGRjJ2wiZZlgXR4QvehrNIjzV8bPSAMpuM+brB42LneVWqGSw7Tg1fiDmo4JZLZfqO7ig== X-Received: by 2002:a19:c514:0:b0:52b:81de:111a with SMTP id 2adb3069b0e04-52b896e0c6emr1862245e87.67.1717228428434; Sat, 01 Jun 2024 00:53:48 -0700 (PDT) Received: from ?IPv6:2a02:810d:a8bf:dc10:c92a:e402:d62d:701c? ([2a02:810d:a8bf:dc10:c92a:e402:d62d:701c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a68792e37desm134837666b.166.2024.06.01.00.53.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2024 00:53:48 -0700 (PDT) To: Gerion Entrup References: <4119708.MHq7AAxBmi@falbala> <114842570.nniJfEyVGO@falbala> <3024583.k3LOHGUjKi@falbala> From: Wolfgang Schuster Message-ID: Date: Sat, 1 Jun 2024 09:53:46 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.60 MIME-Version: 1.0 In-Reply-To: <3024583.k3LOHGUjKi@falbala> Content-Language: en-US Message-ID-Hash: FOOCONFCDHJRSMJSJSOA425QP45BFINV X-Message-ID-Hash: FOOCONFCDHJRSMJSJSOA425QP45BFINV X-MailFrom: wolfgang.schuster.lists@gmail.com 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: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit Gerion Entrup schrieb am 31.05.2024 um 00:37: > Am Donnerstag, 30. Mai 2024, 22:54:47 MESZ schrieb Wolfgang Schuster: >> Gerion Entrup schrieb am 30.05.2024 um 16:25: >>> The chapter format that I want to achieve in the end is nearly the one in the attachment (excerpt of Christian Dietrich's PhD thesis). >> >> When you have a complex layout it is easier to use the >> \defineheadalternative command to create it. >> >> To change the font for each element disable the default settings with >> \setuphead[style=] and use \startfont (or \definedfont) to apply a >> different style for the number, title etc. >> >> %%%% begin example >> [...] >> %%%% end example > > Thank you very much! That looks really clean. I will add it to the wiki. > > Can you bring some clarification regarding "style=", "command=" and "alternative="? 1. Alternatives are the different styles/layouts for the section titles. The example below demonstrates a few of them and you can create your own styles with \defineheadalternative. The command key provides a different method to create your own style/layout and in most cases it doesn't mattter which method you use, only when you want an inline title like "alternative=text" you need \defineheadalternative because it allows you to set a few flags which are needed here. The biggest difference between both is that command uses arguments to place the number (#1) and title (#2) while headalternative use the two macros \headnumbercontent and \headtextcontent. %%%% begin example \starttext % \setuphead[section][alternative=normal] % default alternative \section{Lorem ipsum} \samplefile{lorem} \page \setuphead[section][alternative=text] \section{Lorem ipsum} \samplefile{lorem} \page \setuphead[section][alternative=middle] \section{Lorem ipsum} \samplefile{lorem} \page \setuphead[section][alternative=margin] \section{Lorem ipsum} \samplefile{lorem} \stoptext %%%% end example 2. The "style" key is used to set a custom font/style for all elements of the section, when you set an empty value the title uses the current style of the document. You can also apply different styles to the number and title with the two key "numberstyle" and "titlestyle", the resulting effect is a combination of the general "style" value and the special "numberstyle" or "titlestyle" value. Below are few examples where I use a few combinations of the general and special settings. %%%% begin example \starttext \section{Lorem ipsum} \samplefile{lorem} \page \setuphead[section][style=\bfc] \section{Lorem ipsum} \samplefile{lorem} \page \setuphead[section][style=\tfa,textstyle=\bf,numberstyle={\feature[+][oldstyle]}] \section{Lorem ipsum} \samplefile{lorem} \page \setuphead[section][style={\switchtobodyfont[heros]\tfa},textstyle=,numberstyle=] \section{Lorem ipsum} \samplefile{lorem} \stoptext %%%% end example > What, if I define multiple of them? Is the system not made for this? Multiple of what? > I just tested my initial example regarding font size with `command=\MyChapter, style=` and the font size was only affected by the code of \MyChapter. > What is the default style? The default style is whatever you set with \setupbofyfont at the begin of the document. To get the default settings for \chapter etc. you can use the \showinstancevalues which creates a table which prints the values. %%%% begin example \usemodule[setups] \starttext \showinstancevalues[head][chapter] \showrootvalues[head] \stoptext %%%% end example Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________