summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-21 21:47:11 +0000
committerKarl Berry <karl@freefriends.org>2020-05-21 21:47:11 +0000
commit2517d9a39aa036d64422152f1e451bc37d9b2e03 (patch)
tree9d94d0d32dd51c030ea68205f748d1c739e16c7e
parent285dd4f2910323b6d8ed9a3321aae1bbac50fe10 (diff)
optex (21may20)
git-svn-id: svn://tug.org/texlive/trunk@55231 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/luatex/optex/README5
-rw-r--r--Master/texmf-dist/doc/luatex/optex/optex-doc.pdfbin1172140 -> 1206961 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/optex/optex-doc.tex2
-rw-r--r--Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex8
-rw-r--r--Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex92
-rw-r--r--Master/texmf-dist/doc/man/man1/optex.man1.pdfbin16189 -> 16189 bytes
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/alloc.opm13
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/bib-simple.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm6
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/colors.opm13
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/doc.opm3
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm20
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/graphics.opm10
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/hi-syntax.opm8
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/hisyntax-c.opm4
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/if-macros.opm7
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/languages.opm4
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/math-macros.opm109
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/math-preload.opm4
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/more-macros.opm6
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/optex.ini2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/others.opm6
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/output.opm7
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/parameters.opm32
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/prefixed.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/ref-file.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/sections.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/table.opm325
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/usebib.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/verbatim.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/demo/op-letter-cs.tex (renamed from Master/texmf-dist/tex/luatex/optex/demo/op-letter.tex)0
-rw-r--r--Master/texmf-dist/tex/luatex/optex/demo/op-letter-en.tex38
-rw-r--r--Master/texmf-dist/tex/luatex/optex/demo/op-slides-bg.png (renamed from Master/texmf-dist/tex/luatex/optex/demo/slides-bg.png)bin62385 -> 62385 bytes
-rw-r--r--Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex4
37 files changed, 604 insertions, 142 deletions
diff --git a/Master/texmf-dist/doc/luatex/optex/README b/Master/texmf-dist/doc/luatex/optex/README
index 1a612e61790..caba16dda0a 100644
--- a/Master/texmf-dist/doc/luatex/optex/README
+++ b/Master/texmf-dist/doc/luatex/optex/README
@@ -19,6 +19,11 @@ doc/ ... PDF version of the OpTeX documentation and sources.
History:
+<0.13> \table have more features: \tabskip, \table to, \table pxto, \vspan
+ The \eqalign reimplemented to be more flexible.
+ The boundary character ":" introduced in the \table.
+ \| undefined in 8bit math: bug fixed.
+ \isnextchar: \let\tmp=#1 -> \let\tmp= #1
<0.12> The external macro qrcode.opm introduced
New directory structure: base/, demo/, pkg/, doc/ introduced.
\load macro introduced
diff --git a/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf b/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf
index caaf6319c78..41b0be5572d 100644
--- a/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf
+++ b/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/optex/optex-doc.tex b/Master/texmf-dist/doc/luatex/optex/optex-doc.tex
index 267474b24b5..d1952e201f2 100644
--- a/Master/texmf-dist/doc/luatex/optex/optex-doc.tex
+++ b/Master/texmf-dist/doc/luatex/optex/optex-doc.tex
@@ -20,7 +20,7 @@
\tit Format Based on Plain \TeX/ and OPmac\fnotemark1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hfill Version 0.12
+\hfill Version 0.13
\centerline{\it Petr Olšák, 2020}
diff --git a/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex b/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex
index 561f2a86855..0d53140a24b 100644
--- a/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex
+++ b/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex
@@ -162,7 +162,7 @@ The `\margins` macro is documented in the section~\ref[marg].
\printdoc hyperlinks.opm
\sec[maketoc] Making table of contents
-\printdoc maketoc.opm
+\printdoc maketoc.opm
\sec PDF outlines
\secc Nesting PDF outlines
@@ -189,7 +189,9 @@ The `\margins` macro is documented in the section~\ref[marg].
\printdoc graphics.opm
\sec[table] The \code{\\table} macro
-\printdoc table.opm
+\printdoctail table.opm
+\secc[table.impl] Implemetation of the \code{\\table} macro
+\printdoc table.opm
\sec Balanced multi-columns
\printdoc multicolumns.opm
@@ -229,7 +231,7 @@ The `\margins` macro is documented in the section~\ref[marg].
\printdoc logos.opm
\sec Multilingual support
-\secc Lovercase, uppercase codes
+\secc Lowercase, uppercase codes
\printdoctail uni-lcuc.opm
\secc Hyphenations
\printdoc hyphen-lan.opm
diff --git a/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex b/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex
index d9c537559f9..15a33ee6324 100644
--- a/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex
+++ b/Master/texmf-dist/doc/luatex/optex/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)
diff --git a/Master/texmf-dist/doc/man/man1/optex.man1.pdf b/Master/texmf-dist/doc/man/man1/optex.man1.pdf
index f14b9fba1cb..9715a44de4a 100644
--- a/Master/texmf-dist/doc/man/man1/optex.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/optex.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/luatex/optex/base/alloc.opm b/Master/texmf-dist/tex/luatex/optex/base/alloc.opm
index 7e03ae77b7d..d5625321a9c 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/alloc.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/alloc.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \newdimen {Allocators for registers <2020-01-23>} % loaded in format
+\_codedecl \newdimen {Allocators for registers <2020-05-12>} % loaded in format
\_doc -----------------------------
The limits are set first.
@@ -28,7 +28,7 @@
\_countdef\_toksalloc=15 \_toksalloc=255
\_countdef\_readalloc=16 \_readalloc=-1
\_countdef\_writealloc=17 \_writealloc=-1
-\_countdef\_mathalloc=18 \_mathalloc=3
+\_countdef\_famalloc=18 \_famalloc=3
\_doc -----------------------------
The common allocation macro
@@ -51,7 +51,7 @@
\_doc -----------------------------
The allocation macros
\`\newcount`, \`\newdimen`, \`\newskip`, \`\newmuskip`, \`\newbox`,
- \`\newtoks`, \`\newread`, \`\newwrite` and \`\newmath`
+ \`\newtoks`, \`\newread`, \`\newwrite` and \`\newfam`
are defined here.
\_cod -----------------------------
@@ -63,9 +63,9 @@
\_def\_newtoks #1{\_allocator #1{toks}\_toksdef}
\_def\_newread #1{\_allocator #1{read}\_chardef}
\_def\_newwrite #1{\_allocator #1{write}\_chardef}
-\_def\_newmath #1{\_allocator #1{fam}\_chardef}
+\_def\_newfam #1{\_allocator #1{fam}\_chardef}
-\_public \newcount \newdimen \newskip \newmuskip \newbox \newtoks \newread \newwrite \newmath ;
+\_public \newcount \newdimen \newskip \newmuskip \newbox \newtoks \newread \newwrite \newfam ;
\_doc -----------------------------
The \`\newinsert` macro is defined differently than others.
@@ -162,4 +162,7 @@ the array-like declarator of counters.
}
\endtt
+\_endinput
+2020-05-12 \newmath -> \newfam bug fixing
+2020-01-23 released
diff --git a/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm b/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm
index b569de0d309..612258baee7 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm
@@ -361,7 +361,7 @@ Moreover, there are two optional special fields:
\begitems
* lang = language of the entry. The hyphenation plus autogenerated phrases and
abbreviations will be typeset by this language.
-* option = options by which you can control special printing of vairous fields.
+* option = options by which you can control special printing of various fields.
\enditems
There can be only one option field per each entry with (may be) more options
diff --git a/Master/texmf-dist/tex/luatex/optex/base/bib-simple.opm b/Master/texmf-dist/tex/luatex/optex/base/bib-simple.opm
index 347d90bb143..f152d87acda 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/bib-simple.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/bib-simple.opm
@@ -13,7 +13,7 @@
\_sfcode`\?=\_tmpnum \_sfcode`\!=\_tmpnum
\_let\.=\_maybedot % prevents from double periods
-% Formating of Author/Editor lists:
+% Formatting of Author/Editor lists:
\_def\_authorname{%
\_ifnum\_NameCount>1
diff --git a/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm b/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm
index 44f8dee055a..c756a619bd0 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm
@@ -25,7 +25,7 @@
\`\ecite` `[<label>]{<text>}` behaves like `\rcite [<label>]` but prints
<text> instead <bib-mark>. The <text> is hyperlinked like <bib-marks>
when `\cite` or `\rcite` is used.
- The emptpty internal macro \`\_savedcites` will include the `<bib-marks>` list to
+ The empty internal macro \`\_savedcites` will include the `<bib-marks>` list to
be printed. This list is set by `\_citeA` inside group and it is used by
`\_printsavedcites` in the same group. Each `\cite`/`\rcite`/`\ecite` macro
starts from empty list of <bib-marks> because new group is opened.
@@ -222,9 +222,9 @@
\_def \_bibskip {\_ifnum\_bibnum>0 \_smallskip \_fi}
\_doc -----------------------------
- The \`\usebib` command is implemted in `usebib.opm` file which is loaded
+ The \`\usebib` command is implemented in `usebib.opm` file which is loaded
when the `\usebib` command is firstly used.
- The `usebib.opm` file loads the `librarian.tex` for scaning the `.bib`
+ The `usebib.opm` file loads the `librarian.tex` for scanning the `.bib`
files. See the section~\ref[usebib], where the file `usebib.opm` is
documented.
\_cod -----------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/base/colors.opm b/Master/texmf-dist/tex/luatex/optex/base/colors.opm
index 2745e0fc51d..eb57d0d9a8d 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/colors.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/colors.opm
@@ -74,15 +74,16 @@
\_doc -----------------------------
The \`\_setcolor` macro redefines empty `\_ensureblack` macro (used in
- output routine for headres and footers) to `\_ensureblackA` which sets
- Black at the start of its parameter and retunrs to the current color at the
- end of its parameter. The current color
- is saved into `\_currentcolor` macro and colorstack is pushed.
+ output routine for headers and footers) to `\_ensureblackA` which sets
+ Black at the start of its parameter and returns to the current color at the
+ end of its parameter.
+
+ The current color is saved into `\_currentcolor` macro and colorstack is pushed.
Finally, the `\_colorstackpop` is initialized by `\aftergroup` if
`\localcolor` is declared.
You can save current color to your macro by `\let\yourmacro=\_currentcolor`
- and you can return to this color by the command `\_setcmykcolor\yourmacro`.
+ and you can return to this color by the command `\_setcolor\yourmacro`.
\_cod -----------------------------
\_protected\_def \_setcolor #1{\_global\_let\_ensureblack=\_ensureblackA
@@ -111,7 +112,7 @@
can follow on next pages and their colors are independent on colors
used in the main page-body. The \`\_openfnotestack` is defined as
\`\_openfnotestackA` when the \^`\_setcolor` is used first.
- The \`\_fnotestack` is initializedin in `\everyjob` because the
+ The \`\_fnotestack` is initialized in in `\everyjob` because the
initialization is not saved to the format.
\_cod -----------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/base/doc.opm b/Master/texmf-dist/tex/luatex/optex/base/doc.opm
index 62cbd219c46..e46362e7c63 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/doc.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/doc.opm
@@ -32,7 +32,8 @@
\_pgbottomskip=0pt plus10pt minus2pt
\_doc -----------------------------
- The listing mode is implemented here.
+ The listing mode is implemented here. The \`\maxlines`
+ is maximal lines of code printed in the listing mode.
\_cod -----------------------------
\_newcount \_maxlines \_maxlines=100000
diff --git a/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm b/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm
index 5ecbfc361f1..7619de96578 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm
@@ -16,7 +16,7 @@
\ttlight,\ttcond,\dunhill: {\rm\it} \upital: {\rm} }
\_famalias [LMfonts] \_famalias [Latin Modern Fonts]
-\_famtext {TeX Gyre fonts based o Adobe 35:}
+\_famtext {TeX Gyre fonts based on Adobe 35:}
\_faminfo [Termes] {TeX Gyre Termes fonts based on Times} {f-termes}
{ -,\caps: {\rm\bf\it\bi} }
@@ -36,7 +36,7 @@
\_faminfo [Pagella] {TeX Gyre Pagella fonts based on Palatino} {f-pagella}
{ -,\caps: {\rm\bf\it\bi} }
-\_famalias [Palation]
+\_famalias [Palatino]
\_faminfo [Schola] {TeX Gyre Schola fonts based on New Century} {f-schola}
{ -,\caps: {\rm\bf\it\bi} }
@@ -48,7 +48,7 @@
\_famtext {Other fonts:}
-\_faminfo [Linux Libertine] {Free fonts typicaly installed in systems} {f-libertine}
+\_faminfo [Linux Libertine] {Free fonts typically installed on systems} {f-libertine}
{ -: {\rm\bf\it\bi} \semi: {\rm\it}
\caps,\sans,\mono,\caps\sans: {\rm\bf\it\bi} -: {\initials\displ\keybr} }
\_famalias [Libertine] \_famalias [LinLibertine]
@@ -58,7 +58,7 @@
\medium,\cond\medium, \light, \cond\light:{\rm\it} }
\_famalias [Antt]
-\_faminfo [Baskerville] {Free vaiants of classical Baskerville} {f-baskerville}
+\_faminfo [Baskerville] {Free variants of classical Baskerville} {f-baskerville}
{ -,\caps: {\rm\bf\it\bi} }
\_famalias [BaskevilleF]
@@ -76,11 +76,11 @@
Once you have prepared a font family file with the name `f-<famname>.opm` and \TeX/ is
able to see it in your filesystem then you can type \^`\fontfam``[<famname>]` and
-the file is read, so the information about font family is loaded. The name
+the file is read, so the information about the font family is loaded. The name
`<famname>` must be lowercase and without spaces in the file name
-`f-<famname>.opm`. On the other hand the `\fontfam` command gives more tolerance:
+`f-<famname>.opm`. On the other hand the `\fontfam` command is more tolerant:
you can write uppercase letters and spaces here. The spaces are ignored and
-letters are converted to lowercase.
+uppercase letters are converted to lowercase.
For example `\fontfam [LM Fonts]` is equivalent to \fontfam [LMfonts] and both
commands load the file `f-lmfonts.opm`.
@@ -95,9 +95,9 @@ existed file `fams-ini.opm`.
The information from the user's `fams-local.opm` file has precedence.
For example `fams-ini.opm` declares aliases Times$\to$Termes etc. If you
-have original Times purchased from Adobe then you can register your
-declaration about Times family in `fams-local.opm`. When an user write
-`\fontfam[Times]` then orginal Times (no Termes) is used in such case.
+have the original Times purchased from Adobe then you can register your
+declaration of Adobe's Times family in `fams-local.opm`. When a user writes
+`\fontfam[Times]` then the original Times (not Termes) is used.
The `fams-ini.opm` and `fams-local.opm` files use the macros
`\_famifo`, `\_famalias` and `\_famtext`. See the example from
diff --git a/Master/texmf-dist/tex/luatex/optex/base/graphics.opm b/Master/texmf-dist/tex/luatex/optex/base/graphics.opm
index f2fa1b92572..bc88a16de0b 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/graphics.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/graphics.opm
@@ -30,9 +30,9 @@
Inkscape is able to save a picture to `*.pdf` file and labels for the picture
to `*.pdf_tex` file. The second file is in \LaTeX/ format (unfortunately)
and it is intended to read immediately it after `*.pdf` in included
- in order to place labels of this ficture in the same font as document is printed.
+ in order to place labels of this picture in the same font as document is printed.
We need to read this \LaTeX/ file by plain \TeX/ macros when \`\inkinspic` is used.
- These macros are stored in the \`\_inkdefs` toknes list and it is used
+ These macros are stored in the \`\_inkdefs` tokens list and it is used
locally in the group. The solution is borrowed from OPmac trick 0032.
\_cod -----------------------------
@@ -193,12 +193,12 @@
\`\_circle``{<x>}{<y>}` creates an ellipse with `<x>` axis and `<y>` axix.
The origin is in the center.
\nl
- \`\_oval``{<x>}{<y>}{<roudness>}` creates an oval with `<x>`, `<y>` size and with
+ \`\_oval``{<x>}{<y>}{<roundness>}` creates an oval with `<x>`, `<y>` size and with
given `<roundness>`. The real size is bigger by 2`<roundness>`. The
origin is at the left bottom corner.
\nl
- \`\_mv``{<x>}{<y>}{<curve>}` moves current point to `<x>`, `<y>`, crates the
- `<curve>` and retuns back the current point.
+ \`\_mv``{<x>}{<y>}{<curve>}` moves current point to `<x>`, `<y>`, creates the
+ `<curve>` and returns back the current point.
All these macros are fully expandable and they can be used in the
`\pdfliteral` argument.
\_cod -----------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/base/hi-syntax.opm b/Master/texmf-dist/tex/luatex/optex/base/hi-syntax.opm
index e0ac530c3d3..48210fa4b18 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/hi-syntax.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/hi-syntax.opm
@@ -170,7 +170,7 @@ The `hisyntax-<name>.opm` file must (globally) declare `\_hisyntax<name>` tokens
where the action over verbatim text is declared typically by `\replfromto` or
`\replthis` macros.
-The verbatim text is preparared by {\em pre-processing phase}, then the
+The verbatim text is prepared by {\em pre-processing phase}, then the
`\_hisyntax<name>` is applied and then {\em post-processing phase} does final
corrections. Finally, the verbatim text is printed line by line.
@@ -180,7 +180,7 @@ The pre-processing phase does:
* Each space is replaced by {\visiblesp`\n\ \n`}, so `\n<word>\n` should be a pattern to
finding whole words (no subwords). The `\n` control sequence is removed in
the post-processing phase.
-* Each end of line is repersented by `\n^^J\n`.
+* Each end of line is represented by `\n^^J\n`.
* The `\_start` control sequence is added before the verbatim text and `\_end` control
sequence is appended to the end of the verbatim text. These control
sequences are removed in post-processing phase.
@@ -192,7 +192,7 @@ text.
\begitems
* `\n` means noting but it should be used as a boundary of words as mentioned above.
-* `\t` means a tabelator. It is prepared as `\n\t\n` because it can be at
+* `\t` means a tabulator. It is prepared as `\n\t\n` because it can be at
the boundary of a word.
* `\x <letter>{<text>}` can be used as replacing text. Suppose the example
\begtt
@@ -214,7 +214,7 @@ text.
The `\z <letter>{<text>}` is expanded to `\_z:<letter>{<text>}` and if
`\hicolor <letter> <color>` is declared then
`\_z:<letter>{<text>}` expands to `{<color><text>}`. So, required color is
- activated at all lines (separatelly) where C comment spans.
+ activated at all lines (separately) where C comment spans.
* `\y {<text>}` is replaced by `\<text>` in the post processing phase. It should
be used for macros without a parameter. You cannot use unprotected macros
as replacement text before the post-processing phase, because the post-processing
diff --git a/Master/texmf-dist/tex/luatex/optex/base/hisyntax-c.opm b/Master/texmf-dist/tex/luatex/optex/base/hisyntax-c.opm
index e7583657a48..8e8ccf0920b 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/hisyntax-c.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/hisyntax-c.opm
@@ -46,12 +46,12 @@
Each `hisyntax-<name>.opm` file must declare the token list
-`\_hisyntax<name>` using `\newtoks` and must ceclare the syntax declaration
+`\_hisyntax<name>` using `\newtoks` and must declare the syntax declaration
in it. The second cotken list `\_hicolors<name>` is optional but recommended.
User can re-declare his/her own colors by `\hicolors` which has precedence
before `\_hicolors<name>`.
-The public variants can be deacred if you want to give these token lists to
+The public variants can be declared if you want to give these token lists to
the user name space. But it is not explicitly needed.
All settings must be global here, because the file is typically read inside
diff --git a/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm b/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm
index 76feb2296d3..27de1af3760 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm
@@ -182,7 +182,7 @@
\_endcode % ---------------------------------------------
-Maybe, you need to do more language specific actions than only to swich
+Maybe, you need to do more language specific actions than just switching
hyphenation patterns. For example you need to load a specific font with a
specific script used in selected language, you can define a macros for
quotation marks depending on the language etc.
diff --git a/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm
index c33c8a91d3a..4685aed48eb 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \newif {Special if-macros, is-macros and loops <2020-05-02>} % preloaded in format
+\_codedecl \newif {Special if-macros, is-macros and loops <2020-05-06>} % preloaded in format
\_doc ----------------------------
\secc Classical \code{\\newif}
@@ -159,7 +159,7 @@
is true if the `<tokens variable>` is empty. It is expandable.
\_cod ----------------------------
-\_def \_isempty #1#2{\_if\_relax\_detokenize{#1}\_relax \_else \_ea\_unless \_fi#2}
+\_long\_def \_isempty #1#2{\_if\_relax\_detokenize{#1}\_relax \_else \_ea\_unless \_fi#2}
\_def \_istoksempty #1#2{\_ea\_isempty\_ea{\_the#1}#2}
\_public \isempty \istoksempty ;
@@ -243,7 +243,7 @@
\_cod ----------------------------
\_long\_def\_isnextchar#1#2#3{\_begingroup\_toks0={\_endgroup#2}\_toks1={\_endgroup#3}%
- \_let\_tmp=#1\_futurelet\_next\_isnextcharA
+ \_let\_tmp= #1\_futurelet\_next\_isnextcharA
}
\_def\_isnextcharA{\_the\_toks\_ifx\_tmp\_next0\_else1\_fi\_space}
@@ -252,6 +252,7 @@
\_endcode
+2020-05-06 \isnextchar: \let\tmp=#1 -> \let\tmp= #1 (bug fix, #1 should be space)
2020-05-02 \newif bug fix
2020-04-15 \fornumstep 3: 1..12 instead \fornum 1..12\step 3
2020-04-15 \fornum, \foreach can be nested without groups
diff --git a/Master/texmf-dist/tex/luatex/optex/base/languages.opm b/Master/texmf-dist/tex/luatex/optex/base/languages.opm
index aedcd249f43..aa862de4312 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/languages.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/languages.opm
@@ -35,7 +35,7 @@
\_langw en Chapter Table Figure Subject
%--------------------------------------------------------------
\_langw cs Kapitola Tabulka Obrázek Věc
-\_langw de Kapitel Tabelle Abbildung Subjekt
+\_langw de Kapitel Tabelle Abbildung Betreff
\_langw es Capítulo Tabla Figura Sujeto
\_langw fr Chaptire Tableau Figure Matière
\_langw it Capitolo Tabella Fig. Soggetto
@@ -118,4 +118,4 @@
\_endcode % -------------------------------------
2020-04-29 Obrazek -> Abbildung: bug fixed
-2020-03-15 introduced \ No newline at end of file
+2020-03-15 introduced
diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
index a1e7b817ffb..71a7923906c 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \sin {Math macros plus mathchardefs <2020-04-27>} % preloaded in format
+\_codedecl \sin {Math macros plus mathchardefs <2020-05-11>} % preloaded in format
\_doc -----------------------------
The category code of the character `_` remains as letter (11) and the mathocode
@@ -11,12 +11,12 @@
without problem. But `\int``_a^b` is tokenized as `\int``_a`, `^`, `b`. The
control sequence `\int``_a` isn't defined. We must write `\int _a^b`.
- The lua code presented here solves this problem. But you cannot set our own
+ The Lua code presented here solves this problem. But you cannot set our own
control sequence in the form `\<word>_` or `\<word>_<one-letter>` (where
<word> is sequence of letters) because such control sequences are
- unacessible: proprocessor rewrites it.
+ inaccessible: preprocessor rewrites it.
- The \`\mathsbon` macro activates the rewritting rule `\<word>_<nonleter>` to
+ The \`\mathsbon` macro activates the rewriting rule `\<word>_<nonleter>` to
`\<word> _<nonletter>` and
`\<word>``_<letter><nonletter>` to `\<word> _<letter><nonletter>` at input
processor level. The \`\mathsboff` deactivates it.
@@ -120,7 +120,7 @@
\_doc -----------------------------
All control sequences declared by `\mathchardef` are supposed (by default)
- only for public usage. It means that they are delcared without `_` prefix.
+ only for public usage. It means that they are declared without `_` prefix.
If such sequences are used in internal \OpTeX/ macro then their internal
prefixed form is declared using `\_private` macro.\nl
These encoding dependent declarations will be set to different values
@@ -490,7 +490,7 @@
\_protected\_def\arrowvert{\_delimiter"26A33C } % arrow without arrowheads
\_protected\_def\Arrowvert{\_delimiter"26B33D } % double arrow without arrowheads
\_protected\_def\bracevert{\_delimiter"77C33E } % the vertical bar that extends braces
-\_protected\_def\Vert{\_delimiter"26B30D } \_let\|=\_Vert
+\_protected\_def\Vert{\_delimiter"26B30D } \_let\|=\Vert
\_protected\_def\vert{\_delimiter"26A30C }
\_protected\_def\uparrow{\_delimiter"3222378 }
\_protected\_def\downarrow{\_delimiter"3223379 }
@@ -571,18 +571,44 @@
\_public \bmod \pmod ;
\_doc -----------------------------
- \`\cases`, \`\matrix`, \`\pmatrix` and \`\bordermatrix` macros from plain \TeX/
+ \`\matrix`, \`\pmatrix` and \`\bordermatrix`
+ behave as in Plain \TeX/, if it is used in the
+ `\displaystyle` or `\textstyle`. On the other hand, it is printed in smaller size
+ (by appropriate amount) in `\scriptstyle` and `\scriptscriptstyle`.
+ This feature is new in \OpTeX/.
\_cod -----------------------------
-\_protected\_def\_cases#1{\_left\{\_thinsk\_vcenter{\_normalbaselines\_math
- \_ialign{$##\_hfil$&\_quad##\_hfil\_crcr#1\_crcr}}\_right.}
-\_protected\_def\_matrix#1{\_null\_thinsk\_vcenter{\_normalbaselines\_math
- \_ialign{\_hfil$##$\_hfil&&\_quad\_hfil$##$\_hfil\_crcr
+\_protected\_def\_matrix#1{\_null\_thinsk
+ \_edef\_stylenum{\_the\_numexpr\_mathstyle/2\_relax}%
+ \_vcenter{\_matrixbaselines\_math
+ \_ialign{\_hfil$\_matrixstyle##$\_hfil&&\_quad\_hfil$\_matrixstyle##$\_hfil\_crcr
\_mathstrut\_crcr\_noalign{\_kern-\_baselineskip}
#1\_crcr\_mathstrut\_crcr\_noalign{\_kern-\_baselineskip}}}\_thinsk}
+
+\_def\_matrixbaselines{\_normalbaselines \_def\_matrixstyle{}%
+ \_ifcase\_stylenum \_or \_or
+ \_baselineskip=.7\_baselineskip
+ \_def\_quad {\_hskip.7em\_relax}%
+ \_let\_matrixstyle=\_scriptstyle
+ \_or
+ \_baselineskip=.5\_baselineskip
+ \_def\_quad {\_hskip.5em\_relax}%
+ \_let\_matrixstyle=\_scriptscriptstyle
+ \_fi
+}
\_protected\_def\_pmatrix#1{\_left(\_matrix{#1}\_right)}
+
+\_public \matrix \pmatrix ;
+
+ \_doc -----------------------------
+ The \`\cases` and `\bordermatrix` macros are identical from plain \TeX/.
+ \_cod -----------------------------
+
+\_protected\_def\_cases#1{\_left\{\_thinsk\_vcenter{\_normalbaselines\_math
+ \_ialign{$##\_hfil$&\_quad##\_hfil\_crcr#1\_crcr}}\_right.}
+
\_newdimen\_ptrenwd
-\_ptrenwd=0.875\_fontdimen6\_textfont1 % width of the big left (
+\_ptrenwd=8.75pt % width of the big left (
\_protected\_def\_bordermatrix#1{\_begingroup \_math
\_setbox0=\_vbox{\_def\_cr{\_crcr\_noalign{\_kern.2em\_global\_let\_cr\_endline}}%
\_ialign{$##$\_hfil\_kern.2em\_kern\_ptrenwd&\_thinspace\_hfil$##$\_hfil
@@ -595,20 +621,62 @@
\_global\_setbox1=\_vbox{\_box1 \_kern.2em}%
\_vcenter{\_kern-\_ht1 \_unvbox0 \_kern-\_baselineskip}\_thinsk\_right)$}%
\_null\_thicksk\_vbox{\_kern\_ht1 \_box2}\_endgroup}
-\_public \cases \matrix \pmatrix \bordermatrix ;
+
+\_public \cases \bordermatrix ;
+
+ \_doc -----------------------------
+ The \`\eqalign` macro behaves like in Plain \TeX/ by default.
+ It creates the `\vcenter` in the math mode. The contents is two column
+ `\halign` with right aligned left column and left aligned right column.
+ The table items are in `\displaystyle` and the `\baselineskip` is
+ advanced by `\jot` (3pt in plain \TeX). It follows from the default
+ settings of \^`\eqlines` and \^`\eqstyle` parameters.
+
+ In \OpTeX/, this macro is more flexible. You can set the
+ `\baselineskip` value by the \^`\eqlines` parameter and math style
+ by the \^`\eqstyle` parameter.
+ For example, you need to put the system of euations as an index of sum
+ operator:
+ \begtt
+ $$
+ \sum_{\eqlines{\baselineskip=.7\baselineskip}\eqstyle{\scriptstyle}\eqalign{
+ i &\in A \cr
+ j &\in B \cr
+ k &\in C }}
+ i + j + k
+ $$
+ \endtt
+ You can write more equation systems one next second:
+ \begtt
+ $$\eqalign{
+ x + y + z &= 1 && a + b + c &= -1 \cr
+ u + v &= 20 && f + g &= -20 \cr
+ i &= j
+ }$$
+ \endtt
+ You can use the third column for centered equations without aligning point
+ (as in \^`\displaylines`, but packed to the `\vcenter` box). For example:
+ \begtt \catcode`\<=13
+ $$ \left( \eqspace=0pt \eqalign{&& <first equation>\cr && <second equation>} \right) $$
+ \endtt
+ The \^`\eqspace` is additional space used in the third column to separate
+ equation systems one next second.
+ \_cod -----------------------------
+
+\_def\_eqalign#1{\_null\_thinsk\_vcenter{\_the\_eqlines\_math
+ \_ialign{&\_hfil$\_the\_eqstyle{##}$&$\_the\_eqstyle{{}##}$\_hfil
+ &\_hskip.5\_eqspace\_hfil$\_the\_eqstyle{##}$\_hskip.5\_eqspace\_hfil
+ \_crcr#1\_crcr}}\_thinsk}
\_doc -----------------------------
- \`\openup`, \`\eqalign`, \`\displaylines` and \`\eqalignno` macros from
- plain \TeX/.
+ \`\openup`, \`\displaylines` and \`\eqalignno` macros are copied from
+ Plain \TeX/ unchanged.
\_cod -----------------------------
\_def\_openup{\_afterassignment\_openupA\_dimen0=}
\_def\_openupA{\_advance\_lineskip by\_dimen0
\_advance\_baselineskip by\_dimen0
\_advance\_lineskiplimit by\_dimen0 }
-\_def\_eqalign#1{\_null\_thinsk\_vcenter{\_openup\_jot\_math
- \_ialign{\_strut\_hfil$\_displaystyle{##}$&$\_displaystyle{{}##}$\_hfil
- \_crcr#1\_crcr}}\_thinsk}
\_newifi\_ifdtop
\_def\_display{\_global\_dtoptrue\_openup\_jot\_math
\_everycr{\_noalign{\_ifdtop \_global\_dtopfalse \_ifdim\_prevdepth>-1000pt
@@ -873,7 +941,7 @@
\_let\circleddot\odot
\_doc -----------------------------
- The \`\not` macro is re-defined to be mote inteligent than in plain
+ The \`\not` macro is re-defined to be smarter than in plain
\TeX/. The macro follows this rule:
\begtt
\not< becomes \_nless
@@ -931,7 +999,7 @@
\_doc -----------------------------
The \`\mathbox``{<text>}` macro is copied from OPmac trick 078.
It behaves like `\hbox{<text>}` but the `<text>` is scaled to smaller
- size if it is used in scriptstye or scriptscript style.
+ size if it is used in scriptstyle or scriptscript style.
\_cod -----------------------------
\_def\_mathbox#1{{\_mathstyles{\_hbox{%
@@ -942,5 +1010,6 @@
\_endcode %---------------------------------------------------
+2020-05-11 \let\|=\Vert, bug fixed
2020-04-27 \mathstyles introduced
2020-03-14 implemented
diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm b/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm
index 0b8ffeebab2..633b5ebeb85 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm
@@ -4,7 +4,7 @@
\_doc ------------------------------
We have two math macros \`\normalmath` for normal shape of all math
- symbols and \`\boldmath` for bold shape of all math symbos. The second one
+ symbols and \`\boldmath` for bold shape of all math symbols. The second one
can be used in bold titles, for example.
These macros load all fonts from all given math font families.
\_cod ------------------------------
@@ -132,7 +132,7 @@
\`\_sizemsscript` sizes. These sizes are set by the
\`\setmathsizes` `[<text-size>/<script-size>/<scriptscript-size>]` macro.
These parameters are given in the \`\ptmunit` unit, it is set to
- 1\`\ptunit` and it is set to 1\,pt by defaut.
+ 1\`\ptunit` and it is set to 1\,pt by default.
\nl
\`\_corrmsizes` should be used in the \^`\normalmath` and \^`\boldmath`
macros if you need a size correction when a selected math family is
diff --git a/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm
index a0223753604..51f19198704 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm
@@ -4,8 +4,8 @@
\_doc -----------------------------
We define \`\opinput` `{<file name>}` macro which
- does `\input {<file name>}` but catocodes are set to normal catcodes
- (like \OpTeX/ initializes them) and the catodes setting is return back to
+ does `\input {<file name>}` but the catcodes are set to normal catcodes
+ (like \OpTeX/ initializes them) and the catcodes setting are returned back to
the current values when the file is read. You can use `\optinput`
in any situation inside the document and you will be sure that the file
is read correctly with correct catcode settings.
@@ -33,7 +33,7 @@
\_doc -----------------------------
The implementation of the catcodetable stack follows.
- The current catodes are
+ The current catcodes are
managed in the `\catcodetable0`. If the `\setctable` is used first (or at
the outer level of the stack), then the `\catcodetable0` is pushed to the
stack and the current table is re-set to the given `<catcode table>`.
diff --git a/Master/texmf-dist/tex/luatex/optex/base/optex.ini b/Master/texmf-dist/tex/luatex/optex/base/optex.ini
index de15a1db73a..27649370ef1 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/optex.ini
+++ b/Master/texmf-dist/tex/luatex/optex/base/optex.ini
@@ -21,7 +21,7 @@
% OpTeX version
-\def\optexversion{Beta 0.12 May 2020}
+\def\optexversion{Beta 0.13 May 2020}
\def\fmtname{OpTeX}
% Engine testing:
diff --git a/Master/texmf-dist/tex/luatex/optex/base/others.opm b/Master/texmf-dist/tex/luatex/optex/base/others.opm
index ffa8451f90c..f4bcc78698e 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/others.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/others.opm
@@ -66,6 +66,12 @@
\_def\OPmacversion{OpTeX}
\_doc ----------------------------
+ We allow empty lines in math formulae. It is more comfortable.
+ \_cod ----------------------------
+
+\_suppressmathparerror = 1
+
+ \_doc ----------------------------
Lorem ipsum can be printed by \`\lipsum``[<range>]` or \`\lorem``[<range>]`,
for example `\lipsum[3]` or `\lipsum[112-121]`, max=150. The data are read
from \LaTeX/ file `lipsum.ltd.tex`.
diff --git a/Master/texmf-dist/tex/luatex/optex/base/output.opm b/Master/texmf-dist/tex/luatex/optex/base/output.opm
index ae8ee0b08b3..41948896e75 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/output.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/output.opm
@@ -151,7 +151,7 @@
{\_bgroup \_aftergroup\_vfootA \_afterassignment\_ignorespaces \_let\_next=}{\_vfootB}%
}
\_def\_vfootA{\_unskip\_strut\_isnextchar\_colorstackpop\_closefncolor\_vfootF}
-\_def\_vfootB #1{#1\_uskip\_strut\_vfootF}
+\_def\_vfootB #1{#1\_unskip\_strut\_vfootF}
\_def\_vfootF{\_egroup} % close \_insert\_footins\_bgroup
\_def\_closefncolor#1{#1\_isnextchar\_colorstackpop\_closefncolor\_vfootF}
\_def \_footstrut {\_vbox to\_splittopskip{}}
@@ -243,3 +243,8 @@ The output routine \^`\_optexoutput` is similar as in plain \TeX. It does:
* runs output routine repeatedly if \^`\dosupereject` is activated.
\enditems
\enditems
+
+\_endinput
+
+2020-05-12 \vfootB: \uskip -> \unskip bug fixed
+2020-03-28 Released
diff --git a/Master/texmf-dist/tex/luatex/optex/base/parameters.opm b/Master/texmf-dist/tex/luatex/optex/base/parameters.opm
index 8a707b47586..bd12bac0709 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/parameters.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/parameters.opm
@@ -178,7 +178,7 @@
\_public \picdir ;
\_doc -----------------------------
- You can control the dimesions of included images by
+ You can control the dimensions of included images by
the parameters \`\picwidth` (which is equivalent to \`\picw`) and
\`\picheight`. By default these parameters are set to zero: the native
dimension of the image is used. If only `\picwidth` has a nonzero value,
@@ -399,12 +399,19 @@
and the lines of the table.
\nl
\`\hhkern` gives the space between horizontal lines if they are doubled and
- \`\vvkern` gives the space between such vertical lines.
+ \`\vvkern` gives the space between such vertical lines.
+ \nl
+ \`\tabskipl` is `\tabskip` used before first column,
+ \`\tabskipr` is `\tabskip` used after the last column.
+ \nl
+ \`\tsize` is virtual unit of the width of paragraph-like table items when
+ `\table pxto<size>` is used.
\_cod -----------------------------
\_newtoks\_everytable \_newtoks\_thistable
\_newtoks\_tabiteml \_newtoks\_tabitemr \_newtoks\_tabstrut
-\_newdimen\_tablinespace \_newdimen\_vvkern \_newdimen\_hhkern
+\_newdimen\_tablinespace \_newdimen\_vvkern \_newdimen\_hhkern \_newdimen\_tsize
+\_newskip\_tabskipl \_newskip\_tabskipr
\_everytable={} % code used after settings in \vbox before table processing
\_thistable={} % code used when \vbox starts, is is removed after using it
\_tabstrut={\_strut}
@@ -413,7 +420,22 @@
\_tablinespace=2pt % additional vertical space before/after horizontal rules
\_vvkern=1pt % space between double vertical line and used in \frame
\_hhkern=1pt % space between double horizontal line and used in \frame
-\_public \everytable \thistable \tabiteml \tabitemr \tabstrut \tablinespace \vvkern \hhkern ;
+\_tabskipl=0pt\_relax % \tabskip used before first column
+\_tabskipr=0pt\_relax % \tabskip used after the last column
+\_public \everytable \thistable \tabiteml \tabitemr \tabstrut \tablinespace
+ \vvkern \hhkern \tsize \tabskiplr ;
+
+ \_doc -----------------------------
+ The \^`\eqalign` macro can be configured by \`\eqlines` and \`\eqstyle`
+ tokens lists. The default values are set in order this macro beahaves
+ like in Plain \TeX. The \`\eqspace` is horizontal space put
+ between equation systems if more columns in \^`\eqalign` is used.
+ \_cod -----------------------------
+
+\_newtoks \_eqlines \_eqlines={\_openup\_jot}
+\_newtoks \_eqstyle \_eqstyle={\_strut\_displaystyle}
+\_newdimen \_eqspace \_eqspace=20pt
+\_public \eqlines \eqstyle \eqspace ;
\_doc -----------------------------
The output routine uses token list \`\headline` and \`\footline` in the
@@ -423,7 +445,7 @@
Assume that page-body text can be typeset in different sizes and
different fonts and we don't know in what font context the output routine
is invoked. So, it is strongly recommended to declare fixed variants of
- fonts at begining of your document. For example `\fontdef\rmfixed{\rm}`,
+ fonts at the beginning of your document. For example `\fontdef\rmfixed{\rm}`,
`\fontdef\itfixed{\it}`. Then use them in headline and footline:
\begtt
\headline={\itfixed Text of headline, section: \fistmark \hss}
diff --git a/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm b/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm
index 799cc923f92..a409a44697c 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm
@@ -161,7 +161,7 @@ example `\my_control_sequence`, but with the following exceptions:
\OpTeX/ internal macros and macro package writers.
* Control sequences (terminated by non-letter) in the form
`\<word>_` or `\<word>_<one-letter>`, where
- <word> is a sequence of letters, are unaccessible, because they
+ <word> is a sequence of letters, are inaccessible, because they
are interpreted as `\<word>` followed by `_` or as `\<word>` followed by
`_<one-letter>`. This is important for writing math, for example:
\begtt \adef-{_}
diff --git a/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm b/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm
index 52ace30b8dd..3cf6f6be7d1 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm
@@ -29,7 +29,7 @@
\_let\_wref=\_wrefrelax
\_doc ---------------------
- If a macro needs to ceate and to use `.ref` file then such macro must use
+ If a macro needs to create and to use `.ref` file then such macro must use
\`\openref`. When the file is created (using internal \`\_openrefA`) then
the \`\_wref` `\<macro>{<data>}` is redefined in order to
save the line `\<macro><data>` to the `.ref` file using asynchronous
diff --git a/Master/texmf-dist/tex/luatex/optex/base/sections.opm b/Master/texmf-dist/tex/luatex/optex/base/sections.opm
index 45a3e61d286..ee02064b9e7 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/sections.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/sections.opm
@@ -272,7 +272,7 @@
`\mark` mechanism is needed. But sections need `\mark`s. And they can be
mixed with chapter's running heads, of course.
- The \`\_insermark``{<title text>}` saves `\mark` in the format
+ The \`\_insertmark``{<title text>}` saves `\mark` in the format
`{<title-num>} {<title-text>}`, so it can be printed \"as is" in
`\headline` (see the space between them), or you can define a formating
macro with two parameters for processing these data, if you need it.
diff --git a/Master/texmf-dist/tex/luatex/optex/base/table.opm b/Master/texmf-dist/tex/luatex/optex/base/table.opm
index 5fa252eebaf..4aaaa9a442f 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/table.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/table.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \table {Basic macros for OpTeX <2020-04-10>} % preloaded in format
+\_codedecl \table {Basic macros for OpTeX <2020-05-20>} % preloaded in format
\_doc -----------------------------
The result of the \`\table``{<declaration>}{<data>}` macro is inserted into
@@ -11,21 +11,36 @@
\_let\_tablebox=\_vbox
\_doc -----------------------------
- Categories (for example of `|` character) have to be normal when reading
- `\table` parameters.
+ We save the `to<size>` or `pxto<size>` to `#1` and \`\_tableW` sets the
+ `to<size>` to the \`\_tablew` macro.
+ If `pxto<size>` is used then `\_tablew` is empty and `\_tmpdim` includes
+ given <size>. The `\_ifpxto` returns true in this case.
+
+ The `\table` continues by reading `{<declaration>}` in the \^`\_tableA` macro.
+ Catcodes (for example the `|` character) have to be normal when reading
+ `\table` parameters. This is the reason why we use `\catcodetable` here.
\_cod -----------------------------
-\_def\_table{\_tablebox\_bgroup \_catcodetable\_optexcatcodes \_tableA}
+\_newifi \_ifpxto
+\_def\_table#1#{\_tablebox\_bgroup \_tableW#1\_empty\_end
+ \_bgroup \_catcodetable\_optexcatcodes \_tableA}
+\_def\_tableW#1#2\_end{\_pxtofalse
+ \_ifx#1\_empty \_def\_tablew{}\_else
+ \_ifx#1p \_def\_tablew{}\_tableWx#2\_end \_else \_def\_tablew{#1#2}\_fi\_fi}
+\_def\_tableWx xto#1\_end{\_tmpdim=#1\_relax \_pxtotrue}
\_public \table ;
\_doc -----------------------------
The \^`\tablinespace` is implemented by enlarging given \^`\tabstrut`
by desired dimension (height and depth too) and by setting
`\_lineskip=-2\_tablinespace`. Normal table rows (where no `\hrule` is
- between them) have normal baseline distance.
+ between them) have normal baseline distance.\nl
+ The \`\_tableA``{<declaration>}` macro scans the `<declaration>` by
+ `\_scantabdata#1\_relax` and continues by reading `{<data>}` by
+ the \^`\_tableB` macro.
\_cod -----------------------------
-\_def\_tableA#1{%
+\_def\_tableA#1{\_egroup
\_the\_thistable \_global\_thistable={}%
\_ea\_ifx\_ea^\_the\_tabstrut^\_setbox\_tstrutbox=\_null
\_else \_setbox\_tstrutbox=\_hbox{\_the\_tabstrut}%
@@ -35,17 +50,67 @@
\_offinterlineskip
\_lineskip=-2\_tablinespace
\_fi
- \_colnum=0 \_def\_tmpa{}\_tabdata={}\_scantabdata#1\_relax
+ \_colnum=0 \_let\_addtabitem=\_addtabitemx
+ \_def\_tmpa{}\_tabdata={\_colnum1\_relax}\_scantabdata#1\_relax
\_the\_everytable \_tableB
}
-\_def\_tableB#1{\_halign\_ea{\_the\_tabdata\_cr#1\_crcr}\_egroup}
+
+ \_doc -----------------------------
+ The \`\_tableB``{<data>}` saves `<data>` to `\_tmpb`
+ and does four \^`\replstring`s to prefix each macro \^`\crli` (etc.)
+ by `\_crcr`. The reason is: we want to use macros which scan its parameter
+ to the delimeiter written in right part of table item declaration.
+ See \^`\fS` for example. The `\crcr` cannot be hidden in other macro in such case.
+
+ The `\tabskip` value is saved for places between columns
+ into the \`\_tabskipmid` macro. Then it runs
+ \begtt \catcode`\<=13
+ \tabskip=\tabskipl \halign{<converted declaration>\tabskip=\tabskipr \cr <data>\crcr}
+ \endtt
+ This sets the desired boundary values of `\tabskip`. The
+ \"between-columns" values are set as `\tabskip=`\^`\_tabskipmid` in the
+ `<converted declaration>` immediately after each column declarator.
+
+ If `pxto` keyword was used, then we set the virtual unit \^`\tsize` to
+ `\hsize` first. Then the first attempt of the table is created in box 0.
+ Then the \^`\tsize` is re-calculated using `\wd0` and the real table is
+ printed by `\halign` in the second pass.
+
+ If no `pxto` keyword was used, then we print the table using `\halign`
+ directly. The \^`\_tablew` macro is nonempty if the `to` keyword was used.
+
+ Because the color selector with `\aftergroup` can be used inside the
+ table item, we must to create second real group for each table item.
+ This is reason why we start `<converted declaration>` by `\bgroup` and we
+ end it by `\egroup` in the \`\_tableC` macro. Each `&` character
+ is stored as `\egroup&\bgroup` in `<converted declaration>`. The
+ `\halign\_tablew\_tableC` really does:
+ \begtt \catcode`\<=13
+ \halign\_tablew{\bgroup<converted declaration>\egroup\tabskip=\tabskipr \cr<data>\crcr}
+ \endtt
+ \relax
+ \_cod -----------------------------
+
+\_def\_tableB#1{\_def\_tmpb{#1}%
+ \_replstring\_tmpb{\crli}{\_crcr\crli}\_replstring\_tmpb{\crll}{\_crcr\crll}%
+ \_replstring\_tmpb{\crlli}{\_crcr\crlli}\_replstring\_tmpb{\crlp}{\_crcr\crlp}%
+ \_edef\_tabskipmid{\_the\_tabskip}\_tabskip=\_tabskipl
+ \_ifpxto
+ \_tsize=\_hsize \_setbox0 = \_vbox{\_halign \_tableC}%
+ \_tsize=\_dimexpr\_hsize-(\_wd0-\_tmpdim)\_relax
+ \_setbox0=\_null \_halign \_tableC
+ \_else
+ \_halign\_tablew \_tableC
+ \_fi \_egroup
+}
+\_def\_tableC{\_ea{\_ea\_bgroup\_the\_tabdata\_egroup\_tabskip=\_tabskipr\_cr\_tmpb\_crcr}}
+
\_newbox\_tstrutbox % strut used in table rows
\_newtoks\_tabdata % the \halign declaration line
-\_newcount\_colnum % number of columns
\_doc -----------------------------
- The \`\_scantabdata` converts `\table`'s `<declaration>` to
- `\halign` `<declaration>`.
+ The \`\_scantabdata` macro converts `\table`'s `<declaration>` to
+ `\halign` `<converted declaration>`.
The result is stored into \`\_tabdata` tokens list.
For example, the
following result is generated when `<declaration>=|cr||cl|`.
@@ -57,7 +122,7 @@
&\_the\_tabiteml#\_unsskip\_hfil\_the\_tabitemr\_vrule\_tabstrutA
ddlinedata: &\_dditem &\_dditem\_vvitem &\_dditem &\_dditem
\endtt
- The second result in the \`\_ddlinedata` macro is a teplate of one row of the table
+ The second result in the \`\_ddlinedata` macro is a template of one row of the table
used by \^`\crli` macro.
\_cod -----------------------------
@@ -65,25 +130,57 @@
\_ifx\_relax#1\_let\_next=\_relax
\_else\_ifx|#1\_addtabvrule
\_else\_ifx(#1\_def\_next{\_scantabdataE}%
- \_else\_isinlist{123456789}#1\_iftrue \_def\_next{\_scantabdataC#1}%
- \_else \_ea\_ifx\_csname _tabdeclare#1\_endcsname \_relax
- \_ea\_ifx\_csname _paramtabdeclare#1\_endcsname \_relax
+ \_else\_ifx:#1\_def\_next{\_scantabdataF}%
+ \_else\_isinlist{123456789}#1\_iftrue \_def\_next{\_scantabdataC#1}%
+ \_else \_ea\_ifx\_csname _tabdeclare#1\_endcsname \_relax
+ \_ea\_ifx\_csname _paramtabdeclare#1\_endcsname \_relax
\_opwarning{tab-declarator "#1" unknown, ignored}%
- \_else
+ \_else
\_def\_next{\_ea\_scantabdataB\_csname _paramtabdeclare#1\_endcsname}\_fi
- \_else \_def\_next{\_ea\_scantabdataA\_csname _tabdeclare#1\_endcsname}%
- \_fi\_fi\_fi\_fi\_fi \_next
+ \_else \_def\_next{\_ea\_scantabdataA\_csname _tabdeclare#1\_endcsname}%
+ \_fi\_fi\_fi\_fi\_fi\_fi \_next
}
-\_def\_scantabdataA#1{\_addtabitem \_ea\_addtabdata\_ea{#1\_tabstrutA}\_scantabdata}
-\_def\_scantabdataB#1#2{\_addtabitem\_ea\_addtabdata\_ea{#1{#2}\_tabstrutA}\_scantabdata}
+\_def\_scantabdataA#1{\_addtabitem
+ \_ea\_addtabdata\_ea{#1\_tabstrutA \_tabskip\_tabskipmid}\_scantabdata}
+\_def\_scantabdataB#1#2{\_addtabitem
+ \_ea\_addtabdata\_ea{#1{#2}\_tabstrutA \_tabskip\_tabskipmid}\_scantabdata}
\_def\_scantabdataC {\_def\_tmpb{}\_afterassignment\_scantabdataD \_tmpnum=}
\_def\_scantabdataD#1{\_loop \_ifnum\_tmpnum>0 \_advance\_tmpnum by-1 \_addto\_tmpb{#1}\_repeat
\_ea\_scantabdata\_tmpb}
\_def\_scantabdataE#1){\_addtabdata{#1}\_scantabdata}
+\_def\_scantabdataF {\_addtabitem\_def\_addtabitem{\_let\_addtabitem=\_addtabitemx}\_scantabdata}
-\_def\_addtabitem{\_ifnum\_colnum>0 \_addtabdata{&}\_addto\_ddlinedata{&\_dditem}\_fi
- \_advance\_colnum by1 \_let\_tmpa=\_relax}
+ \_doc -----------------------------
+ The \`\_addtabitemx` adds the boundary code (used between columns)
+ to the <converted declaration>. This code is
+ `\egroup &\bgroup \colnum=<value>\relax`. You can get the current number of
+ column from the \`\colnum` register, but you cannot write
+ `\the\colnum` as the first object in a <data> item because `\halign`
+ first expands the front of the item and the left part of the declaration
+ is processed after this. Use `\relax\the\colnum` instead. Or you can
+ write:
+ \begtt
+ \def\showcolnum{\ea\def\ea\totcolnum\ea{\the\colnum}\the\colnum/\totcolnum}
+ \table{ccc}{\showcolnum & \showcolnum & \showcolnum}
+ \endtt
+ This example prints 1/3 \ 2/3 \ 3/3, because the value of the `\colnum` is
+ equal to the total number of columns before left part of the column declaration
+ is processed.
+ \_cod -----------------------------
+
+\_newcount\_colnum % number of current column in the table
+\_public \colnum ;
+
+\_def\_addtabitemx{\_ifnum\_colnum>0
+ \_addtabdata{\_egroup &\_bgroup}\_addto\_ddlinedata{&\_dditem}\_fi
+ \_advance\_colnum by1 \_let\_tmpa=\_relax
+ \_ifnum\_colnum>1 \_ea\_addtabdata\_ea{\_ea\_colnum\_the\_colnum\_relax}\_fi}
\_def\_addtabdata#1{\_tabdata\_ea{\_the\_tabdata#1}}
+
+ \_doc -----------------------------
+ This code converts `||` or `|` from `\table` <declaration> to the <converted declaration>.
+ \_cod -----------------------------
+
\_def\_addtabvrule{%
\_ifx\_tmpa\_vrule \_addtabdata{\_kern\_vvkern}%
\_ifnum\_colnum=0 \_addto\_vvleft{\_vvitem}\_else\_addto\_ddlinedata{\_vvitem}\_fi
@@ -95,32 +192,49 @@
\_def\_ddlinedata{}
\_doc -----------------------------
- The default \"declaration letters" `c`, `l`, `r` and `p` are declared.
- by `\def\_tabdeclare<letter>{...}` for a non-parametric
- letter and by `\def\_paramtabdeclare<letter>{...}` for a letter with a parameter.
+ The default \"declaration letters" `c`, `l`, `r` and `p` are declared
+ by setting \`\tabdeclarec`, \`\tabdeclarel`, \`\tabdeclarer` and
+ \`\paramtabdeclarep` macros. In general, define
+ `\def\_tabdeclare<letter>{...}` for a non-parametric
+ letter and `\def\_paramtabdeclare<letter>{...}` for a letter with a parameter.
The double hash `##` must be in the definition, it is replaced by a real table item data.
- All items are put in group because of `\aftergroup` can be used (from
- `\localcolors` for example).
You can declare more such \"declaration letters" if you want.
\_cod -----------------------------
-\_def\_tabdeclarec{{\_the\_tabiteml\_hfil##\_unsskip\_hfil\_the\_tabitemr}}
-\_def\_tabdeclarel{{\_the\_tabiteml\_relax##\_unsskip\_hfil\_the\_tabitemr}}
-\_def\_tabdeclarer{{\_the\_tabiteml\_hfil##\_unsskip\_the\_tabitemr}}
-\_def\_paramtabdeclarep#1{{\_the\_tabiteml
+\_def\_tabdeclarec{\_the\_tabiteml\_hfil##\_unsskip\_hfil\_the\_tabitemr}
+\_def\_tabdeclarel{\_the\_tabiteml\_relax##\_unsskip\_hfil\_the\_tabitemr}
+\_def\_tabdeclarer{\_the\_tabiteml\_hfil##\_unsskip\_the\_tabitemr}
+\_def\_paramtabdeclarep#1{\_the\_tabiteml
\_vtop{\_hsize=#1\_relax \_baselineskip=\_normalbaselineskip
- \_lineskiplimit=0pt \_noindent##\_unsskip\_lower\_dp\_tstrutbox\_hbox{}}\_the\_tabitemr}}
+ \_lineskiplimit=0pt \_noindent##\_unsskip
+ \_ifvmode\_vskip\_dp\_tstrutbox \_else\_lower\_dp\_tstrutbox\_hbox{}\_fi}\_the\_tabitemr}
\_doc -----------------------------
- User puts optional spaces around the table item typically, i.\,e.\ he/she writes
+ User puts optional spaces around the table item typically, i.e.\ he/she writes
`& text &` instead `&text&`. The left space is ignored by internal \TeX/ algorithm but
- the right space must be removed by macros. This is a reason why we reccomend to
+ the right space must be removed by macros. This is a reason why we recommend to
use \`\_unsskip` after each `##` in your definition of \"declaration letters".
This macro isn't only the primitive `\unskip` because we allow usage of plain \TeX/
`\hideskip` macro: `&\hideskip text\hideskip&`.
\_cod -----------------------------
-\_def\_unsskip{\_ifdim\_lastskip>0pt \_unskip\_fi}
+\_def\_unsskip{\_ifmmode\_else\_ifdim\_lastskip>0pt \_unskip\_fi\_fi}
+
+ \_doc -----------------------------
+ The \`\fL`, \`\fR`, \`\fC` and \`\fX` macros only does a special parameters settings
+ for paragraph building algorithm. The \`\fS` prints the paragraph into
+ box 0 first, measures the number of lines by the `\prevgraf` primitive
+ and use (or don't use) `\hfil` (for centering) before the first line.
+ \_cod -----------------------------
+
+\_let\_fL=\_raggedright
+\_def\_fR{\_leftskip=0pt plus 1fill \_relax}
+\_def\_fC{\_leftskip=0pt plus1fill \_rightskip=0pt plus 1fill \_relax}
+\_def\_fX{\_leftskip=0pt plus1fil \_rightskip=0pt plus-1fil \_parfillskip=0pt plus2fil \_relax}
+\_long\_def\_fS #1\_unsskip{\_noindent \_setbox0 =\_vbox{\_noindent #1\_endgraf \_ea}%
+ \_ifnum\_prevgraf=1 \_hfil \_fi #1\_unsskip
+}
+\_public \fL \fR \fC \fX \fS ;
\_doc -----------------------------
The family of `\_cr*` macros
@@ -168,17 +282,33 @@
\_def\_mspan{\_omit \_tabdata={\_tabstrutA}\_let\_tmpa=\_relax \_afterassignment\_mspanA \_mscount=}
\_def\_mspanA[#1]#2{\_loop \_ifnum\_mscount>1 \_cs{_span}\_omit \_advance\_mscount-1 \_repeat
- \_colnum=0 \_def\_tmpa{}\_tabdata={}\_scantabdata#1\_relax
- \_setbox0=\_vbox{\_halign\_expandafter{\_the\_tabdata\_cr#2\_cr}\_global\_setbox8=\_lastbox}%
+ \_count1=\_colnum \_colnum=0 \_def\_tmpa{}\_tabdata={}\_scantabdata#1\_relax
+ \_colnum=\_count1 \_setbox0=\_vbox{\_halign\_ea{\_ea\_bgroup\_the\_tabdata\_egroup\_cr#2\_cr}%
+ \_global\_setbox8=\_lastbox}%
\_setbox0=\_hbox{\_unhbox8 \_unskip \_global\_setbox8=\_lastbox}%
\_unhbox8 \_ignorespaces}
\_public \mspan ;
\_doc -----------------------------
+ The \`\vspan``{<number>}{<text>}` implementaiton is here.
+ We need to lower the box by
+ \begtt \catcode`\<=13
+ (<number>-1)*(\ht+\dp of \tabstrut) / 2.
+ \endtt
+ The `#1` parameter must be one-digit number. If you want to set more digits
+ then use braces.
+ \_cod -----------------------------
+
+\_def\_vspan#1#2{\_vtop to 0pt{\_hbox{\_lower \_dimexpr
+ #1\_dimexpr(\_ht\_tstrutbox+\_dp\_tstrutbox)/2\_relax
+ -\_dimexpr(\_ht\_tstrutbox+\_dp\_tstrutbox)/2\_relax \_hbox{#2}}\_vss}}
+\_public \vspan ;
+
+ \_doc -----------------------------
The parameters of primitive `\vrule` and `\hrule` keeps the rule \"last wins".
If we re-define `\hrule` to `\_orihrule height1pt` then each usage
of redefined `\hrule` uses `1pt` height if this parameter isn't
- overwriten by another following `height` parameter. This principle is used for
+ overwritten by another following `height` parameter. This principle is used for
settings another default rule thickness than 0.4\,pt by the macro
\`\rulewidth`.
\_cod -----------------------------
@@ -208,4 +338,123 @@
\_endcode % -------------------------------------
+\secc[table.bound] The boundary declarator \code{:}
+
+The `<declaration>` part of `\table{<declaration>}{<data>}` includes
+column declarators (letters) and other material: the `|` or `(<cmd>)`.
+The boundaries of columns are just before each column declarator
+(with exception of the first one) if the boundary declarator `:` is not used.
+For example, the declaration `{|c||c(xx)(yy)c}`
+should be written more exactly using the boundary declarator `:`
+by `{|c||:c(xx)(yy):c}`. But you can set these boundaries to
+another places using the boundary declarator~`:` explicitly,
+for example `{|c:||c(xx):(yy)c}`. The boundary declarator `:`
+can be used only once between each two column declarators.
+
+Each table item have its own group. The `(<cmd>)` are parts of the given
+table item (depending on the boundary declarator position).
+If you want to apply a special setting for given column, you can do this by
+`(<setting>)` followed by column declarator. But if such column is not
+first, you must use `:(<setting>)`. Example. We have three centered columns,
+the second one have to be in bold font and the third one have to be in red:
+`\table{c:(\bf)c:(\Red)c}{<data>}`
+
+\secc Usage of the \code{\\tabskip} primitive
+
+The value of `\tabskip` primitive is used between all columns of the table.
+It is glue-type, so it can be stretchable or shrinkable, see next
+section~\ref[table.w].
+
+By default, `\tabskip` is 0\,pt. It means that only \^`\tabiteml`,
+\^`\tabitemr` and `(<cmds>)` can generate visual spaces between columns. But they
+are not real spaces between columns because they are in fact the part of
+the total column width.
+
+The `\tabskip` value declared before the \^`\table` macro (or in
+\^`\everytable` or in \^`\thistable`) is used between all columns in the table.
+This value is equal for all spaces between columns. But you can set each such space
+individualy if you use `(\tabskip=<value>)` in the <declaration> immediately
+before boundary character. The boundary character represents the column pair for
+which the `\tabskip` have individual value. For example
+`c(\tabskip=5pt):r` gives `\tabskip` value betwen `c` and `r` columns.
+You need not to use boundary character explicitly, so `c(\tabskip=5pt)r` gives
+the same result.
+
+The space before first column is given by the \^`\tabskipl`
+and the space after last column is equal to \^`\tabskipr`.
+Default values are 0\,pt.
+
+Use nonzero `\tabskip` only in special applications. If `\tabskip` is
+nonzero then horizontal lines generated by \^`\crli`, \^`\crlli` and \^`\crlp`
+have another behavior than you probably expected: they are interrupted in
+each `\tabskip` space.
+
+\secc[table.w] Tables to given width
+
+There are two possibilities how to create tables to given width:
+
+\begitems
+* `\table to<size>{<declaration>}{<data>}` uses stretchability or
+ shrinkability of all spaces between columns generated by `\tabskip` value and
+ eventually by \^`\tabskipl`, \^`\tabskipr` values. See example below.
+* `\table pxto<size>{<declaration>}{<data>}` expands the columns declared
+ by `p{<size>}`, if the `<size>` is given by a virtual \^`\tsize` unit.
+ See example below.
+\enditems
+
+Example of `\table to<size>`:
+
+\begtt \catcode`\<=13
+\thistable{\tabskip=0pt plus1fil minus1fil}
+\table to\hsize {lr}{<data>}
+\endtt
+%
+This table has its width `\hsize`. First column starts at the left boundary of
+this table and it is justified left (to the boundary). Second column ends at
+the right boundary of the table and it is justified right (to the boundary).
+The space between them are stretchable and shrinkable in order to reach
+given width `\hsize`.
+
+\medskip
+Example of `\table pxto<size>` (means \"{\bf p}aragraphs e{\bf x}panded {\bf to}"):
+
+\begtt
+\table pxto\hsize {|c|p{\tsize}|}{\crl
+ aaa & Ddkas jd dsjds ds cgha sfgs dd fddzf dfhz xxz
+ dras ffg hksd kds d sdjds h sd jd dsjds ds cgha
+ sfgs dd fddzf dfhz xxz. \crl
+ bb ddd ggg & Dsjds ds cgha sfgs dd fddzf dfhz xxz
+ ddkas jd dsjds ds cgha sfgs dd fddzf. \crl }
+\endtt
+
+\noindent\table pxto\hsize {|c|p{\tsize}|}{\crl
+ aaa & Ddkas jd dsjds ds cgha sfgs dd fddzf dfhz xxz
+ dras ffg hksd kds d sdjds h sd jd dsjds ds cgha
+ sfgs dd fddzf dfhz xxz. \crl
+ bb ddd ggg & Dsjds ds cgha sfgs dd fddzf dfhz xxz
+ ddkas jd dsjds ds cgha sfgs dd fddzf. \crl }
+\medskip
+
+The first `c` colum is variable width (it gets the width of most wide item)
+and the resting space to given `\hsize` is filled by the `p` column.
+
+You can declare more than one `p{<coefficient>\tsize}` columns in the table
+when `pxto` keyword is used. The total sum of <coefficinets> must be exactly one.
+For example,
+
+\begtt \catcode`\<=13
+\table pxto13cm {r p{.3\tsize} p{.5\tsize} p{.2\tsize} l}{<data>}
+\endtt
+%
+This gives the ratio of widths of individual paragraphs in the table.
+
+\_endinput
+
+2020-05-20 \colnum implemented.
+ \vspan implemented.
+2020-05-19 \fL, \fR ets defined.
+ \table to, \table pxto implemented.
+2020-05-10 \bgroup &\egroup added to tabdata (in order to \aftergroup from colors)
+ boundary declarator : introduced
+ \_unsskip: \ifmmode added.
2020-04-10 second group for items in order to \localcolors
diff --git a/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm b/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm
index 4be18807d7b..d0182a0f85c 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm
@@ -4,7 +4,7 @@
\_doc -----------------------------
The control sequences for `\alpha`, `\beta` etc are redefined here.
- The `\alpha` expands to the charcter with unicode `"03B1`, this is normal
+ The `\alpha` expands to the character with unicode `"03B1`, this is normal
character $α$. You can type it directly in your editor, if you know how
to do this.
\_cod -----------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/base/usebib.opm b/Master/texmf-dist/tex/luatex/optex/base/usebib.opm
index 33ac47b5751..b109e384c21 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/usebib.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/usebib.opm
@@ -265,7 +265,7 @@ The `bib-<style>.opm` file must define the commands:
%
There are two special fieldnames: `!author` and `!editor`. The processed list of
authors or editors (by repeatedly calling `\_authorname` or `\_editorname`) are
-used here insted of raw data.
+used here instead of raw data.
You can define `_print:BEGIN` and/or `_print:END` which is executed at the begin or
end of each `<entrytype>`. The formatting does not solve the numbering and
diff --git a/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm b/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm
index ba2cf93dab3..84d6d83ae5b 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm
@@ -61,7 +61,7 @@
\_doc ----------------------------
\`\activettchar``<char>` saves original catcode of previously declared `<char>` (if
such character was declared) using \`\_savedttchar` and \`\_savedttcharc`
- values. Then new such values are stored. The declared charater is activated
+ values. Then new such values are stored. The declared character is activated
by `\_adef` as a macro (active character) which opens a group,
does `\_setverb` and other settings and reads its parameter until second the same
character. This is done by the \`\_readverb` macro. Finally it prints scanned
diff --git a/Master/texmf-dist/tex/luatex/optex/demo/op-letter.tex b/Master/texmf-dist/tex/luatex/optex/demo/op-letter-cs.tex
index 1b5d722d3b4..1b5d722d3b4 100644
--- a/Master/texmf-dist/tex/luatex/optex/demo/op-letter.tex
+++ b/Master/texmf-dist/tex/luatex/optex/demo/op-letter-cs.tex
diff --git a/Master/texmf-dist/tex/luatex/optex/demo/op-letter-en.tex b/Master/texmf-dist/tex/luatex/optex/demo/op-letter-en.tex
new file mode 100644
index 00000000000..a7f19c43d4a
--- /dev/null
+++ b/Master/texmf-dist/tex/luatex/optex/demo/op-letter-en.tex
@@ -0,0 +1,38 @@
+%% This is part of OpTeX project, see http://petr.olsak.net/optex
+\useOpTeX
+
+\letter % \letter OpTeX style activated
+\enlang \enquotes % Language and quote style
+\fontfam[bonum]
+
+\hfill\address
+ Alice Author
+ 123 Sender Street
+ City 4567
+
+\bigskip
+
+\address
+ Mr. Bobby Bureaucrat
+ 456 Magnolia Street
+ City 8901
+
+\hfill\today
+
+\subject Inquiry regarding \"lorem ipsum"
+
+Dear Mr. Bureaucrat,
+
+\lorem[1-2] % 2 paragraphs of blindtext
+
+Thank you for your time.
+
+With best regards,
+
+\bigskip % leave some space for signature
+\bigskip
+
+Alice Author
+
+\bye
+
diff --git a/Master/texmf-dist/tex/luatex/optex/demo/slides-bg.png b/Master/texmf-dist/tex/luatex/optex/demo/op-slides-bg.png
index 4ac1ad8c38c..4ac1ad8c38c 100644
--- a/Master/texmf-dist/tex/luatex/optex/demo/slides-bg.png
+++ b/Master/texmf-dist/tex/luatex/optex/demo/op-slides-bg.png
Binary files differ
diff --git a/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex b/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex
index f6213cc63d3..a7c40a854c1 100644
--- a/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex
+++ b/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex
@@ -6,8 +6,8 @@
\def<#1>{\hbox{$\langle$\it#1\/$\rangle$}}
\everyintt={\catcode`\<=13}
-\hyperlinks\Blue\Blue % hyperlinks are used in the title page
-\backgroundpic{slides-bg.png} % background picture
+\hyperlinks\Blue\Blue % hyperlinks are used in the title page
+\backgroundpic{op-slides-bg.png} % background picture
\activettchar` % inline verbatim
\enquotes % English quotes \"..."