* [NTG-context] Customizing chapter and page no. styles
@ 2024-08-02 12:33 Shiv Shankar Dayal
2024-08-02 12:52 ` [NTG-context] " Duncan Hothersall
0 siblings, 1 reply; 2+ messages in thread
From: Shiv Shankar Dayal @ 2024-08-02 12:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 251 bytes --]
Hi,
I was going through the Metafun manual, the print version, which comes with
distribution. I see how page no. and chapters are styles. How can I
customize for that kind of output in the current version of ConTeXt?
--
Respect,
Shiv Shankar Dayal
[-- Attachment #1.2: Type: text/html, Size: 478 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* [NTG-context] Re: Customizing chapter and page no. styles
2024-08-02 12:33 [NTG-context] Customizing chapter and page no. styles Shiv Shankar Dayal
@ 2024-08-02 12:52 ` Duncan Hothersall
0 siblings, 0 replies; 2+ messages in thread
From: Duncan Hothersall @ 2024-08-02 12:52 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2085 bytes --]
In the Metafun manual source the setup for page numbering is:
\startuseMPgraphic{circled}
pickup pencircle scaled 1mm ;
drawoptions(withcolor (.6+uniformdeviate.35)*white) ;
fill fullcircle xscaled 1.5cm yscaled 1cm ;
drawoptions(withcolor .625yellow) ;
draw fullcircle xscaled 1.5cm yscaled 1cm ;
\stopuseMPgraphic
\defineoverlay[circled][\useMPgraphic{circled}]
\def\Circled#1%
{\framed
[background=circled,frame=off,offset=overlay]
{\color[darkred]{#1}}}
\setuppagenumbering[location=]
\setupheadertexts[margin][][\hbox to \hsize{\hss\Circled\pagenumber\hss}]
and for chapter titles:
\startuniqueMPgraphic{titled}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
pickup pencircle scaled 1mm ;
drawoptions(withcolor .625yellow) ;
draw llcorner p -- lrcorner p ;
setbounds currentpicture to p ;
\stopuniqueMPgraphic
\defineoverlay[titled][\uniqueMPgraphic{titled}]
\def\ChapterCommand#1#2%
{\setbox0=\hbox to \leftmarginwidth{#1\hss}%
\hskip-\leftmarginwidth
\hskip-\leftmargindistance
\framed
[background=titled,frame=off,offset=0pt]
{\box0
\hskip\leftmargindistance
#2}}
Hope that helps!
Duncan
On Fri, 2 Aug 2024 at 13:33, Shiv Shankar Dayal <shivshankar.dayal@gmail.com>
wrote:
> Hi,
>
> I was going through the Metafun manual, the print version, which comes
> with distribution. I see how page no. and chapters are styles. How can I
> customize for that kind of output in the current version of ConTeXt?
>
> --
> 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
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 3624 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-02 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-02 12:33 [NTG-context] Customizing chapter and page no. styles Shiv Shankar Dayal
2024-08-02 12:52 ` [NTG-context] " Duncan Hothersall
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).