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