referencing the customized enumeration with framed title
Hi, Some time ago, I am able to use following code(the framed title for Theorems and etc.) Thank Wolfgang and Otared again. Since it uses the customized style of numbering, there is a problem to reference them. As in the following code, \in{Definition}[] shows no number and \in{Theorem}[] shows ?? instead of numbers while \in{Exam}[] shows correctly. Is there a way to show the numbers correctly? Thank you for reading. Best regards, Dalyoung %%%%%%%%%%% \setupcolors[state=start] \definecolor[dGreen] [r=0,g=.375,b=.0] %%% define the background of Theorems: \defineframed [FunnyFramed] [frame=off, loffset=1ex, roffset=1ex, foregroundstyle=\ssbf] \startuseMPgraphic{FunnyFrame} picture p ; numeric o ; path a, b ; pair c ; p := textext.rt("\FunnyFramed{\enumerationparameter{text} \convertedcounter[Theorem]}") ; o := BodyFontSize ; a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; p := p shifted (2o,OverlayHeight-ypart center p) ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; b := a superellipsed .95 ; draw b ; b := (boundingbox p) superellipsed .95 ; fill b withcolor .85white ; draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext [FunnyText] [frame=off, background=FunnyFrame, before={\blank[line,halfline]}, % before={\blank[line]}, after={\blank[line]}, offset=\bodyfontsize, width=\textwidth] \defineenumeration[Theorem] [title=yes, text={\translate[en=Theorem, kr=정리]}, prefix=yes, prefixsegments=chapter, way=bychapter, alternative=command, headcommand=\gobbleoneargument, before=\startFunnyText, after=\stopFunnyText] %%%% Definition style \definenumber[DefNumber][way=bychapter,sectionumber=yes] \setuptextrules[rulecolor=dBlue] \define\DefCommand{\incrementnumber[DefNumber] \textrule[top]{\translate[en=Definition, kr=정 의] \getnumber[DefNumber]} } \defineenumeration[Definition] [alternative=hanging, width=fit, alternative=serried, text={}, number=no, before={\DefCommand}, after=\vskip3pt\hrule\blank] %%% Examples with or without solutions \defineenumeration[Exam] [text={\white\translate[en=Example, kr=예제]}, numbercommand={\inframed[corner=round, framecolor=dYellow,toffset=-1pt,boffset=-1pt, loffset=1ex,roffset=1ex, background=color,backgroundcolor=dGreen]}, %height=1.3em, % title=no, prefix=yes, prefixsegments=chapter, way=bychapter, before={\blank[big]}, after=\blank] \starttext \chapter{Spaces} \section{Space 1} \startDefinition[def:first] Let $X$ be a uncountable set. Let $\infty$ is a fixed point of $X$. Let $\mathcal T$ be the family of subsets $G$ such that either (i) $\infty \notin G$ or (ii) $\infty \in G \text{ and } G^c$ is finite. The space $(X, {\mathcal T} )$ is called {\bf Fort's space}. \stopDefinition \startTheorem[lem:first] Fort's space is a compact and Hausdorff topological space.\par \stopTheorem \startTheorem[thm:second] Fort's space is a compact and Hausdorff topological space. \stopTheorem \startExam[Ex:first] Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example \stopExam In this example, we defined \in{Definition}[def:first]. After that, we proved \in{Lemma}[lem:first] and \in{정리}[thm:second]. Finally, \in{Example}[Ex:first], we saw an example of it. \stoptext
On 1/12/2018 3:54 AM, Jeong Dal wrote:
Hi,
Some time ago, I am able to use following code(the framed title for Theorems and etc.) Thank Wolfgang and Otared again.
Since it uses the customized style of numbering, there is a problem to reference them. As in the following code, \in{Definition}[] shows no number and \in{Theorem}[] shows ?? instead of numbers while \in{Exam}[] shows correctly.
Is there a way to show the numbers correctly?
Thank you for reading.
Best regards,
Dalyoung
%%%%%%%%%%% \setupcolors[state=start] \definecolor[dGreen] [r=0,g=.375,b=.0] %%% define the background of Theorems: \defineframed [FunnyFramed] [frame=off, loffset=1ex, roffset=1ex, foregroundstyle=\ssbf]
\startuseMPgraphic{FunnyFrame} picture p ; numeric o ; path a, b ; pair c ; p := textext.rt("\FunnyFramed{\enumerationparameter{text} \convertedcounter[Theorem]}") ;
p := textext.rt("\FunnyFramed{\currentconstructiontext}") ; in a next version: % p := textext.rt("\wrappedconstruction{\FunnyFramed{\currentconstructiontext}}") ; % p := textext.rt("\FunnyFramed{\wrappedconstruction{\currentconstructiontext}}") ; % p := textext.rt("\FunnyFramed{\wrappedcurrentconstruction}") ;
o := BodyFontSize ; a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; p := p shifted (2o,OverlayHeight-ypart center p) ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; b := a superellipsed .95 ; draw b ; b := (boundingbox p) superellipsed .95 ; fill b withcolor .85white ; draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext [FunnyText] [frame=off, background=FunnyFrame, before={\blank[line,halfline]}, % before={\blank[line]}, after={\blank[line]}, offset=\bodyfontsize, width=\textwidth]
\defineenumeration[Theorem] [title=yes, text={\translate[en=Theorem, kr=정리]}, prefix=yes, prefixsegments=chapter, way=bychapter, alternative=command, headcommand=\gobbleoneargument,
Don't do this ^^
before=\startFunnyText, after=\stopFunnyText]
%%%% Definition style \definenumber[DefNumber][way=bychapter,sectionumber=yes] \setuptextrules[rulecolor=dBlue]
\define\DefCommand{\incrementnumber[DefNumber] \textrule[top]{\translate[en=Definition, kr=정 의] \getnumber[DefNumber]} } \defineenumeration[Definition] [alternative=hanging, width=fit, alternative=serried, text={}, number=no, before={\DefCommand}, after=\vskip3pt\hrule\blank]
%%% Examples with or without solutions \defineenumeration[Exam] [text={\white\translate[en=Example, kr=예제]}, numbercommand={\inframed[corner=round, framecolor=dYellow,toffset=-1pt,boffset=-1pt, loffset=1ex,roffset=1ex, background=color,backgroundcolor=dGreen]}, %height=1.3em, % title=no, prefix=yes, prefixsegments=chapter, way=bychapter, before={\blank[big]}, after=\blank]
\starttext
\chapter{Spaces}
\section{Space 1}
\startDefinition[def:first] Let $X$ be a uncountable set. Let $\infty$ is a fixed point of $X$. Let $\mathcal T$ be the family of subsets $G$ such that either (i) $\infty \notin G$ or (ii) $\infty \in G \text{ and } G^c$ is finite. The space $(X, {\mathcal T} )$ is called {\bf Fort's space}. \stopDefinition
\startTheorem[lem:first] Fort's space is a compact and Hausdorff topological space.\par \stopTheorem
\startTheorem[thm:second] Fort's space is a compact and Hausdorff topological space. \stopTheorem
\startExam[Ex:first] Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example \stopExam
In this example, we defined \in{Definition}[def:first]. After that, we proved \in{Lemma}[lem:first] and \in{정리}[thm:second]. Finally, \in{Example}[Ex:first], we saw an example of it.
\stoptext ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Dear Hans, Thank you for the quick answer. Repalcing “p:=textext.rt();” and commenting out “headcommand=gobbleone…” with your suggestion, the references are working. However, there is a side effect. “Theorem 1.1” appears twice, one in the frame which I expected and one at the beginning of the framed text which I don’t want. One more thing, is there no way to show the number of the Definition? Thanks again. Best regards, Dalyoung %%%%%%%%%% \setupcolors[state=start] \definecolor[dGreen] [r=0,g=.375,b=.0] %%% define the background of Theorems: \defineframed [FunnyFramed] [frame=off, loffset=1ex, roffset=1ex, foregroundstyle=\ssbf] \startuseMPgraphic{FunnyFrame} picture p ; numeric o ; path a, b ; pair c ; %%%%% p := textext.rt(“\FunnyFramed{\enumerationparameter{text} \convertedcounter[Theorem]}”) ; p := textext.rt("\FunnyFramed{\currentconstructiontext}") ; o := BodyFontSize ; a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; p := p shifted (2o,OverlayHeight-ypart center p) ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; b := a superellipsed .95 ; draw b ; b := (boundingbox p) superellipsed .95 ; fill b withcolor .85white ; draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext [FunnyText] [frame=off, background=FunnyFrame, before={\blank[line,halfline]}, after={\blank[line]}, offset=\bodyfontsize, width=\textwidth] \defineenumeration[Theorem] [title=no, text={\translate[en=Theorem, kr=정리]}, prefix=yes, prefixsegments=chapter, way=bychapter, alternative=command, %%%%%% headcommand=\gobbleoneargument, before=\startFunnyText, after=\stopFunnyText] %%%% Definition style \definenumber[DefNumber][way=bychapter,sectionumber=yes] \setuptextrules[rulecolor=dBlue] \define\DefCommand{\incrementnumber[DefNumber] \textrule[top]{\translate[en=Definition, kr=정 의] \getnumber[DefNumber]} } \defineenumeration[Definition] [width=fit, alternative=serried, text={}, number=no, before={\DefCommand}, after=\vskip3pt\hrule\blank] %%% Examples with or without solutions \defineenumeration[Exam] [text={\white\translate[en=Example, kr=예제]}, numbercommand={\inframed[corner=round, framecolor=dYellow,toffset=-1pt,boffset=-1pt, loffset=1ex,roffset=1ex, background=color,backgroundcolor=dGreen]}, % title=no, alternataive=hanging, prefix=yes, prefixsegments=chapter, way=bychapter, before={\blank[big]}, after=\blank] \starttext \chapter{Spaces} \section{Space 1} \startDefinition[def:first] Let $X$ be a uncountable set. Let $\infty$ is a fixed point of $X$. Let $\mathcal T$ be the family of subsets $G$ such that either (i) $\infty \notin G$ or (ii) $\infty \in G \text{ and } G^c$ is finite. The space $(X, {\mathcal T} )$ is called {\bf Fort's space}. \stopDefinition \startTheorem[lem:first] Fort's space is a compact and Hausdorff topological space.\par \stopTheorem \startTheorem[thm:second] Fort's space is a compact and Hausdorff topological space. \stopTheorem \startExam[Ex:first] Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example \stopExam In this example, we defined \in{Definition}[def:first]. After that, we proved \in{Lemma}[lem:first] and \in{정리}[thm:second]. Finally, \in{Example}[Ex:first], we saw an example of it. \stoptext
On 1/12/2018 5:22 PM, Jeong Dal wrote:
Dear Hans,
Thank you for the quick answer. Repalcing “p:=textext.rt();” and commenting out “headcommand=gobbleone…” with your suggestion, the references are working. However, there is a side effect. “Theorem 1.1” appears twice, one in the frame which I expected and one at the beginning of the framed text which I don’t want.
One more thing, is there no way to show the number of the Definition?
you can download a beta and try \defineenumeration[Theorem] [alternative=empty, before=\startMyText, after=\stopMyText] \defineframed [MyFramed] [frame=off, loffset=1ex, roffset=1ex, foregroundstyle=\ssbf] \startuseMPgraphic{MyFrame} picture p ; numeric o ; path a, b ; pair c ; % p := textext.rt("\MyFramed{\currentconstructiontext}") ; p := textext.rt("\wrappedconstruction{\MyFramed{\currentconstructiontext}}") ; % p := textext.rt("\MyFramed{\wrappedconstruction{\currentconstructiontext}}") ; % p := textext.rt("\MyFramed{\wrappedcurrentconstruction}") ; o := BodyFontSize ; a := OverlayBox ; p := p shifted (2o,OverlayHeight-ypart center p) ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; b := a superellipsed .95 ; draw b ; b := (boundingbox p) superellipsed .95 ; fill b withcolor .85white ; draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[MyFrame][\useMPgraphic{MyFrame}] \defineframedtext [MyText] [frame=off, background=MyFrame, offset=\bodyfontsize, width=\textwidth] \starttext \startTheorem[lem] bla bla \stopTheorem Bla bla \in {Lemma} [lem] bla bla. \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Dear all, I found some warning message in the log file which concerns about the font. I didn’t see this kind of error before. (I might missed this error.) However, it produced an output. fonts > defining > font with asked name 'texgyreheros-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyreheros-regular', loading aborted fonts > defining > unable to define 'texgyreheros-regular' as 'dummy--0' floatblocks > '1' placed (here) fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--4' fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--5' fonts > defining > font with asked name 'texgyrepagella-bold' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-bold', loading aborted fonts > defining > unable to define 'texgyrepagella-bold' as 'dummy--0' fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--0' How to remove this kind of error? The main file is too big to list here. Here is a part of typescript file which was made by the help of Hans. \loadtypescriptfile[texgyre] %\loadtypescriptfile[euler] %\loadtypescriptfile[xits] \definefontfeature [kr-default] [mode=node,script=hang,lang=kor] \definefontfeature [kr-slanted] [mode=node,script=hang,lang=kor,slant=.2] \definefontfeature [kr-latin-default] [default] \definefontfeature [kr-latin-slanted] [krlatindefault] [slant=.2] \definefontfeature [kr-latin-slanted-mono] [slant=.2] \definefontfeature [kr-latin-smallcaps] [krlatindefault] [smcp=yes] \definefontfeature [kr-latin-smallcaps-mono] [cmcp=yes] \definefontfallback[kr-serif] [texgyrepagella-regular*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifbold] [texgyrepagella-bold*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifitalic] [texgyrepagella-italic*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifbolditalic] [texgyrepagella-bolditalic*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifslanted] [texgyrepagella-regular*kr-latin-slanted] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifboldslanted][texgyrepagella-bold*kr-latin-slanted] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifcaps] [texgyrepagella-regular*kr-latin-smallcaps] [0x0000-0x0400][force=yes] \definefontfallback[kr-sans] [texgyreheros-regular*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansbold] [texgyreheros-bold*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansitalic] [texgyreheros-italic*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansbolditalic] [texgyreheros-bolditalic*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansslanted] [texgyreheros-regular*kr-latin-slanted] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansboldslanted] [texgyreheros-bold*kr-latin-slanted] [0x0000-0x0400][force=yes] \definefontfallback[kr-sanscaps] [texgyreheros-regular*kr-latin-smallcaps] [0x0000-0x0400][force=yes] \definefontfallback[kr-mono] [texgyrecursor-regular] [0x0000-0x0400][force=yes] \definefontfallback[kr-monobold] [texgyrecursor-bold] [0x0000-0x0400][force=yes] \definefontfallback[kr-monoitalic] [texgyrecursor-italic] [0x0000-0x0400][force=yes] \definefontfallback[kr-monobolditalic] [texgyrecursor-bolditalic] [0x0000-0x0400][force=yes] \definefontfallback[kr-monoslanted] [texgyrecursor-regular*kr-latin-slanted-mono] [0x0000-0x0400][force=yes] \definefontfallback[kr-monoboldslanted] [texgyrecursor-bold*kr-latin-slanted-mono] [0x0000-0x0400][force=yes] \definefontfallback[kr-monocaps] [texgyrecursor-regular*kr-latin-smallcaps-mono][0x0000-0x0400][force=yes] %\starttypescriptcollection[hcrfonts] \starttypescript [serif] [HCRMJ] \definefontsynonym [HanBatang] [file:HANBatang-LVT.ttf] [features=kr-default,fallbacks=kr-serif] \definefontsynonym [HanBatangbold] [file:HANBatangB-LVT.ttf][features=kr-default,fallbacks=kr-serifbold] \definefontsynonym [HanBatangitalic] [file:HANBatang-LVT.ttf] [features=kr-slanted,fallbacks=kr-serifitalic] \definefontsynonym [HanBatangbolditalic] [file:HANBatangB-LVT.ttf][features=kr-slanted,fallbacks=kr-serifbolditalic] \definefontsynonym [HanBatangslanted] [file:HANBatang-LVT.ttf] [features=kr-slanted,fallbacks=kr-serifslanted] \definefontsynonym [HanBatangboldslanted][file:HANBatangB-LVT.ttf][features=kr-slanted,fallbacks=kr-serifboldslanted] \definefontsynonym [HanBatangcaps] [file:HANBatang-LVT.ttf] [features=kr-default,fallbacks=kr-serifcaps] \stoptypescript
Hi Dalyoung, The question of TXGyre fonts has been mentioned on this list recently, and the following answer from Wolfgang Schuster seems to solve the problem (until the original problem is fixed). This answer was on the thread « Problem with pagella font (beta) »:
On 23 Jul 2018, at 12:39, Wolfgang Schuster
wrote: Hi Fabrice,
you can download the fonts from the GUST [1] website (the flat package is enough because you need only the opentype files) and put them in your local tex directory in your home folder, e.g.
~/texmf/fonts/data/texgyre/
or you put them in your tex installation, e.g.
texmf-fonts/fonts/data/texgyre/
[1] http://www.gust.org.pl/projects/e-foundry/tex-gyre/whole
Wolfgang
Best regards: OK
On 25 Jul 2018, at 01:40, Jeong Dal
wrote: Dear all,
I found some warning message in the log file which concerns about the font. I didn’t see this kind of error before. (I might missed this error.) However, it produced an output.
fonts > defining > font with asked name 'texgyreheros-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyreheros-regular', loading aborted fonts > defining > unable to define 'texgyreheros-regular' as 'dummy--0' floatblocks > '1' placed (here) fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--4' fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--5' fonts > defining > font with asked name 'texgyrepagella-bold' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-bold', loading aborted fonts > defining > unable to define 'texgyrepagella-bold' as 'dummy--0' fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--0'
How to remove this kind of error? The main file is too big to list here. Here is a part of typescript file which was made by the help of Hans.
\loadtypescriptfile[texgyre] %\loadtypescriptfile[euler] %\loadtypescriptfile[xits]
\definefontfeature [kr-default] [mode=node,script=hang,lang=kor]
\definefontfeature [kr-slanted] [mode=node,script=hang,lang=kor,slant=.2]
\definefontfeature [kr-latin-default] [default]
\definefontfeature [kr-latin-slanted] [krlatindefault] [slant=.2]
\definefontfeature [kr-latin-slanted-mono] [slant=.2]
\definefontfeature [kr-latin-smallcaps] [krlatindefault] [smcp=yes]
\definefontfeature [kr-latin-smallcaps-mono] [cmcp=yes]
\definefontfallback[kr-serif] [texgyrepagella-regular*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifbold] [texgyrepagella-bold*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifitalic] [texgyrepagella-italic*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifbolditalic] [texgyrepagella-bolditalic*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifslanted] [texgyrepagella-regular*kr-latin-slanted] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifboldslanted][texgyrepagella-bold*kr-latin-slanted] [0x0000-0x0400][force=yes] \definefontfallback[kr-serifcaps] [texgyrepagella-regular*kr-latin-smallcaps] [0x0000-0x0400][force=yes] \definefontfallback[kr-sans] [texgyreheros-regular*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansbold] [texgyreheros-bold*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansitalic] [texgyreheros-italic*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansbolditalic] [texgyreheros-bolditalic*kr-latin-default] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansslanted] [texgyreheros-regular*kr-latin-slanted] [0x0000-0x0400][force=yes] \definefontfallback[kr-sansboldslanted] [texgyreheros-bold*kr-latin-slanted] [0x0000-0x0400][force=yes] \definefontfallback[kr-sanscaps] [texgyreheros-regular*kr-latin-smallcaps] [0x0000-0x0400][force=yes] \definefontfallback[kr-mono] [texgyrecursor-regular] [0x0000-0x0400][force=yes] \definefontfallback[kr-monobold] [texgyrecursor-bold] [0x0000-0x0400][force=yes] \definefontfallback[kr-monoitalic] [texgyrecursor-italic] [0x0000-0x0400][force=yes] \definefontfallback[kr-monobolditalic] [texgyrecursor-bolditalic] [0x0000-0x0400][force=yes] \definefontfallback[kr-monoslanted] [texgyrecursor-regular*kr-latin-slanted-mono] [0x0000-0x0400][force=yes] \definefontfallback[kr-monoboldslanted] [texgyrecursor-bold*kr-latin-slanted-mono] [0x0000-0x0400][force=yes] \definefontfallback[kr-monocaps] [texgyrecursor-regular*kr-latin-smallcaps-mono][0x0000-0x0400][force=yes]
%\starttypescriptcollection[hcrfonts]
\starttypescript [serif] [HCRMJ] \definefontsynonym [HanBatang] [file:HANBatang-LVT.ttf] [features=kr-default,fallbacks=kr-serif] \definefontsynonym [HanBatangbold] [file:HANBatangB-LVT.ttf][features=kr-default,fallbacks=kr-serifbold] \definefontsynonym [HanBatangitalic] [file:HANBatang-LVT.ttf] [features=kr-slanted,fallbacks=kr-serifitalic] \definefontsynonym [HanBatangbolditalic] [file:HANBatangB-LVT.ttf][features=kr-slanted,fallbacks=kr-serifbolditalic] \definefontsynonym [HanBatangslanted] [file:HANBatang-LVT.ttf] [features=kr-slanted,fallbacks=kr-serifslanted] \definefontsynonym [HanBatangboldslanted][file:HANBatangB-LVT.ttf][features=kr-slanted,fallbacks=kr-serifboldslanted] \definefontsynonym [HanBatangcaps] [file:HANBatang-LVT.ttf] [features=kr-default,fallbacks=kr-serifcaps] \stoptypescript
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
Dear all, Yesterday, I asked about a font problem without a mwe. Here is a MWE. %%%%%%%%% \setuplanguage[kr][patterns=us] \mainlanguage[kr] \setscript[hangul] \usetypescriptfile[type-hcrlvt] \usetypescript[HcrFont] \definefontfeature[kr][script=hang,language=kor,mode=node,analyze=yes] \setupbodyfont[Myface, rm, 11pt] \starttext This is a test file. %이것은 시험 파일입니다. {\bf This is a test file for font.}%{\bf 이것은 시험 파일입니다.} {\sl This is a test file for font.}%{\sl 이것은 시험 파일입니다.} \stoptext %%%%%%%% Here is a part of log file of the first run. mtx-context | run 1: luatex --fmt="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="test" --lua="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall "cont-yes.mkiv" This is LuaTeX, Version 1.08.0 (TeX Live 2018) system commands enabled. open source > level 1, order 1, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2018.07.20 21:20 MKIV beta fmt: 2018.7.24 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > beware: some patches loaded from cont-new.mkiv close source > level 2, order 2, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'test', input './test', result 'test' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name '/Users/graph/Documents/TeXfiles/test.tex' open source > level 3, order 4, name '/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv' open source > level 4, order 5, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 4, order 5, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 3, order 5, name '/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv' fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--0' fonts > defining > font with asked name 'texgyrepagella-bold' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-bold', loading aborted fonts > defining > unable to define 'texgyrepagella-bold' as 'dummy--0' fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--0' backend > xmp > using file '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml' pages > flushing realpage 1, userpage 1, subpage 1 close source > level 2, order 5, name '/Users/graph/Documents/TeXfiles/test.tex' close source > level 1, order 5, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv' mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.006 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 14 found files, scanned paths: <none> mkiv lua stats > stored bytecode data: 428 modules (0.208 sec), 93 tables (0.013 sec), 521 chunks (0.220 sec) mkiv lua stats > traced context: maxstack: 1309, freed: 0, unreachable: 1309 mkiv lua stats > cleaned up reserved nodes: 58 nodes, 9 lists of 455 mkiv lua stats > node memory usage: 2 glue, 2 kern, 2 penalty, 13 attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined mkiv lua stats > node list callback tasks: 8 unique task lists, 6 instances (re)created, 43 calls mkiv lua stats > used backend: pdf (backend for directly generating pdf output) mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading mkiv lua stats > callbacks: internal: 146, file: 617, direct: 2, late: 0, function 868, total: 1633 mkiv lua stats > loaded patterns: en::2 kr::51, load time: 0.000 mkiv lua stats > result saved in file: test.pdf, compresslevel 3, objectcompresslevel 3 mkiv lua stats > loaded fonts: 3 files: latinmodern-math.otf, hanbatang-lvt.ttf, hanbatangb-lvt.ttf mkiv lua stats > font engine: otf 3.103, afm 1.513, tfm 1.000, 9 instances, 4 shared in backend, 4 common vectors, 0 common hashes, load time 1.061 seconds mkiv lua stats > used platform: osx-64, type: unix, binary subtree: texmf-osx-64 mkiv lua stats > used engine: luatex version 1.08 with functionality level 6731, banner: this is luatex, version 1.08.0 (tex live 2018) mkiv lua stats > control sequences: 46564 of 65536 + 100000 mkiv lua stats > lua properties: engine: lua 5.3, used memory: 214 MB (ctx: 213 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 1.403 seconds, 1 processed pages, 1 shipped pages, 0.713 pages/second I checked the location of texgyre font and here is the result. /Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/shapes/texgyrepagella-regular-otf.tma /Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/texgyrepagella-regular.tma I don’t know what happened here and how to make it right. Thank you for your help. Best regards, Dalyoung Here is a typescript file.
On 7/26/2018 2:49 AM, Jeong Dal wrote:
Dear all,
Yesterday, I asked about a font problem without a mwe.
Here is a MWE. %%%%%%%%% \setuplanguage[kr][patterns=us] \mainlanguage[kr] \setscript[hangul]
\usetypescriptfile[type-hcrlvt] \usetypescript[HcrFont] \definefontfeature[kr][script=hang,language=kor,mode=node,analyze=yes] \setupbodyfont[Myface, rm, 11pt]
\starttext This is a test file. %이것은 시험 파일입니다.
{\bf This is a test file for font.}%{\bf 이것은 시험 파일입니다.}
{\sl This is a test file for font.}%{\sl 이것은 시험 파일입니다.}
\stoptext %%%%%%%%
Here is a part of log file of the first run.
mtx-context | run 1: luatex --fmt="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="test" --lua="/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall "cont-yes.mkiv"
This is LuaTeX, Version 1.08.0 (TeX Live 2018) system commands enabled. open source > level 1, order 1, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2018.07.20 21:20 MKIV beta fmt: 2018.7.24 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > beware: some patches loaded from cont-new.mkiv close source > level 2, order 2, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'test', input './test', result 'test' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name '/Users/graph/Documents/TeXfiles/test.tex' open source > level 3, order 4, name '/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv' open source > level 4, order 5, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 4, order 5, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 3, order 5, name '/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv' fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--0' fonts > defining > font with asked name 'texgyrepagella-bold' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-bold', loading aborted fonts > defining > unable to define 'texgyrepagella-bold' as 'dummy--0' fonts > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts > defining > unknown font 'texgyrepagella-regular', loading aborted fonts > defining > unable to define 'texgyrepagella-regular' as 'dummy--0' backend > xmp > using file '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml' pages > flushing realpage 1, userpage 1, subpage 1 close source > level 2, order 5, name '/Users/graph/Documents/TeXfiles/test.tex' close source > level 1, order 5, name '/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.006 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 14 found files, scanned paths: <none> mkiv lua stats > stored bytecode data: 428 modules (0.208 sec), 93 tables (0.013 sec), 521 chunks (0.220 sec) mkiv lua stats > traced context: maxstack: 1309, freed: 0, unreachable: 1309 mkiv lua stats > cleaned up reserved nodes: 58 nodes, 9 lists of 455 mkiv lua stats > node memory usage: 2 glue, 2 kern, 2 penalty, 13 attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined mkiv lua stats > node list callback tasks: 8 unique task lists, 6 instances (re)created, 43 calls mkiv lua stats > used backend: pdf (backend for directly generating pdf output) mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading mkiv lua stats > callbacks: internal: 146, file: 617, direct: 2, late: 0, function 868, total: 1633 mkiv lua stats > loaded patterns: en::2 kr::51, load time: 0.000 mkiv lua stats > result saved in file: test.pdf, compresslevel 3, objectcompresslevel 3 mkiv lua stats > loaded fonts: 3 files: latinmodern-math.otf, hanbatang-lvt.ttf, hanbatangb-lvt.ttf mkiv lua stats > font engine: otf 3.103, afm 1.513, tfm 1.000, 9 instances, 4 shared in backend, 4 common vectors, 0 common hashes, load time 1.061 seconds mkiv lua stats > used platform: osx-64, type: unix, binary subtree: texmf-osx-64 mkiv lua stats > used engine: luatex version 1.08 with functionality level 6731, banner: this is luatex, version 1.08.0 (tex live 2018) mkiv lua stats > control sequences: 46564 of 65536 + 100000 mkiv lua stats > lua properties: engine: lua 5.3, used memory: 214 MB (ctx: 213 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 1.403 seconds, 1 processed pages, 1 shipped pages, 0.713 pages/second
I checked the location of texgyre font and here is the result.
/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/shapes/texgyrepagella-regular-otf.tma
/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/texgyrepagella-regular.tma
I don’t know what happened here and how to make it right.
Here i see: mkiv lua stats > loaded fonts: 5 files: texgyrepagella-bold.otf, texgyrepagella-regular.otf, hanbatang-lvt.ttf, hanbatangb-lvt.ttf, latinmodern-math.otf Maybe: (1) wipe the cache (2) mtxrun --script --reload -force
Here is a typescript file. Better use type-imp-<yourtag>.mkiv i.e. "-imp-" in the name for such specific implementation files
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Dear Hans,
(1) wipe the cache (2) mtxrun —script --reload -force
Do you mean “wipe cache” as delete “luatex-cache/context/5fe67…f32e/fonts” folder? I open the terminal and run “mtxrun —script — reload -force”, then I got mtxrun | ConTeXt TDS Runner Tool 1.32 mtxrun | mtxrun | no script name given, known scripts: mtxrun | mtxrun | babel 1.20 Babel Input To UTF Conversion mtxrun | base 1.35 ConTeXt TDS Management Tool (aka luatools) mtxrun | bibtex bibtex helpers ……. mtxrun | evohome 1.00 Evohome Fetcher mtxrun | fcd 1.00 Fast Directory Change mtxrun | flac 0.10 ConTeXt Flac Helpers mtxrun | fonts 0.21 ConTeXt Font Database Management mtxrun | grep 0.10 Simple Grepper …… …… mtxrun | watch 1.00 ConTeXt Request Watchdog mtxrun | youless 1.10 YouLess Fetcher Do you mean “mtxrun —script —reload —force fonts”?
Better use type-imp-<yourtag>.mkiv i.e. “-imp-“ in the name for such specific implementation files
I will change the name. Thank you again. Best regards, Dalyoung
On 7/26/2018 4:53 PM, Jeong Dal wrote:
Do you mean “wipe cache” as delete “luatex-cache/context/5fe67…f32e/fonts” folder?
yes
Do you mean “mtxrun —script —reload —force fonts”?
mtxrun —script fonts —reload —force Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 1/12/2018 3:54 AM, Jeong Dal wrote:
Hi,
Some time ago, I am able to use following code(the framed title for Theorems and etc.) Thank Wolfgang and Otared again.
Since it uses the customized style of numbering, there is a problem to reference them. As in the following code, \in{Definition}[] shows no number and \in{Theorem}[] shows ?? instead of numbers while \in{Exam}[] shows correctly.
Is there a way to show the numbers correctly? % in cont-new.mkiv:
\unprotect \defineconstructionalternative [\v!empty] [\c!renderingsetup=\??constructionrenderings:\v!empty] \startsetups[\??constructionrenderings:\v!empty] \noindent \useconstructionstyleandcolor\c!style\c!color \ignorespaces \stopsetups \protect % till here \defineenumeration[Theorem] [alternative=empty, before=\startMyText, after=\stopMyText] \defineframed [MyFramed] [frame=off, loffset=1ex, roffset=1ex, foregroundstyle=\ssbf] \startuseMPgraphic{MyFrame} picture p ; numeric o ; path a, b ; pair c ; p := textext.rt("\MyFramed{\currentconstructiontext}") ; % p := textext.rt("\wrappedconstruction{\MyFramed{\currentconstructiontext}}") ; % p := textext.rt("\MyFramed{\wrappedconstruction{\currentconstructiontext}}") ; % p := textext.rt("\MyFramed{\wrappedcurrentconstruction}") ; o := BodyFontSize ; a := OverlayBox ; p := p shifted (2o,OverlayHeight-ypart center p) ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; b := a superellipsed .95 ; draw b ; b := (boundingbox p) superellipsed .95 ; fill b withcolor .85white ; draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[MyFrame][\useMPgraphic{MyFrame}] \defineframedtext [MyText] [frame=off, background=MyFrame, offset=\bodyfontsize, width=\textwidth] \starttext \startTheorem[lem] bla bla \stopTheorem Bla bla \in {Lemma} [lem] bla bla. \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Hans Hagen
-
Jeong Dal
-
Otared Kavian