
Hi, What is the general method of customizing chapter titles? For example, I would like something like the attachment. Is it achievable without using Metapost? -- Respect, Shiv Shankar Dayal

This is what I came up with:
\setupcolors[state=start]
\definecolor [maincolor] [r=, g=.5, b=.7]
\setupinteraction
[
state=start,
color=maincolor,
contrastcolor=maincolor,
style=,
]
\define[2]\MyChapterCommand%
{\rotate[rotation=90]{\rm\small\sc \headtext{chapter}}
\framed[backgroundcolor=maincolor, background=color,
frame=off, foregroundcolor=white, foreground=color, style=\bfd]{#1}
\blank#2}
\setuphead[chapter][command=\MyChapterCommand]
\setupheadtext[chapter=Chapter]
\starttext
\chapter{Hello world}
\stoptext
The size of chapter no. is too small and I would like the title on new
line. I do not know how to do it.
On Wed, Aug 7, 2024 at 1:01 AM Henning Hraban Ramm
-- Respect, Shiv Shankar Dayal

Hi,
My final version is below:
\setupcolors[state=start]
\definecolor [maincolor] [r=, g=.5, b=.7]
\define[2]\MyChapterCommand
{\framed[align=flushright,
frame=off]{\rotate[rotation=90]{\rm\small\sc \headtext{chapter}}
\framed[backgroundcolor=maincolor, background=color,
frame=off, foregroundcolor=white, foreground=color,
loffset=-20pt]{\setupbodyfont[60pt] \ss#1}
\blank[force,4*medium] #2}}
\setuphead[chapter][command=\MyChapterCommand]
\setupheadtext[chapter=Chapter]
\setupbodyfont[10pt]
\starttext
\chapter{Hello world}
Hello
\stoptext
This is what will work but I want all of it to have right alignment
but it does not go to right.
On Wed, Aug 7, 2024 at 1:50 AM Shiv Shankar Dayal
-- Respect, Shiv Shankar Dayal

Hi,
Finally got it working with:;
\setupcolors[state=start]
\definecolor [maincolor] [r=, g=.5, b=.7]
\define[2]\MyChapterCommand
{\framed[align=flushright, width=\textwidth,
frame=off]{\rotate[rotation=90]{\rm\small\sc \headtext{chapter}}
\framed[backgroundcolor=maincolor, background=color,
frame=off, foregroundcolor=white, foreground=color,
loffset=-20pt]{\setupbodyfont[60pt] \ss#1}
\blank[force,4*medium]\ss\setupbodyfont[20pt] #2}}
\setuphead[chapter][command=\MyChapterCommand]
\setupheadtext[chapter=Chapter]
\setupbodyfont[10pt]
\starttext
\chapter{Hello world}
Hello
\stoptext
On Wed, Aug 7, 2024 at 2:35 AM Shiv Shankar Dayal
-- Respect, Shiv Shankar Dayal
participants (2)
-
Henning Hraban Ramm
-
Shiv Shankar Dayal