ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jeong Dal <haksan@me.com>
To: "list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl" <ntg-context@ntg.nl>
Subject: index problem: [entry not flushed]
Date: Mon, 11 Feb 2019 19:17:00 +0900	[thread overview]
Message-ID: <C6F17F7A-D50D-4ED6-B04C-4DB917F36AE7@me.com> (raw)
In-Reply-To: <mailman.356.1549874795.1205.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
___________________________________________________________________________________

       reply	other threads:[~2019-02-11 10:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.356.1549874795.1205.ntg-context@ntg.nl>
2019-02-11 10:17 ` Jeong Dal [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C6F17F7A-D50D-4ED6-B04C-4DB917F36AE7@me.com \
    --to=haksan@me.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).