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
<shivshankar.da...@gmail.com> wrote:
>
> 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
> <shivshankar.da...@gmail.com> wrote:
> >
> > 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 <te...@fiee.net> wrote:
> > >
> > > Am 06.08.24 um 21:26 schrieb Shiv Shankar Dayal:
> > > > What is the general method of customizing chapter titles? For example,
> > > > I would like something like the attachment. Is it achievable without
> > > > using Metapost?
> > >
> > > If you can create it with a macro, you can use it for a title.
> > >
> > > This looks just like \framed and \rotate with \offset.
> > >
> > > Hraban
> > > ___________________________________________________________________________________
> > > 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
> > > ___________________________________________________________________________________
> >
> >
> >
> > --
> > Respect,
> > Shiv Shankar Dayal
>
>
>
> --
> Respect,
> Shiv Shankar Dayal



-- 
Respect,
Shiv Shankar Dayal
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to