<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Philip Taylor wrote:<br>
      <br>
    </div>
    <blockquote type="cite"
      cite="mid:f372d171-cb56-fb75-6674-9f90877c51ab@Hellenic-Institute.Uk">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div class="moz-cite-prefix">Jonathan Fine wrote:<br>
        <br>
      </div>
      <blockquote type="cite"
cite="mid:CALD=Yf_qfqMSnTH3p6+-LRZDvZuK9DpD4LbnZ5s7vA5XNwSxPQ@mail.gmail.com">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        For example, what if producing the report requires several
        typesetting runs?</blockquote>
      <blockquote type="cite"
cite="mid:CALD=Yf_qfqMSnTH3p6+-LRZDvZuK9DpD4LbnZ5s7vA5XNwSxPQ@mail.gmail.com">
        <div dir="ltr">
          <div class="gmail_quote">
            <div dir="ltr">
              <div class="gmail_quote"> </div>
            </div>
          </div>
        </div>
      </blockquote>
      A valid point, and not one that my proposed solution would
      directly address.<br>
    </blockquote>
    <br>
    Addressed in the code below.  For a normal run, the user just says
    "TeX <whatever>, and the output will be a non-zero decimal
    such as 2.00001, 2.00002, etc.    For the final run, the user says
    "TeX \count 0 = 0 \input <whatever>", the code will then round
    the counter up to the next exact integer, so the output will be
    (e.g.,) "3.0".  The only assumption is that not more than 65535
    iterations will be required before a final run.<br>
    <br>
    Philip Taylor<br>
    --------<br>
    \newread \trackerin
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\newwrite
      \trackerout</p>
    <p style="-qt-paragraph-type:empty; margin-top:0px;
      margin-bottom:0px; margin-left:0px; margin-right:0px;
      -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">{</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"> \catcode
      `\p = \catcode `\1</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"> \catcode
      `\t = \catcode `\1</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"> \global
      \def \nodimen #1pt{#1}</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">}</p>
    <p style="-qt-paragraph-type:empty; margin-top:0px;
      margin-bottom:0px; margin-left:0px; margin-right:0px;
      -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\newdimen
      \seqno</p>
    <p style="-qt-paragraph-type:empty; margin-top:0px;
      margin-bottom:0px; margin-left:0px; margin-right:0px;
      -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\openin
      \trackerin = \jobname.seqno</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\ifeof
      \trackerin</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">    
      \seqno = 0 sp</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\else</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">     \read
      \trackerin to \seqtmp</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">    
      \seqno = \seqtmp sp</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\fi</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\closein
      \trackerin</p>
    <p style="-qt-paragraph-type:empty; margin-top:0px;
      margin-bottom:0px; margin-left:0px; margin-right:0px;
      -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\ifnum
      \count 0 = 1</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">    
      \advance \seqno by 1 sp</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\else </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">    
      \divide \seqno by 65536</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">    
      \multiply \seqno by 65536</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">    
      \advance \seqno by 1 pt</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\fi</p>
    <p style="-qt-paragraph-type:empty; margin-top:0px;
      margin-bottom:0px; margin-left:0px; margin-right:0px;
      -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\message
      {New sequence number = \expandafter \nodimen \the \seqno}</p>
    <p style="-qt-paragraph-type:empty; margin-top:0px;
      margin-bottom:0px; margin-left:0px; margin-right:0px;
      -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\immediate
      \openout \trackerout = \jobname.seqno</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\immediate
      \write \trackerout {\the \seqno}</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\immediate
      \closeout \trackerout</p>
    <br>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">\end</p>
  </body>
</html>