[latexrefman-commits] r336 - in /trunk: ChangeLog latex2e.html latex2e.texi

jhefferon at domain.hid jhefferon at domain.hid
Fri May 15 13:37:16 CEST 2015


Author: jhefferon
Date: Fri May 15 13:37:16 2015
New Revision: 336

URL: http://svn.gna.org/viewcvs/latexrefman?rev=336&view=rev
Log:
more with counters

Modified:
    trunk/ChangeLog
    trunk/latex2e.html
    trunk/latex2e.texi

Modified: trunk/ChangeLog
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/ChangeLog?rev=336&r1=335&r2=336&view=diff
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Fri May 15 13:37:16 2015
@@ -1,3 +1,7 @@
+2015-05-15  Jim Hefferon  <jhefferon at domain.hid>
+
+	* latex2e.texi (\usecounter): Expand definition; give example.
+
 2015-05-13  Jim Hefferon  <jhefferon at domain.hid>
 
 	* latex2e.texi (Counters): reword to clarify backslash.

Modified: trunk/latex2e.html
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/latex2e.html?rev=336&r1=335&r2=336&view=diff
==============================================================================
--- trunk/latex2e.html	(original)
+++ trunk/latex2e.html	Fri May 15 13:37:16 2015
@@ -47,7 +47,7 @@
 <link href="#Top" rel="start" title="Top">
 <link href="#Concept-Index" rel="index" title="Concept Index">
 <link href="#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="dir.html#Top" rel="up" title="(dir)">
+<link href="http://tug.org/texinfohtml" rel="up" title="(dir)">
 <style type="text/css">
 <!--
 a.summary-letter {text-decoration: none}
@@ -407,7 +407,7 @@
 <a name="Top"></a>
 <div class="header">
 <p>
-Next: <a href="#About-this-document" accesskey="n" rel="next">About this document</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Concept-Index" title="Index" rel="index">Index</a>]</p>
+Next: <a href="#About-this-document" accesskey="n" rel="next">About this document</a>, Up: <a href="http://tug.org/texinfohtml" accesskey="u" rel="up">(dir)</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Concept-Index" title="Index" rel="index">Index</a>]</p>
 </div>
 <a name="LaTeX2e_003a-An-unofficial-reference-manual"></a>
 <h1 class="top">LaTeX2e: An unofficial reference manual</h1>
@@ -5301,9 +5301,13 @@
 subsubsection
 </pre></div>
 
-<p>The <code>enumi</code> through <code>enumiv</code> counters are used in the
-enumerate environment, for up to four nested levels.
-</p>
+<p>The <code>mpfootnote</code> counter is used by the <code>\footnote</code> command
+inside of a minipage. The <code>enumi</code> through <code>enumiv</code> counters
+are used in the enumerate environment, for up to four nested levels.
+</p>
+<p>New counters are created with <code>\newcounter</code>.  See <a href="#g_t_005cnewcounter">\newcounter</a>.
+</p>
+
 <table class="menu" border="0" cellspacing="0">
 <tr><td align="left" valign="top">• <a href="#g_t_005calph-_005cAlph-_005carabic-_005croman-_005cRoman-_005cfnsymbol" accesskey="1">\alph \Alph \arabic \roman \Roman \fnsymbol</a>:</td><td>  </td><td align="left" valign="top">Print value of a counter.
 </td></tr>
@@ -5404,10 +5408,28 @@
 <pre class="example">\usecounter{<var>counter</var>}
 </pre></div>
 
-<p>The <code>\usecounter</code> command is used in the second argument of the
-<code>list</code> environment to specify <var>counter</var> to be used to number
-the list items.
-</p>
+<p>In the <code>list</code> environment, when used in the second argument, this
+command sets up <var>counter</var> to number the list items.  It initializes
+<var>counter</var> to zero, and arranges that when <code>\item</code> is called
+without its optional argument then <var>counter</var> is incremented by
+<code>\refstepcounter</code>, making its value be the current <code>ref</code>
+value.  This command is fragile (see <a href="#g_t_005cprotect">\protect</a>).
+</p>
+<p>Put in the preamble, this makes a new list environment enumerated with
+<var>testcounter</var>:
+</p>
+<div class="example">
+<pre class="example">\newcounter{testcounter}
+\newenvironment{test}{%
+  \begin{list}{}{%
+    \usecounter{testcounter}
+  }
+}{%
+  \end{list}
+}
+</pre></div>
+
+
 
 <hr>
 <a name="g_t_005cvalue"></a>

Modified: trunk/latex2e.texi
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/latex2e.texi?rev=336&r1=335&r2=336&view=diff
==============================================================================
--- trunk/latex2e.texi	(original)
+++ trunk/latex2e.texi	Fri May 15 13:37:16 2015
@@ -3929,8 +3929,12 @@
 subsubsection
 @end example
 
-The @code{enumi} through @code{enumiv} counters are used in the
-enumerate environment, for up to four nested levels.
+The @code{mpfootnote} counter is used by the @code{\footnote} command
+inside of a minipage. The @code{enumi} through @code{enumiv} counters
+are used in the enumerate environment, for up to four nested levels.
+
+New counters are created with @code{\newcounter}.  @xref{\newcounter}.
+
 
 @menu
 * \alph \Alph \arabic \roman \Roman \fnsymbol::  Print value of a counter.
@@ -3994,9 +3998,27 @@
 \usecounter at domain.hid}@}
 @end example
 
-The @code{\usecounter} command is used in the second argument of the
- at domain.hid} environment to specify @var{counter} to be used to number
-the list items.
+In the @code{list} environment, when used in the second argument, this
+command sets up @var{counter} to number the list items.  It initializes
+ at var{counter} to zero, and arranges that when @code{\item} is called
+without its optional argument then @var{counter} is incremented by
+ at code{\refstepcounter}, making its value be the current @code{ref}
+value.  This command is fragile (@pxref{\protect}).
+
+Put in the preamble, this makes a new list environment enumerated with
+ at var{testcounter}:
+
+ at example
+\newcounter at domain.hid@}
+\newenvironment at domain.hid@}@{%
+  \begin at domain.hid@}@{@}@{%
+    \usecounter at domain.hid@}
+  @}
+@}@{%
+  \end at domain.hid@}
+@}
+ at end example
+
 
 
 @node \value





More information about the latexrefman-commits mailing list