texlive[58515] Master/texmf-dist: optex (18mar21)

commits+karl at tug.org commits+karl at tug.org
Thu Mar 18 22:11:17 CET 2021


Revision: 58515
          http://tug.org/svn/texlive?view=revision&revision=58515
Author:   karl
Date:     2021-03-18 22:11:17 +0100 (Thu, 18 Mar 2021)
Log Message:
-----------
optex (18mar21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/optex/README
    trunk/Master/texmf-dist/doc/luatex/optex/omls.tex
    trunk/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf
    trunk/Master/texmf-dist/doc/luatex/optex/optex-doc.tex
    trunk/Master/texmf-dist/doc/luatex/optex/optex-math.tex
    trunk/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex
    trunk/Master/texmf-dist/tex/luatex/optex/base/alloc.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/f-heros.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/fonts-opmac.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/lists.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/margins.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/optex.ini
    trunk/Master/texmf-dist/tex/luatex/optex/base/optex.lua
    trunk/Master/texmf-dist/tex/luatex/optex/base/outlines.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/output.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/sections.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/slides.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/styles.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/table.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm
    trunk/Master/texmf-dist/tex/luatex/optex/base/usebib.opm
    trunk/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/luatex/optex/base/f-librecaslon.opm

Modified: trunk/Master/texmf-dist/doc/luatex/optex/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/optex/README	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/doc/luatex/optex/README	2021-03-18 21:11:17 UTC (rev 58515)
@@ -19,6 +19,13 @@
 
 History:
 
+<1.01> Mar. 2021
+       Minor code fixes (thanks to reports from users).
+       LibreCaslon font file added.
+       two new callbacks from new LuaTeX 1.13 added to optex.lua
+       active * (in lists) works as normal in math mode.
+       f-heros(\slides): additional font XITSMath loaded (to the base FiraMath font).
+       \_xhsize seting added to \margins.
 <1.00> Feb. 2021
        The OMLS (OpTeX Markup Language Standard) was developed. It helps to create
        convertors from/to OpTeX documents and similar applications.

Modified: trunk/Master/texmf-dist/doc/luatex/optex/omls.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/optex/omls.tex	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/doc/luatex/optex/omls.tex	2021-03-18 21:11:17 UTC (rev 58515)
@@ -457,7 +457,7 @@
 * `\,` \: should be small space or space.
 * \.`\quad`, \.`\qquad` \: should be bigger space or more spaces.
 * \.`\-`, \.`\/` \: should be ignored.
-* \.`\"<text>"` or \.`\'<text>'` \: `<clqq><text><crqq>` or `<clq><text><crq>`,
+* \.`\"<text>"` or \.`\'<text>'` \: `<qql><text><qqr>` or `<ql><text><qr>`,
   only if `%%:quotes` are set.
 \enditems
 
@@ -588,7 +588,7 @@
 \enditems
 
 
-\secc Multiclolumns
+\secc Multicolumns
 
 \.`\begmulti <number><space>` opens the group and \.`\endmulti`
 closes the group. If output format allows multi-columns then

Modified: trunk/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/luatex/optex/optex-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/optex/optex-doc.tex	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/doc/luatex/optex/optex-doc.tex	2021-03-18 21:11:17 UTC (rev 58515)
@@ -20,7 +20,7 @@
 \tit Format Based on Plain \TeX/ and OPmac\fnotemark1
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\hfill Version 1.00
+\hfill Version 1.01
 
 \centerline{\it Petr Olšák, 2020, 2021}
 

Modified: trunk/Master/texmf-dist/doc/luatex/optex/optex-math.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/optex/optex-math.tex	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/doc/luatex/optex/optex-math.tex	2021-03-18 21:11:17 UTC (rev 58515)
@@ -740,6 +740,12 @@
 And the result from `\input print-unimath.opm` looks like the following ten
 pages.
 
+Unsupported characters can be replaced by characters from other Unicode math
+font, see
+\ulink[http://petr.olsak.net/optex/optex-tricks.html\#addumathfont]{OpTeX trick 0030}
+or section~\ref[newfam].
+
+
 \label[listA]\wlabel{}
 
 \bigskip

Modified: trunk/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1709,7 +1709,7 @@
 The macro packages intended to \OpTeX/ have the name `*.opm`.
 The following packages are distributed as part of \OpTeX/:
 \begitems
-* `qrcodes.opm` enables to create QR codes.
+* `qrcode.opm` enables to create QR codes.
 * `vlna.opm` enables to protect of one-letter prepositions and more things automatically.
 * `emoji.opm` defines `\emoji{<name>}` command for colored emoticons.
 * `plain-at.opm` defines the old names from plain \TeX/.

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/alloc.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/alloc.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/alloc.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \newdimen {Allocators for registers <2020-05-12>} % loaded in format
+\_codedecl \newdimen {Allocators for registers <2021-02-15>} % loaded in format
 
    \_doc -----------------------------
    The limits are set first.
@@ -39,7 +39,7 @@
    \_cod -----------------------------
 
 \_def\_allocator #1#2#3{%
-   \_global\_advance\_cs{_#2alloc}by1
+   \_incr{\_cs{_#2alloc}}%
    \_ifnum\_cs{_#2alloc}>\_cs{_mai#2}%
       \_errmessage{No room for a new \_ea\_string\_csname #2\_endcsname}%
    \_else
@@ -75,7 +75,7 @@
 \_chardef\_insertmin = 201
 
 \_def\_newinsert #1{%
-   \_global\_advance\_insertalloc by-1
+   \_decr\_insertalloc
    \_ifnum\_insertalloc <\_insertmin
       \_errmessage {No room for a new \_string\insert}%
    \_else
@@ -168,5 +168,6 @@
 
 \_endinput
 
+2021-02-15  \_advance -> \_incr, \_decr
 2020-05-12  \newmath -> \newfam  bug fixing
 2020-01-23  released

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/f-heros.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/f-heros.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/f-heros.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -19,7 +19,21 @@
 
 \_initfontfamily % new font family must be initialized
 
-\_loadmath {[FiraMath-Regular]}
+\_ifmathloading
+   \_loadmath {[FiraMath-Regular]}
+   \_addto\_normalmath{\_loadumathfamily 5 {xitsmath-regular}{} }
+   \_addto\_boldmath  {\_loadumathfamily 5 {xitsmath-bold}{} }
+   \_addto\frak{\_fam5 }\_addto\cal{\_fam5 }
+   \_normalmath
+   \_wterm{MATH-FONT(5): "[XITSMath-Regular/Bold]" -- used for \_string\cal, \_string\frak}
+   % \bf, \bi from FiraMath:
+   \_let\_bsansvariables=\_bfvariables
+   \_let\_bsansGreek=\_bfGreek
+   \_let\_bsansgreek=\_bfgreek
+   \_let\_bsansdigits=\_bfdigits
+   \_let\_bisansvariables=\_bivariables
+   \_let\_bisansgreek=\_bigreek
+\_fi
 
 \_endcode
 

Added: trunk/Master/texmf-dist/tex/luatex/optex/base/f-librecaslon.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/f-librecaslon.opm	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/f-librecaslon.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -0,0 +1,22 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [LibreCaslon] \Librecaslon {Libre Caslon Text, inspired by Caslon}
+        {\onum} {\rm \bf \it \bi} {Termes}
+        {[LibreCaslonText-Regular]}
+        {\_def\_fontnamegen {[Libre\_currV]:\_capsV\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+Modifier:^^J
+ \onum ...... oldstyle figures^^J
+}}
+
+\_moddef \resetmod {\_fsetV caps={},csl={CaslonText} 
+                    \_fvars \_cslV-Regular \_cslV-Bold \_cslV-Italic Csln-Bolditalic }
+\_moddef \onum     {\_fsetV caps=+onum; }
+
+\_initfontfamily % new font family must be initialized
+
+\_loadmath {[texgyretermes-math]}
+
+\_endcode
+


Property changes on: trunk/Master/texmf-dist/tex/luatex/optex/base/f-librecaslon.opm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -99,6 +99,11 @@
    { -,\caps: {\rm\bf\it\bi} \swash: {\it\bi} }
 \_famalias [GaramondL]
 
+\_famfrom {Pablo Impallari, Rodrigo Fuenzalida}
+\_faminfo [LibreCaslon] {Libre Caslon Text, inspired by Caslon} {f-librecaslon}
+   { -,\onum: {\rm\bf\it\bi} }
+\_famalias [Caslon]
+
 \_famfrom {Adobe, Paul D. Hunt}
 \_faminfo [Source Pro] {Adobe SourceSerifPro, SourceSansPro, SourceCodePro} {f-sourcepro}
    { \elight,\light,-,\bolder: {\rm\it} -,\bolder: {\bf\bi}

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/fonts-opmac.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/fonts-opmac.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/fonts-opmac.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,12 +1,12 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \typosize {Font managing macros from OPmac <2020-12-12>} % loaded in format
+\_codedecl \typosize {Font managing macros from OPmac <2021-03-10>} % loaded in format
 
    \_doc -----------------------------
    \`\typosize` `[<font-size>/<baselineskip>]` sets given parameters.
    It sets text font size by the \^`\setfontsize` macro and math font sizes
    by setting internal macros \^`\_sizemtext`, \^`\_sizemscript` and
-   \^`\_sizemsscript`. It uses common concept font thes sizes: 100\,\%,
+   \^`\_sizemsscript`. It uses common concept font sizes: 100\,\%,
    70\,\% and 50\,\%.
    The \^`\_setmainvalues` sets the parameters as main values when
    the `\_typosize` is called first.
@@ -23,7 +23,7 @@
     \_edef\_sizemtext{\_ea\_ignorept \_the\_tmpdim \_ptmunit}%
     \_tmpdim=0.7\_tmpdim
     \_edef\_sizemscript{\_ea\_ignorept \_the\_tmpdim \_ptmunit}%
-   \_tmpdim=#1\_ptunit \_tmpdim=0.5\_tmpdim
+    \_tmpdim=#1\_ptunit \_tmpdim=0.5\_tmpdim
     \_edef\_sizemsscript{\_ea\_ignorept \_the\_tmpdim \_ptmunit}%
     \_fi
 }
@@ -71,15 +71,34 @@
 
    \_doc -----------------------------
    \`\_setmainvalues` sets the current font size and `\baselineskip`
-   values to the \`\mainfosize` and \hbox{\`\mainbaselineskip`} registers.
-   It redefines itself to set the main values only first.
+   values to the \`\mainfosize` and \hbox{\`\mainbaselineskip`} registers
+   and loads fonts at given sizes.
+   It redefines itself as \`\_setmainvaluesL`
+   to set the main values only first. The \^`\_setmainvaluesL` does only
+   fonts loading.
    \nl
    \`\scalemain` returns to these values if they were set. Else they are set
    to 10/12\,pt.
+   \nl
+   \`\mfontsrule` gives the rule how math fonts are loaded when \^`\typosize`
+   or \^`\typoscale` are used. The value of \^`\mfontsrule` can be:
+   \begitems
+   * 0: no math fonts are loaded. User must use \^`\normalmath` or \^`\boldmath` explicitly.
+   * 1: `\_normalmath` is run if \^`\typosize`/\^`\typoscale` are used
+        first or they are run at outer group level. No
+        `\everymath`/`\everydisplay` are set in this case. If
+        \^`\typosize`/\^`\typoscale` are run repeatedly in a group then `\_normalmath` is
+        run only when math formula occurs. This is done using
+        `\everymath`/`\everydisplay` and \^`\_setmathfonts`.
+        \^`\mfontsrule=1` is default.
+   * 2: `\_normalmath` is run whenever \^`\typosize`/\^`\typoscale` are used.
+        `\everymath`/`\everydisplay` registers are untouched.
+   \enditems
    \_cod -----------------------------
 
 \_newskip   \_mainbaselineskip   \_mainbaselineskip=0pt \_relax
 \_newdimen  \_mainfosize         \_mainfosize=0pt
+\_newcount  \_mfontsrule         \_mfontsrule=1
 
 \_def\_setmainvalues {%
    \_mainbaselineskip=\_baselineskip
@@ -86,11 +105,15 @@
    \_mainfosize=\_optsize
    \_topskip=\_mainfosize \_splittopskip=\_topskip
    \_ifmmode \_else \_bf \_it \_bi \_rm \_fi % load all basic variants of the family
-   \_normalmath  % load fonts if \typosize is running first
+   \_ifnum \_mfontsrule>0 \_normalmath \_fi  % load math fonts first
    \_let \_setmainvalues =\_setmainvaluesL
 }
-\_def\_setmainvaluesL {\_ifmmode \_normalmath \_else
-   \_rm \_everymath={\_normalmath}\_everydisplay={\_normalmath}\_fi}
+\_def\_setmainvaluesL {\_relax \_ifmmode \_else \_rm \_fi % load text font
+   \_ifcase \_mfontsrule                                  % load math fonts
+   \_or \_ifnum\_currentgrouplevel=0 \_normalmath
+        \_else \_everymath={\_setmathfonts}\_everydisplay={\_normalmath}%
+               \_let\_runboldmath=\_relax \_fi
+   \_or \_normalmath \_fi}
 \_def\_scalemain {%
    \_ifdim \_mainfosize=\_zo
        \_mainfosize=10pt  \_mainbaselineskip=12pt
@@ -98,9 +121,23 @@
     \_fi
    \_optsize=\_mainfosize  \_baselineskip=\_mainbaselineskip
 }
-\_public \scalemain \mainfosize \mainbaselineskip ;
+\_public \scalemain \mainfosize \mainbaselineskip \mfontsrule ;
 
    \_doc -----------------------------
+   Suppose following example:
+   `{\typosize[13/15] Let $M$ be a subset of $R$ and $x\in M$...}`
+   If \^`\mfontsrule=1` then \^`\typosize` does not load math fonts
+   immediatelly but at the first math formula. It is done by `\everymath`
+   register, but the contents of this register is processed inside the math
+   group. If we do `\everymath={\_normalmath}` then this complicated macro
+   will be processed three times in your example above. We want only one
+   pocessing, so we do `\everymath={`\`\_setmathfonts``}` and
+   this macro closes math mode first, loads fonts and opens math mode again.
+   \_cod -----------------------------
+
+\_def\_setmathfonts{$\_normalmath\_everymath{}\_everydisplay{}$}
+
+   \_doc -----------------------------
    \`\thefontsize` `[<size>]` and \`\thefontscale` `[<factor>]`
     do modification of the size of the current font. They are implemented by the
    \^`\newcurrfontsize` macro.
@@ -141,13 +178,25 @@
 \_let\_italcorr=\/
 
    \_doc -----------------------------
-   The \`\boldify` macro does `\let\it\bi` and `\let\normalmath=\boldmath`.
+   The \`\boldify` macro does `\let\rm\bf`, `\let\it\bi` and
+   `\let\normalmath=\boldmath`. All following text will be in bold.
+   If should be used after \^`\typosize` or \^`\typoscale` macros.\nl
+   The internal \`\_runboldmath` macro runs `\_boldmath` immediatelly
+   if no delay of the math font loading is set by \^`\_setmainvaluesL`.\nl
+   The `\rm`, `\it` in math mode must keep its original meaning.
    \_cod -----------------------------
 
 \_protected\_def \_boldify {%
    \_let \_setmainvalues=\_setmainvaluesL
    \_let\it =\_bi \_let\rm =\_bf \_let\_normalmath=\_boldmath \_bf
+   \_runboldmath
+   \_ifx\_ncharrmA\_undefined \_protected\_addto\rm{\_fam0 }\_protected\_addto\it{\_fam1 }%
+   \_else \_protected\_def\rm {\_tryloadbf \_tenbf \_inmath{\_rmvariables \_rmdigits}}%
+          \_protected\_def\it {\_tryloadbi \_tenbi \_inmath{\_itvariables}}%
+   \_fi
 }
+\_def\_runboldmath{\_boldmath}
+
 \_public \em \boldify ;
 
    \_doc -----------------------------
@@ -169,6 +218,8 @@
 \_endcode % -------------------------------------
 
 History:
+2021-03-10 \boldify corrected
+2021-03-09 \mfontsrule and \_setmathfonts introduced
 2020-12-12 \_rmfixed fixed
 2020-04-28 \boldify: removed \let\_rm=\_bf
 2020-04-14 \_setmainvaluesL: \_ifmmode test added

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \fontfam {Fonts selection system <2020-01-27>} % preloaded in format
+\_codedecl \fontfam {Fonts selection system <2021-02-25>} % preloaded in format
 
    \_doc -----------------------------
    \`\initunifonts` macro extends \LuaTeX's font capabalities,
@@ -13,7 +13,9 @@
    macro \`\_doresizeunifont`. This mode includes
    a fallback to TFM mode if \^`\_fontnamegen` is not defined.
    Finally, `\initunifonts` sets itself to relax because we don't want to do
-   this work twice.
+   this work twice.\nl
+   \`\_ttunifont` is default font for `\tt` variant if
+   `f-lmfonts.opm` (or another font file where `\tt` is declared) is not loaded.
    \_cod -----------------------------
 
 \_def\_initunifonts {%
@@ -23,7 +25,7 @@
    }%
    \_gdef\_rfskipatX ##1" ##2\_relax{"##1"}%
    \_global\_let \_doresizefont=\_doresizeunifont
-   \_gdef\_tryloadtt {\_fontdef\_tentt{\_def\_fontnamegen{[lmmono10-regular]}\_rm}}%
+   \_gdef\_tryloadtt {\_fontdef\_tentt{\_let\_fontnamegen=\_ttunifont\_rm}}%
    \_global\_let \_initunifonts=\_relax % we need not to do this work twice
    \_global\_let \initunifonts=\_relax
 }
@@ -32,6 +34,8 @@
        \_font#1={\_fontnamegen} \_sizespec \_relax \_setwsp#1\_relax
    \_fi
 }
+\_def\_ttunifont{[lmmono10-regular]:\_fontfeatures-tlig;}
+
 \_public \initunifonts ;
 
    \_doc -----------------------------
@@ -834,6 +838,7 @@
 
 \endinput
 
+2021-02-25  \_ttunifont introduced
 2021-01-27  lua hack (print function) removed because luaotfload 3.17 removes bug.
 2020-12-12  \_modlist added, doc improved
 2020-04-18  \_tryloadfamslocal introduced

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/lists.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/lists.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/lists.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \begitems {Lists: begitems, enditems <2020-04-21>} % preloaded in format
+\_codedecl \begitems {Lists: begitems, enditems <2021-03-10>} % preloaded in format
 
    \_doc -----------------------------
    \`\_aboveliskip` is used above the list of items,\nl
@@ -47,7 +47,7 @@
   \_advance \_ilevel by1
   \_setlistskip
   \_ifnum\_lastpenalty<10000 \_aboveliskip \_fi
-  \_itemnum=0 \_adef*{\_startitem}
+  \_itemnum=0 \_adef*{\_relax\_ifmmode*\_else\_ea\_startitem\_fi}
   \_advance\_leftskip by\_iindent
   \_printitem=\_defaultitem
   \_the\_everylist \_relax
@@ -123,5 +123,6 @@
 
 \_endcode % -------------------------------------
 
+2021-03-10 \_ifmmode*\_else\_ea\_startitem\_fi added to * defintition
 2020-04-21 \isnextchar\par added to \enditems
 2020-03-18 introduced

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \makeindex {Makeindex and sorting <2021-02-01>} % loaded in format
+\_codedecl \makeindex {Makeindex and sorting <2021-02-15>} % loaded in format
 
    \_doc -----------------------------
    \^`\makeindex` implements sorting algorithm at \TeX/ macro-language level.
@@ -334,7 +334,7 @@
 \_def\_printiiA #1/{\_if^#1^\_let\_previi=\_currii \_else
    \_ea\_scanprevii\_previi/&\_edef\_tmpb{\_detokenize{#1}}%
    \_ifx\_tmpa\_tmpb \_iiemdash \_else#1 \_gdef\_previi{}\_fi
-   \_expandafter\_printiiA\_fi
+   \_ea\_printiiA\_fi
 }
 \_def\_iiemdash{\_kern.1em---\_space}
 \_def\_lastii{}
@@ -457,6 +457,7 @@
 
 \_endcode % -------------------------------------
 
+2021-02-15 \_expandafter -> \_ea
 2021-02-01 secodary sorting: start from code 65
 2020-04-21 \isempty \iffalse ... \fi added to \iindex
 2020-03-26 introduced

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/margins.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/margins.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/margins.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \margins {Macros for margins setting <2020-03-14>} % preloaded in format
+\_codedecl \margins {Macros for margins setting <2021-03-15>} % preloaded in format
 
     \_doc ----------------------------
     \`\margins``/<pg> <fmt> (<left>,<right>,<top>,<bot>)<unit>`
@@ -25,6 +25,7 @@
       \_else  \_if$#4$\_hoffset = #3\_tmp \_relax  % only left margin
               \_else  \_hsize =\_dimexpr \_pgwidth - #3\_tmp - #4\_tmp \_relax % left+right margin
                       \_hoffset = #3\_tmp \_relax
+                      \_xhsize =\_hsize \_setxhsize % \_xhsize used by \output routine
       \_fi\_fi
       \_if$#5$\_if$#6$\_voffset =\_dimexpr (\_pgheight -\_vsize)/2 \_relax
               \_else  \_voffset =\_dimexpr \_pgheight -\_vsize - #6\_tmp \_relax % only bottom margin
@@ -75,4 +76,5 @@
 
 \_endcode % -----------------------------------------
 
-
+2021-03-15 \_setxhsize added
+2020-03-14 released

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \sin {Math macros plus mathchardefs <2021-02-04>} % preloaded in format
+\_codedecl \sin {Math macros plus mathchardefs <2021-02-15>} % preloaded in format
 
    \_doc -----------------------------
    The category code of the character `_` remains as the letter (11) and the mathocode
@@ -1013,7 +1013,7 @@
      depending on the current math style when \^`\mathstyles` was opened.
    \enditems
    Example of usage of \^`\mathstyles`:
-   `\def\mathframe#1{\mathstyles{\frame{$\currstyle#1$}}}`.
+   `\def\mathframe#1{\mathstyles{\frame{$\currstyle{#1}$}}}`.
    \_cod -----------------------------
 
 \_newcount\_stylenum
@@ -1044,17 +1044,26 @@
    \_doc -----------------------------
    The \`\mathbox``{<text>}` macro is copied from OPmac trick 078.
    It behaves like `\hbox{<text>}` but the `<text>` is scaled to a smaller
-   size if it is used in scriptstyle or scriptscript style.
+   size if it is used in scriptstyle or scriptscript style.\nl
+   The \^`\_textmff` and \^`\_scriptmff` are redefined in order to
+   respect optical sizes. If we are in script style then the math mode
+   starts in text style, but optical size is given to script style.
+   The `\mathbox` in non-Unicode math respects optical sizes
+   using different principle.
    \_cod -----------------------------
 
 \_def\_mathbox#1{{\_mathstyles{\_hbox{%
    \_ifnum\_stylenum<2 \_everymath{\_currstyle}%
-   \_else \_typoscale[\_dobystyle{}{}{700}{500}/]\_fi #1}}}%
+   \_else
+      \_ifnum\_stylenum=2 \_def\_textmff{+ssty=0;}\_fi
+      \_ifnum\_stylenum=3 \_def\_textmff{+ssty=1;}\_def\_scriptmff{+ssty=1;}\_fi
+      \_typoscale[\_dobystyle{}{}{700}{500}/]\_fi #1}}}%
 }
 \_public \mathbox ;
 
 \_endcode %---------------------------------------------------
 
+2021-02-15 \_mathbox redefines \_textmff etc. in order to respect optical sizes
 2021-02-04 \_bordermatrixwithdelims introduced.
 2021-01-23 better expession for math styles in \matrix
 2021-01-22 bad use of \_stylenum in \matrix + bad value (bug fix: \_stylenum->\_mtstylenum)

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \loadmath {Unicode Math fonts <2020-06-06>} % preloaded in format
+\_codedecl \loadmath {Unicode Math fonts <2021-03-09>} % preloaded in format
 
    \_doc -----------------------------
    \`\loadmath` `{<Unicode-math font>}` loads the given font. It does:
@@ -88,7 +88,8 @@
   \_delimitershortfall=0.5\_fontdimen6\_textfont3
   \_nulldelimiterspace=0.12\_fontdimen6\_textfont3
   \_scriptspace=0.05\_fontdimen6\_textfont3
-  {\_everymath{}\_global\_setbox0=\_hbox{$\_fam1\_displaystyle{0\_atop0}$}}% correction for \choose
+  \_begingroup % correction for \choose
+      \_everymath{}\_global\_setbox0=\_hbox{$\_fam1\_displaystyle{0\_atop0}$}\_endgroup
   \_Umathfractiondelsize\_displaystyle = \_dimexpr(\_ht0-\_Umathaxis\_displaystyle)*2\_relax
 }
 
@@ -120,7 +121,10 @@
    math formulae from these three math families. All information needed by
    \TeX/ is collected in single Unicode-math font.\nl
    The \^`\_corrmsize` `<factor><space>` can be used just before
-   `\_loadumathfamily`, see section~\ref[math-preload] for more information.
+   `\_loadumathfamily`, see section~\ref[math-preload] for more information.\nl
+   The \`\_textmff`, \`\_scriptmff` and \`\_sscriptmff` are additional font
+   features for text, script and sscript sizes respectively. They are
+   locally re-defined in \^`\mathbox` macro.
    \_cod -----------------------------
 
 \_def\_umathname#1#2{"#1:\_mfontfeatures#2"}
@@ -128,14 +132,15 @@
 
 \_def\_loadumathfamily #1 #2#3 {%
   \_edef\_optsizesave{\_the\_optsize}%
-  \_optsize=\_sizemtext  \_font\_mF=\_umathname{#2}{#3} at\_optsize \_textfont#1=\_mF
-  \_ifnum#1=1 \_textfont2=\_mF \_textfont3=\_mF \_fi
-  \_optsize=\_sizemscript \_font\_mF=\_umathname{#2}{+ssty=0;#3} at\_optsize \_scriptfont#1=\_mF
-  \_ifnum#1=1 \_scriptfont2=\_mF \_scriptfont3=\_mF \_fi
-  \_optsize=\_sizemsscript \_font\_mF=\_umathname{#2}{+ssty=1;#3} at\_optsize\_scriptscriptfont#1=\_mF
-  \_ifnum#1=1 \_scriptscriptfont2=\_mF \_scriptscriptfont3=\_mF \_fi
+  \_optsize=\_sizemtext  \_font\_mF=\_umathname{#2}{\_textmff #3} at\_optsize
+  \_textfont#1=\_mF \_ifnum#1=1 \_textfont2=\_mF \_textfont3=\_mF \_fi
+  \_optsize=\_sizemscript \_font\_mF=\_umathname{#2}{\_scriptmff #3} at\_optsize
+  \_scriptfont#1=\_mF \_ifnum#1=1 \_scriptfont2=\_mF \_scriptfont3=\_mF \_fi
+  \_optsize=\_sizemsscript \_font\_mF=\_umathname{#2}{\_sscriptmff #3} at\_optsize
+  \_scriptscriptfont#1=\_mF \_ifnum#1=1 \_scriptscriptfont2=\_mF \_scriptscriptfont3=\_mF \_fi
   \_optsize=\_optsizesave \_ptmunit=\_ptunit
 }
+\_def\_textmff{} \_def\_scriptmff{+ssty=0;} \_def\_sscriptmff{+ssty=1;}
 
    \_doc -----------------------------
    Unicode math font includes all typical math alphabets together, user needs not to
@@ -194,7 +199,7 @@
 \_def\_greekdef#1{\_ifx#1\_relax \_else
    \_begingroup \_lccode`X=\_umathnumB \_lowercase{\_endgroup \_def#1{X}}%
    \_advance\_umathnumB by 1
-   \_expandafter\_greekdef \_fi
+   \_ea\_greekdef \_fi
 }
 
 \_endcode
@@ -253,6 +258,9 @@
 
 \_endinput
 
+2021-03-09 \_setunimathdimes: \_begin/end/group instead {}, bug fixed
+2021-02-15 \_textmff, \_scriptmff and \_sscriptmff introduced
+2021-02-15 \_expandafter -> \_ea
 2020-06-07 \Umathfractiondelsize (for \choose brackets) corrected, see https://tug.org/pipermail/luatex/2020-June/007365.html
 2020-04-15 \_setmathdimens -> \_setuniathdimens
 2020-02-25 implemented

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/optex.ini
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/optex.ini	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/optex.ini	2021-03-18 21:11:17 UTC (rev 58515)
@@ -21,8 +21,9 @@
 
 % OpTeX version
 
-\def\optexversion{1.00 Feb.2021}
+\def\optexversion{1.01 Mar.2021}
 \def\fmtname{OpTeX}
+\let\fmtversion=\optexversion
 
 % Engine testing:
 

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/optex.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/optex.lua	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/optex.lua	2021-03-18 21:11:17 UTC (rev 58515)
@@ -92,6 +92,7 @@
     process_input_buffer  = "data",
     process_output_buffer = "data",
     process_jobname       = "data",
+    input_level_string    = "data",
 
     -- node list processing
     contribute_filter      = "simple",
@@ -141,6 +142,7 @@
 
     -- undocumented
     glyph_stream_provider = "exclusive",
+    provide_charproc_data = "exclusive",
 }
 --
 -- Return a list containing descriptions of added callback functions for

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/outlines.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/outlines.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/outlines.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -50,7 +50,7 @@
 \_def\_outlinesC#1#2#3#4{\_pdfoutline goto name{#1} count #2#3{#4}\_relax}
 
 \_newcount\_oulnum
-\_def\_insertoutline#1{\_global\_advance\_oulnum by1
+\_def\_insertoutline#1{\_incr\_oulnum
    \_pdfdest name{oul:\_the\_oulnum} xyz\_relax
    \_pdfunidef\_tmp{#1}%
    \_pdfoutline goto name{oul:\_the\_oulnum} count0 {\_tmp}\_relax
@@ -100,3 +100,9 @@
 It creates a link destination of the type `oul:<num>` into the document
 (where \^`\insertoutline` is used) and the link itself is created too in the
 outline.
+
+\endinput
+
+2021-02-15 \_advance -> \_incr
+2021-02-09 \thisoutline implemented
+2020-03-12 released

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/output.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/output.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/output.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \nopagenumbers {Output routine <2020-03-28>} % preloaded in format
+\_codedecl \nopagenumbers {Output routine <2021-02-25>} % preloaded in format
 
    \_doc -----------------------------
    \`\_optexoutput` is the default output routine. You can create another...
@@ -38,7 +38,8 @@
    (for headlines and footlines, for instance). This value is set
    from the current value of `\hsize` when \`\_setxhsize` macro is called.
    This macro destroys itself, so the value is set only once. Typically it is
-   done when first \^`\_optexoutput` routine is called (see \^`\_begoutput`).
+   done in \^`\margins` macro or
+   when first \^`\_optexoutput` routine is called (see \^`\_begoutput`).
    Or it is called at the begining of the \^`\begtt`...`\endtt` environment before
    `\hsize` value is eventually changed by the user in this environment.
    \_cod -----------------------------
@@ -130,7 +131,7 @@
 \_def \_folio {\_ifnum\_pageno<0 \_romannumeral-\_pageno \_else \_number\_pageno \_fi}
 \_def \_nopagenumbers {\_footline={}}
 \_def \_advancepageno {%
-   \_ifnum\_pageno<0 \_global\_advance\_pageno by-1 \_else \_incr\_pageno \_fi
+   \_ifnum\_pageno<0 \_decr\_pageno \_else \_incr\_pageno \_fi
 } % increase |pageno|
 \_def \_raggedbottom {\_topskip=\_dimexpr\_topskip plus60pt \_pgbottomskip=0pt plus1fil\_relax}
 \_def \_normalbottom {\_topskip=\_dimexpr\_topskip \_pgbottomskip=0pt\_relax}
@@ -214,10 +215,10 @@
    \_global\_let\_draftfont=\_draftfont
 }
 \_def \_draftbox #1{\_setbox0=\_hbox{#1}%
-   \_kern.5\_vsize \_kern4.5\_wd0
-   \_hbox to0pt{\_kern.5\_xhsize \_kern-1\_wd0
+   \_kern.5\_vsize \_kern\_voffset \_kern4.5\_wd0
+   \_hbox to0pt{\_kern.5\_xhsize \_kern\_hoffset \_kern-2\_wd0
    \_pdfsave \_pdfrotate{55}\_pdfscale{10}{10}%
-   \_hbox to0pt{\_localcolor\LightGrey \_box0\_hss}%
+   \_hbox to0pt{\_localcolor\_setgreycolor{.8}\_box0\_hss}%
    \_pdfrestore
    \_hss}%
 }
@@ -260,5 +261,7 @@
 
 \_endinput
 
+2021-02-25 \_draftbox improved
+2021-02-15 \_advance -> \_decr
 2020-05-12 \vfootB: \uskip -> \unskip bug fixed
 2020-03-28 Released

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -56,7 +56,7 @@
 
 \_def \_codedecl #1#2{%
    \_ifx #1\_undefined \_wterm{#2}%
-   \_else \_expandafter \_endinput \_fi
+   \_else \_ea \_endinput \_fi
 }
 \_def \_wterm {\_immediate \_write16 }
 
@@ -292,3 +292,7 @@
 The `qrcode.opm` is the first example of how an external macro file for \OpTeX/
 can look like.
 
+\endinput
+
+2021-02-15 \_expandafter -> \_ea in \_codedecl
+2020-02-14 released

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/sections.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/sections.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/sections.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \chap {Titles, chapters, sections, subsections <2021-02-09>} % preloaded in format
+\_codedecl \chap {Titles, chapters, sections, subsections <2021-03-03>} % preloaded in format
 
    \_doc ---------------------------
    We are using scaled fonts for titles
@@ -147,8 +147,8 @@
 \_def \_thechapnum {\_the\_chapnum}
 \_def \_thesecnum  {\_othe\_chapnum.\_the\_secnum}
 \_def \_theseccnum {\_othe\_chapnum.\_the\_secnum.\_the\_seccnum}
-\_def \_thetnum    {\_othe\_chapnum.\_the\_secnum.\_the\_tnum}
-\_def \_thefnum    {\_othe\_chapnum.\_the\_secnum.\_the\_fnum}
+\_def \_thetnum    {\_othe\_chapnum.\_othe\_secnum.\_the\_tnum}
+\_def \_thefnum    {\_othe\_chapnum.\_othe\_secnum.\_the\_fnum}
 \_def \_thednum    {(\_the\_dnum)}
 
 \_def\_othe #1.{\_ifnum#1>0 \_the#1.\_fi}
@@ -363,12 +363,21 @@
                            the current language).
    * \^`\_thecapnum` ...   expands to `\the<letter>num` (caption number).
    \enditems
+   The \`\_captionsep` inserts a separator between auto-generated
+   caption number and the following caption text. Default separator
+   is `\_enspace` but if the caption text starts with dot or colon, then
+   the space is not inserted. A user can wite `\caption/t: My table`
+   and \"{\bf Table 1.1:} My table" is printed. You can re-define
+   the \^`\_captionsep` macro if you want to use another separator.
    \_cod -----------------------------
 
 \_def \_printcaptiont {%
-   \_noindent \_wlabel\_thecapnum {\_bf\_thecaptitle~\_thecapnum}\_enspace
-   \_narrowlastlinecentered\_iindent
+   \_noindent \_wlabel\_thecapnum {\_bf\_thecaptitle~\_thecapnum}%
+   \_narrowlastlinecentered\_iindent \_futurelet\_next\_captionsep
 }
+\_def\_captionsep{\_ifx\_next.\_ea\_bfnext \_else\_ifx\_next:\_ea\_ea\_ea\_bfnext
+   \_else \_enspace \_fi\_fi}
+\_def\_bfnext#1{{\_bf#1}}
 \_let \_printcaptionf = \_printcaptiont % caption of figures = caption of tables
 
    \_doc -----------------------------
@@ -450,6 +459,7 @@
 
 \_endcode % -------------------------------------
 
+2021-03-03 \_captionsep introduced, \_othe used in \_thetnum, \_thefnum.
 2021-02-09 \thisoutline implemented
 2021-01-26 \_nl: \unskip added
 2021-01-11 \secl introduced

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/slides.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/slides.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/slides.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 % This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \slideshow {Slides style for OpTeX <2021-01-16>} % loaded on demand by \slides
+\_codedecl \slideshow {Slides style for OpTeX <2021-03-10>} % loaded on demand by \slides
 
    \_doc -----------------------------
    Default margins and design is declared here.
@@ -79,7 +79,7 @@
 
 \_newcount\_gilevel
 \_def\*{*}
-\_adef*{\_startitem}
+\_adef*{\_relax\_ifmmode*\_else\_ea\_startitem\_fi}
 \_sdef{_item:X}{\Blue\_raise.2ex\_fullrectangle{.8ex}\_kern.5em}
 \_sdef{_item:x}{\Blue\_raise.3ex\_fullrectangle{.6ex}\_kern.4em}
 \_style X
@@ -146,9 +146,10 @@
 
 \_newbox\_slidepage  \_newbox\_slidepageB
 \_countdef\_slidelayer=1
-\_def\_decr#1{\_global\_advance#1 by-1 }
 
-\_def\_slideshow{\_slidelayer=1 \_slideshowactive \_setbox\_slidepage=\_vbox\_bgroup}
+\_def\_slideshow{\_slidelayer=1 \_slideshowactive
+   \_let\slideopen=\_relax  % first wins
+   \_setbox\_slidepage=\_vbox\_bgroup\_bgroup}
 
 \_def\_slideshowactive{%
    \_sdef{_spg:;}{\_closepage \_global\_slidelayer=1 \_resetpage \_openslide}
@@ -159,11 +160,11 @@
 }
 \_def\_destboxslide{\_def\_destbox[##1:##2]{\_isequal{##1}{ref}\_iffalse \_destboxori[##1:##2]\_fi}}
 
-\_def\_openslide{\_setbox\_slidepage=\_vbox\_bgroup \_setilevel
+\_def\_openslide{\_setbox\_slidepage=\_vbox\_bgroup\_bgroup \_setilevel
    \_ifvoid\_slidepage \_else \_unvbox\_slidepage \_nointerlineskip\_lastbox \_fi}
 \_def\_setilevel{\_loop \_decr\_gilevel \_ifnum\_gilevel<0 \_else \_begitems \_repeat}
 
-\_def\_closepage{\_egroups
+\_def\_closepage{\_egroups \_egroup
    \_ifnum \_maxlayers=0 \_unvcopy\_slidepage \_vfil\_break
    \_else \_begingroup \_setwarnslides \_layernum=0
       \_loop
@@ -202,8 +203,15 @@
    \_global\_maxlayers=#1
    \_setbox\_slidepageB=\_vbox\_bgroup
 }
-\_public \subtit \slideshow \pg \wideformat \use \pshow \layernum ;
+\_def\_slideopen{\_let\slideshow=\_relax % first wins
+   \_sdef{_spg:;}{\_egroups\_vfil\_break \_lfnotenumreset\_bgroup \_setilevel}
+   \_sdef{_spg:.}{\_egroups\_endslides}
+   \_sdef{_spg:+}{\_egroups\_bgroup \_setilevel}
+   \_bgroup
+}
 
+\_public \subtit \slideshow \slideopen \pg \wideformat \use \pshow \layernum ;
+
    \_doc -----------------------------
    Default \`\layers` `<num>` macro (when \^`\slideshow` is not activated) is simple.
    It prints the `<layered-text>` with `\layernum=<num>+1` because we need the
@@ -232,5 +240,8 @@
 
 The user manual of \OpTeX/ slides are in `op-slides.tex` file.
 
+2021-03-10 \slideopen introduced, bug with colors in \setbox fixed
+2021-03-10 \ifmmode* added to \adef*
+2021-02-15 \_def\_decr removed
 2021-01-16 \layers at empty page raises error: problem fixed
 2020-03-19 slides introduced

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/styles.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/styles.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/styles.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \report {Basic styles of OpTeX <2020-03-28>} % preloaded in format
+\_codedecl \report {Basic styles of OpTeX <2021-03-10>} % preloaded in format
 
    \_doc -----------------------------
    We define auxiliary macro first (used by the \^`\address` macro)
@@ -61,7 +61,7 @@
 
 \_def\_slides{\_par
   \_opinput{slides.opm}
-  \_adef*{\_startitem}
+  \_adef*{\_relax\_ifmmode*\_else\_ea\_startitem\_fi}
 }
 \_public \slides ;
 
@@ -114,3 +114,7 @@
 
 \endtt %---------------------------------------------------------------------
 
+\endinput
+
+2021-03-10 \ifmmode* added to \adef*
+2020-03-28 released

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/table.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/table.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/table.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \table {Basic macros for OpTeX <2021-01-27>} % preloaded in format
+\_codedecl \table {Basic macros for OpTeX <2021-03-09>} % preloaded in format
 
    \_doc -----------------------------
    The result of the \`\table``{<declaration>}{<data>}` macro is inserted into
@@ -101,7 +101,7 @@
    \_replstring\_tmpb{\crlp}{\_crcr\crlp}%
    \_edef\_tabskipmid{\_the\_tabskip}\_tabskip=\_tabskipl
    \_ifpxto
-      \_tsize=\_hsize \_setbox0 = \_vbox{\_halign \_tableC}%
+      \_tsize=\_hsize \_setbox0 = \_vbox{\_tablepxpreset \_halign \_tableC}%
       \_tsize=\_dimexpr\_hsize-(\_wd0-\_tmpdim)\_relax
       \_setbox0=\_null \_halign \_tableC
    \_else
@@ -111,8 +111,9 @@
 \_def\_tableC{\_ea{\_ea\_bgroup\_the\_tabdata\_egroup\_tabskip=\_tabskipr\_cr
    \_scantextokens\_ea{\_tmpb\_crcr}}}
 
-\_newbox\_tstrutbox  % strut used in table rows
-\_newtoks\_tabdata   % the \halign declaration line
+\_def\_tablepxpreset{} % can be used to de-activate references to .ref file
+\_newbox\_tstrutbox    % strut used in table rows
+\_newtoks\_tabdata     % the \halign declaration line
 
    \_doc -----------------------------
    The \`\_scantabdata` macro converts `\table`'s `<declaration>` to
@@ -261,11 +262,11 @@
 \_def\_tablinefil{\_leaders\_hrule\_hfil}
 
 \_def\_crlp#1{\_crcr \_zerotabrule \_noalign{\_kern-\_drulewidth}%
-   \_omit \_xdef\_crlplist{#1}\_xdef\_crlplist{,\_expandafter}\_expandafter\_crlpA\_crlplist,\_end,%
+   \_omit \_xdef\_crlplist{#1}\_xdef\_crlplist{,\_ea}\_ea\_crlpA\_crlplist,\_end,%
    \_global\_tmpnum=0 \_gdef\_dditem{\_omit\_crlpD}%
    \_gdef\_vvitem{\_kern\_vvkern\_kern\_drulewidth}\_gdef\_vvitemA{\_kern\_drulewidth}%
    \_vvleft\_crlpD\_ddlinedata \_global\_tmpnum=0 \_crcr \_zerotabrule}
-\_def\_crlpA#1,{\_ifx\_end#1\_else \_crlpB#1-\_end,\_expandafter\_crlpA\_fi}
+\_def\_crlpA#1,{\_ifx\_end#1\_else \_crlpB#1-\_end,\_ea\_crlpA\_fi}
 \_def\_crlpB#1#2-#3,{\_ifx\_end#3\_xdef\_crlplist{\_crlplist#1#2,}\_else\_crlpC#1#2-#3,\_fi}
 \_def\_crlpC#1-#2-#3,{\_tmpnum=#1\_relax
    \_loop \_xdef\_crlplist{\_crlplist\_the\_tmpnum,}\_ifnum\_tmpnum<#2\_advance\_tmpnum by1 \_repeat}
@@ -511,6 +512,8 @@
 
 \_endinput
 
+2021-03-09 \_tablepxpreset introduced
+2021-02-15 \_expandafter -> \_ea
 2021-01-27 \_tableB: \long\def added, \vspan syntax improved
 2020-05-26 \eqbox implemented
 2020-05-20 \colnum implemented.

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \_ncharrmA {Uni math codes <2021-02-03>} % preloaded on demand by \loadmath
+\_codedecl \_ncharrmA {Uni math codes <2021-03-11>} % preloaded on demand by \loadmath
 
    \_doc -----------------------------
    The control sequences for `\alpha`, `\beta` etc are redefined here.
@@ -204,6 +204,8 @@
 \_Umathcode `? = 5 1 `?  % keep plain.tex declaration
 \_Umathchardef \mathquestion = 5 1 `?
 
+\_Umathcode `* = 2 1 "02217  % equivalent to \ast, like in plain TeX
+
 \_protected\_def \_sqrt       {\_Uradical 1 "0221A }
 \_protected\_def \_cuberoot   {\_Uradical 1 "0221B }
 \_protected\_def \_fourthroot {\_Uradical 1 "0221C }
@@ -425,6 +427,7 @@
 \_endinput
 
 History:
+2021-03-11  Umathcode `* declaed as \ast
 2021-02-03  Unicode superscripts, subscripts declared
 2021-01-31  Mathcode of ! ? set to Close, codes undeclared in mathclass set correctly
 2021-01-23  Compressed \vdots, \ddots, \adots in script(script)style.

Modified: trunk/Master/texmf-dist/tex/luatex/optex/base/usebib.opm
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/base/usebib.opm	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/base/usebib.opm	2021-03-18 21:11:17 UTC (rev 58515)
@@ -1,6 +1,6 @@
 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
 
-\_codedecl \MakeReference {Reading bib databases <2020-03-13>} % loaded on demand by \usebib
+\_codedecl \MakeReference {Reading bib databases <2021-03-12>} % loaded on demand by \usebib
 
    \_doc -----------------------------
    Loading the `librarian.tex` macro package. See `texdoc librarian`
@@ -24,6 +24,8 @@
    \_cod -----------------------------
 
 \_def\_usebib/#1 (#2) #3 {%
+  \_let\_citeI=\_relax \_xdef\_citelist{\_citelist\_citelistB}%
+  \_global\_let\_addcitelist=\_writeXcite
   \_ifx\_citelist\_empty
      \_opwarning{No cited items. \_noexpand\usebib ignored}%
   \_else
@@ -40,13 +42,11 @@
                        "\_cs{_lan:\_the\_language}" (using "en")}%
            \_language=0 \_chardef\_documentlanguage=0
         \_fi
-        \_let\_citeI=\_relax \_xdef\_citelist{\_citelist\_citelistB}%
-        \_global\_let\_addcitelist=\_writeXcite
-        \_def\_tmp##1[*]##2\_relax{\_def\_tmp{##2}}\_expandafter\_tmp\_citelist[*]\_relax
+        \_def\_tmp##1[*]##2\_relax{\_def\_tmp{##2}}\_ea\_tmp\_citelist[*]\_relax
         \_ifx\_tmp\_empty\_else % there was \nocite[*] used.
            \_setbox0=\_vbox{\_hsize=\_maxdimen \_def\_citelist{}\_adef@{\_readbibentry}%
            \_input #3.bib
-           \_expandafter}\_expandafter\_def\_expandafter\_citelist\_expandafter{\_citelist}%
+           \_ea}\_ea\_def\_ea\_citelist\_ea{\_citelist}%
         \_fi
         \_def\_citeI[##1]{\_csname lb at cite\_endcsname{##1}{\_bibpart}{}{}}\_citelist
         \_BibFile{#3}%
@@ -370,6 +370,8 @@
 History:
 --------
 
+2021-03-12  \_citelistB added before first test.
+2021-02-15  \_expandafter -> \_ea
 Apr. 2014:  released in OPmac
 Jan. 2016:  "first entry wins" implemented
 Apr. 2016:  \readentry -> \readbibentry, \usebib->\MakeReference

Modified: trunk/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex	2021-03-18 21:10:53 UTC (rev 58514)
+++ trunk/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex	2021-03-18 21:11:17 UTC (rev 58515)
@@ -149,7 +149,7 @@
 
 \pg; %------------------------------------------------------------------
 
-\sec Notes
+\sec Notes to `\slideshow`
 
 * When `\slideshow` is active then you cannot reference sections by
   hyperlinked `\ref`. Only `\pgref` works (and goes to the last layer
@@ -156,12 +156,45 @@
   of the referenced page).
 * If the text overfull the page (slide) then it follows to the next page without
   saying explicitly `\pg;`. But `\slideshow` cannot work in this case.\pg+
+* If `\slideshow` then each part of page between two `\pg`'s or between
+  `\slideshow` and the first `\pg` is processed in a local group.
+* If not `\slideshow` then the document is not separated to groups.
+  This can lead to different results. So, you can put `\slideopen` command
+  instead of `\slideshow`. Then local groups are opened exactly as when
+  `\slideshow` is used but `\slideshow` is not activated. Example:
 
+\begtt
+\slides
+\def\foo...{...} % global definitions.
+%\slideshow      % printing version, no slide show.
+\slideopen       % opens group for first page.
+... first page
+\pg;             % closes group and opens group for second page.
+... second page
+\pg.             % closes group of the last page.
+\endtt
+
+\pg; %------------------------------------------------------------------
+
 \sec More about design
 
 * You can use `\backgroundpic{<image-file>}` for putting an image to the background.
 * You can re-declare `\footline` or re-define internal macros for design as
   you wish.
+* The TeXGyre Heros font is used as default text font, the FiraMath is used
+  for math.
+* If you want to use another text font fmaily, use `\fontfam`
+  {\em before} `\slides` command.
+* If you want to use different math font, use
+  `\loadmath{[font]}` before `\fontfam` (if used) and before `\slides`. For example:
+
+\begtt
+\loadmath{[Asana-Math]} % Math font: Asana
+\fontfam[Termes]        % Text font: Termes
+\slides
+...
+\endtt
+
 * You can put the images or text wherever using `\putimege` or `\puttext`
   macros...
 
@@ -272,8 +305,8 @@
   You can concentrate on the contents of your document, not on the
   programming syntax.\pg+
 * User needs to read 250 pages of doc for understanding Beamer,\pg+
-* on the other hand, you need to read only ten
-  slides\fnote{this eleventh slide isn't counted}
+* on the other hand, you need to read only eleven
+  slides\fnote{this twelfth slide isn't counted}
   and you are ready to use {\bf\Blue\OpTeX/ slides}.
 
 \pg; %------------------------------------------------------------------



More information about the tex-live-commits mailing list.