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

jhefferon at domain.hid jhefferon at domain.hid
Fri Jul 31 21:26:13 CEST 2015


Author: jhefferon
Date: Fri Jul 31 21:26:12 2015
New Revision: 388

URL: http://svn.gna.org/viewcvs/latexrefman?rev=388&view=rev
Log:
vline, cline, hline

Modified:
    trunk/ChangeLog
    trunk/latex2e.texi

Modified: trunk/ChangeLog
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/ChangeLog?rev=388&r1=387&r2=388&view=diff
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Fri Jul 31 21:26:12 2015
@@ -1,3 +1,8 @@
+2015-07-22  Jim Hefferon  <jhefferon at domain.hid>
+
+	* latex2e.texi (vline, cline, hline): Add examples.  Also describe
+	how columns are counted.
+
 2015-07-30  Vincent Belaïche  <vincent.belaiche at domain.hid>
 
 	* latex2e-fr.texi (Top): Correct menu item French translation for "Making paragraphs"

Modified: trunk/latex2e.texi
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/latex2e.texi?rev=388&r1=387&r2=388&view=diff
==============================================================================
--- trunk/latex2e.texi	(original)
+++ trunk/latex2e.texi	Fri Jul 31 21:26:12 2015
@@ -3184,7 +3184,7 @@
 Synopsis:
 
 @example
-\begin at domain.hid@}
+\begin at domain.hid}@}
 column 1 entry &column 2 entry ... &column n entry \\
   ...
 \end at domain.hid@}
@@ -3194,7 +3194,7 @@
 or
 
 @example
-\begin at domain.hid@}
+\begin at domain.hid}@}
 column 1 entry &column 2 entry ... &column n entry \\
   ...
 \end at domain.hid*@}
@@ -3214,7 +3214,7 @@
 @end example
 
 The vertical format of two left-aligned columns, with a vertical bar
-between them, comes from @code{tabular}'s argument @code{@{l|l@}}.
+between them, is specified in @code{tabular}'s argument @code{@{l|l@}}.
 @findex & 
 Columns are separated with an ampersand @code{&}.  A horizontal rule
 between two rows is created with @code{\hline}.
@@ -3225,7 +3225,7 @@
 
 The required and optional arguments to @code{tabular} consist of:
 
- at domain.hid @code
+ at table @var
 @item width
 Required for @code{tabular*}, not allowed for @code{tabular}. Specifies
 the width of the @code{tabular*} environment.  The space between columns
@@ -3393,23 +3393,29 @@
 Synopsis:
 
 @example
-\multicolumn at domain.hid}@}
- at domain.hid example
-
-Make an entry that spans several columns.  The first argument @var{cols}
-specifies the number of columns to span.  The second argument @var{pos}
-specifies the formatting of the entry, with @code{c} for centered,
- at domain.hid} for flushleft, or @code{r} for flushright.  The third argument
- at domain.hid} specifies the contents of that entry.
-
-The @var{pos} argument can also contain vertical bars @code{|}
-indicating the placement of vertical rules.  Thus if @var{pos} is
- at domain.hid|} then a vertical rule will come at the start and end of the
-entry, which will be centered.
-
-The number of spanned columns @var{cols} can be 1.  This is useful to
+\multicolumn at domain.hid}@}
+ at end example
+
+Make an entry that spans several columns.  The first argument
+ at var{numcols} specifies the number of columns to span.  The second
+argument @var{cols} specifies the formatting of the entry, with @code{c}
+for centered, @code{l} for flushleft, or @code{r} for flushright.  The
+third argument @var{text} specifies the contents of that entry.
+
+The @var{cols} argument can also contain vertical bars @code{|},
+indicating the placement of vertical rules, and @code{@@@{..@}}
+expressions.  Thus if @var{cols} is @samp{|c|} then a vertical rule will
+come at the start and end of each of that column's entries, which will
+be centered.
+
+The number of spanned columns @var{numcols} can be 1.  This is useful to
 override for one row the specification given in the @code{tabular}
 definition, including the placement of vertical rules.
+
+The set of spanned columns is counted as:@tie{}the specifier in
+ at code{tabular}'s argument is broken into parts, where each part (except
+the first) begins with @code{l}, @code{c}, @code{r}, or at domain.hid},
+and then the given number of parts is taken.
 
 In the example below, in the @code{tabular} definition the first column
 is specified as right-justified but in the first row the entry is
@@ -3438,10 +3444,29 @@
 
 @findex \vline
 
-The @code{\vline} command will draw a vertical line extending the full
-height and depth of its row.  An @code{\hfill} command can be used to
-move the line to the edge of the column.  It can also be used in an
- at domain.hid.
+Draw a vertical line extending the full height and depth of this entry's
+row.  Can also be used in an @@-expression, although its synonym
+vertical bar at domain.hid{|} is more common.
+
+This command is rarely used; more typically the table's vertical lines
+are specified in @code{tabular}'s @var{cols} argument and overriden as
+needed with @code{\multicolumn}.  This example illustrates some pitfalls.
+
+ at example
+\begin at domain.hid@}
+  x   &\vline\hfill y   &\multicolumn at domain.hid@} \\  
+  abc &def &\vline\hfill ghi 
+\end at domain.hid@}
+ at end example
+
+In the first line's second entry the @code{\hfill} moves the
+ at code{\vline} to the left edge of the cell.  But that is different than
+putting it halfway between the two columns, so the vertical bar from the
+ at code{@{c|cc@}} specifier comes before the one produced by
+ at code{\vline\hfill}.  The first line's third entry gives the usual way
+to put a vertical bar between the two columns.  In the second line, the
+ at code{ghi} is the widest entry in its column so @code{\vline\hfill} puts
+the vertical line immediately next to the @code{g}, with no whitespace.
 
 
 @node \cline
@@ -3455,9 +3480,20 @@
 \cline at domain.hid}@}
 @end example
 
-The @code{\cline} command draws horizontal lines across the columns
-specified, beginning in column @var{i} and ending in column @var{j},
-which are specified in the mandatory argument.
+Draw a horizontal rule beginning in column @var{i} and ending in column
+ at var{j} The dash at domain.hid} must appear in the mandatory
+argument. To span a single column use equal numbers.
+
+This example puts two horizontal lines between the first and second
+rows, one line only in the first column and the other spanning the third
+and fourth columns.  The two lines are at the same height.
+
+ at example
+\begin at domain.hid@} 
+  a &b &c &d \\ \cline at domain.hid@} \cline at domain.hid@} 
+  e &f &g &h 
+\end at domain.hid@}
+ at end example
 
 
 @node \hline
@@ -3465,10 +3501,21 @@
 
 @findex \hline
 
-The @code{\hline} command draws a horizontal line the width of the
-enclosing @code{tabular} or @code{array} environment.  It's most
-commonly used to draw a line at the top, bottom, and between the rows
-of a table.
+Draws a horizontal line the width of the enclosing @code{tabular} or
+ at code{array} environment.  It's most commonly used to draw a line at the
+top, bottom, and between the rows of a table.
+
+Here the top of the table has two horizontal rules, one above the other,
+that span both columns.  The bottom of the table has a single rule.
+Because of the @code{\hline} the second line's line ending double
+backslash at domain.hid{\\} is required.
+
+ at example
+\begin at domain.hid@} \hline\hline
+  Baseball   &Red Sox  \\
+  Basketball &Celtics  \\ \hline
+\end at domain.hid@}
+ at end example
 
 
 @node thebibliography





More information about the latexrefman-commits mailing list