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

jhefferon at domain.hid jhefferon at domain.hid
Sun Aug 9 02:43:05 CEST 2015

Author: jhefferon
Date: Sun Aug  9 02:43:05 2015
New Revision: 394

URL: http://svn.gna.org/viewcvs/latexrefman?rev=394&view=rev
center and centering


Modified: trunk/ChangeLog
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/ChangeLog?rev=394&r1=393&r2=394&view=diff
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Sun Aug  9 02:43:05 2015
@@ -1,3 +1,8 @@
+2015-08-08  Jim Hefferon  <jhefferon at domain.hid>
+	* latex2e.texi (center, \centering): Add detail, including
+	distinguishing the two and examples.
 2015-08-05  Vincent Belaïche  <vincent.belaiche at domain.hid>
 	* latex2e.texi (\indent): remove "width of" concering concerning

Modified: trunk/latex2e.texi
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/latex2e.texi?rev=394&r1=393&r2=394&view=diff
--- trunk/latex2e.texi	(original)
+++ trunk/latex2e.texi	Sun Aug  9 02:43:05 2015
@@ -1820,16 +1820,34 @@
 \begin at domain.hid@}
- at domain.hid} \\
- at domain.hid} \\
+ .. text ..
 \end at domain.hid@}
 @end example
+Environment to create a sequence of lines that are centered within the
+left and right margins on the current page.  If the text in the
+environment body is too long to fit on a line, @LaTeX{} will insert line
+breaks that avoid hyphenation and avoid stretching or shrinking any
+interword space.  To force a line break at a particular spot use
+double-backslash at domain.hid{\\} (@pxref{\\}).
 @findex \\ @r{(for @code{center})}
-The @code{center} environment allows you to create a paragraph
-consisting of lines that are centered within the left and right
-margins on the current page.  Each line is terminated with the
-string @code{\\}.
+This environment inserts space above and below the text body.
+ at xref{\centering} to avoid such space (for example, inside a
+ at code{figure} environment).
+In this example, depending on how long the page's lines are, @LaTeX{} may
+choose a break for the part before the double backslash, will center
+the line or two , then will break at the double backslash, and will center
+the ending.
+ at example
+My father considered that anyone who went to chapel and didn't drink 
+alcohol was not to be tolerated.\\ 
+I grew up in that belief.  --Richard Burton 
+ at end example
+A double backslash after the final line is optional.
 * \centering::          Declaration form of the @code{center} environment.
@@ -1842,27 +1860,37 @@
 @findex \centering
 @cindex centering text, declaration for
-The @code{\centering} declaration corresponds to the @code{center}
-environment.  This declaration can be used inside an environment such
-as @code{quote} or in a @code{parbox}.  Thus, the text of a figure or
-table can be centered on the page by putting a @code{\centering}
-command at the beginning of the figure or table environment.
-Unlike the @code{center} environment, the @code{\centering} command
-does not start a new paragraph; it simply changes how @LaTeX{} formats
-paragraph units.  To affect a paragraph unit's format, the scope of
-the declaration must contain the blank line or @code{\end} command (of
-an environment such as quote) that ends the paragraph unit.
-Here's an example:
- at domain.hid
-\begin at domain.hid@}
-first line \\
-second line \\
-\end at domain.hid@}
- at domain.hid example
+Declaration that causes material in its scope to be centered.  It is
+most often used inside an environment such as @code{figure}, or in a
+ at code{parbox}.
+Unlike the @code{center} environment, the @code{\centering} command does
+not add vertical space above and below the text.
+It also does not start a new paragraph; it simply changes how @LaTeX{}
+formats paragraph units.  If @code{ww @{\centering xx \\ yy@} zz} is
+surrounded by blank lines then @LaTeX{} will create a paragraph whose
+first line @samp{ww xx} is centered and whose second line, not centered,
+contains @samp{yy zz}.  Usually what is desired is for the scope of the
+declaration to contain a blank line or the @code{\end} command of an
+environment such as @code{figure} or @code{table} that ends the
+paragraph unit.  Thus, if @code{@{\centering xx \\ yy\par@} zz} is
+surrounded by blank lines then it makes a new paragraph with two
+centered lines @samp{xx} and @samp{yy}, followed by a new paragraph with
+ at samp{zz} that is formatted as usual.  See also the following example.
+This example's @code{\centering} causes the graphic to be horizontally
+ at example
+\begin at domain.hid@}
+  \centering
+  \includegraphics[width=0.6\textwidth]@{ctan_lion.png@}
+  \caption at domain.hid Lion@}  \label at domain.hid@}
+\end at domain.hid@}
+ at end example
+The scope of the @code{\centering} ends with the @code{\end at domain.hid@}}.
 @node description

More information about the latexrefman-commits mailing list