[latexrefman-commits] r355 - in /trunk: ChangeLog latex2e.texi
jhefferon at domain.hid
jhefferon at domain.hid
Sat Jun 6 17:08:15 CEST 2015
Author: jhefferon
Date: Sat Jun 6 17:08:14 2015
New Revision: 355
URL: http://svn.gna.org/viewcvs/latexrefman?rev=355&view=rev
Log:
\newtheorem
Modified:
trunk/ChangeLog
trunk/latex2e.texi
Modified: trunk/ChangeLog
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/ChangeLog?rev=355&r1=354&r2=355&view=diff
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Sat Jun 6 17:08:14 2015
@@ -1,4 +1,9 @@
-2015-06-04 Jim Hefferon <jhefferon at domain.hid>
+2015-06-06 Jim Hefferon <jhefferon at domain.hid>
+
+ * latex2e.texi (\newtheorem): Expand definition. Add examples
+ covering both optional arguments.
+
+2015-06-05 Jim Hefferon <jhefferon at domain.hid>
* latex2e.texi (\newsavebox): Expand definition.
Modified: trunk/latex2e.texi
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/latex2e.texi?rev=355&r1=354&r2=355&view=diff
==============================================================================
--- trunk/latex2e.texi (original)
+++ trunk/latex2e.texi Sat Jun 6 17:08:14 2015
@@ -4047,35 +4047,116 @@
@cindex theorems, defining
@cindex defining new theorems
- at domain.hid
-\newtheorem at domain.hid}]
-\newtheorem at domain.hid}@}
- at domain.hid example
-
-This command defines a theorem-like environment. Arguments:
+Define a new theorem-like environment. Synopses:
+
+ at example
+\newtheorem at domain.hid}]
+\newtheorem at domain.hid}@}
+ at end example
+
+Both create a theorem-like environment @var{name}. Using the form
+ at code{\newtheorem at domain.hid}]}
+with the optional argument after the second required argument, will
+create an environment whose counter will be subordinate to the counter
+ at var{numbered_within} (it will be reset when @var{numbered_within} is
+reset). Using the form
+ at code{\newtheorem at domain.hid}@}}
+whose optional argument is between the two required arguments, will
+create an environment whose counter will share the previously defined
+counter @var{numbered_like}.
+
+You can specify at most one of @var{numbered_within} and
+ at var{numbered_like}, not both.
+
+This command creates a counter named @var{name}. In addition, unless
+the optional argument @var{numbered_like} is used, the current
+ at code{\ref} value will be that of @code{\the at domain.hid}}
+(@pxref{\ref}).
+
+This declaration is global. It is fragile (@pxref{\protect}).
+
+Arguments:
@table @var
- at domain.hid newenv
-The name of the environment to be defined; must not be the name of an
-existing environment or otherwise defined.
-
- at domain.hid label
+ at item name
+The name of the environment. It must not begin with a backslash
+(@samp{\}). It must not be the name of an existing environment, and
+also the command name @code{\@var{name}} cannot be already defined.
+
+ at item title
The text printed at the beginning of the environment, before the
number. For example, @samp{Theorem}.
+ at item numbered_within
+Optional; the name of an already defined counter, usually a sectional
+unit such as @code{chapter} or @code{section}. When the
+ at var{numbered_within} counter is reset then the @var{name} environment's
+counter will also be reset.
+
+If this optional argument is not used then the command
+ at code{\the at domain.hid}} is set to @code{\arabic at domain.hid}@}}.
+
@item numbered_like
-(Optional.) The name of an already defined theorem-like environment;
-the new environment will be numbered just like @var{numbered_like}.
-
- at domain.hid within
-(Optional.) The name of an already defined counter, a sectional unit.
-The new theorem counter will be reset at the same time as the
- at domain.hid} counter.
+Optional; the name of an already defined theorem-like environment. The
+new environment will be numbered in sequence with @var{numbered_like}.
@end table
-At most one of @var{numbered_like} and @var{within} can be specified,
-not both.
+Without any optional arguments the environments are numbered
+sequentially. This example has a declaration in the preamble that
+results in @samp{Definition 1} and @samp{Definition 2}.
+ at example
+\newtheorem at domain.hid@}
+\begin at domain.hid@}
+\section@{..@}
+\begin at domain.hid@}
+ First def
+\end at domain.hid@}
+
+\section@{..@}
+\begin at domain.hid@}
+ Second def
+\end at domain.hid@}
+ at end example
+
+Because this example takes the optional argument @var{numbered_within}
+to be @code{section}, it gives @samp{Definition 1.1} and
+ at samp{Definition 2.1}.
+ at example
+\newtheorem at domain.hid]
+\begin at domain.hid@}
+\section@{..@}
+\begin at domain.hid@}
+ First def
+\end at domain.hid@}
+
+\section@{..@}
+\begin at domain.hid@}
+ Second def
+\end at domain.hid@}
+ at end example
+
+In this example there are two declarations in the preamble, the second
+of which calls for @code{thm} to use the same counter as @code{defn}.
+It gives @samp{Definition 1.1}, followed by @samp{Theorem 2.1} and
+ at samp{Definition 2.2}.
+ at example
+\newtheorem at domain.hid]
+\newtheorem at domain.hid@}
+\begin at domain.hid@}
+\section@{..@}
+\begin at domain.hid@}
+ First def
+\end at domain.hid@}
+
+\section@{..@}
+\begin at domain.hid@}
+ First thm
+\end at domain.hid@}
+\begin at domain.hid@}
+ Second def
+\end at domain.hid@}
+ at end example
@node \newfont
@@ -4083,6 +4164,8 @@
@findex \newfont
@cindex fonts, new commands for
@cindex defining new fonts
+
+
Synopsis:
More information about the latexrefman-commits
mailing list