From 29bf525f876e4654f4acff755e0ec7b925041c2e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 3 Dec 2022 21:02:14 +0000 Subject: optex (3dec22) git-svn-id: svn://tug.org/texlive/trunk@65185 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/optex/base/README | 11 + Master/texmf-dist/doc/optex/base/mte-doc.tex | 26 - Master/texmf-dist/doc/optex/base/optex-doc.pdf | Bin 1437685 -> 1484007 bytes Master/texmf-dist/doc/optex/base/optex-doc.tex | 2 +- Master/texmf-dist/doc/optex/base/optex-math.tex | 33 +- Master/texmf-dist/doc/optex/base/optex-techdoc.tex | 8 +- Master/texmf-dist/doc/optex/base/optex-userdoc.tex | 32 +- Master/texmf-dist/tex/optex/base/alloc.opm | 5 +- Master/texmf-dist/tex/optex/base/basic-macros.opm | 22 +- Master/texmf-dist/tex/optex/base/bib-simple.opm | 49 +- Master/texmf-dist/tex/optex/base/cite-bib.opm | 2 +- Master/texmf-dist/tex/optex/base/doc.opm | 34 +- Master/texmf-dist/tex/optex/base/f-heros.opm | 17 +- Master/texmf-dist/tex/optex/base/f-iwona.opm | 26 + Master/texmf-dist/tex/optex/base/f-kurier.opm | 26 + Master/texmf-dist/tex/optex/base/f-lato.opm | 34 ++ Master/texmf-dist/tex/optex/base/fams-ini.opm | 19 +- Master/texmf-dist/tex/optex/base/fnotes.opm | 4 +- Master/texmf-dist/tex/optex/base/fonts-catalog.opm | 2 +- Master/texmf-dist/tex/optex/base/fonts-resize.opm | 72 ++- Master/texmf-dist/tex/optex/base/fonts-select.opm | 25 +- Master/texmf-dist/tex/optex/base/graphics.opm | 12 +- Master/texmf-dist/tex/optex/base/hi-syntax.opm | 20 +- Master/texmf-dist/tex/optex/base/hyperlinks.opm | 6 +- Master/texmf-dist/tex/optex/base/if-macros.opm | 63 +- Master/texmf-dist/tex/optex/base/lang-data.opm | 24 +- Master/texmf-dist/tex/optex/base/lang-decl.opm | 16 +- Master/texmf-dist/tex/optex/base/languages.opm | 7 +- Master/texmf-dist/tex/optex/base/makeindex.opm | 6 +- Master/texmf-dist/tex/optex/base/math-preload.opm | 63 +- Master/texmf-dist/tex/optex/base/math-unicode.opm | 343 ----------- Master/texmf-dist/tex/optex/base/more-macros.opm | 119 +++- Master/texmf-dist/tex/optex/base/multicolumns.opm | 7 +- Master/texmf-dist/tex/optex/base/optex.ini | 6 +- Master/texmf-dist/tex/optex/base/optex.lua | 107 ++-- Master/texmf-dist/tex/optex/base/others.opm | 8 +- Master/texmf-dist/tex/optex/base/output.opm | 7 +- Master/texmf-dist/tex/optex/base/pdfuni-string.opm | 12 +- Master/texmf-dist/tex/optex/base/plain-macros.opm | 19 +- Master/texmf-dist/tex/optex/base/prefixed.opm | 178 ++++-- Master/texmf-dist/tex/optex/base/ref-file.opm | 2 +- Master/texmf-dist/tex/optex/base/references.opm | 6 +- Master/texmf-dist/tex/optex/base/sections.opm | 27 +- Master/texmf-dist/tex/optex/base/table.opm | 14 +- Master/texmf-dist/tex/optex/base/unimath-codes.opm | 65 ++- .../texmf-dist/tex/optex/base/unimath-macros.opm | 404 +++++++++++++ Master/texmf-dist/tex/optex/base/verbatim.opm | 10 +- Master/texmf-dist/tex/optex/pkg/math.opm | 639 +++++++++++++++++++++ Master/texmf-dist/tex/optex/pkg/mte.opm | 32 +- 49 files changed, 1938 insertions(+), 733 deletions(-) delete mode 100644 Master/texmf-dist/doc/optex/base/mte-doc.tex create mode 100644 Master/texmf-dist/tex/optex/base/f-iwona.opm create mode 100644 Master/texmf-dist/tex/optex/base/f-kurier.opm create mode 100644 Master/texmf-dist/tex/optex/base/f-lato.opm delete mode 100644 Master/texmf-dist/tex/optex/base/math-unicode.opm create mode 100644 Master/texmf-dist/tex/optex/base/unimath-macros.opm create mode 100644 Master/texmf-dist/tex/optex/pkg/math.opm diff --git a/Master/texmf-dist/doc/optex/base/README b/Master/texmf-dist/doc/optex/base/README index 0cd39b8770e..f6a86e51d2e 100644 --- a/Master/texmf-dist/doc/optex/base/README +++ b/Master/texmf-dist/doc/optex/base/README @@ -22,6 +22,17 @@ doc/ ... PDF version of the OpTeX documentation and sources. History: +<1.09> Dec 2022: + New math.opm package: doing math more comfortable. + The math.opm package can be a package template for macro writers. + \docgen for printing doucumantation of packages introduced. + unimath control sequences are almost all declared by \chardef, no \mathchardef. + \casesof, \currfile, \nospaceafter (tools for macro programmers) introduced. + \setpos, \posx, \posy moved from OpTeX trick to the format. + \sfont, \ufont introduced. + More robust \caption parameter. + Lato, Kurier, Iwona font families registered. + Minor more improvements and bug fixing. <1.08> Aug 2022: Sorting rules for German, French, Polish, Hungarian, ... added. Font files for Montserrat, STIX, XITS, STIXtwo, Overlock added. diff --git a/Master/texmf-dist/doc/optex/base/mte-doc.tex b/Master/texmf-dist/doc/optex/base/mte-doc.tex deleted file mode 100644 index 030f023d3f7..00000000000 --- a/Master/texmf-dist/doc/optex/base/mte-doc.tex +++ /dev/null @@ -1,26 +0,0 @@ -% This is part of mte.opm macro package for OpTeX - -% Run optex mte-doc -% (two times) to generate documentation including references and the index. - -\load [doc] - -\def\elink[#1]#2{% - \ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf\#cs:#1]% - {\tt\string#2}% -} -\def\olink[#1]#2{% - \ulink[http://petr.olsak.net/ftp/olsak/optex/optex-doc.pdf\#cs:#1]% - {\tt\string#2}% -} -\let\_urllinkcolor=\Cyan - -\printdoctail mte.opm -\printdoc mte.opm - -\nonum\sec Index -\begmulti 3 -\tt \makeindex -\endmulti - -\bye diff --git a/Master/texmf-dist/doc/optex/base/optex-doc.pdf b/Master/texmf-dist/doc/optex/base/optex-doc.pdf index bf9f70a3267..666e8793e6e 100644 Binary files a/Master/texmf-dist/doc/optex/base/optex-doc.pdf and b/Master/texmf-dist/doc/optex/base/optex-doc.pdf differ diff --git a/Master/texmf-dist/doc/optex/base/optex-doc.tex b/Master/texmf-dist/doc/optex/base/optex-doc.tex index 785a181b1da..de9639a5767 100644 --- a/Master/texmf-dist/doc/optex/base/optex-doc.tex +++ b/Master/texmf-dist/doc/optex/base/optex-doc.tex @@ -21,7 +21,7 @@ \tit Format Based on Plain \TeX/ and OPmac\fnotemark1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\hfill Version 1.08 +\hfill Version 1.09 \centerline{\it Petr Olšák, 2020, 2021, 2022} diff --git a/Master/texmf-dist/doc/optex/base/optex-math.tex b/Master/texmf-dist/doc/optex/base/optex-math.tex index ab127ea7622..e94b742d660 100644 --- a/Master/texmf-dist/doc/optex/base/optex-math.tex +++ b/Master/texmf-dist/doc/optex/base/optex-math.tex @@ -37,6 +37,20 @@ \def\x`{\bgroup\_setverb\xx} \bgroup \lccode\string`\.=\string`\` \lowercase{\egroup \def\xx #1#2.{\i #2 \egroup `#1#2.}} +\bgroup +\globaldefs=-1 +\def\refs{} \tmpnum=0 +\def\_Xtoc#1#2#3{\incr\tmpnum + \ea\addto \ea\refs \expanded{{\noexpand\sdef{r:#3}{\the\tmpnum}}} + \scantoeol\ignoreit +} +\isfile{optex-doc.ref}\iftrue \input{optex-doc.ref}\fi +\ea +\egroup +\refs + +\def\urloptexdoc{https://petr.olsak.net/ftp/olsak/optex/optex-doc.pdf} +\def\optexdoc[#1]{\ea\ulink\expanded{[\urloptexdoc\#toc:\trycs{r:#1}{}]}} \hyperlinks\Green\Green @@ -69,8 +83,8 @@ There are more types of extensions: e\TeX, lua\TeX/, Unicode math and is appended to the red triangle to inform you about the extension type. Nevertheless, \OpTeX/ user doesn't have to worry about it, all extensions are available if Unicode Math font is loaded (e.g., by the command -`\fonfam[lmfonts]`). See section 1.3.3 in \OpTeX/ documentation about -loading Unicode math fonts. +`\fonfam[lmfonts]`). See \optexdoc[1.3.3]{section 1.3.3} in \OpTeX/ +documentation about loading Unicode math fonts. {\iindent=2em \bigskip @@ -109,7 +123,8 @@ The math atoms are \ii single/math/object {\em single math objects} or \fnote{In \OpTeX/, the character `_` can be interpreted as a part of the control sequence name, not as the subscript constructor. But in common cases, constructions of math atoms are interpreted exactly as in plain \TeX. See sections - 2.2.2 and 2.14 of \OpTeX/ documentation for more details. If you want to + \optexdoc[2.2.2]{2.2.2} and \optexdoc[2.15]{2.15} + of \OpTeX/ documentation for more details. If you want to be sure that `_` is just a subscript constructor in \OpTeX/ then you can set \code{\\catcode`\\_=8} but after this, you cannot use control sequences with `_` character.} The constructors for exponent `^` and subscript `_` can be used in arbitrary order @@ -644,8 +659,8 @@ in another than this default shape, then we can use \x`\mit`, \x`\rm`, \x`\it`, \x`\bf`, \x`\cal`. \new \OpTeX/ \OpTeX/ supports more such selectors \x`\script`, \x`\frak`, \x`\bbchar`, \x`\bi`, see -section 1.3.3 in the \OpTeX/ documentation. The math selectors have local -validity in the group. +\optexdoc[1.3.3]{section 1.3.3} in the \OpTeX/ documentation. +The math selectors have local validity in the group. The control sequences \x`\rm`, \x`\it`, \x`\bf`, and \x`\bi` act as variant selectors of fonts in non-math mode (text mode) and they act @@ -1410,7 +1425,7 @@ operator: $$ \sum/_{\eqlines{\baselineskip=.7\baselineskip}\eqstyle{\scriptstyle}\eqalign{ i &\in A \cr - \quad j &\in B\cup C \cr + j &\in B\cup C \cr m &\in C }} i + j + m $$ @@ -1418,7 +1433,7 @@ $$ $$ \sum_{\eqlines{\baselineskip=.7\baselineskip}\eqstyle{\scriptstyle}\eqalign{ i &\in A \cr - \quad j &\in B\cup C \cr + j &\in B\cup C \cr m &\in C }} i + j + m $$ @@ -1585,8 +1600,8 @@ characters from main math font and these additional fonts. This can be usable if the main math font doesn't include all desired characters or you dislike some character shapes from main font. \OpTeX/ enables to load additional math fonts by `\addUmathfont` and characters from additional -fonts can be declared by `\resetmathchars`. See the section 2.16 of \OpTeX/ -documentation for more details about this. +fonts can be declared by `\mathchars`. See the \optexdoc[2.16]{section 2.16} +of \OpTeX/ documentation for more details about this. The rest of this section includes an example which shows another task: how to combine main Unicode math font with old 8-bit math font `bbold10.tfm`. diff --git a/Master/texmf-dist/doc/optex/base/optex-techdoc.tex b/Master/texmf-dist/doc/optex/base/optex-techdoc.tex index 5a51ba4d8ac..78156194047 100644 --- a/Master/texmf-dist/doc/optex/base/optex-techdoc.tex +++ b/Master/texmf-dist/doc/optex/base/optex-techdoc.tex @@ -87,7 +87,7 @@ the `\dump` command. } \printdoctail prefixed.opm -\secc The implementation of the namespaces +\secc The implementation of the namespaces and macros for macro-files \printdoc prefixed.opm \sec pdf\TeX/ initialization @@ -145,7 +145,7 @@ section~\ref[fselect]. \printdoc math-macros.opm \sec Unicode-math fonts -\printdoctail math-unicode.opm +\printdoctail unimath-macros.opm \sec[opmac-fonts] Scaling fonts in document (high-level macros) These macros are documented in section~\ref[sizes] from the user point of view. @@ -274,7 +274,7 @@ The allocations are declared in subsection~\ref[lua-alloc], calbacks are implemented in subsection~\ref[callbacks] and handling with colors can be found in the subsection~\ref[lua-colors]. -{\everytt={\typosize[8/10]\_let\_printverbline=\_printcodeline \medskip} +{\everytt={\typosize[8/10]\_let\_printverbline=\_printcodeline \_hfuzz=1em \medskip} \commentchars-- \def\docfile{optex.lua} \ttline=-1 \_def\_printcomments{\_medskip {\_catcodetable0 \_typosize[10/12]\_everypar={}\_scantextokens\_ea{\_vcomments}\par}% @@ -285,7 +285,7 @@ found in the subsection~\ref[lua-colors]. } -\sec Printing documentation +\sec[doc] Printing documentation \printdoctail doc.opm \printdoc doc.opm diff --git a/Master/texmf-dist/doc/optex/base/optex-userdoc.tex b/Master/texmf-dist/doc/optex/base/optex-userdoc.tex index 23609f7bad6..e04014b991f 100644 --- a/Master/texmf-dist/doc/optex/base/optex-userdoc.tex +++ b/Master/texmf-dist/doc/optex/base/optex-userdoc.tex @@ -237,8 +237,8 @@ to \^`\fontfam[lmfonts]`. Several aliases are prepared, thus If you write \^`\fontfam[?]` then all font families registered in \OpTeX/ are listed on the terminal and in the log file. If you write \^`\fontfam[catalog]` then a catalog of all fonts registered in -\OpTeX/ and available in your \TeX/ system is printed. The instructions -on how to register your own font family are appended in the catalog. +\OpTeX/ and available in your \TeX/ system is printed. +See also \ulink[http://petr.olsak.net/ftp/olsak/optex/op-catalog.pdf]{this catalog}. If the family is loaded then {\em font modifiers} applicable in such font family are listed on the terminal: (`\caps`, `\cond` for example). @@ -1128,7 +1128,7 @@ this item occurs is listed in the index entry. So you can type: The \ii resistor resistor is a passive electrical component ... \endtt -You cannot double the word if you use the \^`\iid` instead of \^`\ii`: +You don't have to double the word if you use the \^`\iid` instead of \^`\ii`: \begtt The \iid resistor is a passive electrical component ... @@ -1304,7 +1304,7 @@ The usage is: \endtt The is one or more `*.bib` database source files (separated by -spaces and without extension) and the