Re: still counting

Marei Peischl <[email protected]> Sun, 8 Mar 2026 23:43:05 +0100
Newsgroups gmane.comp.tex.texhax
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------2OQhXPqHqHp5ZIGFc808kWM5
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Walt,

you need to add \noalign, like \everycr{\noalign{\global\advance\A by 1}}

This is because otherwise the last time the \everycr is used you will 
end up within the first cell of a new row and not after the last one.

Hope this helps.

Marei


On 08/03/2026 20.21, Walter Burkhard wrote:
> Hello,
> I need to count lines of the form   asdfasdf&jkljkl\cr  that appear
> within a table.    I have a attached a short program containing a
> 2 line table   try.tex  .    I need to include the  \everycr  command
> but I do not seem to be able to do so.
>
> Any hints would be appreciated,  many thanks.
>
> Walt Burkhard
--------------2OQhXPqHqHp5ZIGFc808kWM5
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Walt,</p>
    <p>you need to add \noalign, like 
      \everycr{\noalign{\global\advance\A by 1}}</p>
    <p>This is because otherwise the last time the \everycr is used you
      will end up within the first cell of a new row and not after the
      last one. </p>
    <p>Hope this helps.</p>
    <p>Marei</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 08/03/2026 20.21, Walter Burkhard
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOLnYiFQ77tbOnLHhkCKX-FSmLbML_Ecnotz3+FHEF9DumB=1Q@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div class="gmail_default"
style="font-family:garamond,times new roman,serif;font-size:large">Hello,
           <br>
        </div>
        <div class="gmail_default"
style="font-family:garamond,times new roman,serif;font-size:large">I
          need to count lines of the form   asdfasdf&amp;jkljkl\cr  that
          appear</div>
        <div class="gmail_default"
style="font-family:garamond,times new roman,serif;font-size:large">within
          a table.    I have a attached a short program containing a </div>
        <div class="gmail_default"
style="font-family:garamond,times new roman,serif;font-size:large">2
          line table   try.tex  .    I need to include the  \everycr
           command</div>
        <div class="gmail_default"
style="font-family:garamond,times new roman,serif;font-size:large">but I
          do not seem to be able to do so.   </div>
        <div class="gmail_default"
style="font-family:garamond,times new roman,serif;font-size:large"><br>
        </div>
        <div class="gmail_default"
style="font-family:garamond,times new roman,serif;font-size:large">Any
          hints would be appreciated,  many thanks.</div>
        <div class="gmail_default"
style="font-family:garamond,times new roman,serif;font-size:large"><br>
        </div>
        <div class="gmail_default"
style="font-family:garamond,times new roman,serif;font-size:large">Walt
          Burkhard</div>
      </div>
    </blockquote>
  </body>
</html>

--------------2OQhXPqHqHp5ZIGFc808kWM5--