From: Gerion Entrup <gerion.entrup@flump.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: [NTG-context] Re: setuphead in connection with the command argument
Date: Fri, 31 May 2024 00:37:42 +0200 [thread overview]
Message-ID: <3024583.k3LOHGUjKi@falbala> (raw)
In-Reply-To: <cd9941a3-740c-b4d8-449f-71e6b71b98a8@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2015 bytes --]
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
> \defineframed
> [ChapterFrame]
> [width=\textwidth,
> align=flushright,
> offset=0pt,
> rulethickness=0pt]
>
> \startsetups [christian_dietrich]
> \startlocalheadsetup
> \startframed[ChapterFrame]
> \blank[2cm]
> \startfont[Serif sa 8]
> \color[darkgray]{\headnumbercontent}
> \stopfont
> \blank[5mm]
> \startfont[SerifBold sa 2]
> \color[darkred]{\headtextcontent}
> \stopfont
> \blank[1cm]
> \startfont[SerifBold sa 1.5]
> \color[darkred]{\structureuservariable{subtitle}}
> \stopfont
> \stopframed
> \stoplocalheadsetup
> \stopsetups
>
> \defineheadalternative
> [christian_dietrich]
> [renderingsetup=christian_dietrich]
>
> \setuphead
> [chapter]
> [alternative=christian_dietrich,
> header=empty,
> style=]
>
> \starttext
>
> \startchapter[title=Chapter title][subtitle=Chapter subtitle]
> \samplefile{lorem}
> \stopchapter
>
> \stoptext
> %%%% 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="?
What, if I define multiple of them? Is the system not made for this?
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?
Best
Gerion
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2024-05-30 22:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 14:15 [NTG-context] " Gerion Entrup
2024-05-30 14:25 ` [NTG-context] " Gerion Entrup
2024-05-30 20:54 ` Wolfgang Schuster
2024-05-30 22:37 ` Gerion Entrup [this message]
2024-06-01 7:53 ` Wolfgang Schuster
2024-06-01 14:34 ` Gerion Entrup
2024-06-02 22:05 ` Wolfgang Schuster
2024-06-03 11:36 ` Gerion Entrup
2024-06-03 13:13 ` Hans Hagen via ntg-context
2024-06-06 10:14 ` Gerion Entrup
2024-05-30 16:49 ` Bruce Horrocks
2024-05-30 22:25 ` Gerion Entrup
2024-05-30 22:40 ` Bruce Horrocks
[not found] <e405fddb4b534eb68f0be12a3a153c4e@AS8P194MB2116.EURP194.PROD.OUTLOOK.COM>
2024-05-30 14:47 ` Tomáš Hála
2024-05-30 15:04 ` Gerion Entrup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3024583.k3LOHGUjKi@falbala \
--to=gerion.entrup@flump.de \
--cc=ntg-context@ntg.nl \
--cc=wolfgang.schuster.lists@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).