diff options
Diffstat (limited to 'macros/luatex/optex/doc/optex-userdoc.tex')
-rw-r--r-- | macros/luatex/optex/doc/optex-userdoc.tex | 92 |
1 files changed, 76 insertions, 16 deletions
diff --git a/macros/luatex/optex/doc/optex-userdoc.tex b/macros/luatex/optex/doc/optex-userdoc.tex index d9c537559f..15a33ee632 100644 --- a/macros/luatex/optex/doc/optex-userdoc.tex +++ b/macros/luatex/optex/doc/optex-userdoc.tex @@ -407,6 +407,8 @@ scriptscript). Moreover, there is the macro \^`\mathstyles{<math list>}` which d the current math style. It is documented at the end of the section~\ref[math-macros]. +The \^`\eqalign` macro is more flexible in \OpTeX/, see technical documentation about it. + \sec Typical elements of document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -762,19 +764,28 @@ These letters can be combined by the `|` character (vertical line). Example % generates the following result: -\bigskip +\medskip \noindent\hfil\table{||lc|r||}{ \crl Month & commodity & price \crli \tskip2pt January & notebook & \$ 700 \cr February & skateboard & \$ 100 \cr July & yacht & k\$ 170 \crl} -\bigskip +\medskip Apart from `l`, `r`, `c` declarators, you can use the `p{<size>}` declarator -which declares the column of given width. More precisely, a long text in -the table cell is printed as an paragraph with given width. -To avoid problems with narrow left-right aligned paragraphs you can write -`p{<size>`\^`\raggedright}`, then the paragraph will be only left aligned. +which declares the column with paragraphs of given width. More precisely, +a long text in the table cell is printed as an paragraph with given width. +By default, the paragraph is left-right justified. But there are +alternatives: + +\begitems +* `p{<size>`\^`\fL}` fit left, i.e.\ left justified, ragged right, +* `p{<size>`\^`\fR}` fit right, i.e.\ right justified, ragged left, +* `p{<size>`\^`\fC}` fit center, i.e.\ ragged left plus right, +* `p{<size>`\^`\fS}` fit special, short one-line pararaph centered, + long paragraph normal, +* `p{<size>`\^`\fX}` fit extra, left-right justified but last line centered. +\enditems You can use `(<text>)` in the <declaration>. Then this text is applied in each line of the table. For example `r(\kern10pt)l` adds more 10\,pt space @@ -786,7 +797,7 @@ prefixed. For example `3c` means `ccc` or `c 3{|c}` means can use them in order to more legibility. The command `\cr` used in the <data> part of the table -is generally known. It marks end row of the table. +is generally known. It marks the end of each row in the table. Moreover \OpTeX/ defines following similar commands: \begitems @@ -801,7 +812,7 @@ Moreover \OpTeX/ defines following similar commands: \enditems The \^`\tskip<dimen>` command works like the `\noalign{\vskip<dimen>}` -after `\cr*` commands but it doesn't interrupt the vertical lines. +immediately after `\cr*` commands but it doesn't interrupt the vertical lines. \new You can use following parameters for the \^`\table` macro. Default values are listed @@ -816,6 +827,8 @@ too. \tablinespace=2pt % additional vert. space before/after horizontal lines \vvkern=1pt % space between lines in double vertical line \hhkern=1pt % space between lines in double horizontal line +\tabskip=0pt % space between columns +\tabskipl=0pt \tabskipr=0pt % space before first and after last column \endtt Example: if you do \^`\tabiteml={$\enspace}`\^`\tabitemr={\enspace$}` then @@ -830,7 +843,7 @@ which spans <number> columns and formats the <text> by the with the same syntax as common \^`\table` <declaration>. If your table includes vertical rules and you want to create continuous vertical rules by \^`\mspan`, then use rule declarators `|` -only after `c`, `l` or `r` letter in \^`\mspan` <declaration>. The +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. @@ -853,17 +866,63 @@ creates the following result: seven & eight & nine \crli}} \bigskip -The `c`, `l`, `r` and `p` are default \"declaration letters" but you can define -more such letters by `\def\_tabdeclare<letter>{<left>##<right>}`. More about -it is in technical documentation in the section~\ref[table]. +The \^`\vspan``<number>{<text>}` shifts the <text> down in order it looks +like to be in the center of the <number> lines (current line is first). +You can use this for creating tables like in the following example: + +\begtt \typosize[8.7/11] +\thistable{\tabstrut={\vrule height 20pt depth10pt width0pt} + \baselineskip=20pt \tablinespace=0pt \rulewidth=.8pt} +\table{|8{c|}}{\crlp{3-8} + \mspan2[c|]{} & \mspan3[c|]{Singular} & \mspan3[c|]{Plural} \crlp{3-8} + \mspan2[c|]{} & Neuter & Masculine & Feminine & Masculine & Feminine & Neuter \crl + \vspan2{I} & Inclusive & \mspan3[c|]{\vspan2{O}} & \mspan3[c|]{X} \crlp{2,6-8} + & Exclusive & \mspan3[c|]{} & \mspan3[c|]{X} \crl + \vspan2{II} & Informal & \mspan3[c|]{X} & \mspan3[c|]{X} \crlp{2-8} + & Formal & \mspan6[c|]{X} \crl + \vspan2{III} & Informal & \vspan2{O} & X & X & \mspan2[c|]{X} &\vspan2{O} \crlp{2,4-7} + & Formal & & \mspan4[c|]{X} & \crl +} +\endtt +\puttext 8.9cm -4cm {\pdfsave\pdfscale{.5}{.5}\rlap{% +\thistable{\tabstrut={\vrule height 20pt depth10pt width0pt} + \baselineskip=20pt \tablinespace=0pt \rulewidth=.8pt} +\table{|8{c|}}{\crlp{3-8} + \mspan2[c|]{} &\mspan3[c|]{Singular} &\mspan3[c|]{Plural} \crlp{3-8} + \mspan2[c|]{} & Neuter & Masculine & Feminine & Masculine & Feminine & Neuter \crl + \vspan2{I} & Inclusive & \mspan3[c|]{\vspan2{O}} &\mspan3[c|] X \crlp{2,6-8} + & Exclusive & \mspan3[c|]{} &\mspan3[c|] X \crl + \vspan2{II} & Informal & \mspan3[c|] X &\mspan3[c|] X \crlp{2-8} + & Formal & \mspan6[c|] X \crl + \vspan2{III} & Informal & \vspan2 O & X & X &\mspan2[c|] X & \vspan2 O \crlp{2,4-7} + & Formal & &\mspan4[c|] X & \crl +}}\pdfrestore} + + +\hangindent=-7.5cm \hangafter=0 +The <number> parameter of \^`\vspan` must be one-digit number. +If you want to set more digits then use braces. +You can use non-integer values too if you feel that the +result is better, for example \^`\vspan{2.1}{text}`. + +\hangindent=-7.5cm \hangafter=0 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 by \TeX/ is 0.4\,pt. +The `c`, `l`, `r` and `p` are default \"declaration letters" but you can define +more such letters by `\def\_tabdeclare<letter>{<left>##<right>}`. +More about it is in technical documentation in section~\ref[table.impl]. +See the definition of the \^`\tabdeclarec` macro, for example. + +The `:` columns boundary declarator is described in section~\ref[table.bound]. +The tables with given width can be declared by `to<size>` or `xto<size>`. +More about it is in section~\ref[table.w] Many tips about tables can be seen on the site \url{http://petr.olsak.net/optex/optex-tricks.html}. + \label[verbatim]\secc Verbatim %%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1570,8 +1629,9 @@ document. The macro `\author <authors><end-line>` can be used when \^`\report` is declared. It prints `<authors>` in italics at center of the line. You can separate authors by `\nl` to more lines. -The \^`\letter` declaration is intended to create letters. See an example in -the file `op-letter.tex`. The \^`\letter` style sets default +The \^`\letter` declaration is intended to create letters. +See the files `op-letter-*.tex` for examples. +The \^`\letter` style sets default font size to 11\,pt and `\parindent` to 0\,pt. It sets half-line space between paragraphs. The page numbers are not printed. The \^`\subject` macro can be used, it prints the word \"Subject:" or \"Věc" (or something else @@ -1579,7 +1639,7 @@ depending on current language) in bold. Moreover, the \^`\address` macro can be used when \^`\letter` is declared. The usage of the \^`\address` macro looks like: -\begtt +\begtt \catcode`\<=13 \address <first line of address> <second line of address> @@ -1727,7 +1787,7 @@ put it as the first command in your document: \thefontsize [size] \thefontscale [factor] % current font size \inspic file.ext % insert a picture, extensions: jpg, png, pdf -\table {rule}{data} % simple macro for the tables like in LaTeX +\table {rule}{data} % macro for the tables like in LaTeX \fnote {text} % footnote (local numbering on each page) \mnote {text} % note in the margin (left or right by page number) |