<?xml version="1.0" encoding="UTF-8"?>
<?latexml class="article"?>
<?latexml RelaxNGSchema="LaTeXML"?>
<document xmlns="http://dlmf.nist.gov/LaTeXML">
  <resource src="LaTeXML.css" type="text/css"/>
  <resource src="ltx-article.css" type="text/css"/>
  <section inlist="toc" xml:id="S1">
    <tags>
      <tag>1</tag>
      <tag role="refnum">1</tag>
      <tag role="typerefnum">§1</tag>
    </tags>
    <title><tag close=" ">1</tag>Testing LaTeX Counters</title>
    <para xml:id="S1.p1">
      <p>Counter Foo [0] = 0.</p>
    </para>
    <para xml:id="S1.p2">
      <p>Increment Foo[1] = 1.</p>
    </para>
    <para xml:id="S1.p3">
      <p>Set Foo to 2 = 2.</p>
    </para>
    <para xml:id="S1.p4">
      <p>Add 10 to Foo [12] = 12.</p>
    </para>
    <para xml:id="S1.p5">
      <p>Double Foo [24] = 24.</p>
    </para>
    <subsection inlist="toc" xml:id="S1.SS1">
      <tags>
        <tag>1.1</tag>
        <tag role="refnum">1.1</tag>
        <tag role="typerefnum">§1.1</tag>
      </tags>
      <title><tag close=" ">1.1</tag>Testing RefStep</title>
      <para xml:id="S1.SS1.p1">
        <p>Define bar to be reset within foo.

Now (Foo,Bar)[24,0] is (24,0)</p>
      </para>
      <para xml:id="S1.SS1.p2">
        <p>Refstep bar: 
Now (Foo,Bar)[24,1] is (24,1)</p>
      </para>
      <para xml:id="S1.SS1.p3">
        <p>Refstep foo: 
Now (Foo,Bar)[25,0] is (25,0)</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S1.SS2">
      <tags>
        <tag>1.2</tag>
        <tag role="refnum">1.2</tag>
        <tag role="typerefnum">§1.2</tag>
      </tags>
      <title><tag close=" ">1.2</tag>Number formatting</title>
      <para xml:id="S1.SS2.p1">
        <p>arabic[6] = 6</p>
      </para>
      <para xml:id="S1.SS2.p2">
        <p>roman [vi] = vi</p>
      </para>
      <para xml:id="S1.SS2.p3">
        <p>Roman [VI] = VI</p>
      </para>
      <para xml:id="S1.SS2.p4">
        <p>alph [f] = f</p>
      </para>
      <para xml:id="S1.SS2.p5">
        <p>Alph [F] = F</p>
      </para>
      <para xml:id="S1.SS2.p6">
        <p>fnsymbol [<Math mode="inline" tex="\|" text="parallel-to" xml:id="S1.SS2.p6.m1">
            <XMath>
              <XMTok meaning="parallel-to" name="||" role="VERTBAR">∥</XMTok>
            </XMath>
          </Math>] = ∥</p>
      </para>
      <para xml:id="S1.SS2.p7">
        <p>How far will TeX go?


Fubar is mmmmmmmmmcmxcix</p>
      </para>
    </subsection>
  </section>
  <section inlist="toc" xml:id="S2">
    <tags>
      <tag>2</tag>
      <tag role="refnum">2</tag>
      <tag role="typerefnum">§2</tag>
    </tags>
    <title><tag close=" ">2</tag>Expanding LaTeX Counter Names</title>
    <para xml:id="S2.p1">
      <p>Counter Foo [0] = 0.</p>
    </para>
    <para xml:id="S2.p2">
      <p>Increment Foo[1] = 1.</p>
    </para>
    <para xml:id="S2.p3">
      <p>Set Foo to 2 = 2.</p>
    </para>
    <para xml:id="S2.p4">
      <p>Add 10 to Foo [12] = 12.</p>
    </para>
    <para xml:id="S2.p5">
      <p>Double Foo [24] = 24.</p>
    </para>
    <subsection inlist="toc" xml:id="S2.SS1">
      <tags>
        <tag>2.1</tag>
        <tag role="refnum">2.1</tag>
        <tag role="typerefnum">§2.1</tag>
      </tags>
      <title><tag close=" ">2.1</tag>Testing RefStep</title>
      <para xml:id="S2.SS1.p1">
        <p>Define bar to be reset within Foo.

Now (Foo,Bar)[24,0] is (24,0)</p>
      </para>
      <para xml:id="S2.SS1.p2">
        <p>Refstep Bar: 
Now (Foo,Bar)[24,1] is (24,1)</p>
      </para>
      <para xml:id="S2.SS1.p3">
        <p>Refstep Foo: 
Now (Foo,Bar)[25,0] is (25,0)</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S2.SS2">
      <tags>
        <tag>2.2</tag>
        <tag role="refnum">2.2</tag>
        <tag role="typerefnum">§2.2</tag>
      </tags>
      <title><tag close=" ">2.2</tag>Number formatting</title>
      <para xml:id="S2.SS2.p1">
        <p>arabic[6] = 6</p>
      </para>
      <para xml:id="S2.SS2.p2">
        <p>roman [vi] = vi</p>
      </para>
      <para xml:id="S2.SS2.p3">
        <p>Roman [VI] = VI</p>
      </para>
      <para xml:id="S2.SS2.p4">
        <p>alph [f] = f</p>
      </para>
      <para xml:id="S2.SS2.p5">
        <p>Alph [F] = F</p>
      </para>
      <para xml:id="S2.SS2.p6">
        <p>fnsymbol [<Math mode="inline" tex="\|" text="parallel-to" xml:id="S2.SS2.p6.m1">
            <XMath>
              <XMTok meaning="parallel-to" name="||" role="VERTBAR">∥</XMTok>
            </XMath>
          </Math>] = ∥</p>
      </para>
    </subsection>
  </section>
  <section inlist="toc" xml:id="S3">
    <tags>
      <tag>3</tag>
      <tag role="refnum">3</tag>
      <tag role="typerefnum">§3</tag>
    </tags>
    <title><tag close=" ">3</tag>TeX Counters</title>
    <subsection inlist="toc" xml:id="S3.SS1">
      <tags>
        <tag>3.1</tag>
        <tag role="refnum">3.1</tag>
        <tag role="typerefnum">§3.1</tag>
      </tags>
      <title><tag close=" ">3.1</tag>Integers</title>
      <para xml:id="S3.SS1.p1">
        <p>7 = 7.</p>
      </para>
      <para xml:id="S3.SS1.p2">
        <p>7 = 7.</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S3.SS2">
      <tags>
        <tag>3.2</tag>
        <tag role="refnum">3.2</tag>
        <tag role="typerefnum">§3.2</tag>
      </tags>
      <title><tag close=" ">3.2</tag>Dimensions</title>
      <para xml:id="S3.SS2.p1">
        <p>HFuzz is 0.1pt.
Now HFuzz is 2.0pt.</p>
      </para>
      <para xml:id="S3.SS2.p2">
        <p>HFuzz is 2.0pt.
Now HFuzz is 2.0pt.</p>
      </para>
      <para xml:id="S3.SS2.p3">
        <p>Dimen 1.23pt = 1.23pt.</p>
      </para>
      <para xml:id="S3.SS2.p4">
        <p>Dimen 1.23pt = 1.23pt.</p>
      </para>
      <para xml:id="S3.SS2.p5">
        <p>Dimen 1.23pt = 1.23pt.</p>
      </para>
      <para xml:id="S3.SS2.p6">
        <p>count 2: 3*65536 = 196608.</p>
      </para>
      <para xml:id="S3.SS2.p7">
        <p>Now dimen: 3pt = 3.0pt</p>
      </para>
      <para xml:id="S3.SS2.p8">
        <p>One em = 10.0pt</p>
      </para>
      <para xml:id="S3.SS2.p9">
        <p>One ex = 4.3pt</p>
      </para>
      <para xml:id="S3.SS2.p10">
        <p>Dimen: one ex = 4.3pt</p>
      </para>
      <para xml:id="S3.SS2.p11">
        <p>Dimen: 1pt = 1.0pt</p>
      </para>
      <para xml:id="S3.SS2.p12">
        <p>Dimen: 1pt = 1.0pt</p>
      </para>
      <para xml:id="S3.SS2.p13">
        <p>8 pt = 8.0pt</p>
      </para>
      <para xml:id="S3.SS2.p14">
        <p>15 pt = 15.0pt</p>
      </para>
      <para xml:id="S3.SS2.p15">
        <p>Catcodes?

15.0 POINTS = 15.0 POINTS</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S3.SS3">
      <tags>
        <tag>3.3</tag>
        <tag role="refnum">3.3</tag>
        <tag role="typerefnum">§3.3</tag>
      </tags>
      <title><tag close=" ">3.3</tag>Glue</title>
      <para xml:id="S3.SS3.p1">
        <p>1pt plus 3pt = 1.0pt plus 3.0pt</p>
      </para>
      <para xml:id="S3.SS3.p2">
        <p>1pt plus 3fil = 1.0pt plus 3fil</p>
      </para>
      <para xml:id="S3.SS3.p3">
        <p>1pt plus 3fill = 1.0pt plus 3fill</p>
      </para>
      <para xml:id="S3.SS3.p4">
        <p>Skip: 2pt plus 3fill = 2.0pt plus 3fill</p>
      </para>
      <para xml:id="S3.SS3.p5">
        <p>0.1pt plus 3fill = 0.1pt plus 3fill</p>
      </para>
      <para xml:id="S3.SS3.p6">
        <p>Catcodes?

1.0 POINTS PLUS 3.0 POINTS = 1.0 POINTS   PLUS  3.0 POINTS</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S3.SS4">
      <tags>
        <tag>3.4</tag>
        <tag role="refnum">3.4</tag>
        <tag role="typerefnum">§3.4</tag>
      </tags>
      <title><tag close=" ">3.4</tag>Undefined?</title>
      <para xml:id="S3.SS4.p1">
        <p>Unknown count: 0 = 0</p>
      </para>
      <para xml:id="S3.SS4.p2">
        <p>Unknown dimen: 0pt = 0.0pt</p>
      </para>
      <para xml:id="S3.SS4.p3">
        <p>Unknown skip: 0pt = 0.0pt</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S3.SS5">
      <tags>
        <tag>3.5</tag>
        <tag role="refnum">3.5</tag>
        <tag role="typerefnum">§3.5</tag>
      </tags>
      <title><tag close=" ">3.5</tag>The</title>
      <para xml:id="S3.SS5.p1">
        <p>the count 127 [99] : 99</p>
      </para>
      <para xml:id="S3.SS5.p2">
        <p>the two (countdef 2)[196608] : 196608</p>
      </para>
      <para xml:id="S3.SS5.p3">
        <p>Tokens: abFOOcd = abFOOcd</p>
      </para>
      <para xml:id="S3.SS5.p4">
        <p>Catcode: 11 = 11</p>
      </para>
      <para xml:id="S3.SS5.p5">
        <p>Catcode: 12 = 12</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S3.SS6">
      <tags>
        <tag>3.6</tag>
        <tag role="refnum">3.6</tag>
        <tag role="typerefnum">§3.6</tag>
      </tags>
      <title><tag close=" ">3.6</tag>New Count, etc</title>
      <para xml:id="S3.SS6.p1">
        <p>3 = 3</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S3.SS7">
      <tags>
        <tag>3.7</tag>
        <tag role="refnum">3.7</tag>
        <tag role="typerefnum">§3.7</tag>
      </tags>
      <title><tag close=" ">3.7</tag>LaTeX style</title>
      <para xml:id="S3.SS7.p1">
        <p>1em = 10.0pt
3em = 30.0pt</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S3.SS8">
      <tags>
        <tag>3.8</tag>
        <tag role="refnum">3.8</tag>
        <tag role="typerefnum">§3.8</tag>
      </tags>
      <title><tag close=" ">3.8</tag>Macrology</title>
      <para xml:id="S3.SS8.p1">
        <p>1=1</p>
      </para>
      <para xml:id="S3.SS8.p2">
        <p>[23=23]</p>
      </para>
      <para xml:id="S3.SS8.p3">
        <p>[29=29]</p>
      </para>
      <para xml:id="S3.SS8.p4">
        <p>[29=29]</p>
      </para>
      <para xml:id="S3.SS8.p5">
        <p>[10000=10000]
[$a$ = $a$]</p>
      </para>
    </subsection>
    <subsection inlist="toc" xml:id="S3.SS9">
      <tags>
        <tag>3.9</tag>
        <tag role="refnum">3.9</tag>
        <tag role="typerefnum">§3.9</tag>
      </tags>
      <title><tag close=" ">3.9</tag>Quirks</title>
      <para xml:id="S3.SS9.p1">
        <p>Note that for toksdef and otheres, TeX binds the token to relax
before reading the number, in case the definition is immediagely
followed by a usage or assignment (See TeX Program §1224)</p>
      </para>
      <para xml:id="S3.SS9.p2">
        <p>Tooks:abc</p>
      </para>
      <para xml:id="S3.SS9.p3">
        <p>dima:1.0pt</p>
      </para>
      <para xml:id="S3.SS9.p4">
        <p>skipa:1.0pt plus 1.0pt</p>
      </para>
      <para xml:id="S3.SS9.p5">
        <p>muskipa:1.0mu</p>
      </para>
      <para xml:id="S3.SS9.p6">
        <p>@</p>
      </para>
      <para xml:id="S3.SS9.p7">
        <p><Math mode="inline" tex="\mathchar 4944\relax" text="∑" xml:id="S3.SS9.p7.m1">
            <XMath>
              <XMTok role="BIGOP">∑</XMTok>
            </XMath>
          </Math></p>
      </para>
    </subsection>
  </section>
</document>
