Re: [NTG-context] index problem: [entry not flushed]

2019-02-11 Thread Jeong Dal
Dear Wolfgang,

>> I couldn’t figure out what relation is there between Theorems and Exam.
> The numbers are correct with the latest beta.
> 
> mtx-context | current version: 2019.02.10 17:43
> 

You are right. The example which I sent last time had no problem in numbers.
I checked it by adding definitions one by one and finally found the reason.

One line in my environment file cause the problem. 
\setupenumeration[alternative=serried,width=broad,distance=0.5em]

Also, I found very strange phenomena that it depends on the order of appearance 
of that line.
That is, it is OK if the command \setupenumeration… before the 
\defineenumeration[Exam], but if the command \setupenumeration… after the 
\defineenumeration[Exam] cause the problem.

After change the order of appearance such a commnad in my environment file, the 
numbers of Exam are correct.  Now, I have to find the other possible changes.

Please run the following code changing the location of the commnad 
“\setupenumeration…”.

Thank you so much.

Best regards,

Dalyoung

 general setting for enumerations:Exam,Theorem,Lemma,Definition
\setupenumeration[alternative=serried,width=broad,distance=0.5em]
%

\setupwhitespace[medium]

\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=blue]},   %height=1.3em,
title=yes,
prefix=yes,
prefixsegments=chapter,
way=bychapter,
before={\blank},
after=\blank]

\setupbodyfont[rm, 11pt]

\starttext

\dorecurse{3}{
\startchapter[title={Chapter Title}]

\startExam
We call it \index{OneTwo}{\bf OneTwo}
\stopExam

\startExam
We call it \index{OneTwo}{\bf OneTwo}
\stopExam
\stopchapter
}

\page
\placeindex

\stoptext
%

> Wolfgang
> 

___
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
___


Re: [NTG-context] index problem: [entry not flushed]

2019-02-11 Thread Wolfgang Schuster



Jeong Dal schrieb am 11.02.19 um 11:17:

2.  Also, the numbers of examples is not reset even though the new chapter 
began,
for example, Example 2.3, 2.4, 3.5, 3.6 etc.
However,  I couldn’t make the same error with this code,
It never happened without theorems, but it appeared when I added \startTheorem 
in my book.
So, I add "\setcounter[Exam][0]” before the \startchapter everytime.
I couldn’t figure out what relation is there between Theorems and Exam.

The numbers are correct with the latest beta.

mtx-context | current version: 2019.02.10 17:43

Wolfgang

___
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
___


Re: [NTG-context] index problem: [entry not flushed]

2019-02-11 Thread Jeong Dal
Dear all,

Since the customized Theorem structure is already complicate, I just extract 
\index from the title as following:

\startTheorem{\bf title of theorem}
\index{title of theorem}
bla bla bla
\stopTheorem

In this way, I cleared the message "[entry not flushed]” in the indices.
There may be a better way.

However, I couldn’t locate what hindered the resetting of counter Exam yet.
I have to check the definition in the environment file one by one.

Thank you for reading.

Best regards,

Dalyoung


___
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
___


[NTG-context] index problem: [entry not flushed]

2019-02-11 Thread Jeong Dal
Dear all,

I just found that the counter problem has no relation with theorems.
It happened without theorems while some examples worked correctly.
There may be another problem in my definitions in environment file.
I’ll do more tests.

Thank you for reading.

Best regards,

Dalyoung



___
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
___


[NTG-context] index problem: [entry not flushed]

2019-02-11 Thread Jeong Dal
Dear all,

I used a customized Theorem structure which is made by the help of experts in 
this list.
I have two questions.

1. Recently I added titles of theorems which was indexed and found a strange 
error message  "[entry not flushed]” in the list of index. 
Please run the following sample code?

%%
\defineframed
  [MyFramed]
  [frame=off,
   loffset=1ex,
   roffset=1ex,
   foregroundstyle=\ssbf]

\startuseMPgraphic{MyFrame}
picture p ; numeric o ; path a, b ; pair c ;
%p := textext.rt("\FunnyFramed{\enumerationparameter{text} 
\convertedcounter[Theorem]}") ;
   p := textext.rt("\wrappedconstruction{\MyFramed{\currentconstructiontext}}") 
;
%   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[MyFrame][\useMPgraphic{MyFrame}]

\defineframedtext
  [MyText]
  [frame=off,
   background=MyFrame,
   before={\blank[line,halfline]},
   after={\blank[line]},
   offset=\bodyfontsize,
   width=\textwidth]

\defineenumeration[Theorem]
 [alternative=empty,
  title=yes,
  titleleft=,
  titleright=,
  text={\translate[en=Theorem, kr=정리]},
   prefix=yes,
   prefixsegments=chapter,
   way=bychapter,
%   alternative=command,
   before=\startMyText,
   after=\stopMyText]

\defineenumeration[Lemma]
  [alternative=empty,
  title=no,
  text={\translate[en=Lemma, kr=보조정리]},
   prefix=yes,
   prefixsegments=chapter,
   way=bychapter,
   counter=Theorem,
   before=\startMyText,
   after=\stopMyText]

\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=blue]},   %height=1.3em,
title=yes,
prefix=yes,
prefixsegments=chapter,
way=bychapter,
before={\blank},
after=\blank]

\setupbodyfont[rm, 11pt]

\starttext

\startchapter[title={First}]
\startTheorem
This is the first Theorem
\stopTheorem

\startExam
We call it \index{OneTwo}{\bf OneTwo}
\stopExam

\startTheorem{\index{OneOne}{\bf OneOne}}
This is the first Theorem
\stopTheorem

\startExam
We call it \index{OneTwo}{\bf OneTwo}
\stopExam
\stopchapter

\startchapter[title={Second}]
   \startTheorem{\index{TwoOne}{\bf TwoOne}}
   This is the first Theorem
   \stopTheorem

   \startExam
   We call it \index{Two 3}{\bf Two 3}
   \stopExam

   \startExam
   We call it \index{TwoTwo}{\bf TwoTwo}
   \stopExam
\stopchapter

\startchapter[title={Third}]
   \startExam
   We call it \index{Three 1}{\bf Three 1}
   \stopExam

   \startTheorem{\index{ThreeOne}{\bf ThreeOne}}
   This is the first Theorem
   \stopTheorem

   \startExam
   We call it \index{ThreeThree}{\bf ThreeThree}
   \stopExam

\stopchapter

\page
\placeindex

\stoptext
%%

How to get rid of the message [entry not flushed]?

2.  Also, the numbers of examples is not reset even though the new chapter 
began, 
for example, Example 2.3, 2.4, 3.5, 3.6 etc.
However,  I couldn’t make the same error with this code,
It never happened without theorems, but it appeared when I added \startTheorem 
in my book.
So, I add "\setcounter[Exam][0]” before the \startchapter everytime.
I couldn’t figure out what relation is there between Theorems and Exam.

Thank you for reading.

Best regards,

Dalyoung



___
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
___