ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* index problem: [entry not flushed]
       [not found] <mailman.356.1549874795.1205.ntg-context@ntg.nl>
@ 2019-02-11 10:17 ` Jeong Dal
  2019-02-11 16:04   ` Wolfgang Schuster
  2019-02-11 10:41 ` Jeong Dal
  1 sibling, 1 reply; 5+ messages in thread
From: Jeong Dal @ 2019-02-11 10:17 UTC (permalink / raw)
  To: list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* index problem: [entry not flushed]
       [not found] <mailman.356.1549874795.1205.ntg-context@ntg.nl>
  2019-02-11 10:17 ` index problem: [entry not flushed] Jeong Dal
@ 2019-02-11 10:41 ` Jeong Dal
  1 sibling, 0 replies; 5+ messages in thread
From: Jeong Dal @ 2019-02-11 10:41 UTC (permalink / raw)
  To: list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: index problem: [entry not flushed]
  2019-02-11 10:17 ` index problem: [entry not flushed] Jeong Dal
@ 2019-02-11 16:04   ` Wolfgang Schuster
  2019-02-11 23:00     ` Jeong Dal
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2019-02-11 16:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jeong Dal



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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: index problem: [entry not flushed]
  2019-02-11 16:04   ` Wolfgang Schuster
@ 2019-02-11 23:00     ` Jeong Dal
  0 siblings, 0 replies; 5+ messages in thread
From: Jeong Dal @ 2019-02-11 23:00 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: index problem: [entry not flushed]
       [not found] <mailman.1.1549882801.20787.ntg-context@ntg.nl>
@ 2019-02-11 14:20 ` Jeong Dal
  0 siblings, 0 replies; 5+ messages in thread
From: Jeong Dal @ 2019-02-11 14:20 UTC (permalink / raw)
  To: list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-11 23:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.356.1549874795.1205.ntg-context@ntg.nl>
2019-02-11 10:17 ` index problem: [entry not flushed] Jeong Dal
2019-02-11 16:04   ` Wolfgang Schuster
2019-02-11 23:00     ` Jeong Dal
2019-02-11 10:41 ` Jeong Dal
     [not found] <mailman.1.1549882801.20787.ntg-context@ntg.nl>
2019-02-11 14:20 ` Jeong Dal

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).