From 2517d9a39aa036d64422152f1e451bc37d9b2e03 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 21 May 2020 21:47:11 +0000 Subject: optex (21may20) git-svn-id: svn://tug.org/texlive/trunk@55231 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/luatex/optex/README | 5 + Master/texmf-dist/doc/luatex/optex/optex-doc.pdf | Bin 1172140 -> 1206961 bytes Master/texmf-dist/doc/luatex/optex/optex-doc.tex | 2 +- .../texmf-dist/doc/luatex/optex/optex-techdoc.tex | 8 +- .../texmf-dist/doc/luatex/optex/optex-userdoc.tex | 92 +++++- Master/texmf-dist/doc/man/man1/optex.man1.pdf | Bin 16189 -> 16189 bytes Master/texmf-dist/tex/luatex/optex/base/alloc.opm | 13 +- .../tex/luatex/optex/base/bib-iso690.opm | 2 +- .../tex/luatex/optex/base/bib-simple.opm | 2 +- .../texmf-dist/tex/luatex/optex/base/cite-bib.opm | 6 +- Master/texmf-dist/tex/luatex/optex/base/colors.opm | 13 +- Master/texmf-dist/tex/luatex/optex/base/doc.opm | 3 +- .../texmf-dist/tex/luatex/optex/base/fams-ini.opm | 20 +- .../texmf-dist/tex/luatex/optex/base/graphics.opm | 10 +- .../texmf-dist/tex/luatex/optex/base/hi-syntax.opm | 8 +- .../tex/luatex/optex/base/hisyntax-c.opm | 4 +- .../tex/luatex/optex/base/hyphen-lan.opm | 2 +- .../texmf-dist/tex/luatex/optex/base/if-macros.opm | 7 +- .../texmf-dist/tex/luatex/optex/base/languages.opm | 4 +- .../tex/luatex/optex/base/math-macros.opm | 109 +++++-- .../tex/luatex/optex/base/math-preload.opm | 4 +- .../tex/luatex/optex/base/more-macros.opm | 6 +- Master/texmf-dist/tex/luatex/optex/base/optex.ini | 2 +- Master/texmf-dist/tex/luatex/optex/base/others.opm | 6 + Master/texmf-dist/tex/luatex/optex/base/output.opm | 7 +- .../tex/luatex/optex/base/parameters.opm | 32 +- .../texmf-dist/tex/luatex/optex/base/prefixed.opm | 2 +- .../texmf-dist/tex/luatex/optex/base/ref-file.opm | 2 +- .../texmf-dist/tex/luatex/optex/base/sections.opm | 2 +- Master/texmf-dist/tex/luatex/optex/base/table.opm | 325 ++++++++++++++++++--- .../tex/luatex/optex/base/unimath-codes.opm | 2 +- Master/texmf-dist/tex/luatex/optex/base/usebib.opm | 2 +- .../texmf-dist/tex/luatex/optex/base/verbatim.opm | 2 +- .../tex/luatex/optex/demo/op-letter-cs.tex | 41 +++ .../tex/luatex/optex/demo/op-letter-en.tex | 38 +++ .../texmf-dist/tex/luatex/optex/demo/op-letter.tex | 41 --- .../tex/luatex/optex/demo/op-slides-bg.png | Bin 0 -> 62385 bytes .../texmf-dist/tex/luatex/optex/demo/op-slides.tex | 4 +- .../texmf-dist/tex/luatex/optex/demo/slides-bg.png | Bin 62385 -> 0 bytes 39 files changed, 645 insertions(+), 183 deletions(-) create mode 100644 Master/texmf-dist/tex/luatex/optex/demo/op-letter-cs.tex create mode 100644 Master/texmf-dist/tex/luatex/optex/demo/op-letter-en.tex delete mode 100644 Master/texmf-dist/tex/luatex/optex/demo/op-letter.tex create mode 100644 Master/texmf-dist/tex/luatex/optex/demo/op-slides-bg.png delete mode 100644 Master/texmf-dist/tex/luatex/optex/demo/slides-bg.png (limited to 'Master/texmf-dist') 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 Binary files a/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf and b/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf 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{}` 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{}` 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{`\^`\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{`\^`\fL}` fit left, i.e.\ left justified, ragged right, +* `p{`\^`\fR}` fit right, i.e.\ right justified, ragged left, +* `p{`\^`\fC}` fit center, i.e.\ ragged left plus right, +* `p{`\^`\fS}` fit special, short one-line pararaph centered, + long paragraph normal, +* `p{`\^`\fX}` fit extra, left-right justified but last line centered. +\enditems You can use `()` in the . 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 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` command works like the `\noalign{\vskip}` -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 columns and formats the by the with the same syntax as common \^`\table` . 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` . The +after `c`, `l` or `r` letter in \^`\mspan` . 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{##}`. More about -it is in technical documentation in the section~\ref[table]. +The \^`\vspan``{}` shifts the down in order it looks +like to be in the center of the 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 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=`. 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{##}`. +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` or `xto`. +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 ` can be used when \^`\report` is declared. It prints `` 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 @@ -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 Binary files a/Master/texmf-dist/doc/man/man1/optex.man1.pdf and b/Master/texmf-dist/doc/man/man1/optex.man1.pdf 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` `[