summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/base
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/base')
-rw-r--r--macros/luatex/optex/base/alloc.opm8
-rw-r--r--macros/luatex/optex/base/basic-macros.opm10
-rw-r--r--macros/luatex/optex/base/cite-bib.opm1
-rw-r--r--macros/luatex/optex/base/fams-ini.opm2
-rw-r--r--macros/luatex/optex/base/fnotes.opm29
-rw-r--r--macros/luatex/optex/base/fonts-resize.opm6
-rw-r--r--macros/luatex/optex/base/graphics.opm19
-rw-r--r--macros/luatex/optex/base/if-macros.opm31
-rw-r--r--macros/luatex/optex/base/languages.opm36
-rw-r--r--macros/luatex/optex/base/makeindex.opm3
-rw-r--r--macros/luatex/optex/base/maketoc.opm15
-rw-r--r--macros/luatex/optex/base/math-macros.opm138
-rw-r--r--macros/luatex/optex/base/math-unicode.opm22
-rw-r--r--macros/luatex/optex/base/more-macros.opm30
-rw-r--r--macros/luatex/optex/base/multicolumns.opm2
-rw-r--r--macros/luatex/optex/base/optex.ini2
-rw-r--r--macros/luatex/optex/base/others.opm20
-rw-r--r--macros/luatex/optex/base/outlines.opm1
-rw-r--r--macros/luatex/optex/base/output.opm22
-rw-r--r--macros/luatex/optex/base/parameters.opm22
-rw-r--r--macros/luatex/optex/base/pdfuni-string.opm58
-rw-r--r--macros/luatex/optex/base/plain-macros.opm2
-rw-r--r--macros/luatex/optex/base/print-unimath.opm56
-rw-r--r--macros/luatex/optex/base/ref-file.opm8
-rw-r--r--macros/luatex/optex/base/references.opm13
-rw-r--r--macros/luatex/optex/base/sections.opm36
-rw-r--r--macros/luatex/optex/base/slides.opm2
-rw-r--r--macros/luatex/optex/base/table.opm66
-rw-r--r--macros/luatex/optex/base/unimath-codes.opm155
-rw-r--r--macros/luatex/optex/base/unimath-table.opm9
-rw-r--r--macros/luatex/optex/base/verbatim.opm4
31 files changed, 601 insertions, 227 deletions
diff --git a/macros/luatex/optex/base/alloc.opm b/macros/luatex/optex/base/alloc.opm
index d5625321a9..b981c25b56 100644
--- a/macros/luatex/optex/base/alloc.opm
+++ b/macros/luatex/optex/base/alloc.opm
@@ -109,11 +109,11 @@
\_newdimen \tmpdim \_newdimen \_tmpdim
\_doc -----------------------------
- A few registers are initialized like in plain\TeX/. Note that `\z@` and `\z@skip` from
- plain\TeX/ is `\zo` and `\zoskip` because we absolutely
+ A few registers are initialized like in plain\TeX/. Note that `\z@skip` from
+ plain\TeX/ is `\zoskip` here because we absolutely
don't support the `@` category dance.
- Note that `\p@` is not defined because we can write 1pt which is more
- legible.
+ The `\z@` and `\p@` is not defined because we can write 0pt or 1pt which is more
+ legible in source code. You can see `plain-at.opm` file.
\_cod -----------------------------
\_newdimen\_maxdimen \_maxdimen=16383.99999pt % the largest legal <dimen>
diff --git a/macros/luatex/optex/base/basic-macros.opm b/macros/luatex/optex/base/basic-macros.opm
index 512678c312..83181f9510 100644
--- a/macros/luatex/optex/base/basic-macros.opm
+++ b/macros/luatex/optex/base/basic-macros.opm
@@ -92,6 +92,16 @@
\_public \loggingall \tracingall ;
+ \_doc ------------------------------
+ Write a warning if the user did not to load a Unicode Font {\em or}
+ if there were unresolved references. \`\_byehook` is used in the \^`\bye` macro.
+ \_cod ------------------------------
+
+\_def\_byehook{%
+ \_ifx\_initunifonts\_relax \_relax\_else \_opwarning{Unicode font was not loaded}\_fi
+ \_ifnum\_unresolvedrefs>0 \_opwarning{Rerun to get references right}\_fi
+}
+
\_endcode % -------------------------------------
diff --git a/macros/luatex/optex/base/cite-bib.opm b/macros/luatex/optex/base/cite-bib.opm
index c756a619bd..ff46c1deaa 100644
--- a/macros/luatex/optex/base/cite-bib.opm
+++ b/macros/luatex/optex/base/cite-bib.opm
@@ -89,6 +89,7 @@
\_ifcsname _bib:#1#2\_endcsname \_else
\_addcitelist{#1#2}%
\_opwarning{The cite [#1#2] unknown. Try to TeX me again}\_openref
+ \_incr\_unresolvedrefs
\_addto\_savedcites{?,}\_def\_sortcitesA{}\_lastcitenum=0
\_ea\_gdef \_csname _bib:#1#2\_endcsname {}%
\_ea\_skiptorelax \_fi
diff --git a/macros/luatex/optex/base/fams-ini.opm b/macros/luatex/optex/base/fams-ini.opm
index 7619de9657..d89a29c7a1 100644
--- a/macros/luatex/optex/base/fams-ini.opm
+++ b/macros/luatex/optex/base/fams-ini.opm
@@ -60,7 +60,7 @@
\_faminfo [Baskerville] {Free variants of classical Baskerville} {f-baskerville}
{ -,\caps: {\rm\bf\it\bi} }
-\_famalias [BaskevilleF]
+\_famalias [BaskervilleF]
\_faminfo [Technika] {Fonts from visual style of CTU in Prague} {f-technika}
{ -,\light,\book, \caps, \caps\book: {\rm\bf\it\bi} -:{\stencil} }
diff --git a/macros/luatex/optex/base/fnotes.opm b/macros/luatex/optex/base/fnotes.opm
index 3a1f28cfc2..219b2cf293 100644
--- a/macros/luatex/optex/base/fnotes.opm
+++ b/macros/luatex/optex/base/fnotes.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \fnote {Footnotes, marginal notes OpTeX <2020-03-20>} % loaded in format
+\_codedecl \fnote {Footnotes, marginal notes OpTeX <2020-05-26>} % loaded in format
\_doc -----------------------------
\`\_gfnotenum` is conter which counts footnotes globally in the document.
@@ -92,7 +92,8 @@
\_ifpgfnote \_openref \_fi
\_wref \_Xfnote{}%
\_ifpgfnote \_ifcsname _fn:\_the\_gfnotenum \_endcsname \_else
- \_opwarning{unknown \_noexpand\fnote mark. TeX me again}
+ \_opwarning{unknown \_noexpand\fnote mark. TeX me again}%
+ \_incr\_unresolvedrefs
\_fi\_fi
\_opfootnote\_fnset\_printfnotemarkB
}
@@ -126,18 +127,32 @@
\_public \fixmnotes ;
\_doc -----------------------------
- The outer box of marginal note has zero width and zero depth and it is appended
- after current line using `\vadjust` primitive or it is inverted to vertical mode
+ The \`\_mnoteD``{<text>}` macro sets the position the marginal note.
+ The outer box of marginal note has zero width and zero depth and it is appended
+ after current line using `\vadjust` primitive or it is inverted to vertical mode
as a box with `\vskip-\baselineskip` followed.
\_cod -----------------------------
-\_long\_def\_mnote#1{\_ifvmode {\_mnoteA{#1}}\_nobreak\_vskip-\_baselineskip \_else
+\_def\_mnote #1#{\_ifx^#1^\_else \_mnoteC#1\_end \_fi \_mnoteD}
+\_def\_mnoteC up#1\_end{\_mnoteskip=#1\_relax} % \mnote up<dimen> {<text>} syntax
+\_long\_def\_mnoteD#1{\_ifvmode {\_mnoteA{#1}}\_nobreak\_vskip-\_baselineskip \_else
\_lower\_dp\_strutbox\_hbox{}\_vadjust{\_kern-\_dp\_strutbox \_mnoteA{#1}\_kern\_dp\_strutbox}%
\_fi
}
\_public \mnote ;
\_doc -----------------------------
+ The \`\mnoteskip` is a dimen which denotes the vertical shift of marginal
+ note from its normal position. Positive value means shift up, negative
+ down. The `\mnoteskip` register is set to zero
+ after the marginal note is printed. The new sytax `\mnote up<dimen>{<text>}`
+ is possible too, but public `\mnoteskip` is kept for backward compatibility.
+ \_cod -----------------------------
+
+\_newdimen\_mnoteskip
+\_public \mnoteskip ;
+
+ \_doc -----------------------------
The \`\_mnoteA` macro does the real work. The \`\_lrmnote``{<left>}{<right>}`
uses only first or only second parameter depending on the left or right
marginal note.
@@ -149,6 +164,7 @@
\_edef\_mnotesfixed{\_cs{_mn:\_the\_mnotenum}}%
\_else
\_opwarning{unknown \_noexpand\mnote side. TeX me again}\_openref
+ \_incr\_unresolvedrefs
\_def\_mnotesfixed{\_right}%
\_fi\_fi
\_hbox to0pt{\_wref\_Xmnote{}\_everypar={}%
@@ -172,4 +188,5 @@
\_endcode % -------------------------------------
-
+2020-05-26 \mnote up<dimen> implemented
+2020-03-20 released
diff --git a/macros/luatex/optex/base/fonts-resize.opm b/macros/luatex/optex/base/fonts-resize.opm
index 5a9f0df40e..1709cb05cf 100644
--- a/macros/luatex/optex/base/fonts-resize.opm
+++ b/macros/luatex/optex/base/fonts-resize.opm
@@ -152,8 +152,8 @@
\_doc -----------------------------
The \`\_regtfm` `<font id> <optical size data>`
saves the <optical size data> concerned to `<font id>`.
- The `<optical size data>` is in the form as show below in the code where
- `\regtfm` is used.
+ The `<optical size data>` is in the form as shown below in the code where
+ `\_regtfm` is used.
\nl
The \`\_wichtfm` `<fontname>` expands to the `<fontname>` or to the corrected
`<fontname>` read from the `<optical size data>`. It is used in the
@@ -266,7 +266,7 @@ create a size-dependent selector for such font then you can use
The example above uses the 8\,bit `tfm` font. You can use Unicode font too, of
course. The \^`\fontfam` macro initializes the extended `\font` primitive
features for \LuaTeX/. If you didn't use this command, you must to initialize
-these features by `\initunifonts` command, for example:
+these features by the \^`\initunifonts` command explicitly, for example:
\begtt
\initunifonts
diff --git a/macros/luatex/optex/base/graphics.opm b/macros/luatex/optex/base/graphics.opm
index bc88a16de0..be2cfdab7e 100644
--- a/macros/luatex/optex/base/graphics.opm
+++ b/macros/luatex/optex/base/graphics.opm
@@ -421,5 +421,24 @@
\_endcode % -------------------------------------
+The \^`\inspic` is defined by `\pdfximage` and `\pdfrefximage` primitives.
+If you want to use one picture more than once in your document, then the
+following code is recommended:
+\begtt \catcode`\<=13
+\newbox\mypic
+\setbox\mypic = \hbox{\picw=3cm \inspic{<picture>}}
+
+My picture: \copy\mypic, again my picture: \copy\mypic, etc.
+\endtt
+This code downloads the picture data to the PFD oputput only once (when
+`\setbox` is processed). Each usage of `\copy\mypic` puts only a pointer to
+the picture data in the PDF.
+
+If you want to copy the same picture in different sizes, then choose
+a \"basic size" used in `\setbox` and all different sizes can be realized by
+the \^`\transformbox{<transformation>}{\copy\mypic}`.
+
+\_endinput
+
2020-04-12: \_public \clipinoval \clipincircle ; added, bug fixed
diff --git a/macros/luatex/optex/base/if-macros.opm b/macros/luatex/optex/base/if-macros.opm
index 4685aed48e..39e3841719 100644
--- a/macros/luatex/optex/base/if-macros.opm
+++ b/macros/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-06>} % preloaded in format
+\_codedecl \newif {Special if-macros, is-macros and loops <2020-05-22>} % preloaded in format
\_doc ----------------------------
\secc Classical \code{\\newif}
@@ -72,25 +72,25 @@
\_def\_do{\_doundefined} % we need to ask \_ifx#1\_do ...
\_long\_def\_foreach #1\_do#2{\_putforstack
- \_immediateassignment\_def\_fbody##1{#2}%
+ \_immediateassignment\_gdef\_fbody##1{#2}%
\_foreachA #1\_do}
\_long\_def\_foreachA #1{\_ifx\_do#1\_getforstack\_else\_fbody{#1}\_ea\_foreachA\_fi}
\_def\_fornum#1..#2\_do{\_fornumstep 1:#1..#2\_do}
\_long\_def\_fornumstep#1:#2..#3\_do#4{\_putforstack
\_immediateassigned{%
- \_def\_fbody##1{#4}%
- \_def\_fornumsgn{}%
- \_def\_fornumrel{<}%
- \_frnum=\_numexpr#2\_relax
- \_ifnum\_numexpr#3<\_frnum \_def\_fornumrel{>}\_fi %decreasing sequence
- \_ifnum\_numexpr#1\_fornumrel0 \_def\_fornumsgn{-}\_fi % correction
+ \_gdef\_fbody##1{#4}%
+ \_gdef\_fornumsgn{}%
+ \_gdef\_fornumrel{<}%
+ \_global\_frnum=\_numexpr#2\_relax
+ \_ifnum\_numexpr#3<\_frnum \_gdef\_fornumrel{>}\_fi %decreasing sequence
+ \_ifnum\_numexpr#1\_fornumrel0 \_gdef\_fornumsgn{-}\_fi % correction
}%
\_fornumB{#3}{#1}%
}
\_def\_fornumB #1#2{\_ifnum\_numexpr#1\_fornumrel\_frnum \_getforstack \_else
\_ea\_fbody\_ea{\_the\_frnum}%
- \_immediateassignment\_advance\_frnum by\_numexpr\_fornumsgn#2\_relax
+ \_immediateassignment\_global\_advance\_frnum by\_numexpr\_fornumsgn#2\_relax
\_afterfi{\_fornumB{#1}{#2}}\_fi
}
\_def\_afterfi#1#2\_fi{\_fi#1}
@@ -118,16 +118,16 @@
\_newcount\_forlevel
\_def\_putforstack{\_immediateassigned{%
\_ifnum\_forlevel>0
- \_sdef{_frnum:\_the\_forlevel\_ea}\_ea{\_the\_frnum}%
- \_slet{_fbody:\_the\_forlevel}{_fbody}%
+ \_sxdef{_frnum:\_the\_forlevel\_ea}{\_the\_frnum}%
+ \_global\_slet{_fbody:\_the\_forlevel}{_fbody}%
\_fi
- \_advance\_forlevel by1
+ \_global\_advance\_forlevel by1
}}
\_def\_getforstack{\_immediateassigned{%
- \_advance\_forlevel by-1
+ \_global\_advance\_forlevel by-1
\_ifnum\_forlevel>0
- \_slet{_fbody}{_fbody:\_the\_forlevel}%
- \_frnum=\_cs{_frnum:\_the\_forlevel}\_space
+ \_global\_slet{_fbody}{_fbody:\_the\_forlevel}%
+ \_global\_frnum=\_cs{_frnum:\_the\_forlevel}\_space
\_fi
}}
@@ -252,6 +252,7 @@
\_endcode
+2020-05-22 \foreach, \fornum: all settings are global, independent on TeX group
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
diff --git a/macros/luatex/optex/base/languages.opm b/macros/luatex/optex/base/languages.opm
index aa862de431..36800e95db 100644
--- a/macros/luatex/optex/base/languages.opm
+++ b/macros/luatex/optex/base/languages.opm
@@ -80,7 +80,7 @@
another meaning when `\oldaccents` command is used.
The macros `\"` and `\'` are not defined as `\protected` because we need
their expansion when `\outlines` are created.
- User can declare quotes by \`\quoteschars``<clqq><crqq><clq><crq>`, where
+ User can declare quotes by \^`\quoteschars``<clqq><crqq><clq><crq>`, where
`<clqq>...<crqq>` are normal quotes and `<clq>...<crq>` are alternative quotes.
or use \`\altquotes` to swap between meaning of these two types of quotes.
\nl
@@ -98,8 +98,26 @@
\_let \_skquotes = \_csquotes
\_let \_dequotes = \_csquotes
+ \_doc -----------------------------
+ The \`\quoteschars``<lqq><rqq><lq><rq>` defines `\"` and `\"` as `\_qqA`
+ in in normal mode and as expadable macros in outline mode.
+ We want to well process the common cases: \code{\\"`&`"} or \code{\\"`\{`"}.
+ This is reason why the quotes parameter is read in verbatim mode and retokenized
+ again by `\scantextokens`. We want to allow to quote the quoutes mark
+ itself by \code{\\"{`"`}"}. This is reason why the sub-verbatim mode is
+ used when first character is \code{\{} in the parameter.\nl
+ The `\"` is defined as `\_qqA\_qqB<lqq><rqq>` and `\'` as `\_qqA\_qqC<lq><rq>`.
+ The \`\_qqA``\_qqB<clqq><crqq>` runs \`\_qqB``<lqq><rqq><text>"`.
+ \_cod -----------------------------
+
\_def \_quoteschars #1#2#3#4{\_def\_altquotes{\_quoteschars#3#4#1#2}\_public\altquotes;%
- \_def \"##1"{#1##1#2}\_def \'##1'{#3##1#4}}
+ \_protected\_def \"{\_qqA\_qqB#1#2}\_protected\_def \'{\_qqA\_qqC#3#4}%
+ \_regmacro{}{}{\_def \"##1"{#1##1#2}\_def \'##1'{#3##1#4}}}
+
+\_def\_qqA#1#2#3{\_bgroup\_setverb \_catcode`\ =10
+ \_isnextchar\_bgroup{\_catcode`\{=1 \_catcode`\}=2 #1#2#3}{#1#2#3}}
+\_long\_def\_qqB#1#2#3"{\_egroup#1\_scantextokens{#3}#2}
+\_long\_def\_qqC#1#2#3'{\_egroup#1\_scantextokens{#3}#2}
\_doc -----------------------------
Sometimes should be usable to leave the markup `"such"` or `'such'` i.e.~without
@@ -107,10 +125,20 @@
by the \`\activequotes` macro and leave quotes without first backslash.
First, declare `\<iso-code>quotes`, then \^`\altquotes` (if needed) and finally
\^`\activequotes`.
+
+ \`\_resetaquotes` redefines expandable version of `\"<text>"` and `\'<text>'`
+ used in outlines in order to the delimiter is {\em active} character. We
+ are testing if \^`\quoteschars` were used now because the error in outlines
+ can be more confusing.
\_cod -----------------------------
-\_def\_activequotes{\_ea\_activequotesA\"""\_ea\_activequotesA\'''}
-\_def\_activequotesA#1#2#3{\_bgroup\_lccode`\~=`#3\_lowercase{\_egroup\_adef#3##1~{#1##1#2}}}
+\_def\_activequotes{\_adef"{\"}\_adef'{\'}\_resetaquotes}
+
+\_bgroup \_catcode`,=13 \_lccode`\~=`\" \_lccode`\,=`\' \_lowercase{\_egroup
+ \_def\_resetaquotes{%
+ \_bgroup \_the\_regoul \_edef\_tmp{\"?"}\_egroup % test if \quoteschar were used
+ \_regmacro{}{}{\_edef\"##1~{\"##1"}\_edef\'##1,{\'##1'}}}
+}
\_public \quoteschars \activequotes \enquotes \csquotes \skquotes \frquotes \plquotes
\esquotes \grquotes \ruquotes \itquotes \dequotes ;
diff --git a/macros/luatex/optex/base/makeindex.opm b/macros/luatex/optex/base/makeindex.opm
index 5904b494b4..c7e9b8ef4a 100644
--- a/macros/luatex/optex/base/makeindex.opm
+++ b/macros/luatex/optex/base/makeindex.opm
@@ -283,7 +283,8 @@
\_cod -----------------------------
\_def\_makeindex{\_par
- \_ifx\_iilist\_empty \_opwarning{index data-buffer is empty. TeX me again}
+ \_ifx\_iilist\_empty \_opwarning{index data-buffer is empty. TeX me again}%
+ \_incr\_unresolvedrefs
\_else
\_dosorting \_iilist % sorting \_iilist
\_bgroup
diff --git a/macros/luatex/optex/base/maketoc.opm b/macros/luatex/optex/base/maketoc.opm
index f94571629e..46a2f8d50f 100644
--- a/macros/luatex/optex/base/maketoc.opm
+++ b/macros/luatex/optex/base/maketoc.opm
@@ -3,7 +3,7 @@
\_codedecl \maketoc {Macros for maketoc <2020-03-12>} % preloaded in format
\_doc ------------------------------------
- \`\_Xtoc` `{<level>}{<type>}{<number>}{<title>}` (in `.ref` file) reads the
+ \`\_Xtoc` `{<level>}{<type>}{<number>}<title>` (in `.ref` file) reads the
specified data and appends them to the \`\_toclist` as
\^`\_tocline``{<level>}{<type>}{<number>}{<title>}{<gpageno>}{<pageno>}`
where:
@@ -17,15 +17,17 @@
\enditems
The last two parameters are restored from previous
\^`\_Xpage``{<pageno>}{<gpageno>}`, data were saved in the \^`\_currpage` macro.
+
+ We read the <title> parameter by \^`\scantoeol` from `.ref` file
+ because the <title> can include something like \code{`\{`}.
\_cod ------------------------------------
\_def\_toclist{}
\_newifi \_ifischap \_ischapfalse
-\_def\_Xtoc#1#2#3#4{\_ifnum#1=0 \_ischaptrue\_fi
- \_addto\_toclist{\_tocline{#1}{#2}{#3}{#4}}
- \_ea\_addto\_ea\_toclist\_ea{\_currpage}%
-}
+\_def\_Xtoc#1#2#3{\_ifnum#1=0 \_ischaptrue\_fi
+ \_addto\_toclist{\_tocline{#1}{#2}{#3}}\_scantoeol\_XtocA}
+\_def\_XtocA#1{\_addto\_toclist{{#1}}\_ea\_addto\_ea\_toclist\_ea{\_currpage}}
\_doc ------------------------------------
\`\_tocline``{<level>}{<type>}{<number>}{<title>}{<gpageno>}{<pageno>}` prints
@@ -59,7 +61,7 @@
\_def\_pgn{\_ilink[pg:#5]}%
\_the\_everytocline
\_ifcsname _tocl:#1\_endcsname
- \_cs{_tocl:#1}{#3}{#4}{#6}\_par
+ \_cs{_tocl:#1}{#3}{\_scantextokens{#4}}{#6}\_par
\_fi
\_egroup
}
@@ -100,6 +102,7 @@
\_def\_maketoc{\_par \_ifx\_toclist\_empty
\_opwarning{\_noexpand\maketoc -- data unavailable, TeX me again}\_openref
+ \_incr\_unresolvedrefs
\_else \_begingroup
\_tocrefnum=0 \_penalty11333
\_the\_regtoc \_toclist
diff --git a/macros/luatex/optex/base/math-macros.opm b/macros/luatex/optex/base/math-macros.opm
index 71a7923906..6189dec1c7 100644
--- a/macros/luatex/optex/base/math-macros.opm
+++ b/macros/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-05-11>} % preloaded in format
+\_codedecl \sin {Math macros plus mathchardefs <2020-06-13>} % preloaded in format
\_doc -----------------------------
The category code of the character `_` remains as letter (11) and the mathocode
@@ -433,13 +433,23 @@
\_protected\_def\_cdots{\_mathinner{\_cdotp\_cdotp\_cdotp}}
\_protected\_def\_vdots{\_vbox{\_baselineskip=.4em \_lineskiplimit=0pt
\_kern.6em \_hbox{.}\_hbox{.}\_hbox{.}}}
-\_protected\_def\_ddots{\_mathinner{%
+\_protected\_def\_ddots{\_mathinner{%
\_mkern1mu\_raise.7em\_vbox{\_kern.7em\_hbox{.}}\_mkern2mu
\_raise.4em\_hbox{.}\_mkern2mu\_raise.1em\_hbox{.}\_mkern1mu}}
\_public \ldots \cdots \vdots \ddots ;
\_doc -----------------------------
+ \`\adots` ispired by plain \TeX/
+ \_cod -----------------------------
+
+\_protected\_def\_adots{\_mathinner{%
+ \_mkern1mu\_raise.1em\_hbox{.}\_mkern2mu
+ \_raise.4em\_hbox{.}\_mkern2mu\_raise.7em\_vbox{\_kern.7em\_hbox{.}}\_mkern1mu}}
+
+\_public \adots ;
+
+ \_doc -----------------------------
Math accents (encoding dependent declarations).
\_cod -----------------------------
@@ -563,6 +573,7 @@
$#1\_leftharpoondown$}}}}
\_protected\_def\_buildrel#1\over#2{\_mathrel{\_mathop{\_kern0pt #2}\_limits^{#1}}}
\_protected\_def\_doteq{\_buildrel\_textstyle.\over=}
+\_private \in \sim ;
\_public \cong \notin \rightleftharpoons \buildrel \doteq ;
\_protected\_def\_bmod{\_nonscript\_mskip-\_medmuskip\_mkern5mu
@@ -571,31 +582,32 @@
\_public \bmod \pmod ;
\_doc -----------------------------
- \`\matrix`, \`\pmatrix` and \`\bordermatrix`
+ \`\matrix` and \`\pmatrix`
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`.
+ `\displaystyle`. On the other hand, it is printed in smaller size
+ (by appropriate amount) in `\textstyle` = `\scriptstyle` and `\scriptscriptstyle`.
This feature is new in \OpTeX/.
\_cod -----------------------------
\_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
+ \_ialign{\_the\_lmfil$\_matrixstyle##$\_hfil&&\_quad\_the\_lmfil$\_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
+ \_let\_matrixbaselines=\_relax % \matrix inside matrix does not change size again
+ \_ifcase\_stylenum \_or \_matrixscriptbaselines \_or \_matrixscriptbaselines
\_or
\_baselineskip=.5\_baselineskip
\_def\_quad {\_hskip.5em\_relax}%
\_let\_matrixstyle=\_scriptscriptstyle
\_fi
}
+\_def\_matrixscriptbaselines{\_baselineskip=.7\_baselineskip
+ \_def\_quad {\_hskip.7em\_relax}\_let\_matrixstyle=\_scriptstyle
+}
\_protected\_def\_pmatrix#1{\_left(\_matrix{#1}\_right)}
\_public \matrix \pmatrix ;
@@ -604,23 +616,24 @@
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.}
+\_protected\_long\_def\_cases#1{\_left\{\_thinsk\_vcenter{\_normalbaselines\_math
+ \_ialign{$##\_hfil$&\_quad{##\_unsskip}\_hfil\_crcr#1\_crcr}}\_right.}
\_newdimen\_ptrenwd
\_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
- &&\_quad\_hfil$##$\_hfil\_crcr
- \_omit\_strut\_hfil\_crcr\_noalign{\_kern-\_baselineskip}%
- #1\_crcr\_omit\_strut\_cr}}%
+ \_setbox0=\_vbox{\_bordermatrixA #1\_stopbmatrix}%
\_setbox2=\_vbox{\_unvcopy0 \_global\_setbox1=\_lastbox}%
\_setbox2=\_hbox{\_unhbox1 \_unskip\_global\_setbox1=\_lastbox}%
\_setbox2=\_hbox{$\_kern\_wd1 \_kern-\_ptrenwd\_left(\_kern-\_wd1
\_global\_setbox1=\_vbox{\_box1 \_kern.2em}%
\_vcenter{\_kern-\_ht1 \_unvbox0 \_kern-\_baselineskip}\_thinsk\_right)$}%
\_null\_thicksk\_vbox{\_kern\_ht1 \_box2}\_endgroup}
+\_def\_bordermatrixA #1\cr#2\_stopbmatrix{%
+ \_ialign{$##$\_hfil\_kern.2em\_kern\_ptrenwd&\_thinspace\_hfil$##$\_hfil
+ &&\_quad\_hfil$##$\_hfil\_crcr
+ \_omit\_strut\_hfil\_crcr\_noalign{\_kern-\_baselineskip}%
+ #1\_crcr\_noalign{\_kern.2em}#2\_crcr\_omit\_strut\_cr}}
\_public \cases \bordermatrix ;
@@ -632,44 +645,56 @@
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
+ In \OpTeX/, this macro is more flexible. See section 4.4 in the
+ \ulink[http://petr.olsak.net/ftp/olsak/optex/optex-math.pdf]
+ {Typesetting Math with \OpTeX/}.
+ The `\baselineskip` value is set 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.
+
+ There are more possible columns than two (used in classical Plain TeX):
+ `rlcrlcrlc` etc.\ where `r` and `l` columns are without spaces and `c` column
+ (if used) has the space \^`\eqspace`/2 at its both sides.
\_cod -----------------------------
-\_def\_eqalign#1{\_null\_thinsk\_vcenter{\_the\_eqlines\_math
+\_long\_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}
+\_public \eqalign ;
+
\_doc -----------------------------
- \`\openup`, \`\displaylines` and \`\eqalignno` macros are copied from
+ The \`\displaylines``{<formula>\cr<formula>\cr...<formula>}`
+ creates horizontally centered formulae.
+ It behaves exactly as in Plain \TeX/. The `\halign` is applied directly
+ in the outer display environment with lines of type `\hbox to\displaywidth`.
+ This enables to break lines inside such display to more pages but it is
+ impossible to use `\eqno` or `\leqno` or \^`\eqmark`.
+
+ \OpTeX/ offers
+ `\dislaylines to<dimen>{<formula>\cr<formula>\cr...<formula>}`
+ as an alternative case of usage `\displaylines`. See section 4.3 in the
+ \ulink[http://petr.olsak.net/ftp/olsak/optex/optex-math.pdf]
+ {Typesetting Math with \OpTeX/}.
+ The centered formulas are in `\vcenter` in this case,
+ so lines cannot be broken to more pages, but this case
+ enables to use `\eqno` or `\leqno` or \^`\eqmark`.
+ \_cod -----------------------------
+
+\_def\_displaylines #1#{\_ifx&#1&\_ea\_displaylinesD
+ \_else \_def\_tmp to##1\_end{\_def\_tmp{\_dimexpr ##1}}\_tmp #1\_end
+ \_ea\_displaylinesto \_fi}
+\_long\_def\_displaylinesD #1{\_display \_tabskip=\_zoskip
+ \_halign{\_hbox to\_displaywidth{$\_elign\_hfil\_displaystyle##\_hfil$}\_crcr
+ #1\_crcr}}
+\_long\_def\_displaylinesto #1{\_vcenter{\_openup\_jot \_math \_tabskip=\_zoskip
+ \_halign{\_strut\_hbox to\_span\_tmp{$\_hss\_displaystyle##\_hss$}\_crcr
+ #1\_crcr}}}
+
+\_public\displaylines ;
+
+ \_doc -----------------------------
+ \`\openup`, \`\eqalignno` and `\leqalignno` macros are copied from
Plain \TeX/ unchanged.
\_cod -----------------------------
@@ -683,20 +708,17 @@
\_vskip-\_lineskiplimit \_vskip\_normallineskiplimit \_fi
\_else \_penalty\_interdisplaylinepenalty \_fi}}}
\_def\_elign{\_tabskip=\_zoskip\_everycr{}} % restore inside \_display
-\_def\_displaylines#1{\_display \_tabskip=\_zoskip
- \_halign{\_hbox to\_displaywidth{$\_elign\_hfil\_displaystyle##\_hfil$}\_crcr
- #1\_crcr}}
-\_def\_eqalignno#1{\_display \_tabskip=\_centering
+\_long\_def\_eqalignno#1{\_display \_tabskip=\_centering
\_halign to\_displaywidth{\_hfil$\_elign\_displaystyle{##}$\_tabskip=\_zoskip
&$\_elign\_displaystyle{{}##}$\_hfil\_tabskip\_centering
&\_llap{$\_elign##$}\_tabskip\_zoskip\_crcr
#1\_crcr}}
-\_def\_leqalignno#1{\_display \_tabskip=\_centering
+\_long\_def\_leqalignno#1{\_display \_tabskip=\_centering
\_halign to\_displaywidth{\_hfil$\_elign\_displaystyle{##}$\_tabskip=\_zoskip
&$\_elign\_displaystyle{{}##}$\_hfil\_tabskip=\_centering
&\_kern-\_displaywidth\_rlap{$\_elign##$}\_tabskip\_displaywidth\_crcr
#1\_crcr}}
-\_public \openup \eqalign \displaylines \eqalignno ;
+\_public \openup \eqalignno \leqalignno ;
\_doc -----------------------------
These macros are inspired from `ams-math.tex` file.
@@ -941,7 +963,7 @@
\_let\circleddot\odot
\_doc -----------------------------
- The \`\not` macro is re-defined to be smarter 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
@@ -979,7 +1001,7 @@
* \`\currstyle` which expands to `\displaystyle`, `\textstyle`,
`\scriptstyle` or `\scriptscriptstyle` depending on the current math style
when \^`\mathstyles` was opened.
- * `\dobystyle{<D>}{<T>}{<S>}{<SS>}` is expandable macro. It expands to
+ * \`\dobystyle``{<D>}{<T>}{<S>}{<SS>}` is expandable macro. It expands to
`<D>`, `<T>`, `<S>` or `<SS>` depending on the current math style
when \^`\mathstyles` was opened.
* The value of the \`\stylenum` is 0, 1, 2 or 3
@@ -1010,6 +1032,12 @@
\_endcode %---------------------------------------------------
+2020-06-14 \borermatrix, \cases corrected
+2020-06-13 \adots introduced, \matrix smaller in T mode too.
+2020-06-03 \notin corrected
+2020-06-02 $$\par$$ error is supressed, so we define \(l)eqalign(no), \displayines as \long
+2020-05-30 \cases: group added in the second column.
+ "\displaylines to<size>" implemented and documented.
2020-05-11 \let\|=\Vert, bug fixed
2020-04-27 \mathstyles introduced
2020-03-14 implemented
diff --git a/macros/luatex/optex/base/math-unicode.opm b/macros/luatex/optex/base/math-unicode.opm
index f35b8652e0..03222fdad0 100644
--- a/macros/luatex/optex/base/math-unicode.opm
+++ b/macros/luatex/optex/base/math-unicode.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \loadmath {Unicode Math fonts <2020-02-25>} % preloaded in format
+\_codedecl \loadmath {Unicode Math fonts <2020-06-06>} % preloaded in format
\_doc -----------------------------
\`\loadmath` `{<Unicode-math font>}` loads given font. It does:
@@ -81,6 +81,8 @@
\_delimitershortfall=0.5\_fontdimen6\_textfont3
\_nulldelimiterspace=0.12\_fontdimen6\_textfont3
\_scriptspace=0.05\_fontdimen6\_textfont3
+ {\_everymath{}\_global\_setbox0=\_hbox{$\_displaystyle{0\_atop0}$}}% correction for \choose
+ \_Umathfractiondelsize\_displaystyle = \_dimexpr(\_ht0-\_Umathaxis\_displaystyle)*2\_relax
}
\_doc -----------------------------
@@ -116,7 +118,7 @@
different parts of Unicode table. We need auxiliary macros for setting
mathcodes by selected math alphabet.
\nl
- \`\_umathrange` `{<from->-<to>}\<first>` sets `\Umathcode`s
+ \`\_umathrange` `{<from->-<to>}<class><family>\<first>` sets `\Umathcode`s
of the characters in the interval `<from>-<to>` to `\<first>`,
`\<first>+1`, `\<first>+2`
etc., but \`\_umathcharholes` are skipped
@@ -153,21 +155,17 @@
[120122]{"2102}[120127]{"210D}[120133]{"2115}[120135]{"2119}
[120136]{"211A}[120137]{"211D}[120145]{"2124}%
}
-\_def\_umathrange#1#2{\_umathnumB=#2\_relax \_umathrangeA#1}
+\_def\_umathrange#1#2#3#4{\_umathnumB=#4\_def\_tmp{#2 #3 }\_umathrangeA#1}
\_def\_umathrangeA#1-#2{\_umathnumA=`#1\_relax
\_loop
\_umathcorr\_umathprepare\_umathnumB
- \_Umathcode \_umathnumA = 7 1 \_umathcorr\_umathvalue{\_umathnumB}
+ \_Umathcode \_umathnumA = \_tmp \_umathcorr\_umathvalue{\_umathnumB}
\_ifnum\_umathnumA<`#2\_relax
\_advance\_umathnumA by1 \_advance\_umathnumB by1
\_repeat
}
-\_def\_umathrangeGREEK{\_begingroup
- \_lccode`A="0391 \_lccode`Z="03A9
- \_lowercase{\_endgroup \_umathrange{A-Z}}}
-\_def\_umathrangegreek{\_begingroup
- \_lccode`A="03B1 \_lccode`Z="03D6
- \_lowercase{\_endgroup \_umathrange{A-Z}}}
+\_def\_umathrangeGREEK{\_umathrange{^^^^0391-^^^^03a9}}
+\_def\_umathrangegreek{\_umathrange{^^^^03b1-^^^^03d6}}
\_def\_greekdef#1{\_ifx#1\_relax \_else
\_begingroup \_lccode`X=\_umathnumB \_lowercase{\_endgroup \_def#1{X}}%
\_advance\_umathnumB by 1
@@ -228,9 +226,13 @@ the section~\ref[math-macros].
\printdoc unimath-codes.opm
\printdoctail unimath-codes.opm
+\secc Printing all Unicode math slots in used math font
+\printdoctail print-unimath.opm
+\printdoc print-unimath.opm
\_endinput
+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
diff --git a/macros/luatex/optex/base/more-macros.opm b/macros/luatex/optex/base/more-macros.opm
index 51f1919870..595a4f2ed3 100644
--- a/macros/luatex/optex/base/more-macros.opm
+++ b/macros/luatex/optex/base/more-macros.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \eoldef {OpTeX useful macos <2020-05-03>} % preloaded in format
+\_codedecl \eoldef {OpTeX useful macos <2020-05-22>} % preloaded in format
\_doc -----------------------------
We define \`\opinput` `{<file name>}` macro which
@@ -147,6 +147,30 @@
\_public \eoldef \skiptoeol \bracedparam ;
\_doc -----------------------------
+ \`\scantoeol``\macro <text to end of line>` scans the
+ `<text to end of line>` in verbatim mode and runs the
+ `\macro{<text to end of line>}`. The `\macro`
+ can be defined `\def\macro#1{...\scantextokens{#1}...}`.
+ The new tokenization of the parameter is processed when the parameter is used,
+ no when the parameter is scanned. This principle is used in definition
+ of \^`\chap`, \^`\sec`, \^`\secc` and \^`\_Xtoc` macros.
+ It means that user can write \code{\\sec text `&` text} for example.
+ Inline verbatim works in title sections.
+
+ The verbatim scanner of `\scatoeol` keeps category 7 for `^` in
+ order to be able to use `^^J` as comment chracter which means that
+ the next line continues.
+ \_cod -----------------------------
+
+\_def\_scantoeol#1{\def\_tmp{#1}\_begingroup \_setscancatcodes \_scantoeolA}
+\_def\_setscancatcodes{\_setverb \_catcode`\^^M=12\_catcode`\^=7\_catcode`\ =10\_catcode`\^^J=14 }
+\_catcode`\^^M=12 %
+\_def\_scantoeolA#1^^M{\_endgroup \_tmp{#1}}%
+\_normalcatcodes %
+
+\_public \scantoeol ;
+
+ \_doc -----------------------------
The \`\replstring``\macro{<textA>}{<textB>}`
replaces all occurrences of `<textA>` by `<textB>` in the `\macro` body.
The `\macro` must be defined without parameters. The occurrences of
@@ -176,7 +200,8 @@
If you really need primitive `\catcode` then you can use `\_catcode`.
\_cod -----------------------------
-\_def\catcode{\_catcode\_string} % more robust in cases \catcode` or \catcode"
+\_def\catcode#1{\_catcode \_if`\_noexpand#1\_ea`\_else\_if"\_noexpand#1"\_else
+ \_if'\_noexpand#1'\_else \_ea\_ea\_ea\_ea\_ea\_ea\_ea#1\_fi\_fi\_fi}
\_doc -----------------------------
The \`\removespaces` `<text with spaces >{}` expands to <textwithoutspaces>.
@@ -237,5 +262,6 @@
\_endcode % -------------------------------------
+2020-05-22 robust \catcode newly defined in order \catcode\string.... be possible
2020-05-03 \load macro introduced
2020-03-15 released
diff --git a/macros/luatex/optex/base/multicolumns.opm b/macros/luatex/optex/base/multicolumns.opm
index c593f72552..2305aacf5a 100644
--- a/macros/luatex/optex/base/multicolumns.opm
+++ b/macros/luatex/optex/base/multicolumns.opm
@@ -26,7 +26,7 @@
\_newcount\_mullines
\_def\_begmulti #1 {\_par\_bgroup\_wipeepar\_multiskip\_penalty0 \_def\_Ncols{#1}
- \_setbox6=\_vbox\_bgroup\_penalty0
+ \_setbox6=\_vbox\_bgroup \_let\_setxhsize=\_relax \_penalty0
%% \hsize := column width = (\hsize+\colsep) / n - \colsep
\_advance\_hsize by\_colsep
\_divide\_hsize by\_Ncols \_advance\_hsize by-\_colsep
diff --git a/macros/luatex/optex/base/optex.ini b/macros/luatex/optex/base/optex.ini
index 27649370ef..dce5d1aaff 100644
--- a/macros/luatex/optex/base/optex.ini
+++ b/macros/luatex/optex/base/optex.ini
@@ -21,7 +21,7 @@
% OpTeX version
-\def\optexversion{Beta 0.13 May 2020}
+\def\optexversion{Beta 0.14 Jun 2020}
\def\fmtname{OpTeX}
% Engine testing:
diff --git a/macros/luatex/optex/base/others.opm b/macros/luatex/optex/base/others.opm
index f4bcc78698..225e54c37a 100644
--- a/macros/luatex/optex/base/others.opm
+++ b/macros/luatex/optex/base/others.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \uv {Miscenaleous <2020-04-02>} % preloaded in format
+\_codedecl \uv {Miscenaleous <2020-05-22>} % preloaded in format
\_doc ----------------------------
\`\useOpTeX` and \`\useoptex` are declared as `\relax`.
@@ -73,8 +73,13 @@
\_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`.
+ for example `\lipsum[3]` or `\lipsum[112-121]`, max=150.
+
+ First usage of `\lipsum` reads the \LaTeX/ file `lipsum.ltd.tex`
+ and prints the selected paragraph(s). Next usages of `\lipsum`
+ prints the selected paragraph(s) from memory. This second and more
+ usages of `\lipsum` are fully expandable. If you want to have all
+ printings of `\lipsum` expandable, use dummy `\lipsum[0]` first.
\_cod ----------------------------
\_def \_lipsum {%
@@ -87,12 +92,13 @@
}
\_def\_negativermnm{\_romannumeral-`\.}
\_def\_reallipsum[#1]{\_lipsumA #1\_empty-\_empty\_end}
-\_def\_lipsumA #1-#2\_empty#3\_end{\_tmpnum=#1 \_edef\_tmp{\_ifx^#2^#1\_else#2\_fi}%
- \_loop \_csname lips:\_the\_tmpnum\_endcsname \par % \par is better here
- \_ifnum\_tmpnum<\_tmp \_advance\_tmpnum by1 \_repeat
-}
+\_def\_lipsumA #1-#2\_empty#3\_end{%
+ \_fornum #1..\_ifx^#2^#1\_else#2\_fi \_do {\_csname lips:##1\_endcsname \par}}
+
\def\lipsum {\_lipsum}
\def\lorem {\_lipsum}
\_endcode
+2020-05-22 \lipsum uses \fornum (expandable after first usage)
+2020-04-02 released \ No newline at end of file
diff --git a/macros/luatex/optex/base/outlines.opm b/macros/luatex/optex/base/outlines.opm
index 0d041c743c..2f9a040881 100644
--- a/macros/luatex/optex/base/outlines.opm
+++ b/macros/luatex/optex/base/outlines.opm
@@ -5,6 +5,7 @@
\_def\_outlines#1{\_pdfcatalog{/PageMode/UseOutlines}\_openref
\_ifx\_toclist\_empty
\_opwarning{\_noexpand\outlines -- data unavailable. TeX me again}%
+ \_incr\_unresolvedrefs
\_else
\_ifx\_dest\_destactive \_else
\_opwarning{\_noexpand\outlines doesn't work when \_noexpand\hyperlinks isn't declared}\_fi
diff --git a/macros/luatex/optex/base/output.opm b/macros/luatex/optex/base/output.opm
index 41948896e7..c113eae103 100644
--- a/macros/luatex/optex/base/output.opm
+++ b/macros/luatex/optex/base/output.opm
@@ -25,7 +25,7 @@
\_def \_begoutput{\_incr\_gpageno
\_immediate\_wref\_Xpage{{\_the\_gpageno}{\_folio}}%
- \_prepoffsets \_the\_regmark} %
+ \_setxhsize \_prepoffsets \_the\_regmark}
\_def \_endoutput{\_advancepageno
{\_globaldefs=1 \_the\_nextpages \_nextpages={}}%
\_ifnum\_outputpenalty>-20000 \_else\_dosupereject\_fi
@@ -33,6 +33,20 @@
\_def \_prepoffsets {}
\_doc -----------------------------
+ The `\hsize` value can be changed at various places in the document but
+ we need to have constant value \`\_xhsize` in output routine
+ (for headlines and footlines, for instance). This value is set
+ from current value of `\hsize` when \`\_setxhsize` macro is called.
+ This macro destroys itself, so the value is set only once. Typicaly it is
+ done when first \^`\_optexoutput` routine is called (see \^`\_begoutput`).
+ Or it is called at begining of the \^`\begtt`...`\endtt` environment before
+ `\hsize` value is eventually changed by user in this environment.
+ \_cod -----------------------------
+
+\_newdimen \_xhsize
+\_def\_setxhsize {\_global\_xhsize=\_hsize \_global\_let\_setxhsize=\_relax}
+
+ \_doc -----------------------------
\`\gpageno` counts pages from one in whole document
\_cod -----------------------------
@@ -71,7 +85,7 @@
\_def\_makeheadline {\_istoksempty \_headline \_iffalse
\_vbox to0pt{\_vss
\_baselineskip=\_headlinedist \_lineskiplimit=-\_maxdimen
- \_line{\_the\_headline}\_hbox{}}\_nointerlineskip
+ \_hbox to\_xhsize{\_the\_headline}\_hbox{}}\_nointerlineskip
\_fi
}
@@ -81,7 +95,7 @@
\_def\_makefootline{\_istoksempty \_footline \_iffalse
\_baselineskip=\_footlinedist
- \_lineskiplimit=-\_maxdimen \_line{\_the\_footline}
+ \_lineskiplimit=-\_maxdimen \_hbox to\_xhsize{\_the\_footline}
\_fi
}
@@ -201,7 +215,7 @@
}
\_def \_draftbox #1{\_setbox0=\_hbox{#1}%
\_kern.5\_vsize \_kern4.5\_wd0
- \_hbox to0pt{\_kern.5\_hsize \_kern-1\_wd0
+ \_hbox to0pt{\_kern.5\_xhsize \_kern-1\_wd0
\_pdfsave \_pdfrotate{55}\_pdfscale{10}{10}%
\_hbox to0pt{\_localcolor\LightGrey \_box0\_hss}%
\_pdfrestore
diff --git a/macros/luatex/optex/base/parameters.opm b/macros/luatex/optex/base/parameters.opm
index bd12bac070..f9fc3ee150 100644
--- a/macros/luatex/optex/base/parameters.opm
+++ b/macros/luatex/optex/base/parameters.opm
@@ -149,7 +149,7 @@
\_public \plaintexsetting ;
\_doc -----------------------------
- \secc \OpTeX/ parameters
+ \secc[oparams] \OpTeX/ parameters
The main principle how to configure \OpTeX/ is not to use only parameters.
A designer can copy macros from \OpTeX/ and re-define them as required.
@@ -361,20 +361,12 @@
The \`\mnotesize` is horizontal size of the marginal notes.
\nl
The \`\mnoteindent` is horizontal space between body-text and marginal note.
- \nl
- The \`\mnoteskip` is a dimen which denotes the vertical shift of marginal
- note from its normal position. Positive value means shift up, negative
- down. The `\mnoteskip` register is set to zero
- after the marginal note is printed.
- Use it as an exception of marginal note position if the marginal
- notes overlaps or they are put at bottom of the page.
\_cod -----------------------------
\_newtoks\_everymnote
\_newdimen\_mnotesize \_mnotesize=20mm % the width of the mnote paragraph
\_newdimen\_mnoteindent \_mnoteindent=10pt % ditance between mnote and text
-\_newdimen\_mnoteskip
-\_public \everymnote \mnotesize \mnoteindent \mnoteskip ;
+\_public \everymnote \mnotesize \mnoteindent ;
\_doc -----------------------------
The `\table` parameters follows. The \`\thistable` tokens list
@@ -423,7 +415,7 @@
\_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 ;
+ \vvkern \hhkern \tsize \tabskipl \tabskipr ;
\_doc -----------------------------
The \^`\eqalign` macro can be configured by \`\eqlines` and \`\eqstyle`
@@ -438,6 +430,14 @@
\_public \eqlines \eqstyle \eqspace ;
\_doc -----------------------------
+ \`\lmfil` is \"left matrix filler" (for `\matrix` columns). The default
+ value does centering because right matrix filler is directly set to `\hfil`.
+ \_cod -----------------------------
+
+\_newtoks \_lmfil \_lmfil={\_hfil}
+\_public \lmfil ;
+
+ \_doc -----------------------------
The output routine uses token list \`\headline` and \`\footline` in the
same sense as in plain \TeX/. If they are non-empty then `\hfil` or `\hss`
must be here because they are used inside `\hbox to\hsize`.
diff --git a/macros/luatex/optex/base/pdfuni-string.opm b/macros/luatex/optex/base/pdfuni-string.opm
index d7566eb91d..a289aae731 100644
--- a/macros/luatex/optex/base/pdfuni-string.opm
+++ b/macros/luatex/optex/base/pdfuni-string.opm
@@ -2,6 +2,11 @@
\_codedecl \pdfunidef {PDFunicode strings for outlines <2020-03-12>} % preloaded in format
+ \_doc -----------------------------
+ The \`\_octalprint` is lua script which prints the character code in the
+ octal notation.
+ \_cod -----------------------------
+
\_edef\_octalprint#1#2{\_noexpand\_directlua{% #1=character-code #2=character
if ('#2'>='A' and '#2'<='Z') or ('#2'>='a' and '#2'<='z') then
tex.print(string.format('000\_pcent s',"#2"))
@@ -10,17 +15,34 @@
tex.print(string.format('\_pcent 03o\_nbb\_pcent03o',(#1-num)/256,num))
end
}}
+
+ \_doc -----------------------------
+ \`\pdfunidef``\macro{<text>}` does more things than only converting to octal notation.
+ The <text> can be scanned in verbatim mode (it is true becuase \^`\_Xtoc`
+ reads the <text> in verbatim mode). First `\edef` do
+ `\_scantextokens\unexpanded` and second `\edef` expands the parameter
+ according to current values on selected macros from `\_regoul`. Then
+ \`\_removeoutmath` converts `..$x^2$..` to `..x^2..`, i.e removes dollars.
+ Then \`\_removeoutbraces` converts `..{x}..` to `..x..`.
+ Finaly, the <text> is detokenized, spaces are preprocessed using \^`\replstring`
+ and then the \`\_pdfunidefB` is repeated on each character. It calls the
+ `\directlua` chunk to print octal numbers in the macro \^`\_octalprint`.
+ \_cod -----------------------------
+
\_def\_pdfunidef#1#2{%
\_begingroup
- \_catcode`\\=12 \_let\\=\_bslash
\_the\_regoul \_relax % \_regmacro alternatives of logos etc.
+ \_ifx\_savedttchar\_undefined \_def#1{\_scantextokens{\_unexpanded{#2}}}%
+ \_else \_lccode`\;=\_savedttchar \_lowercase{\_prepinverb#1;}{#2}\fi
+ \_edef#1{#1}%
\_escapechar=-1
- \_edef#1{#2\_empty}%
+ \_edef#1{#1\_empty}%
\_escapechar=`\\
\_ea\_edef \_ea#1\_ea{\_ea\_removeoutmath #1$\_end$}% $x$ -> x
\_ea\_edef \_ea#1\_ea{\_ea\_removeoutbraces #1{\_end}}% {x} -> x
\_edef#1{\_detokenize\_ea{#1}}%
\_replstring#1{ }{{ }}% text text -> text{ }text
+ \_catcode`\\=12 \_let\\=\_bslash
\_edef\_out{\\376\\377}%
\_ea\_pdfunidefB#1^% text -> \_out in octal
\_ea
@@ -39,6 +61,28 @@
\_def\_removeoutbracesA #1{\_ifx\_end#1\_else #1\_ea\_removeoutbraces\_fi}
\_def\_removeoutmath #1$#2${#1\_ifx\_end#2\_else #2\_ea\_removeoutmath\_fi}
+ \_doc -----------------------------
+ The \`\_prepinverb``<macro><separator>{<text>}`,
+ e.g.\ `\_prepinverb\tmpb|{aaa |bbb| cccc |dd| ee}`
+ does `\def\tmpb{<su>{aaa }bbb<su>{ cccc }dd<su>{ ee}}` where
+ <su> is `\scantextokens\unexpanded`. It means that in-line verbatim
+ are not argument of `\scantextoken`. First `\edef\tmpb` tokenizes again
+ the <text> but not the parts which were in the the in-line verbatim.
+ \_cod -----------------------------
+
+\_def\_prepinverb#1#2#3{\_def#1{}%
+ \_def\_dotmpb ##1#2##2{\_addto#1{\_scantextokens{\_unexpanded{##1}}}%
+ \_ifx\_end##2\_else\_ea\_dotmpbA\_ea##2\_fi}%
+ \_def\_dotmpbA ##1#2{\_addto#1{##1}\_dotmpb}%
+ \_dotmpb#3#2\_end
+}
+
+ \_doc -----------------------------
+ The \^`\regmacro` is used in order to sed the values of macros
+ `\em`, `\rm`, `\bf`, `\it`, `\bi`, `\tt`, `\/` and `~` to values usable in
+ PDF outlines.
+ \_cod -----------------------------
+
\_regmacro {}{}{\_let\em=\_empty \_let\rm=\_empty \_let\bf=\_empty
\_let\it=\_empty \_let\bi=\_empty \_let\tt=\_empty \_let\/=\_empty
\_let~=\_space
@@ -65,14 +109,4 @@ bytes FEFF. Moreover, each byte is encoded by three octal digits preceded by
backslash. The only exception is the visible ASCII character encoding: such
a character is encoded by its real byte preceded by `\000`.
-The command \`\pdfunidef``\macro{string}` is implemented here
-using `\directlua`.
-The input string is preprocessed: detokenized, converted `\word /` to
-`\word/` (used in logos) preprocessed spaces using \^`\replstring` and then the
-\`\_pdfunidefB` is repeated on each character. It calls the `\directlua` chunk
-to print octal numbers in the macro `\_octalprint`.
-
-The \^`\regmacro` is used in order to sed the values of macros
-`\em`, `\rm`, `\bf`, `\it`, `\bi`, `\tt`, `\/` and `~` to values usable in
-PDF outlines.
diff --git a/macros/luatex/optex/base/plain-macros.opm b/macros/luatex/optex/base/plain-macros.opm
index f5c16ba3bd..d3a158008e 100644
--- a/macros/luatex/optex/base/plain-macros.opm
+++ b/macros/luatex/optex/base/plain-macros.opm
@@ -332,7 +332,7 @@
\_def \_showhyphens #1{\_setbox0=\_vbox{\_parfillskip=0pt \_hsize=\_maxdimen \_tenrm
\_pretolerance=-1 \tolerance=-1 \hbadness=0 \showboxdepth=0 \ #1}}
-\_def \_bye {\_par \_vfill \_supereject \_end}
+\_def \_bye {\_par \_vfill \_supereject \_byehook \_end}
\_public \bye ;
\_endcode % -------------------------------------
diff --git a/macros/luatex/optex/base/print-unimath.opm b/macros/luatex/optex/base/print-unimath.opm
new file mode 100644
index 0000000000..a1a3ceb106
--- /dev/null
+++ b/macros/luatex/optex/base/print-unimath.opm
@@ -0,0 +1,56 @@
+%% This is part of OpTeX project, see http://petr.olsak.net/optex
+
+\_codedecl \_undefined {Printing Unicode-math table \string<2020-06-08>}
+
+\_begingroup
+ \_def\UnicodeMathSymbol#1#2#3#4{%
+ \_ifnum#1>"10000 \_endinput \_else \_printmathsymbol{#1}{#2}{#3}{#4}\_fi
+ }
+ \_def\UnicodeMathSymbolA#1#2#3#4{%
+ \_ifnum#1>"10000 \_printmathsymbol{#1}{#2}{#3}{#4}\_fi
+ }
+ \_def\_printmathsymbol#1#2#3#4{%
+ \_hbox{\_hbox to2em{$#2{}$\_hss}\_hbox to3em
+ {\small\_printop#3\_hss}{\_tt\_string#2\_trycs{_eq:\_string#2}{}}}
+ }
+ \_def\_eq#1#2{\_sdef{_eq:\_string#2}{=\_string#1}}
+ \_eq \diamond\smwhtdiamond \_eq \bullet\smblkcircle \_eq \circ\vysmwhtcircle
+ \_eq \bigcirc\mdlgwhtcircle \_eq \to\rightarrow \_eq \le\leq
+ \_eq \ge\geq \_eq \neq\ne \_eq \emptyset\varnothing \_eq \hbar\hslash
+ \_eq \land\wedge \_eq \lor\vee \_eq \owns\ni \_eq \gets\leftarrow
+ \_eq \mathring\ocirc \_eq \lnot\neg \_eq \backepsilon\upbackepsilon
+ \_eq \eth\matheth \_eq \dbkarow\dbkarrow \_eq \drbkarow\drbkarrow
+ \_eq \hksearow\hksearrow \_eq \hkswarow\hkswarrow
+
+ \_tracinglostchars=0
+ \_fontdef\small{\_setfontsize{at5pt}\_rm}
+ \_def\_printop{\_def\mathop{Op}}
+ \_def\mathalpha{Alph}\_def\mathord{Ord}\_def\mathbin{Bin}\_def\mathrel{Rel}
+ \_def\mathopen{Open}\_def\mathclose{Close}\_def\mathpunct{Punct}\_def\mathfence{Fence}
+ \_def\mathaccent{Acc}\_def\mathaccentwide{Accw}\_def\mathbotaccentwide{AccBw}
+ \_def\mathbotaccent{AccB}\_def\mathaccentoverlay{AccO}
+ \_def\mathover{Over}\_def\mathunder{Under}
+ \_typosize[7.5/9]\_normalmath \_everymath={}
+
+ Codes U+00000 \_dots\ U+10000
+ \_begmulti 3
+ \_input unimath-table.opm
+ \_endmulti
+
+ \_medskip\_goodbreak
+ Codes U+10001 \_dots\ U+1EEF1 \_let\UnicodeMathSymbol=\UnicodeMathSymbolA
+ \_begmulti 4
+ \_input unimath-table.opm
+ \_endmulti
+\_endgroup
+
+\_endcode
+
+This file can be used for testing your Unicode Math font
+and/or for printing \TeX/ sequences which can be used in math.
+
+Load Unicode math font first (for example by `\fontfam[termes]` or by
+`\loadmath{<math-font>}`) and then you
+can do `\input print-unimath.opm`. The big table with all math symbols is printed.
+
+\_endinput
diff --git a/macros/luatex/optex/base/ref-file.opm b/macros/luatex/optex/base/ref-file.opm
index 3cf6f6be7d..c5fa396524 100644
--- a/macros/luatex/optex/base/ref-file.opm
+++ b/macros/luatex/optex/base/ref-file.opm
@@ -65,7 +65,7 @@
versa.
\_cod ----------------------
-\_def\_REFversion{3} % actual version of .ref files in OpTeX
+\_def\_REFversion{4} % actual version of .ref files in OpTeX
\_def\_Xrefversion#1{\_ifnum #1=\_REFversion\_relax \_else \_endinput \_fi}
\_public \Xrefversion ; % we want to ignore .ref files generated by OPmac
@@ -107,7 +107,7 @@ The `.ref` file looks like:
\begtt \catcode`\<=13
\Xrefversion{<ref-version>}
\_Xpage{<gpageno>}{<pageno>}
-\_Xtoc{<level>}{<type>}{<text>}{<title>}
+\_Xtoc{<level>}{<type>}{<text>}<title>
\_Xlabel{<label>}{<text>}
\_Xlabel{<label>}{<text>}
...
@@ -118,12 +118,12 @@ The `.ref` file looks like:
%
where <gpageno> is internal page number globally numbered from one and
`<pageno>` is a page number (`\the\pageno`) used in pagination (they may be differ).
-Each page begins with `\_Xpage`.
+Each page begins with \^`\_Xpage`.
The `<label>` is a label used by user in `\label[<label>]` and `<text>` is a
text which should be referenced (the number of section or table, for
example `2.3.14`). The `<title>` is a title of the chapter (`<level>`=1,
`<type>`=`chap`), section (`<level>`=2, `<type>`=`sec`), subsection
-(`<level>`=3, `<type>`=`secc`). The `\_Xpage` is written at begining of each
+(`<level>`=3, `<type>`=`secc`). The \^`\_Xpage` is written at begining of each
page, the `\_Xtoc` is written when chapter or section or subsection title
exists on the page and `\_Xlabel` when labeled object prefixed by
`\label[<label>]` exists on the page.
diff --git a/macros/luatex/optex/base/references.opm b/macros/luatex/optex/base/references.opm
index 5aaf36a87a..e00a0a2fda 100644
--- a/macros/luatex/optex/base/references.opm
+++ b/macros/luatex/optex/base/references.opm
@@ -10,6 +10,13 @@
\_def\_Xpage#1#2{\_def\_currpage{{#1}{#2}}\_lfnotenum=0 }
\_doc ----------------------------
+ Counter for number of unresolved references \`\_unresolvedrefs`.
+ \_cod ----------------------------
+
+\_newcount\_unresolvedrefs
+\_unresolvedrefs=0
+
+ \_doc ----------------------------
\`\_Xlabel` `{<label>}{<text>}` saves the <text> to `\_lab:<label>` and saves
`[pg:<gpageno>]{<pageno>}` to `\_pgref:<label>`.
\_cod ----------------------------
@@ -53,12 +60,14 @@
\_def\_ref[#1]{\_isdefined{_lab:#1}%
\_iftrue \_ilink[ref:#1]{\_csname _lab:#1\_endcsname}%
- \_else ??\_opwarning{label [#1] unknown. Try to TeX me again}\_openref
+ \_else ??\_opwarning{label [#1] unknown. Try to TeX me again}%
+ \_incr\_unresolvedrefs \_openref
\_fi
}
\_def\_pgref[#1]{\_isdefined{_pgref:#1}%
\_iftrue \_ea\_ea\_ea\_ilink \_csname _pgref:#1\_endcsname
- \_else ??\_opwarning{pg-label [#1] unknown. Try to TeX me again}\_openref
+ \_else ??\_opwarning{pg-label [#1] unknown. Try to TeX me again}%
+ \_incr\_unresolvedrefs \_openref
\_fi
}
\_public \ref \pgref ;
diff --git a/macros/luatex/optex/base/sections.opm b/macros/luatex/optex/base/sections.opm
index ee02064b9e..d4cda17b83 100644
--- a/macros/luatex/optex/base/sections.opm
+++ b/macros/luatex/optex/base/sections.opm
@@ -16,16 +16,19 @@
\_def \_seccfont {\_scalemain\_typoscale[\_magstep1/\_magstep1]\_boldify}
\_doc ---------------------------
- The \`\tit` macro is defined by `\eoldef`, it means that the parameter is
- separated by end of line. The macros `\chap`, `\sec` and `\secc` use
- `\eoldef` too.
+ The \`\tit` macro is defined using \^`\scantoeol` and \`\_printtit`.
+ It means that the parameter is
+ separated by end of line and inline verbatim is allowed. The same
+ principle is used in the \^`\chap`, \^`\sec` and \^`\secc` macros.
\_cod ---------------------------
-\_eoldef\_tit #1{\_vglue\_titskip
+\_def\_printtit #1{\_vglue\_titskip
{\_leftskip=0pt plus1fill \_rightskip=\_leftskip % centering
- \_titfont \_noindent #1\_par}%
+ \_titfont \_noindent \_scantextokens{#1}\_par}%
\_nobreak\_bigskip
}
+\_def\_tit{\_scantoeol\_printtit}
+
\_public \tit ;
\_doc ---------------------------
@@ -165,32 +168,35 @@
The \`\chap`, \`\sec` and \`\secc` macros are implemented here.
The \`\_inchap`, \`\_insec` and \`\_insecc` macros does the real work,
First, we read the optional parameter `[<label>]`, if it exists.
+ The `\chap`, `\sec` and `\secc` macro reads its parameter using
+ \^`\scantoeol`. This causes that they cannot be used inside other macros.
+ Use \`\_inchap`, \`\_insec` and \`\_insecc` macros directly in such case.
\_cod ----------------------------
-\_optdef\_chap[]{\_trylabel \_inchap}
-\_optdef\_sec []{\_trylabel \_insec}
-\_optdef\_secc[]{\_trylabel \_insecc}
+\_optdef\_chap[]{\_trylabel \_scantoeol\_inchap}
+\_optdef\_sec []{\_trylabel \_scantoeol\_insec}
+\_optdef\_secc[]{\_trylabel \_scantoeol\_insecc}
\_def\_trylabel{\_istoksempty\_opt\_iffalse \_label[\_the\_opt]\_fi}
-\_eoldef\_inchap #1{\_par \_sectionlevel=1
+\_def\_inchap #1{\_par \_sectionlevel=1
\_def \_savedtitle {#1}% saved to .ref file
\_ifnonum \_else {\_globaldefs=1 \_incr\_chapnum \_chapx}\_fi
\_edef \_therefnum {\_ifnonum \_space \_else \_thechapnum \_fi}%
- \_printchap{#1}%
+ \_printchap{\_scantextokens{#1}}%
\_resetnonumnotoc
}
-\_eoldef\_insec #1{\_par \_sectionlevel=2
+\_def\_insec #1{\_par \_sectionlevel=2
\_def \_savedtitle {#1}% saved to .ref file
\_ifnonum \_else {\_globaldefs=1 \_incr\_secnum \_secx}\_fi
\_edef \_therefnum {\_ifnonum \_space \_else \_thesecnum \_fi}%
- \_printsec{#1}%
+ \_printsec{\_scantextokens{#1}}%
\_resetnonumnotoc
}
-\_eoldef\_insecc #1{\_par \_sectionlevel=3
+\_def\_insecc #1{\_par \_sectionlevel=3
\_def \_savedtitle {#1}% saved to .ref file
\_ifnonum \_else {\_globaldefs=1 \_incr\_seccnum \_seccx}\_fi
\_edef \_therefnum {\_ifnonum \_space \_else \_theseccnum \_fi}%
- \_printsecc{#1}%
+ \_printsecc{\_scantextokens{#1}}%
\_resetnonumnotoc
}
\_public \chap \sec \secc ;
@@ -215,7 +221,7 @@
\_fi
}
\_def \_wtotoc #1#2#3#4{\_edef\_tmp{{#1}{#2}{#3}{#4}}\_ea\_wtotocA\_tmp}
-\_def \_wtotocA #1#2#3#4{\_wref\_Xtoc{{#1}{#2}{#3}{#4}}}
+\_def \_wtotocA #1#2#3#4{\_wref\_Xtoc{{#1}{#2}{#3}#4}}
\_doc -----------------------------
The \`\_abovetitle``{<penaltyA>}{<skipA>}` and \`\_belowtitle``{<skipB>}` pair
diff --git a/macros/luatex/optex/base/slides.opm b/macros/luatex/optex/base/slides.opm
index e25cc5ee7a..835bfa72a9 100644
--- a/macros/luatex/optex/base/slides.opm
+++ b/macros/luatex/optex/base/slides.opm
@@ -140,7 +140,7 @@
\_sdef{_spg:;}{\_closepage \_global\_slidelayer=1 \_resetpage \_openslide}
\_sdef{_spg:.}{\_closepage \_end}
\_sdef{_spg:+}{\_closepage \_incr\_slidelayer \_decr\_pageno \_openslide}
- \_def\bye {\_closepage \_end}
+ \_def\bye {\_closepage \_byehook \_end}
\_let\_layers=\_layersactive
\_def\_destbox[##1:##2]{\_isequal{##1}{ref}\_iffalse \_destboxori[##1:##2]\_fi}%
}
diff --git a/macros/luatex/optex/base/table.opm b/macros/luatex/optex/base/table.opm
index 4aaaa9a442..43f294eb4c 100644
--- a/macros/luatex/optex/base/table.opm
+++ b/macros/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-05-20>} % preloaded in format
+\_codedecl \table {Basic macros for OpTeX <2020-05-26>} % preloaded in format
\_doc -----------------------------
The result of the \`\table``{<declaration>}{<data>}` macro is inserted into
@@ -57,7 +57,7 @@
\_doc -----------------------------
The \`\_tableB``{<data>}` saves `<data>` to `\_tmpb`
- and does four \^`\replstring`s to prefix each macro \^`\crli` (etc.)
+ and does four \^`\replstring`s to prefix each macro \^`\crl` (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.
@@ -92,8 +92,9 @@
\_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}%
+ \_replstring\_tmpb{\crl}{\_crcr\crl}\_replstring\_tmpb{\crll}{\_crcr\crll}%
+ \_replstring\_tmpb{\crli}{\_crcr\crli}\_replstring\_tmpb{\crlli}{\_crcr\crlli}%
+ \_replstring\_tmpb{\crlp}{\_crcr\crlp}%
\_edef\_tabskipmid{\_the\_tabskip}\_tabskip=\_tabskipl
\_ifpxto
\_tsize=\_hsize \_setbox0 = \_vbox{\_halign \_tableC}%
@@ -275,7 +276,7 @@
\_public \crl \crll \crli \crlli \crlp \tskip ;
\_doc -----------------------------
- The \`\mspan``[<declaration>]{<text>}` macro generates similar `\omit\span\omit\span`
+ The \`\mspan``{<number>}[<declaration>]{<text>}` macro generates similar `\omit\span\omit\span`
sequence as plain \TeX/ macro `\multispan`. Moreover, it uses \^`\_scantabdata` to
convert `<declaration>` from `\table` syntax to `\halign` syntax.
\_cod -----------------------------
@@ -336,6 +337,28 @@
}\_kern\_vvkern\_hrule}\_vrule}}
\_public \frame ;
+ \_doc -----------------------------
+ \`\eqbox` and \`\eqboxsize` are implemented here. The widths of
+ all `\eqbox`es are saved to the `.ref` file in the format
+ \`\_Xeqbox``{<label>}{<size>}`. The `.ref` file is read again and maximum
+ box width for each <label> is saved to `\_eqb:<label>`.
+ \_cod -----------------------------
+
+\_def\_Xeqbox#1#2{%
+ \_ifcsname _eqb:#1\_endcsname
+ \_ifdim #2>\_cs{_eqb:#1}\_relax \_sdef{_eqb:#1}{#2}\_fi
+ \_else \_sdef{_eqb:#1}{#2}\_fi
+}
+\_def\_eqbox #1[#2]#3{\_setbox0=\_hbox{{#3}}%
+ \_openref \_immediate\_wref \_Xeqbox{{#2}{\_the\_wd0}}%
+ \_ifcsname _eqb:#2\_endcsname
+ \_hbox to\_cs{_eqb:#2}{\_ifx r#1\_hfill\_fi\_hss\_unhbox0\_hss\_ifx l#1\_hfill\_fi}%
+ \_else \_box0 \_fi
+}
+\_def\_eqboxsize [#1]#2{\_trycs{_eqb:#1}{#2}}
+
+\public \eqbox \eqboxsize ;
+
\_endcode % -------------------------------------
\secc[table.bound] The boundary declarator \code{:}
@@ -448,8 +471,41 @@ For example,
%
This gives the ratio of widths of individual paragraphs in the table.
+\secc `\eqbox`: boxes with equal width acros the whole document
+
+The \^`\eqbox` `[<label>]{<text>}` behaves like `\hbox{<text>}` in the first
+run of \TeX. But the widths of all boxes with the same label are saved to
+`.ref` file and the maximum box width for each label is calculated at the
+beginning of the next \TeX/ run. Then \^`\eqbox`~`[<label>]{<text>}` behaves
+like `\hbox to <dim:label> {\hss <text>\hss}`, where <dim:label> is
+the maximum width of all boxes
+labeled by the same `[<label>]`. The documentation of the \LaTeX/ package
+`eqparbox` includes more information and tips.
+
+The \^`\eqboxsize` `[<label>]{<dimen>}` expands to <dim:label> if this value is known,
+else it expands to the given <dimen>.
+
+The optional parameter `r` or `l` can be writen before `[<label>]` (for example
+`\eqbox r[label]{text}`) if you want to put the text to the right or to the
+left side of the box width.
+
+Try the following example and watch what happens after first \TeX/ run and
+after second one.
+
+\begtt
+\def\leftitem#1{\par
+ \noindent \hangindent=\eqboxsize[items]{2em}\hangafter=1
+ \eqbox r[items]{#1 }\ignorespaces}
+
+\leftitem {\bf first} \lorem[1]
+\leftitem {\bf second one} \lorem[2]
+\leftitem {\bf final} \lorem[3]
+\endtt
+
+
\_endinput
+2020-05-26 \eqbox implemented
2020-05-20 \colnum implemented.
\vspan implemented.
2020-05-19 \fL, \fR ets defined.
diff --git a/macros/luatex/optex/base/unimath-codes.opm b/macros/luatex/optex/base/unimath-codes.opm
index d0182a0f85..4718f0dd51 100644
--- a/macros/luatex/optex/base/unimath-codes.opm
+++ b/macros/luatex/optex/base/unimath-codes.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_ncharrmA {Uni math codes <2020-03-14>} % preloaded on demand by \loadmath
+\_codedecl \_ncharrmA {Uni math codes <2020-06-13>} % preloaded on demand by \loadmath
\_doc -----------------------------
The control sequences for `\alpha`, `\beta` etc are redefined here.
@@ -21,7 +21,8 @@
\varrho \varpi \_relax
\_doc -----------------------------
- The math alphabets are declared here using the \^`\_umathrange` macro.
+ The math alphabets are declared here using the
+ \^`\_umathrange {<range>}<class><family><starting-code>` macro.
\_cod -----------------------------
\_chardef\_ncharrmA=`A \_chardef\_ncharrma=`a
@@ -39,20 +40,20 @@
\_chardef\_ncharsxA="1D63C \_chardef\_ncharsxa="1D656
\_chardef\_ncharttA="1D670 \_chardef\_nchartta="1D68A
-\_protected\_def\_rmvariables {\_umathrange{A-Z}\_ncharrmA \_umathrange{a-z}\_ncharrma}
-\_protected\_def\_bfvariables {\_umathrange{A-Z}\_ncharbfA \_umathrange{a-z}\_ncharbfa}
-\_protected\_def\_nitvariables {\_umathrange{A-Z}\_ncharitA \_umathrange{a-z}\_ncharita}
-\_protected\_def\_bivariables {\_umathrange{A-Z}\_ncharbiA \_umathrange{a-z}\_ncharbia}
-\_protected\_def\_calvariables {\_umathrange{A-Z}\_ncharclA \_umathrange{a-z}\_ncharcla}
-\_protected\_def\_bcalvariables {\_umathrange{A-Z}\_ncharbcA \_umathrange{a-z}\_ncharbca}
-\_protected\_def\_frakvariables {\_umathrange{A-Z}\_ncharfrA \_umathrange{a-z}\_ncharfra}
-\_protected\_def\_bfrakvariables {\_umathrange{A-Z}\_ncharbrA \_umathrange{a-z}\_ncharbra}
-\_protected\_def\_bbvariables {\_umathrange{A-Z}\_ncharbbA \_umathrange{a-z}\_ncharbba}
-\_protected\_def\_sansvariables {\_umathrange{A-Z}\_ncharsnA \_umathrange{a-z}\_ncharsna}
-\_protected\_def\_bsansvariables {\_umathrange{A-Z}\_ncharbsA \_umathrange{a-z}\_ncharbsa}
-\_protected\_def\_isansvariables {\_umathrange{A-Z}\_ncharsiA \_umathrange{a-z}\_ncharsia}
-\_protected\_def\_bisansvariables {\_umathrange{A-Z}\_ncharsxA \_umathrange{a-z}\_ncharsxa}
-\_protected\_def\_ttvariables {\_umathrange{A-Z}\_ncharttA \_umathrange{a-z}\_nchartta}
+\_protected\_def\_rmvariables {\_umathrange{A-Z}71\_ncharrmA \_umathrange{a-z}71\_ncharrma}
+\_protected\_def\_bfvariables {\_umathrange{A-Z}71\_ncharbfA \_umathrange{a-z}71\_ncharbfa}
+\_protected\_def\_itvariables {\_umathrange{A-Z}71\_ncharitA \_umathrange{a-z}71\_ncharita}
+\_protected\_def\_bivariables {\_umathrange{A-Z}71\_ncharbiA \_umathrange{a-z}71\_ncharbia}
+\_protected\_def\_calvariables {\_umathrange{A-Z}71\_ncharclA \_umathrange{a-z}71\_ncharcla}
+\_protected\_def\_bcalvariables {\_umathrange{A-Z}71\_ncharbcA \_umathrange{a-z}71\_ncharbca}
+\_protected\_def\_frakvariables {\_umathrange{A-Z}71\_ncharfrA \_umathrange{a-z}71\_ncharfra}
+\_protected\_def\_bfrakvariables {\_umathrange{A-Z}71\_ncharbrA \_umathrange{a-z}71\_ncharbra}
+\_protected\_def\_bbvariables {\_umathrange{A-Z}71\_ncharbbA \_umathrange{a-z}71\_ncharbba}
+\_protected\_def\_sansvariables {\_umathrange{A-Z}71\_ncharsnA \_umathrange{a-z}71\_ncharsna}
+\_protected\_def\_bsansvariables {\_umathrange{A-Z}71\_ncharbsA \_umathrange{a-z}71\_ncharbsa}
+\_protected\_def\_isansvariables {\_umathrange{A-Z}71\_ncharsiA \_umathrange{a-z}71\_ncharsia}
+\_protected\_def\_bisansvariables {\_umathrange{A-Z}71\_ncharsxA \_umathrange{a-z}71\_ncharsxa}
+\_protected\_def\_ttvariables {\_umathrange{A-Z}71\_ncharttA \_umathrange{a-z}71\_nchartta}
\_chardef\_greekrmA="0391 \_chardef\_greekrma="03B1
\_chardef\_greekbfA="1D6A8 \_chardef\_greekbfa="1D6C2
@@ -61,20 +62,18 @@
\_chardef\_greeksnA="1D756 \_chardef\_greeksna="1D770
\_chardef\_greeksiA="1D790 \_chardef\_greeksia="1D7AA
-\_protected\_def\_nitgreek {\_umathrangeGREEK\_greekrmA \_umathrangegreek\_greekita}
-\_protected\_def\_rmgreek {\_umathrangeGREEK\_greekrmA \_umathrangegreek\_greekrma}
-\_protected\_def\_bfgreek {\_umathrangeGREEK\_greekbfA \_umathrangegreek\_greekbfa}
-\_protected\_def\_bigreek {\_umathrangeGREEK\_greekbfA \_umathrangegreek\_greekbia}
-\_protected\_def\_sansgreek {\_umathrangeGREEK\_greeksnA \_umathrangegreek\_greeksna}
-\_protected\_def\_isansgreek {\_umathrangeGREEK\_greeksnA \_umathrangegreek\_greeksia}
-
-% Another possibility (slanted capitals in \_nitgreek, \_bigreek, \_isansgreek):
-%\_protected\_def\_nitgreek {\_umathrangeGREEK\_greekitA \_umathrangegreek\_greekita}
-%\_protected\_def\_rmgreek {\_umathrangeGREEK\_greekrmA \_umathrangegreek\_greekrma}
-%\_protected\_def\_bfgreek {\_umathrangeGREEK\_greekbfA \_umathrangegreek\_greekbfa}
-%\_protected\_def\_bigreek {\_umathrangeGREEK\_greekbiA \_umathrangegreek\_greekbia}
-%\_protected\_def\_sansgreek {\_umathrangeGREEK\_greeksnA \_umathrangegreek\_greeksna}
-%\_protected\_def\_isansgreek {\_umathrangeGREEK\_greeksiA \_umathrangegreek\_greeksia}
+\_protected\_def\_itgreek {\_umathrangegreek71\_greekita}
+\_protected\_def\_rmgreek {\_umathrangegreek71\_greekrma}
+\_protected\_def\_bfgreek {\_umathrangegreek71\_greekbfa}
+\_protected\_def\_bigreek {\_umathrangegreek71\_greekbia}
+\_protected\_def\_bsansgreek {\_umathrangegreek71\_greeksna}
+\_protected\_def\_bisansgreek{\_umathrangegreek71\_greeksia}
+\_protected\_def\_itGreek {\_umathrangeGREEK71\_greekitA}
+\_protected\_def\_rmGreek {\_umathrangeGREEK71\_greekrmA}
+\_protected\_def\_bfGreek {\_umathrangeGREEK71\_greekbfA}
+\_protected\_def\_biGreek {\_umathrangeGREEK71\_greekbiA}
+\_protected\_def\_bsansGreek {\_umathrangeGREEK71\_greeksnA}
+\_protected\_def\_bisansGreek{\_umathrangeGREEK71\_greeksiA}
\_chardef\_digitrmO=`0
\_chardef\_digitbfO="1D7CE
@@ -83,12 +82,12 @@
\_chardef\_digitbsO="1D7EC
\_chardef\_digitttO="1D7F6
-\_protected\_def\_rmdigits {\_umathrange{0-9}\_digitrmO}
-\_protected\_def\_bfdigits {\_umathrange{0-9}\_digitbfO}
-\_protected\_def\_bbdigits {\_umathrange{0-9}\_digitbbO}
-\_protected\_def\_sansdigits {\_umathrange{0-9}\_digitsnO}
-\_protected\_def\_bsansdigits {\_umathrange{0-9}\_digitbsO}
-\_protected\_def\_ttdigits {\_umathrange{0-9}\_digitttO}
+\_protected\_def\_rmdigits {\_umathrange{0-9}71\_digitrmO}
+\_protected\_def\_bfdigits {\_umathrange{0-9}71\_digitbfO}
+\_protected\_def\_bbdigits {\_umathrange{0-9}71\_digitbbO}
+\_protected\_def\_sansdigits {\_umathrange{0-9}71\_digitsnO}
+\_protected\_def\_bsansdigits {\_umathrange{0-9}71\_digitbsO}
+\_protected\_def\_ttdigits {\_umathrange{0-9}71\_digitttO}
\_doc -----------------------------
The \`\cal`, \`\bbchar`, \`\frak`, \`\script`
@@ -99,8 +98,10 @@
You can redefine them again if you need different behavior (for example
you don't want to use sans serif bold in math). What to do:
\begtt \advance\hsize by2em
- \_protected\_def\_bf {\_tryloadbf\_tenbf \_inmath{\_bfvariables\_bfgreek\_bfdigits}}
- \_protected\_def\_bi {\_tryloadbi\_tenbi \_inmath{\_bivariables\_bigreek\_bfdigits}}
+ \_protected\_def\_bf
+ {\_tryloadbf\_tenbf \_inmath{\_bfvariables\_bfgreek\_bfGreek\_bfdigits}}
+ \_protected\_def\_bi
+ {\_tryloadbi\_tenbi \_inmath{\_bivariables\_bigreek\_bfGreek\_bfdigits}}
\_public \bf \bi ;
\endtt
\`\_inmath` `{<cmds>}` applies `<cmds>` only in math mode.
@@ -113,18 +114,21 @@
% \bf and \bi behaves as sans serif in math, ...
\_protected\_def\_rm {\_tryloadrm \_tenrm \_inmath{\_rmvariables \_rmdigits}}
-\_protected\_def\_it {\_tryloadit \_tenit \_inmath{\_nitvariables}}
-\_protected\_def\_bf {\_tryloadbf \_tenbf \_inmath{\_bsansvariables \_sansgreek \_bsansdigits}}
-\_protected\_def\_bi {\_tryloadbi \_tenbi \_inmath{\_bisansvariables \_isansgreek \_bsansdigits}}
+\_protected\_def\_it {\_tryloadit \_tenit \_inmath{\_itvariables}}
+\_protected\_def\_bf
+ {\_tryloadbf \_tenbf \_inmath{\_bsansvariables \_bsansgreek \_bsansGreek \_bsansdigits}}
+\_protected\_def\_bi
+ {\_tryloadbi \_tenbi \_inmath{\_bisansvariables \_bisansgreek \_bsansGreek \_bsansdigits}}
\_protected\_def\_tt {\_tryloadtt \_tentt \_inmath{\_ttvariables \_ttdigits}}
\_protected\_def\_bbchar {\_bbvariables \_bbdigits}
\_protected\_def\_cal {\_calvariables}
\_protected\_def\_frak {\_frakvariables}
-\_protected\_def\_misans {\_isansvariables \_isansgreek \_sansdigits}
-\_protected\_def\_mbisans {\_bisansvariables \_isansgreek \_bsansdigits}
+\_protected\_def\_misans {\_isansvariables \_sansdigits}
+\_protected\_def\_mbisans {\_bisansvariables \_bisansgreek \_bsansGreek \_bsansdigits}
\_protected\_def\_script {\_rmvariables \_fam4 }
+\_protected\_def\_mit {\_itvariables \_rmdigits \_itgreek \_rmGreek }
-\_public \rm \it \bf \bi \tt \bbchar \cal \frak \misans \mbisans \script ;
+\_public \rm \it \bf \bi \tt \bbchar \cal \frak \misans \mbisans \script \mit ;
\_doc -----------------------------
Each Unicode slot carries information about math type. This is saved in
@@ -181,7 +185,7 @@
\_global\_Udelcode`<=1 "027E8 % these characters have different meaning
\_global\_Udelcode`>=1 "027E9 % as normal and as delimeter
-\_nitgreek \_nitvariables \_rmdigits % default setting
+\_mit % default math alphapbets setting
\_Umathcode `- = 2 1 "2212
%\_Umathcode`: = 3 1 "3A % mathclass defines it as 6 1 "3A (punctuation)
@@ -231,6 +235,11 @@
\_let\|=\Vert
\_mathcode`\_="8000
+\_global\_Umathcode "22EF = 0 1 "22EF % mathclass.txt says that it is Rel
+\_global\_Umathchardef \unicodecdots = 0 1 "22EF
+
+\_global\_Umathcode `/ = 0 1 `/ % mathclass says that / is Bin, Plain TeX says that it is Ord.
+
\_doc -----------------------------
Aliases are declared here. They are names not menitioned in the `unimath-table.opm` file
but commonly used in \TeX.
@@ -254,7 +263,7 @@
\_let \gets=\leftarrow
\_let \mathring=\ocirc
\_let \lnot=\neg
-\_let \longdivision=\longdivisionsign
+\_let \longdivisionsign=\longdivision
\_let \backepsilon=\upbackepsilon
\_let \eth=\matheth
\_let \dbkarow=\dbkarrow
@@ -294,15 +303,18 @@
\_let \upvarpi=\mupvarpi
\_doc -----------------------------
- The \^`\not` macro is redefined here.
+ The \`\not` macro is redefined here. If the `\_not!<char>` is defined
+ (by \`\_negationof`)
+ then this macro is used. Else centered / is printed over the <char>.
\_cod -----------------------------
\_protected\_def\_not#1{%
- \_ifcsname _not!\_csstring#1\_endcsname \_csname _not!\_csstring#1\_endcsname
- \_else \_mathrel{\_mathord{\_rlap{\_kern1pt/}}\_mathord{#1}}%
- \_fi
-}
+ \_trycs{_not!\_csstring#1}{\_mathrel\_mathstyles{%
+ \_setbox0=\_hbox{\_math$\_currstyle#1$}%
+ \_hbox to\_wd0{\_hss$\_currstyle/$\_hss}\_kern-\_wd0 \_box0
+}}}
\_def\_negationof #1#2{\_ea\_let \_csname _not!\_csstring#1\_endcsname =#2}
+
\_negationof = \neq
\_negationof < \nless
\_negationof > \ngtr
@@ -314,6 +326,44 @@
\_negationof \greater \ngtr
\_negationof \forksnot \forks
\_negationof \in \notin
+\_negationof \mid \nmid
+\_negationof \cong \ncong
+\_negationof \leftarrow \nleftarrow
+\_negationof \rightarrow \nrightarrow
+\_negationof \leftrightarrow \nleftrightarrow
+\_negationof \Leftarrow \nLeftarrow
+\_negationof \Leftrightarrow \nLeftrightarrow
+\_negationof \Rightarrow \nRightarrow
+\_negationof \exists \nexists
+\_negationof \ni \nni
+\_negationof \paralel \nparalel
+\_negationof \sim \nsim
+\_negationof \approx \napprox
+\_negationof \equiv \nequiv
+\_negationof \asymp \nasymp
+\_negationof \lesssim \nlesssim
+\_negationof \ngtrsim \ngtrsim
+\_negationof \lessgtr \nlessgtr
+\_negationof \gtrless \ngtrless
+\_negationof \prec \nprec
+\_negationof \succ \nsucc
+\_negationof \subset \nsubset
+\_negationof \supset \nsupset
+\_negationof \subseteq \nsubseteq
+\_negationof \supseteq \nsupseteq
+\_negationof \vdash \nvdash
+\_negationof \vDash \nvDash
+\_negationof \Vdash \nVdash
+\_negationof \VDash \nVDash
+\_negationof \preccurlyeq \npreccurlyeq
+\_negationof \succcurlyeq \nsucccurlyeq
+\_negationof \sqsubseteq \nsqsubseteq
+\_negationof \sqsupseteq \nsqsupseteq
+\_negationof \vartriangleleft \nvartriangleleft
+\_negationof \vartriangleright \nvartriangleright
+\_negationof \trianglelefteq \ntrianglelefteq
+\_negationof \trianglerighteq \ntrianglerighteq
+\_negationof \vinfty \nvinfty
\_public \not ;
@@ -357,5 +407,8 @@ can define:
\_endinput
History:
+2020-06-13 Umathcode of / declared asi iin Plain TeX
+2020-06-07 \_itgreek \_itGreek, \_rmgreek \_rmGreek etc. introduced, names changed
+2020-06-03 \not\mid = \nmid added, \not corrected
2020-04-30 Bug fix: \phi, \varpi etc. were bad encoded
2020-04-09 Bug fix: \Udelcode`<, \Udelcode`> added
diff --git a/macros/luatex/optex/base/unimath-table.opm b/macros/luatex/optex/base/unimath-table.opm
index 511b67e8ce..066f57d352 100644
--- a/macros/luatex/optex/base/unimath-table.opm
+++ b/macros/luatex/optex/base/unimath-table.opm
@@ -1,6 +1,9 @@
%%^^A%% unicode-math-table.tex -- part of UNICODE-MATH <wspr.io/unicode-math>
%%^^A%% Source file of the math symbols.
+% Only \ddots, \adots and \vdots are called differently:
+% \unicodeddots, \unicodeadots and \unicodevdots
+
\UnicodeMathSymbol{"00021}{\mathexclam }{\mathclose}{exclamation mark}%
\UnicodeMathSymbol{"00023}{\mathoctothorpe }{\mathord}{number sign}%
\UnicodeMathSymbol{"00024}{\mathdollar }{\mathord}{dollar sign}%
@@ -563,10 +566,10 @@
\UnicodeMathSymbol{"022EB}{\nvartriangleright }{\mathrel}{not right triangle}%
\UnicodeMathSymbol{"022EC}{\ntrianglelefteq }{\mathrel}{not left triangle, equals}%
\UnicodeMathSymbol{"022ED}{\ntrianglerighteq }{\mathrel}{not right triangle, equals}%
-\UnicodeMathSymbol{"022EE}{\vdots }{\mathrel}{vertical ellipsis}%
+\UnicodeMathSymbol{"022EE}{\unicodevdots }{\mathrel}{vertical ellipsis}%
\UnicodeMathSymbol{"022EF}{\unicodecdots }{\mathord}{three dots, centered}%
-\UnicodeMathSymbol{"022F0}{\adots }{\mathrel}{three dots, ascending}%
-\UnicodeMathSymbol{"022F1}{\ddots }{\mathrel}{three dots, descending}%
+\UnicodeMathSymbol{"022F0}{\unicodeadots }{\mathrel}{three dots, ascending}%
+\UnicodeMathSymbol{"022F1}{\unicodeddots }{\mathrel}{three dots, descending}%
\UnicodeMathSymbol{"022F2}{\disin }{\mathrel}{element of with long horizontal stroke}%
\UnicodeMathSymbol{"022F3}{\varisins }{\mathrel}{element of with vertical bar at end of horizontal stroke}%
\UnicodeMathSymbol{"022F4}{\isins }{\mathrel}{small element of with vertical bar at end of horizontal stroke}%
diff --git a/macros/luatex/optex/base/verbatim.opm b/macros/luatex/optex/base/verbatim.opm
index 84d6d83ae5..c74338d2e2 100644
--- a/macros/luatex/optex/base/verbatim.opm
+++ b/macros/luatex/optex/base/verbatim.opm
@@ -120,7 +120,7 @@
number using `\_llap`.
\_cod ----------------------------
-\_eoldef \begtt#1{\_par \_wipeepar
+\_eoldef \begtt#1{\_par \_wipeepar \_setxhsize
\_vskip\_parskip \_ttskip
\_begingroup
\_setverb
@@ -213,7 +213,7 @@
\_else
\_edef\_vinolines{\_the\_tmpnum}%
\_fi
- \_vskip\_parskip \_ttskip \_wipeepar
+ \_vskip\_parskip \_ttskip \_wipeepar \_setxhsize
\_begingroup
\_ifnum\_ttline<-1 \_let\_printverblinenum=\_relax \_else \_initverblinenum \_fi
\_setverb \_adef{ }{\ }\_adef\^^I{\t}\_parindent=\_ttindent \_parskip=0pt