[NTG-context] Chapter title in MetaFun manual.
Jeong Dal
haksan at mac.com
Fri Feb 10 13:26:52 CET 2023
Dear all,
I think that I found the cause.
The page layout of my file is different from that of MetaFun manual.
After borrowing the \setuplayout from MetaFun-000.tex, it works correctly.
I am sorry to give you a wrong example.
Thank you for reading.
Best regards,
Dalyoung
> 2023. 2. 10. ì¤í 9:05, Jeong Dal via ntg-context <ntg-context at ntg.nl> ìì±:
>
> Dear all,
>
> I copied the code of defining chapter command from metafun-000.tex, and run it.
> But the result is different from that in MetaFun Manual.
> There is a big spaces between the number and the title which yields the number cannot be seen.
> I commented out several lines which seems to be not-related with chapter title.
> And, I changed
>
> \def\ChapterCommand#1#2% â> \define[2]\ChapterCommand
>
> Would you please test the following code to find out what is wrong?
>
> Thank you for reading.
>
> Best regards,
>
> Dalyoung
>
>
> \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
>
> %\startnotmode[proof]
> % \defineoverlay[circled][\useMPgraphic{circled}]
> %\stopnotmode
>
> \define[1]\Circled%
> {\framed
> [background=circled,frame=off,offset=overlay]
> {\color[darkred]{#1}}}
>
> \setuppagenumbering[location=]
> \setupheadertexts[margin][][\hbox to \hsize{\hss\Circled\pagenumber\hss}]
>
> \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}]
>
> \define[2]\ChapterCommand%
> {\setbox0=\hbox to \leftmarginwidth{#1\hss}%
> \hskip-\leftmarginwidth
> \hskip-\leftmargindistance
> \framed
> [background=titled,frame=off,offset=0pt]
> {\box0
> \hskip\leftmargindistance
> #2}}
>
> \define[2]\TitleCommand%
> {\framed
> [background=titled,frame=off,offset=0pt]
> {#2}}
>
> \setuphead
> [chapter]%,section,subsection]
> [command=\ChapterCommand,
> style=\ss\bf\tfd,
> color=darkred]
>
> \setuphead
> [title]%,subject,sububject]
> [command=\TitleCommand,
> style=\ss\bf\tfd,
> color=darkred]
>
>
> \setupbodyfont[bonum,rm,12pt]
> \showframe
>
> \starttext
> \startchapter[title={Introduction}]
> This is the chapter for introduction.
> \stopchapter
>
> \startchapter[title={Function}]
> Now, we study the function.
> \stopchapter
>
> \starttitle[title={References}]
> \startitemize[n]
> \item first
> \item second
> \item third
> \stopitemize
> \stoptitle
>
> \stoptext
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20230210/46bf3cb2/attachment-0001.htm>
More information about the ntg-context
mailing list