From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/116991 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeong Dal via ntg-context Newsgroups: gmane.comp.tex.context Subject: Chapter title in MetaFun manual. Date: Fri, 10 Feb 2023 21:05:36 +0900 Message-ID: <7DED14FA-DEDA-4BA8-944D-2D4AA95D5FDE@mac.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.14\)) Content-Type: multipart/mixed; boundary="===============7556743821909313338==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6792"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jeong Dal To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 10 13:06:27 2023 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQSAd-0001Zw-Dt for gctc-ntg-context-518@m.gmane-mx.org; Fri, 10 Feb 2023 13:06:27 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 951F23615B0; Fri, 10 Feb 2023 13:05:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 54WoHelAIPgB; Fri, 10 Feb 2023 13:05:52 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4010A3615AD; Fri, 10 Feb 2023 13:05:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B1CF4361141 for ; Fri, 10 Feb 2023 13:05:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w3vlXoMEG9zJ for ; Fri, 10 Feb 2023 13:05:49 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=17.58.6.49; helo=pv50p00im-ztdg10012101.me.com; envelope-from=haksan@mac.com; receiver= Original-Received: from pv50p00im-ztdg10012101.me.com (pv50p00im-ztdg10012101.me.com [17.58.6.49]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id D75D2360F26 for ; Fri, 10 Feb 2023 13:05:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=1a1hai; t=1676030745; bh=7vh4GvssuVC2qnGbyNF9Seu6v9h+tX69aaDtPlvEGJ0=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To; b=HvheU+/U4AHMxPPbsJeSWVdCVpAsFeW4J6CHodpeHGD5VkP2w5Sut3Nh5FxeX+Qna NgkL/DEJF9+ooPqP713XX86NLnmoUccO+knMAwmt7WqrXAMBV2pNo1JUgM2ksY19g5 Za+x9xe35pHuaVXCuxtq5sDsLC3hcuW6WkqOecQa2lNgK46vm3K9eaRizNvzi2KtSR bbyxFyfx/pifC8J0mMeA9tjsOqMuSSFDRWGM6jUC4ILpjLc0RHnDY+SLP/gABRpryZ yHO0jmhWH51SR2UA/B3kEJ4ZcAC01IMCb6tRpSL6t9KEEh7WgWg2tfZYRnCyQpbECC /9motuJ/F7k2w== Original-Received: from smtpclient.apple (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10012101.me.com (Postfix) with ESMTPSA id DBD14740085 for ; Fri, 10 Feb 2023 12:05:44 +0000 (UTC) X-Mailer: Apple Mail (2.3654.120.0.1.14) X-Proofpoint-GUID: XDFoQaCVBGpTqilEaNqJuYoh1wpcD6bR X-Proofpoint-ORIG-GUID: XDFoQaCVBGpTqilEaNqJuYoh1wpcD6bR X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.517,18.0.883,17.11.64.514.0000000_definitions?= =?UTF-8?Q?=3D2022-06-21=5F08:2022-06-21=5F01,2022-06-21=5F08,2022-02-23?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 malwarescore=0 phishscore=0 bulkscore=0 clxscore=1015 mlxscore=0 mlxlogscore=979 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2302100101 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:116991 Archived-At: --===============7556743821909313338== Content-Type: multipart/alternative; boundary="Apple-Mail=_8A89EF94-F852-4AA5-B2F9-FC3C0D1AB644" --Apple-Mail=_8A89EF94-F852-4AA5-B2F9-FC3C0D1AB644 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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% =E2=80=94> \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=3Dcircled,frame=3Doff,offset=3Doverlay] {\color[darkred]{#1}}} \setuppagenumbering[location=3D] \setupheadertexts[margin][][\hbox to = \hsize{\hss\Circled\pagenumber\hss}] \startuniqueMPgraphic{titled} path p ; p :=3D 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=3D\hbox to \leftmarginwidth{#1\hss}% \hskip-\leftmarginwidth \hskip-\leftmargindistance \framed [background=3Dtitled,frame=3Doff,offset=3D0pt] {\box0 \hskip\leftmargindistance #2}} \define[2]\TitleCommand% {\framed [background=3Dtitled,frame=3Doff,offset=3D0pt] {#2}} \setuphead [chapter]%,section,subsection] [command=3D\ChapterCommand, style=3D\ss\bf\tfd, color=3Ddarkred] \setuphead [title]%,subject,sububject] [command=3D\TitleCommand, style=3D\ss\bf\tfd, color=3Ddarkred] \setupbodyfont[bonum,rm,12pt] \showframe \starttext \startchapter[title=3D{Introduction}] This is the chapter for introduction. \stopchapter \startchapter[title=3D{Function}] Now, we study the function. \stopchapter \starttitle[title=3D{References}] \startitemize[n] \item first \item second \item third \stopitemize \stoptitle \stoptext= --Apple-Mail=_8A89EF94-F852-4AA5-B2F9-FC3C0D1AB644 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 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% =E2=80=94> = \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=3Dcircled,frame=3Doff,offset=3Doverlay]
{\color[darkred]{#1}}}

\setuppagenumbering[location=3D]
\setupheadertexts[margin][][\hbox to \hsize{\hss\Circled\pagenumber\hss}]

\startuniqueMPgraphic{titled}
= path p ; p :=3D 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=3D\hbox to \leftmarginwidth{#1\hss}%
\hskip-\leftmarginwidth
\hskip-\leftmargindistance
\framed
[background=3Dtitled,frame=3Doff,offset=3D0pt]
{\box0
\hskip\leftmargindistance
= #2}}

\define[2]\TitleCommand%
{\framed
[background=3Dtitled,frame=3Doff,offset=3D0pt]
= {#2}}

\setuphead
[chapter]%,section,subsection]
[command=3D\ChapterCommand,
style=3D\ss\bf\tfd,
color=3Ddarkred]

\setuphead
[title]%,subject,sububject]
[command=3D\TitleCommand,
style=3D\ss\bf\tfd,
color=3Ddarkred]

\setupbodyfont[bonum,rm,12pt]
\showframe

\starttext
\startchapter[title=3D{Introduction}]
This is = the chapter for introduction.
\stopchapter

\startchapter[title=3D{Function}]
Now, we study = the function.
\stopchapter

\starttitle[title=3D{References}]
\startitemize[n]
\item = first
\item second
\item third
\stopitemize
\stoptitle

\stoptext
= --Apple-Mail=_8A89EF94-F852-4AA5-B2F9-FC3C0D1AB644-- --===============7556743821909313338== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============7556743821909313338==--