summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/cstex/opmac-u-en.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/cstex/opmac-u-en.tex')
-rw-r--r--Master/texmf-dist/doc/cstex/opmac-u-en.tex64
1 files changed, 40 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/cstex/opmac-u-en.tex b/Master/texmf-dist/doc/cstex/opmac-u-en.tex
index b77643592e0..03809c3a482 100644
--- a/Master/texmf-dist/doc/cstex/opmac-u-en.tex
+++ b/Master/texmf-dist/doc/cstex/opmac-u-en.tex
@@ -766,8 +766,7 @@ These letters can be combined by the ``{\tt\char`\|}'' character
\begtt
\table{||lc|r||}{ \crl
- Month & commodity & price \crli
- \tskip.2em
+ Month & commodity & price \crli \tskip.2em
January & notebook & \$ 700 \cr
February & skateboard & \$ 100 \cr
July & yacht & k\$ 170 \crl}
@@ -776,7 +775,7 @@ These letters can be combined by the ``{\tt\char`\|}'' character
generates the following result:
\bigskip
-\table{||lc|r||}{ \crl
+\hfil\table{||lc|r||}{ \crl
Month & commodity & price \crli
\tskip.2em
January & notebook & \$ 700 \cr
@@ -784,14 +783,31 @@ generates the following result:
July & yacht & k\$ 170 \crl}
\bigskip
-The command "\cr" is generally known. Moreover OPmac defines following similar
-commands:
+Apart from "l", "r", "c" declarators, you can use the "p{<size>}" declarator
+which declares the column of given width. More preciselly, a long text in
+the table cell is printed as an paragraph with given width.
+To avoid the problems with narrow left-right aligned paragraphs you can write
+"p{<size>\raggedright}", then the paragraph will be only left aligned.
+
+An arbitrary part of the "<declaration>" can be repeated by a "<number>"
+prefixed. For example ``"3c"'' means ``"ccc"'' or ``"c 3{|c}"'' means
+``"c|c|c|c"''. Note that spaces in the <declaration> are ignored and you
+can use them in
+order to more legibility.
+
+The command "\cr" used in the "<data>" part of the table (the end row
+separator) is generally known.
+Moreover OPmac defines following similar commands:
\begitems
* "\crl" \dots\ the end of the row with a horizontal line after it.
* "\crli" \dots\ like "\crl" but the horizontal line doesn't intersect the
vertical double lines.
* "\crlli" \dots\ like "\crli" but horizontal line is doubled.
+* "\crlp{<list>}" \dots\ like "\crli" but the lines are drawn only in the
+columns mentioned in comma separated "<list>" of their numbers.
+The "<list>" can include "<from>-<to>" declarators, for example
+"\crlp{1-3,5}" is equal to "\crlp{1,2,3,5}".
\enditems
The "\tskip<dimen>" command works like the "\noalign{\vskip<dimen>}"
@@ -811,39 +827,39 @@ with their default values:
If you do "\def\tabiteml{$\enspace}\def\tabitemr{\enspace$}" then
the "\table" acts like \LaTeX's array environment.
+If there is an item which spans to more than one column in the table then you can use
+"\multispan{<number>}" macro from plain \TeX{} or "\mspan<number>[<declaration>]{<text>}"
+from OPmac, which spans <number> columns and formats the <text> by the
+<declaration>. The <declaration> must include exactly one letter ``"c"'' or
+``"l"'' or ``"r"'' and may include characters ``"|"''
+for vertical rules. If your table includes vertical rules and you want to
+create continuous vertical rules by "\mspan", then use rules in
+only after ``"c"'', ``"l"'' or ``"r"'' letter in "\mspan" <declaration>. The
+exception is only in the case when "\mspan" includes first
+column and the table have rules on the left side. The example of "\mspan" usage is below.
+
The "\frame{<text>}" makes a frame around "<text>". You can put the whole "\table"
into "\frame" if you need double-ruled border of the table. Example:
\begtt
-\frame{\table{|c||l||r|}{\crl
- \multispan3\vrule\hss\bf Title\hss \vrule\tabstrut \crl
- \noalign{\kern\hhkern}\crli
+\frame{\table{|c||l||r|}{ \crl
+ \mspan3[|c|]{\bf Title} \crl \noalign{\kern\hhkern}\crli
first & second & third \crlli
seven & eight & nine \crli}}
\endtt
%
creates the following result:
-\bigskip
-\frame{\table{|c||l||r|}{\crl
- \multispan3\vrule\hss\bf Title\hss \vrule\tabstrut \crl
- \noalign{\kern\hhkern}\crli
+%\bigskip
+\hfil\frame{\table{|c||l||r|}{\crl
+ \mspan3[|c|]{\bf Title} \crl \noalign{\kern\hhkern}\crli
first & second & third \crlli
seven & eight & nine \crli}}
\bigskip
-The "c", "l" and "r" are default <declaration> letters but you can define
-more such letters by "\def\tabdeclare<letter>{<left>##<right>}". For
-example:
-
-\begtt
-\newdimen\Pwidth
-\def\tabdeclareP {\enskip\vtop{\hsize=\Pwidth \rightskip=0pt plus1fil
- \baselineskip=1.2em\lineskiplimit=0pt\noindent##\tabstrutA}\hss\enskip}
-\endtt
-%
-declares the letter P which means the tabular column with "\vtop"s. This is
-similar to \LaTeX's parbox.
+The "c", "l", "r" and "p" are default <declaration> letters but you can define
+more such letters by "\def\tabdeclare<letter>{<left>##<right>}". The
+technical documentation "opmac-d.pdf" describes this feature more preciselly.
The rule width of tables (and implicit width of all "\vrule"s and "\hrule"s)
can be set by the command "\rulewidth=<dimen>". The default value given