summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-09 22:01:07 +0000
committerKarl Berry <karl@freefriends.org>2021-02-09 22:01:07 +0000
commitfe491675252d9e6fe3ae6b1c67b198daed5cf936 (patch)
treeec846c8c711f8d0cdc9ab381f175d71746864a78 /Master/texmf-dist/tex/luatex
parent8790b9df74c6be439ccba2d4c53edfb57407ad6b (diff)
optex (9feb21)
git-svn-id: svn://tug.org/texlive/trunk@57691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm37
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/doc.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm6
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm5
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/if-macros.opm14
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/languages.opm24
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/makeindex.opm11
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/maketoc.opm49
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/math-macros.opm32
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/math-preload.opm24
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm6
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/more-macros.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/optex.ini2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/others.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/outlines.opm42
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/parameters.opm42
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/pdfuni-string.opm71
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/ref-file.opm14
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/references.opm5
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/sections.opm52
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/slides.opm6
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/table.opm19
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm40
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/unimath-table.opm3
-rw-r--r--Master/texmf-dist/tex/luatex/optex/base/verbatim.opm16
-rw-r--r--Master/texmf-dist/tex/luatex/optex/demo/op-demo.tex4
-rw-r--r--Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex2
28 files changed, 328 insertions, 206 deletions
diff --git a/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm
index 3f0f7a5c24e..4d465c30109 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \sdef {Basic macros for OpTeX <2021-01-08>} % loaded in format
+\_codedecl \sdef {Basic macros for OpTeX <2021-02-03>} % loaded in format
\_doc ------------------------------
\`\bgroup`, \`\egroup`, \`\empty`, \`\space`, \`\null` and \`\wlog`
@@ -12,31 +12,31 @@
\_def \_space { }
\_def \_null {\_hbox{}}
\_def \_wlog {\_immediate\_write-1 } % write on log file (only)
-
\_public \bgroup \egroup \empty \space \null \wlog ;
\_doc ------------------------------
- \`\ignoreit` ignores next token or `{<text>}`, \`\ignoresecond`
- uses first, ignores second parameter and \`\usesecond`
- ignores first, uses second parameter.
+ \`\ignoreit` ignores next token or `{<text>}`,
+ \`\useit``{<text>}` expands to `<text>` (removes outer braces),
+ \`\ignoresecond` uses first, ignores second parameter and
+ \`\usesecond` ignores first, uses second parameter.
\_cod ------------------------------
\_long\_def \_ignoreit #1{}
+\_long\_def \_useit #1{#1}
\_long\_def \_ignoresecond #1#2{#1}
\_long\_def \_usesecond #1#2{#2}
-
-\_public \ignoreit \ignoresecond \usesecond ;
+\_public \ignoreit \useit \ignoresecond \usesecond ;
\_doc ------------------------------
\`\bslash` is \"normal backslash" with category code 12.
- \`\nbb` and \`\pcent` are double backslash and normal~`%`,
- they should be used in Lua codes, for example.
+ \`\nbb` is double backslash
+ and \`\pcent` is normal~`%`.
+ They can be used in Lua codes, for example.
\_cod ------------------------------
\_edef \_bslash {\_csstring\\}
\_edef \_nbb {\_bslash\_bslash}
\_edef \_pcent{\_csstring\%}
-
\_public \bslash \nbb \pcent ;
\_doc ------------------------------
@@ -52,13 +52,12 @@
\_def \_sdef #1{\_ea\_def \_csname#1\_endcsname}
\_def \_sxdef #1{\_ea\_xdef \_csname#1\_endcsname}
\_def \_slet #1#2{\_ea\_let \_csname#1\_ea\_endcsname \_csname#2\_endcsname}
-
\_public \sdef \sxdef \slet ;
\_doc ------------------------------
\`\adef` `{<char>}{<body>}` puts the <char> as active character and defines it
as `{<body>}`. You can declare a macro with parameters too. For example
- `\adef @#1{...$1...}`.
+ `\adef @#1{...#1...}`.
\_cod ------------------------------
\_def \_adef #1{\_catcode`#1=13 \_begingroup \_lccode`\~=`#1\_lowercase{\_endgroup\_def~}}
@@ -73,7 +72,7 @@
\_cod ------------------------------
\_def \_cs #1{\_csname#1\_endcsname}
-\_def \_trycs#1#2{\_ifcsname #1\_endcsname \_csname #1\_endcsname \_else #2\_fi}
+\_def \_trycs#1#2{\_ifcsname #1\_endcsname \_csname #1\_ea\_endcsname \_else #2\_fi}
\_public \cs \trycs ;
\_doc ------------------------------
@@ -83,6 +82,15 @@
\_long\_def \_addto #1#2{\_ea\_def\_ea#1\_ea{#1#2}}
\_public \addto ;
+ \_doc -----------------------------
+ \`\incr``<counter>` increases `<counter>` by one globally.
+ \`\decr``<counter>` decreases `<counter>` by one globally.
+ \_cod -----------------------------
+
+\_def\_incr #1{\_global\_advance#1by1 }
+\_def\_decr #1{\_global\_advance#1by-1 }
+\_public \incr \decr ;
+
\_doc ------------------------------
\`\opwarning` `{<text>}` prints warning on the terminal and to the log file.
\_cod ------------------------------
@@ -101,7 +109,6 @@
\_tracingparagraphs=1 \_tracingrestores=1 \_tracingscantokens=1
\_tracingifs=1 \_tracinggroups=1 \_tracingassigns=1 }
\_def\_tracingall{\_tracingonline=1 \_loggingall}
-
\_public \loggingall \tracingall ;
\_doc ------------------------------
@@ -116,6 +123,8 @@
\_endcode % -------------------------------------
+2021-02-03: \useit defined.
+2021-01-22: \trycs: \ea added in order to be able to use cs with parameters
2021-01-08: \opwarning format changed (secondly, hope that conclusively)
2020-10-12: \opwarning: line numbers added
2020-02-14: introduced
diff --git a/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm b/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm
index 6327877fbe9..26a5b17bd44 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm
@@ -173,7 +173,7 @@
\_def\_nonumcitations{\_lastcitenum=0\_def\_sortcitesA{}\_def\_etalchar##1{$^{##1}$}%
\_def\_citelinkA##1{\_isdefined{_bim:##1}\_iftrue \_csname _bim:##1\_endcsname
- \_else ##1\_opwarning{\_noexpand\nonumcitations + empty bibmark. Maybe bad bib-style}\_fi}
+ \_else ##1\_opwarning{\_noexpand\nonumcitations + empty bibmark. Maybe bad bib-style}\_fi}%
}
\_def\_citelinkA{}
diff --git a/Master/texmf-dist/tex/luatex/optex/base/doc.opm b/Master/texmf-dist/tex/luatex/optex/base/doc.opm
index 9c979e9849a..ce571a9e812 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/doc.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/doc.opm
@@ -193,7 +193,7 @@
then use \code{\\_forwardlink\\`\\foo`}.
\_cod -----------------------------
-\_activettchar`
+\_verbchar`
\_def\`#1`{\_leavevmode\_edef\_tmp{\_csstring#1}\_iindex{\_tmp}%
\_ifcsname cs:\_tmp\_endcsname\_else \_dest[cs:\_tmp]\_fi
diff --git a/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm b/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm
index 69cf8909bca..9066d4fed5a 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \fontfam {Fonts selection system <2020-12-12>} % preloaded in format
+\_codedecl \fontfam {Fonts selection system <2020-01-27>} % preloaded in format
\_doc -----------------------------
\`\initunifonts` macro extends \LuaTeX's font capabalities,
@@ -19,10 +19,7 @@
\_def\_initunifonts {%
\directlua{%
require('luaotfload-main')
- print_bak = print
- print = function () end
luaotfload.main()
- print = print_bak % "print hack" until luaotfload will be corrected
}%
\_gdef\_rfskipatX ##1" ##2\_relax{"##1"}%
\_global\_let \_doresizefont=\_doresizeunifont
@@ -837,6 +834,7 @@ Luaotfload documentation for more information.
\endinput
+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
\_fontdecl -> \_famdecl with different concept
diff --git a/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm b/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm
index 6e123596c26..5fc8a32233b 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \ulink {Hyperlinks <2020-04-22>} % preloaded in format
+\_codedecl \ulink {Hyperlinks <2021-01-27>} % preloaded in format
\_doc ----------------------------
\`\dest``[<type>:<spec>]` creates a destination of internal links. The
@@ -88,7 +88,7 @@
\_let\_dest=\_destactive \_let\_link=\_linkactive
\_def\_ilink[##1]##2{\_link[##1]{\_localcolor#1}{##2}}%
\_def\_ulink[##1]##2{\_urlactive[url:##1]{\_localcolor#2}{##2}}%
- \_public \dest \ilink \ulink ;%
+ \_public \dest \ilink \ulink \link ;%
}
\_public \hyperlinks ;
@@ -152,5 +152,6 @@ of internal links are created at the same destination place:
\_endinput
+2021-01-27 \public \link added to \hyperlinks, bug fixed.
2020-04-22 \| in \url: bug fixed
2020-03-15 introduced \ No newline at end of file
diff --git a/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm
index 0e7e4015584..462e4960172 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \newif {Special if-macros, is-macros and loops <2020-05-22>} % preloaded in format
+\_codedecl \newif {Special if-macros, is-macros and loops <2021-02-03>} % preloaded in format
\_doc ----------------------------
\secc Classical \code{\\newif}
@@ -55,7 +55,7 @@
\_cod ----------------------------
\_long\_def \_loop #1\_repeat{\_def\_body{#1}\_iterate}
-\_def \loop #1\repeat{\_def\_body{#1}\_iterate}
+\_long\_def \loop #1\repeat{\_def\_body{#1}\_iterate}
\_let \_repeat=\_fi % this makes \loop...\if...\repeat skippable
\_let \repeat=\_fi
\_def \_iterate {\_body \_ea \_iterate \_fi}
@@ -93,7 +93,7 @@
\_def\_testparam#1#2#3\_iftrue{\_ifx###1\_empty\_ea\_finbody\_else}
\_def\_finbody#1\_finbody{}
-\_def\foreach #1\do#2#{\_isempty{#2}\_iftrue
+\_long\_def\foreach #1\do#2#{\_isempty{#2}\_iftrue
\_afterfi{\_foreachA{#1}{##1}}\_else\_afterfi{\_foreachA{#1}{#2}}\_fi}
\_doc -----------------------------
@@ -147,15 +147,18 @@
\_sxdef{_frnum:\_the\_forlevel\_ea}{\_the\_frnum}%
\_global\_slet{_fbody:\_the\_forlevel}{_fbody}%
\_fi
- \_global\_advance\_forlevel by1
+ \_incr\_forlevel
}}
\_def\_getforstack{\_immediateassigned{%
- \_global\_advance\_forlevel by-1
+ \_decr\_forlevel
\_ifnum\_forlevel>0
\_global\_slet{_fbody}{_fbody:\_the\_forlevel}%
\_global\_frnum=\_cs{_frnum:\_the\_forlevel}\_space
\_fi
}}
+\_ifx\_immediateassignment\_undefined % for compatibility with older LuaTeX
+ \_let\_immediateassigned=\_useit \_let\_immediateassignment=\_empty
+\_fi
\_doc ----------------------------
User can define own expandable \"foreach" macro by
@@ -301,6 +304,7 @@
\_endcode
+2021-02-03 public version of \loop and \foreach are \long
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
diff --git a/Master/texmf-dist/tex/luatex/optex/base/languages.opm b/Master/texmf-dist/tex/luatex/optex/base/languages.opm
index 52b52f775e7..ff9373b7202 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/languages.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/languages.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_mtext {Languages <2020-12-05>} % preloaded in format
+\_codedecl \_mtext {Languages <2021-01-21>} % preloaded in format
\_doc -----------------------------
Only four words are generated by \OpTeX/ macros: \"Chapter",
@@ -110,17 +110,20 @@
itself by \code{\\"{`"`}"}. This is the reason why the sub-verbatim mode is
used when the 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>"`.
+ The \`\_qqA``\_qqB<clqq><crqq>` runs \`\_qqB``<lqq><rqq><text>"`.\nl
+ The \`\_regquotes``\""<L><R>` does `\def\"#1"{<L>#1<R>}` for outlines but the `"`
+ separator is active (because `"` and `'` are active in \^`\pdfunidef`).
\_cod -----------------------------
\_def \_quoteschars #1#2#3#4{\_def\_altquotes{\_quoteschars#3#4#1#2}\_public\altquotes;%
\_protected\_def \"{\_qqA\_qqB#1#2}\_protected\_def \'{\_qqA\_qqC#3#4}%
- \_regmacro{}{}{\_def \"##1"{#1##1#2}\_def \'##1'{#3##1#4}}}
+ \_regmacro{}{}{\_regquotes\""#1#2\_regquotes\''#3#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}
+\_def\_regquotes#1#2#3#4{\_bgroup \_lccode`~=`#2\_lowercase{\_egroup \_def#1##1~}{#3##1#4}}
\_doc -----------------------------
Sometimes should be usable to leave the markup `"such"` or `'such'` i.e.~without
@@ -128,20 +131,10 @@
by the \`\activequotes` macro and leave quotes without the 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{\_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'}}}
-}
+\_def\_activequotes{\_let\_actqq=\"\_adef"{\_actqq}\_let\_actq=\'\_adef'{\_actq}%
+ \_regmacro{}{}{\_adef"{\"}\_adef'{\'}}}
\_public \quoteschars \activequotes \enquotes \csquotes \skquotes \frquotes \plquotes
\esquotes \grquotes \ruquotes \itquotes \dequotes ;
@@ -189,6 +182,7 @@
\_endcode % -------------------------------------
+2021-01-21 more robust quotes in outlines
2020-12-05 bib phrases moved here
2020-04-29 Obrazek -> Abbildung: bug fixed
2020-03-15 introduced
diff --git a/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm b/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm
index 22b09e396b8..8c58f7085c1 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \makeindex {Makeindex and sorting <2020-04-26>} % loaded in format
+\_codedecl \makeindex {Makeindex and sorting <2021-02-01>} % loaded in format
\_doc -----------------------------
\^`\makeindex` implements sorting algorithm at \TeX/ macro-language level.
@@ -68,7 +68,7 @@
The characters declared in `\_ignoredchars` are ignored in the first pass
without additional condition. All characters are taken into account in
- second pass: ASCII characters with code $\lq65$ are sorted first if they
+ second pass: ASCII characters with code $\string<65$ are sorted first if they
are not mentioned in the `\_sortingdata<iso-code>` macro.
Others not mentioned characters have undefined behavior during sorting.
\_cod -----------------------------
@@ -133,7 +133,7 @@
\_def \_act ##1{\_ifx##1\_relax \_else
\_ifx##1,\_else \_advance\_tmpnum by1 \_lccode`##1=\_tmpnum \_fi
\_ea\_act \_fi}%
- \_tmpnum=65 \_ea\_act \_sortingdata \_relax
+ \_tmpnum=64 \_ea\_act \_sortingdata \_relax
}
\_doc -----------------------------
@@ -401,8 +401,8 @@
All other variants of indexing macros expand internally to `\iindex`.
\_cod -----------------------------
-\_def\_iindex#1{\_isempty{#1}\_iffalse\_openref{\def~{ }%
- \edef\_act{\_noexpand\_wref\_noexpand\_Xindex{{#1}{\_iitypesaved}}}\_act}\_fi}
+\_def\_iindex#1{\_isempty{#1}\_iffalse
+ \_openref{\_def~{ }\_ewref\_Xindex{{#1}{\_iitypesaved}}}\_fi}
\_public \iindex ;
\_doc -----------------------------
@@ -457,5 +457,6 @@
\_endcode % -------------------------------------
+2021-02-01 secodary sorting: start from code 65
2020-04-21 \isempty \iffalse ... \fi added to \iindex
2020-03-26 introduced
diff --git a/Master/texmf-dist/tex/luatex/optex/base/maketoc.opm b/Master/texmf-dist/tex/luatex/optex/base/maketoc.opm
index 84e699d67df..8dfd821640a 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/maketoc.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/maketoc.opm
@@ -1,16 +1,17 @@
% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \maketoc {Macros for maketoc <2020-03-12>} % preloaded in format
+\_codedecl \maketoc {Macros for maketoc <2020-02-09>} % preloaded in format
\_doc ------------------------------------
- \`\_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>}`
+ \`\_Xtoc` `{<level>}{<type>}{<number>}{<o-title>}<title>` (in `.ref` file) reads
+ given data and appends them to the \`\_toclist` as
+ \^`\_tocline``{<level>}{<type>}{<number>}{<o-title>}{<title>}{<gpageno>}{<pageno>}`
where:
\begitems
* `<level>`: 0 reserved, 1: chapter, 2: section, 3: subsection
* `<type>`: the type of the level, i.e. chap, sec, secc
* `<number>`: the number of the chapter/section/subsection in the format 1.2.3
+ * `<o-title>`: outlines title, if differs from `<title>`.
* `<title>`: the title text
* `<gpageno>`: the page number numbered from 1 independently of pagination
* `<pageno>`: the page number used in the pagination
@@ -25,13 +26,13 @@
\_def\_toclist{}
\_newifi \_ifischap \_ischapfalse
-\_def\_Xtoc#1#2#3{\_ifnum#1=0 \_ischaptrue\_fi
- \_addto\_toclist{\_tocline{#1}{#2}{#3}}\_scantoeol\_XtocA}
+\_def\_Xtoc#1#2#3#4{\_ifnum#1=0 \_ischaptrue\_fi
+ \_addto\_toclist{\_tocline{#1}{#2}{#3}{#4}}\_scantoeol\_XtocA}
\_def\_XtocA#1{\_addto\_toclist{{#1}}\_ea\_addto\_ea\_toclist\_ea{\_currpage}}
\_doc ------------------------------------
- \`\_tocline``{<level>}{<type>}{<number>}{<title>}{<gpageno>}{<pageno>}` prints
- the record to the table of contents. It opens group, reduces `\_leftskip`,
+ \`\_tocline``{<level>}{<type>}{<number>}{<o-title>}{<title>}{<gpageno>}{<pageno>}`
+ prints the record to the table of contents. It opens group, reduces `\_leftskip`,
`\_rightskip`, runs the \^`\everytocline` (user can customise the design of TOC
here) and runs `\_tocl:<level> {<number>}{<title>}{<pageno>}` macro.
This macro starts with vertical mode,
@@ -53,15 +54,15 @@
\_cod ------------------------------------
\_newcount \_tocrefnum
-\_def\_tocline#1#2#3#4#5#6{%
+\_def\_tocline#1#2#3#4#5#6#7{%
\_advance\_tocrefnum by1
\_bgroup
\_leftskip=\_iindent \_rightskip=2\_iindent
\_ifischap \_advance\_leftskip by \_iindent \_fi
- \_def\_pgn{\_ilink[pg:#5]}%
+ \_def\_pgn{\_ilink[pg:#6]}%
\_the\_everytocline
\_ifcsname _tocl:#1\_endcsname
- \_cs{_tocl:#1}{#3}{\_scantextokens{#4}}{#6}\_par
+ \_cs{_tocl:#1}{#3}{\_scantextokens{#5}}{#7}\_par
\_fi
\_egroup
}
@@ -96,6 +97,29 @@
\_def\_tocpar{\_nobreak \_hskip-2\_iindent\_null \_par}
\_doc -----------------------------------
+ If you want a special formating of TOC with adding more
+ special lines (no generated as titles from `\chap`, `\sec`, `\secc`), you
+ can define `\addtotoc{<level>}{<type>}{<number>}{<o-title>}{<title>}` macro:
+ \begtt
+ \def\addtotoc#1#2#3#4#5{%
+ \incr\_tocrefnum
+ \_dest[toc:\_the\_tocrefnum]%
+ \_ewref\_Xtoc{{#1}{#2}{#3}{#4}#5}%
+ }
+ \endtt
+ and you can declare special lines (or something else)
+ as an unused level (10 in the following example):
+ \begtt
+ \sdef{_tocl:10}#1#2#3{\medskip\hbox{\Blue #2}\medskip}
+ \endtt
+ Now, users can add a blue line into TOC by
+ \begtt \catcode`\<=13
+ \addtotoc{10}{blue-line}{}{\relax}{<blue text to be added in the TOC>}
+ \endtt
+ anywhere in the document. Note that `\relax` in the fourth parameter
+ means that outline will be not generated. And second parameter
+ `blue-line` is only a comment (unused in macros).
+
\`\maketoc` prints warning if TOC data is empty, else it creates TOC by
running \^`\_toclist`
\_cod ----------------------------------
@@ -124,6 +148,7 @@
\_endcode
+2021-02-09 \thisoutline implemented
2020-04-23 \_tocpar introduced (incompatible change)
2020-04-22 \_pg -> \_pgn (incompatible change)
-2020-03-12 introduced \ No newline at end of file
+2020-03-12 introduced
diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
index a087d31c686..6d5278d5c2e 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \sin {Math macros plus mathchardefs <2020-06-13>} % preloaded in format
+\_codedecl \sin {Math macros plus mathchardefs <2021-02-04>} % preloaded in format
\_doc -----------------------------
The category code of the character `_` remains as the letter (11) and the mathocode
@@ -594,7 +594,7 @@
\_cod -----------------------------
\_protected\_def\_matrix#1{\_null\_thinsk
- \_edef\_stylenum{\_the\_numexpr\_mathstyle/2\_relax}%
+ \_edef\_tmpa{\_the\_numexpr \_mathstyle/4\_relax}% 0 0 1 1 1 1 2 2
\_vcenter{\_matrixbaselines\_math
\_ialign{\_the\_lmfil$\_matrixstyle##$\_hfil&&\_quad\_the\_lmfil$\_matrixstyle##$\_hfil\_crcr
\_mathstrut\_crcr\_noalign{\_kern-\_baselineskip}
@@ -602,22 +602,22 @@
\_def\_matrixbaselines{\_normalbaselines \_def\_matrixstyle{}%
\_let\_matrixbaselines=\_relax % \matrix inside matrix does not change size again
- \_ifcase\_stylenum \_or \_matrixscriptbaselines \_or \_matrixscriptbaselines
+ \_ifcase\_tmpa \_or
+ \_baselineskip=.7\_baselineskip \_def\_quad {\_hskip.7em\_relax}%
+ \_let\_matrixstyle=\_scriptstyle
\_or
- \_baselineskip=.5\_baselineskip
- \_def\_quad {\_hskip.5em\_relax}%
+ \_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 ;
\_doc -----------------------------
- The \`\cases` and `\bordermatrix` macros are identical from plain \TeX/.
+ The \`\cases` and \`\bordermatrix` macros are almost identical as in plain \TeX/.
+ You can simply re-define `\bordermatrix` with other delimiters
+ using the common \`\_bordermatrixwithdelims` macro.
\_cod -----------------------------
\_protected\_long\_def\_cases#1{\_left\{\_thinsk\_vcenter{\_normalbaselines\_math
@@ -625,13 +625,14 @@
\_newdimen\_ptrenwd
\_ptrenwd=8.75pt % width of the big left (
-\_protected\_def\_bordermatrix#1{\_begingroup \_math
- \_setbox0=\_vbox{\_bordermatrixA #1\_stopbmatrix}%
+\_protected\_def\_bordermatrix{\_bordermatrixwithdelims()}
+\_def\_bordermatrixwithdelims#1#2#3{\_begingroup \_math
+ \_setbox0=\_vbox{\_bordermatrixA #3\_stopbmatrix}%
\_setbox2=\_vbox{\_unvcopy0 \_global\_setbox1=\_lastbox}%
\_setbox2=\_hbox{\_unhbox1 \_unskip\_global\_setbox1=\_lastbox}%
- \_setbox2=\_hbox{$\_kern\_wd1 \_kern-\_ptrenwd\_left(\_kern-\_wd1
+ \_setbox2=\_hbox{$\_kern\_wd1 \_kern-\_ptrenwd\_left#1\_kern-\_wd1
\_global\_setbox1=\_vbox{\_box1 \_kern.2em}%
- \_vcenter{\_kern-\_ht1 \_unvbox0 \_kern-\_baselineskip}\_thinsk\_right)$}%
+ \_vcenter{\_kern-\_ht1 \_unvbox0 \_kern-\_baselineskip}\_thinsk\_right#2$}%
\_null\_thicksk\_vbox{\_kern\_ht1 \_box2}\_endgroup}
\_def\_bordermatrixA #1\cr#2\_stopbmatrix{%
\_ialign{$##$\_hfil\_kern.2em\_kern\_ptrenwd&\_thinspace\_hfil$##$\_hfil
@@ -1054,7 +1055,10 @@
\_endcode %---------------------------------------------------
-2020=12-17 \box0->\hbox{\box0} in \_finphant and \_finsmash, see https://tex.stackexchange.com/questions/574997/
+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)
+2020-12-17 \box0->\hbox{\box0} in \_finphant and \_finsmash, see https://tex.stackexchange.com/questions/574997/
2020-06-14 \borermatrix, \cases corrected
2020-06-13 \adots introduced, \matrix smaller in T mode too.
2020-06-03 \notin corrected
diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm b/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm
index 7f6aaa6fdbb..0ec9abae2f7 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm
@@ -134,28 +134,34 @@
These parameters are given in the \`\ptmunit` unit, it is set to
1\`\ptunit` and it is set to 1\,pt by default.
\nl
- \`\_corrmsizes` should be used in the \^`\normalmath` and \^`\boldmath`
- macros if you need a size correction when a selected math family is
- loaded. It is similar to ex-height correction but for math fonts.
+ \`\_corrmsize` `<factor><space>` can be used just before
+ `\_loadmathfamily` or `\_setmathfamily`.
+ The `<factor>` is decimal number, it denotes
+ scale-factor \"size of loaded math font in `\textstyle` : size of text font".
+ You can use it in `\_normalmath` or `\_boldmath` macros if you want to do a
+ corrections (for example due to different ex-height in text and math
+ font). The `\_corrmsize` is applied only to one following
+ `\_loadmathfamily` or `\_setmathfamily`. If it is missing
+ then the `<factor>` is 1 for such math family (i.e.\ no size corrections).
\_cod -----------------------------
-\_def\_corrmsizes{\_ptmunit=1\_ptunit\_relax} % for corrections of sizes in diferent fomts
+\_def\_corrmsize#1 {\_ptmunit=#1\_ptunit} % for corrections of sizes in diferent fonts
-\_def\_loadmathfamily #1 #2 {\_chardef\_tmp#1\_corrmsizes
+\_def\_loadmathfamily #1 #2 {%
\_edef\_optsizesave{\_the\_optsize}%
\_optsize=\_sizemtext \_font\_mF=\_whichtfm{#2} at\_optsize \_textfont#1=\_mF
\_optsize=\_sizemscript \_font\_mF=\_whichtfm{#2} at\_optsize \_scriptfont#1=\_mF
\_optsize=\_sizemsscript \_font\_mF=\_whichtfm{#2} at\_optsize \_scriptscriptfont#1=\_mF
- \_optsize=\_optsizesave \_relax
+ \_optsize=\_optsizesave \_ptmunit=\_ptunit
}
-\_def\_setmathfamily #1 #2{\_let\_mF=#2\_chardef\_tmp#1\_corrmsizes
+\_def\_setmathfamily #1 #2{\_let\_mF=#2%
\_edef\_optsizesave{\_the\_optsize}%
\_optsize=\_sizemtext \_fontlet#2=#2 at\_optsize \_textfont#1=#2%
\_optsize=\_sizemscript \_fontlet#2=#2 at\_optsize \_scriptfont#1=#2%
\_optsize=\_sizemsscript \_fontlet#2=#2 at\_optsize \_scriptscriptfont#1=#2%
- \_optsize=\_optsizesave \_let#2=\_mF
+ \_optsize=\_optsizesave \_ptmunit=\_ptunit \_let#2=\_mF
}
-\_def\_setmathsizes[#1/#2/#3]{%
+\_def\_setmathsizes[#1/#2/#3]{\_ptmunit=\_ptunit
\_def\_sizemtext{#1\_ptmunit}\_def\_sizemscript{#2\_ptmunit}%
\_def\_sizemsscript{#3\_ptmunit}%
}
diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm b/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm
index f857deb1750..680da012d66 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm
@@ -118,7 +118,9 @@
If the math family 1 is loaded then the family 2 and 3 are set by the same
font because \TeX/ needs to read dimension information about generating
math formulae from these three math families. All information needed by
- \TeX/ is collected in single Unicode-math font.
+ \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.
\_cod -----------------------------
\_def\_umathname#1#2{"#1:\_mfontfeatures#2"}
@@ -132,7 +134,7 @@
\_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=\_optsizesave \_relax
+ \_optsize=\_optsizesave \_ptmunit=\_ptunit
}
\_doc -----------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm
index 406139b16fb..d5ce88c1a67 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm
@@ -214,7 +214,7 @@
The \`\catcode` primitive is redefined here. Why?
There is very common cases like \code{\\catcode`}`<something>`
or `\catcode"<number>` but these characters
- \code{\`} or \code{"} can be set as active (typically by `\activettchar` macro).
+ \code{\`} or \code{"} can be set as active (typically by `\verbchar` macro).
Nothing problematic happens if re-defined `\catcode` is used in this case.
If you really need primitive `\catcode` then you can use `\_catcode`.
diff --git a/Master/texmf-dist/tex/luatex/optex/base/optex.ini b/Master/texmf-dist/tex/luatex/optex/base/optex.ini
index 9a4aeace8e3..3826ccf0e19 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/optex.ini
+++ b/Master/texmf-dist/tex/luatex/optex/base/optex.ini
@@ -21,7 +21,7 @@
% OpTeX version
-\def\optexversion{Beta 0.19 Jan.2021}
+\def\optexversion{1.00 Feb.2021}
\def\fmtname{OpTeX}
% Engine testing:
diff --git a/Master/texmf-dist/tex/luatex/optex/base/others.opm b/Master/texmf-dist/tex/luatex/optex/base/others.opm
index d96edc4dba5..6ff15d4332f 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/others.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/others.opm
@@ -92,7 +92,7 @@
\_def\_lipsumload{{%
\_setbox0=\_vbox{\_tmpnum=0 % vertical mode during \input lipsum.ltd.tex
\_def\ProvidesFile##1[##2]{}%
- \_def\NewLipsumPar{\_advance\_tmpnum by1 \_sxdef{_lip:\_the\_tmpnum}}%
+ \_def\NewLipsumPar{\_incr\_tmpnum \_sxdef{_lip:\_the\_tmpnum}}%
\_opinput {lipsum.ltd.tex}%
\_global\_let\_lipsumload=\_empty
}}}
diff --git a/Master/texmf-dist/tex/luatex/optex/base/outlines.opm b/Master/texmf-dist/tex/luatex/optex/base/outlines.opm
index d1082f9580b..ad05c97edc3 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/outlines.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/outlines.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \outlines {PDF outlines <2020-03-12>} % preloaded in format
+\_codedecl \outlines {PDF outlines <2021-02-09>} % preloaded in format
\_def\_outlines#1{\_pdfcatalog{/PageMode/UseOutlines}\_openref
\_ifx\_toclist\_empty
@@ -16,13 +16,15 @@
\_toclist}% create outlines
\_fi
}
-\_def\_outlinesA#1#2#3#4#5#6{%
- \_advance\_count#1 by1
- \_ifcase#1\_or
- \_addoneol{_ol:\_the\_count0}\_or
- \_addoneol{_ol:\_the\_count0:\_the\_count1}\_or
- \_addoneol{_ol:\_the\_count0:\_the\_count1:\_the\_count2}\_or
- \_addoneol{_ol:\_the\_count0:\_the\_count1:\_the\_count2:\_the\_count3}\_fi
+\_def\_outlinesA#1#2#3#4#5#6#7{%
+ \_isequal{\relax}{#4}\_iffalse
+ \_advance\_count#1 by1
+ \_ifcase#1\_or
+ \_addoneol{_ol:\_the\_count0}\_or
+ \_addoneol{_ol:\_the\_count0:\_the\_count1}\_or
+ \_addoneol{_ol:\_the\_count0:\_the\_count1:\_the\_count2}\_or
+ \_addoneol{_ol:\_the\_count0:\_the\_count1:\_the\_count2:\_the\_count3}\_fi
+ \_fi
}
\_def\_addoneol#1{%
\_ifcsname #1\_endcsname
@@ -31,19 +33,21 @@
\_else \_sxdef{#1}{1}%
\_fi
}
-\_def\_outlinesB#1#2#3#4#5#6{%
- \_advance\_count#1 by1
- \_ifcase#1%
- \_tmpnum=\_trycs{_ol:\_the\_count0}{0}\_or
- \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1}{0}\_relax\_or
- \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1:\_the\_count2}{0}\_relax\_or
- \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1:\_the\_count2:\_the\_count3}{0}\_relax\_or
- \_tmpnum = 0\_relax\_fi
- \_pdfunidef\_tmp{#4}%
+\_def\_outlinesB#1#2#3#4#5#6#7{%
\_advance\_tocrefnum by1
- \_outlinesC{#1}{toc:\_the\_tocrefnum}{\_ifnum#1<\_outlinelevel\_space\_else-\_fi}{\_tmpnum}{\_tmp}%
+ \_isequal{\relax}{#4}\_iffalse
+ \_advance\_count#1 by1
+ \_ifcase#1%
+ \_tmpnum=\_trycs{_ol:\_the\_count0}{0}\_or
+ \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1}{0}\_relax\_or
+ \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1:\_the\_count2}{0}\_relax\_or
+ \_tmpnum=\_trycs{_ol:\_the\_count0:\_the\_count1:\_the\_count2:\_the\_count3}{0}\_relax\_or
+ \_tmpnum = 0\_relax\_fi
+ \_isempty{#4}\_iftrue \_pdfunidef\_tmp{#5}\_else \_pdfunidef\_tmp{#4}\_fi
+ \_outlinesC{toc:\_the\_tocrefnum}{\_ifnum#1<\_outlinelevel\_space\_else-\_fi}{\_tmpnum}{\_tmp}%
+ \_fi
}
-\_def\_outlinesC#1#2#3#4#5{\_pdfoutline goto name{#2} count #3#4{#5}\_relax}
+\_def\_outlinesC#1#2#3#4{\_pdfoutline goto name{#1} count #2#3{#4}\_relax}
\_newcount\_oulnum
\_def\_insertoutline#1{\_global\_advance\_oulnum by1
diff --git a/Master/texmf-dist/tex/luatex/optex/base/parameters.opm b/Master/texmf-dist/tex/luatex/optex/base/parameters.opm
index addc6e9b8e4..c8df6eec491 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/parameters.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/parameters.opm
@@ -166,7 +166,7 @@
The \`\picdir` tokens list can include a directory where image files
(loaded by `\inspic`) are saved. Empty `\picdir` (default value) means
that image files are in the current directory (or somewhere in the \TeX/
- system where \LuaTeX/can find them). If you set a non-empty value to
+ system where \LuaTeX/ can find them). If you set a non-empty value to
the `\picdir`, then it must end by `/` character, for example
`\picdir={img/}` means that there exists a directory `img` in your
current directory and the image files are stored here.
@@ -185,10 +185,10 @@
a nonzero value then the height is given, the width is calculated. If both
parameters are non-zero, the height and width are given and the aspect
ratio of the image is (probably) broken. We recommend setting these
- parameters locally in the group where `\inspic` is used in order to not
+ parameters locally in the group where \^`\inspic` is used in order to not
influence the dimensions of other images. But there exist many
situations you need to put the same dimensions to more images,
- so you can set this parameter only once before more `\inspic` macros.
+ so you can set this parameter only once before more \^`\inspic` macros.
\_cod -----------------------------
\_newdimen\_picwidth \_picwidth=0pt \_let\picw=\_picwidth
@@ -197,21 +197,21 @@
\_doc -----------------------------
The \`\everytt` is the token list used in
- `\begtt`...`\endtt` environment and
- in the verbatim group opened by `\verbinput` macro. You can include a
+ \^`\begtt`...\^`\endtt` environment and
+ in the verbatim group opened by \^`\verbinput` macro. You can include a
code which is processed inside the group after basic settings were done
On the other hand, it is processed before the scanner of verbatim text is started.
Your macros should influence scanner (catcode settings) or printing
process of the verbatim code or both.
- The code from the line immediately after `\begtt` is processed after
- the `\everytt`. This code should overwrite `\everytt` settings. Use
- `\everytt` for all verbatim environments in your document and use a code
- after `\begtt` locally only for this environment.
+ The code from the line immediately after \^`\begtt` is processed after
+ the \^`\everytt`. This code should overwrite \^`\everytt` settings. Use
+ \^`\everytt` for all verbatim environments in your document and use a code
+ after \^`\begtt` locally only for this environment.
The \`\everyintt` token list does similar work
but acts in the in-line verbatim
- text processed by a pair of `\activettchar` characters or by `\code{<text>}`.
+ text processed by a pair of \^`\verbchar` characters or by \^`\code``{<text>}`.
You can set `\everyintt={\Red}` for example if you want in-line verbatim
in red color.
\_cod -----------------------------
@@ -222,12 +222,12 @@
\_doc -----------------------------
The \`\ttline` is used
- in `\begtt`...`\endtt` environment or in the code
- printed by `\verbinput`. If `\ttline` is positive or zero, then the
+ in \^`\begtt`...\^`\endtt` environment or in the code
+ printed by \^`\verbinput`. If `\ttline` is positive or zero, then the
verbatim code has numbered lines from `\ttline+1`. The `\ttline`
register is re-set to a new value after a code piece is printed, so next
code pieces have numbered lines continuously. If `\ttline=-1`, then
- `\begtt`...`\endtt` lines are without numbers and `\verbinput` lines
+ \^`\begtt`...\^`\endtt` lines are without numbers and \^`\verbinput` lines
show the line numbers of inputted file. If `\ttline`\code{<-1}
then no line numbers are printed.
\_cod -----------------------------
@@ -237,8 +237,8 @@
\_doc -----------------------------
The \`\ttindent` gives default indentation
- of verbatim lines printed by `\begtt`...`\endtt` pair or by
- `\verbinput`.
+ of verbatim lines printed by \^`\begtt`...\^`\endtt` pair or by
+ \^`\verbinput`.
\nl
The \`\ttshift` gives the amount of shift of all verbatim lines to the right.
Despite the \^`\ttindent`, it does not shift the line numbers, only
@@ -283,13 +283,13 @@
\_public \hicolors ;
\_doc -----------------------------
- The default item mark used between `\begitems` and `\enditems` is the bullet.
+ The default item mark used between \^`\begitems` and \^`\enditems` is the bullet.
The \`\defaultitem` tokens list declares this default item mark.
\nl
The \`\everyitem` tokens list is applied in vertical mode
at the start of each item.
\nl
- The \`\everylist` tokens list is applied after the group is opened by
+ The \`\everylist` tokens list is applied after the group is opened by \^`\begitems`
\nl
The \`\ilevel` keeps the value of the current nesting level of the items list.
\nl
@@ -305,14 +305,14 @@
\_public \defaultitem \everyitem \everylist \listskipamount \ilevel ;
\_doc -----------------------------
- The `\tit` macro includes `\vglue`\`\titskip` above the title of the document.
+ The \^`\tit` macro includes `\vglue`\`\titskip` above the title of the document.
\_cod -----------------------------
\_newskip\_titskip \_titskip=40pt \_relax % \vglue above title printed by \tit
\_public \titskip ;
\_doc ----------------------------
- The `\begmulti` `\endmulti` pair creates more columns. The parameter
+ The \^`\begmulti` and \^`\endmulti` pair creates more columns. The parameter
\`\colsep` declares the space between columns. If $n$ columns are specified
then we have $n-1$ `\colseps` and $n$ columns in total `\hsize`. This
gives the definite result of the width of the columns.
@@ -358,7 +358,7 @@
\_public \everyii ;
\_doc -----------------------------
- The \`\everymnote` is used in the `\mnote` group before `\noindent` which
+ The \`\everymnote` is used in the \^`\mnote` group before `\noindent` which
immediately precedes marginal note text.
\nl
The \`\mnotesize` is the horizontal size of the marginal notes.
@@ -372,7 +372,7 @@
\_public \everymnote \mnotesize \mnoteindent ;
\_doc -----------------------------
- The `\table` parameters follow. The \`\thistable` tokens list
+ The \^`\table` parameters follow. The \`\thistable` tokens list
register should be used for giving an exception for only one `\table`
which follows. It should change locally other parameters of the `\table`.
It is reset to an empty list after the table is printed.
diff --git a/Master/texmf-dist/tex/luatex/optex/base/pdfuni-string.opm b/Master/texmf-dist/tex/luatex/optex/base/pdfuni-string.opm
index f9e28582d5c..25781ddfb4f 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/pdfuni-string.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/pdfuni-string.opm
@@ -1,23 +1,29 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \pdfunidef {PDFunicode strings for outlines <2020-03-12>} % preloaded in format
+\_codedecl \pdfunidef {PDFunicode strings for outlines <2021-02-08>} % preloaded in format
\_doc -----------------------------
- The \`\_octalprint` is a Lua script that prints the character code in the
- octal notation.
+ \`\_hexprint` is a command defined in Lua, that scans a number and expands
+ to its UTF-16 Big Endian encoded form for use in PDF hexadecimal strings.
\_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"))
- else
- local num=#1\_pcent256
- tex.print(string.format('\_pcent 03o\_nbb\_pcent03o',(#1-num)/256,num))
- end
+\bgroup
+\_catcode`\%=12
+\_gdef\_hexprint{\_directlua{
+ local num = token.scan_int()
+ if num < 0x10000 then
+ tex.print(string.format("%04X", num))
+ else
+ num = num - 0x10000
+ local high = bit32.rshift(num, 10) + 0xD800
+ local low = bit32.band(num, 0x3FF) + 0xDC00
+ tex.print(string.format("%04X%04X", high, low))
+ end
}}
+\egroup
\_doc -----------------------------
- \`\pdfunidef``\macro{<text>}` does more things than only converting to octal notation.
+ \`\pdfunidef``\macro{<text>}` does more things than only converting to hexadecimal PDF string.
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
@@ -26,11 +32,15 @@
Then \`\_removeoutbraces` converts `..{x}..` to `..x..`.
Finally, 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`.
+ `\directlua` chunk to print hexadecimal numbers in the macro \^`\_hexprint`.\nl
+ Characters for quotes (and separators for quotes) are activated by first
+ `\_scatextokens` and they are defined as the same non-active characters.
+ But `\_regoul` can change this definition.
\_cod -----------------------------
\_def\_pdfunidef#1#2{%
\_begingroup
+ \_catcodetable\_optexcatcodes \_adef"{"}\_adef'{'}%
\_the\_regoul \_relax % \_regmacro alternatives of logos etc.
\_ifx\_savedttchar\_undefined \_def#1{\_scantextokens{\_unexpanded{#2}}}%
\_else \_lccode`\;=\_savedttchar \_lowercase{\_prepinverb#1;}{#2}\fi
@@ -43,19 +53,17 @@
\_edef#1{\_detokenize\_ea{#1}}%
\_replstring#1{ }{{ }}% text text -> text{ }text
\_catcode`\\=12 \_let\\=\_bslash
- \_edef\_out{\\376\\377}%
+ \_edef\_out{<FEFF}
\_ea\_pdfunidefB#1^% text -> \_out in octal
\_ea
\_endgroup
- \_ea\_def\_ea#1\_ea{\_out}
+ \_ea\_def\_ea#1\_ea{\_out>}
}
\_def\_pdfunidefB#1{%
\_ifx^#1\_else
- \_tmpnum=`#1
- \_pdfunidefC{\_luaescapestring{#1}}%
+ \_edef\_out{\_out \_hexprint `#1}
\_ea\_pdfunidefB \_fi
}
-\_def\_pdfunidefC #1{\_edef\_out{\_out \\\_ea\_octalprint\_ea{\_the\_tmpnum}{#1}}}
\_def\_removeoutbraces #1#{#1\_removeoutbracesA}
\_def\_removeoutbracesA #1{\_ifx\_end#1\_else #1\_ea\_removeoutbraces\_fi}
@@ -91,22 +99,29 @@
\_endcode % --------------------------------
-There are only two encodings for PDF strings (used in PDFoutlines, PDFinfo
-, etc.). The first one is PDFDocEncoding which is one-byte encoding, but most
-Czech or Slovak characters are missing here.
+There are only two encodings for PDF strings (used in PDFoutlines, PDFinfo,
+etc.). The first one is PDFDocEncoding which is single-byte encoding, but it
+misses most international characters.
-The second encoding is PDFunicode encoding which is implemented in this file.
+The second encoding is Big Endian UTF-16 which is implemented in this file. It
+encodes a single character in either two or four bytes.
This encoding is \TeX/-discomfortable because it looks like
\begtt
-\376\377\000C\000v\000i\001\015\000e\000n\000\355\000\040\000j\000e\000\040
-\000z\000\341\000t\001\033\001\176
+<FEFF 0043 0076 0069 010D 0065 006E 00ED 0020 006A 0065 0020 007A 00E1 0074
+011B 017E 0020 0061 0020 0078 2208 D835DD44>
\endtt
-This example is the real encoding of the string "Cvičení je zátěž". You can see
-that this is UTF-16 encoding (two bytes per character) with two starting
-bytes FEFF. Moreover, each byte is encoded by three octal digits preceded by
-a backslash. The only exception is the visible ASCII character encoding: such
-a character is encoded by its real byte preceded by `\000`.
+This example shows a hexadecimal PDF string (enclosed in \code{<>} as opposed
+to the literal PDF string enclosed in `()`). In these strings each byte is
+represented by two hexadecimal characters (`0-9`, `A-F`). You can tell the
+encoding is UTF-16BE, becuase it starts with \"Byte order mark" `FEFF`. Each
+unicode character is then encoded in one or two byte pairs. The example string
+corresponds to the text \"Cvičení je zátěž a ${\rm x} ∈ 𝕄$". Notice the 4 bytes
+for the last character, $𝕄$. (Even the whitespace would be OK in a PDF file,
+because it should be ignored by PDF viewers, but \LuaTeX\ doesn't allow it.)
+\_endinput
+2021-02-08 \_octalprint -> \_hexprint
+2020-03-12 Released
diff --git a/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm b/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm
index fd7c1101d76..d594bf88c04 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/ref-file.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \openref {File for references <2020-02-14>} % preloaded in format
+\_codedecl \openref {File for references <2021-02-05>} % preloaded in format
\_doc --------------------------
The \`\_inputref` macro is used in `\everyjob`. It reads `\jobname.ref` file
@@ -34,7 +34,10 @@
the \`\_wref` `\<macro>{<data>}` is redefined in order to
save the line `\<macro><data>` to the `.ref` file using asynchronous
`\write` primitive. Finally, the `\_openref` destroys itself, because we
- need not open the file again.
+ need not open the file again.\nl
+ The `\_wref``<csname>{<params>}` does exactly `\write\_reffile{\string<csname><params>}`
+ in this case and \`\_ewref``<csname>{<params>}` does
+ `\write\_reffile{\string<csname><expanded-params>}`.
\_cod ---------------------
\_def\_openref {%
@@ -47,7 +50,8 @@
\_immediate\_write\_reffile {\_pcent\_pcent\_space OPTeX <\_optexversion> - REF file (#1)}%
\_immediate\_wref \Xrefversion{{\_REFversion}}%
}
-\def\openref{\_openref}
+\_def\_ewref #1#2{\_edef\_ewrefA{#2}\_ea\_wref\_ea#1\_ea{\_ewrefA}}
+\_def\openref{\_openref}
\_doc ----------------------
We are using the convention that the macros used in `.ref` file are named
@@ -65,7 +69,7 @@
versa.
\_cod ----------------------
-\_def\_REFversion{4} % actual version of .ref files in OpTeX
+\_def\_REFversion{5} % 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 +111,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>}
...
diff --git a/Master/texmf-dist/tex/luatex/optex/base/references.opm b/Master/texmf-dist/tex/luatex/optex/base/references.opm
index 27e4f8d632f..03c8f6955ca 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/references.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/references.opm
@@ -27,7 +27,7 @@
\_doc ----------------------------
\`\label``[<label>]` saves the decalred label to `\_lastlabel` and
\`\wlabel``{<text>}` uses the `\_lastlabel` and activates
- `\wref\_Xlabel{<label>}{<text>}`.
+ `\_wref\_Xlabel{<label>}{<text>}`.
\_cod ----------------------------
\_def\_label[#1]{\_isempty{#1}\_iftrue \_global\_let \_lastlabel=\_undefined
@@ -39,8 +39,7 @@
\_ifx\_lastlabel\_undefined \_else
\_dest[ref:\_lastlabel]%
\_printlabel\_lastlabel
- \_edef\_tmp{{\_lastlabel}{#1}}%
- \_ea\_wref \_ea\_Xlabel \_ea{\_tmp}%
+ \_ewref \_Xlabel {{\_lastlabel}{#1}}%
\_sxdef{_lab:\_lastlabel}{#1}\_sxdef{l0:\_lastlabel}{}%
\_global\_let\_lastlabel=\_undefined
\_fi
diff --git a/Master/texmf-dist/tex/luatex/optex/base/sections.opm b/Master/texmf-dist/tex/luatex/optex/base/sections.opm
index 66dc9cd9e08..5e50fa3b9fe 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/sections.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/sections.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \chap {Titles, chapters, sections, subsections <2020-03-28>} % preloaded in format
+\_codedecl \chap {Titles, chapters, sections, subsections <2021-02-09>} % preloaded in format
\_doc ---------------------------
We are using scaled fonts for titles
@@ -97,7 +97,8 @@
* `\_sectionlevel=1` -- chapters (used in `\chap`)
* `\_sectionlevel=2` -- sections (used in `\sec`)
* `\_sectionlevel=3` -- subsections (used in `\secc`)
- * `\_sectionlevel=4` -- subsubsections (unused by default)
+ * `\_sectionlevel=4` -- subsubsections (unused by default, see the
+ \ulink[http://petr.olsak.net/optex/optex-tricks.html\#seccc]{\OpTeX/ trick 0033})
\enditems
\_cod --------------------------
@@ -130,7 +131,6 @@
subsections <num>.<num>. On the other hand, if chapter is used in the
document then `\_chapnum>0` and sections have numbers` <num>.<num>`
and subsections have numbers `<num>.<num>.<num>`.
-
\_cod --------------------------
\_newcount \_chapnum % chapters
@@ -152,7 +152,6 @@
\_def \_thednum {(\_the\_dnum)}
\_def\_othe #1.{\_ifnum#1>0 \_the#1.\_fi}
-\_def\_incr #1{\_global\_advance#1by1 }
\_doc ----------------------------
The \`\notoc` and \`\nonum` prefixes are implemented by
@@ -204,12 +203,11 @@
\_doc ----------------------------
The \`\_printrefnum``[<pre>@<post>]` macro is used in `\_print*` macros.
- \nl
- The \`\_wtotoc` `{<level>}{<info>}{<ref-num>}{<title-text>}`
- macro expands its parameters and does \^`\_wref`.
Note that the `<tite-text>` is `\detokenize`d before `\_wref`, so the
problem of \"fragile macros" from old \LaTeX/ never occurs.
+ This fourth parameter is not delimited by `{...}` but by end of line.
+ This gives possibility to have unbalanced braces in inline verbatim in titles.
\_cod ----------------------------
\_def \_printrefnum [#1@#2]{\_leavevmode % we must be in horizontal mode
@@ -217,12 +215,20 @@
\_wlabel \_therefnum % references, if `\label[<label>]` is declared
\_ifnotoc \_else \_incr \_tocrefnum
\_dest[toc:\_the\_tocrefnum]%
- \_wtotoc{\_the\_sectionlevel}{\_secinfo}%
- {\_therefnum}{\_detokenize\_ea{\_savedtitle}}%
+ \_ewref\_Xtoc{{\_the\_sectionlevel}{\_secinfo}%
+ {\_therefnum}{\_theoutline}\_detokenize\_ea{\_savedtitle}}%
\_fi
+ \_gdef\_theoutline{}%
}
-\_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}}
+
+ \_doc -----------------------------
+ \`\thisoutline``{<text>}` saves text to the \`\_theoutline` macro.
+ \^`\_printrefnum` uses it and removes it.
+ \_cod -----------------------------
+
+\_def\_theoutline{}
+\_def\_thisoutline#1{\_gdef\_theoutline{#1}}
+\_public \thisoutline ;
\_doc -----------------------------
The \`\_abovetitle``{<penaltyA>}{<skipA>}` and \`\_belowtitle``{<skipB>}` pair
@@ -256,7 +262,7 @@
\_def\_nbpar{{\_interlinepenalty=10000\_endgraf}}
-\_protected\_def\_nl{\_hfil\_break}
+\_protected\_def\_nl{\_unskip\_hfil\_break}
\_regmacro {\_def\_nl{\_unskip\_space}} {\_def\_nl{\_unskip\_space}} {\_def\_nl{ }}
\_regmacro {\_def\nl{\_unskip\_space}} {\_def\nl{\_unskip\_space}} {\_def\nl{ }}
@@ -321,7 +327,10 @@
\_public \secl ;
\_doc -----------------------------
- The \`\caption``/<letter>` uses `\_<letter>num` counter.
+ The \`\caption``/<letter>` increases `\_<letter>num` counter,
+ edefines \`\_thecapnum` as `\_the<letter>num` and
+ defines \`\_thecaptitle` as language-dependent word using \^`\_mtext`,
+ runs the `\_everycaption<letter>` tokens register.
The group opened by `\caption` is finalized by first `\par` from
an empty line or from `\vskip` or from `\endinsert`.
The `\_printcaption<letter>` is called, it starts with
@@ -350,9 +359,9 @@
They switch to horizontal mode and use `\_wlabel\_thecapnum` (in order to
make reference and hyperlink destination) a they can use:
\begitems
- * `\_thecaptitle` ... expands to the word Table or Figure (depending on
- the current language).
- * `\_thecapnum` ... expands to `\the<letter>num` (caption number).
+ * \^`\_thecaptitle` ... expands to the word Table or Figure (depending on
+ the current language).
+ * \^`\_thecapnum` ... expands to `\the<letter>num` (caption number).
\enditems
\_cod -----------------------------
@@ -363,6 +372,15 @@
\_let \_printcaptionf = \_printcaptiont % caption of figures = caption of tables
\_doc -----------------------------
+ If you want to declare a new type of `\caption` with independent counter,
+ you can use following lines, where `\caption/a` for Algorithms are
+ declared:
+ \begtt
+ \let\_printcaptiona = \_printcaptionf \let\_everycaptiona = \_everycaptionf
+ \newcount\_anum \addto\_secx {\_anum=0 }
+ \def\_theanum {\_othe\_chapnum.\_the\_secnum.\_the\_anum}
+ \sdef{_mt:a:en}{Algorithm} \sdef{_mt:a:cs}{Algoritmus} % + your language...
+ \endtt
The default format of `\caption` text is a paragraph in block narrower by
`\_iindent` and with the last line is centered. This setting is done by
the \`\_narrowlastlinecentered` macro.
@@ -432,6 +450,8 @@
\_endcode % -------------------------------------
+2021-02-09 \thisoutline implemented
+2021-01-26 \_nl: \unskip added
2021-01-11 \secl introduced
2021-01-05 \_thednum printed in text mode in its both occurences.
2020-04-28 \_secfonts etc: \_boldify is last.
diff --git a/Master/texmf-dist/tex/luatex/optex/base/slides.opm b/Master/texmf-dist/tex/luatex/optex/base/slides.opm
index deba85c7466..5ee4346674a 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/slides.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/slides.opm
@@ -1,6 +1,6 @@
% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \slideshow {Slides style for OpTeX <2020-03-19>} % loaded on demand by \slides
+\_codedecl \slideshow {Slides style for OpTeX <2021-01-16>} % loaded on demand by \slides
\_doc -----------------------------
Default margins and design is declared here.
@@ -197,7 +197,7 @@
\_maxlayers=0
\_long\_def\_layersactive #1 #2\endlayers{%
- \_par\_egroup
+ \_par\_penalty0\_egroup
\_gdef\_layertext{#2}%
\_global\_maxlayers=#1
\_setbox\_slidepageB=\_vbox\_bgroup
@@ -232,3 +232,5 @@
The user manual of \OpTeX/ slides are in `op-slides.tex` file.
+2021-01-16 \layers at empty page raises error: problem fixed
+2020-03-19 slides introduced
diff --git a/Master/texmf-dist/tex/luatex/optex/base/table.opm b/Master/texmf-dist/tex/luatex/optex/base/table.opm
index 09ece437ea4..d6edaff20f7 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/table.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/table.opm
@@ -1,10 +1,10 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \table {Basic macros for OpTeX <2020-05-26>} % preloaded in format
+\_codedecl \table {Basic macros for OpTeX <2021-01-27>} % preloaded in format
\_doc -----------------------------
The result of the \`\table``{<declaration>}{<data>}` macro is inserted into
- `\_tablebox`. You can change default value if you want by
+ \`\_tablebox`. You can change default value if you want by
`\let\_tablebox=\vtop` or `\let\_tablebox=\relax`.
\_cod -----------------------------
@@ -95,7 +95,7 @@
work in special cases here like \code{`\{`} for example.
\_cod -----------------------------
-\_def\_tableB #1{\_egroup \_def\_tmpb{#1}%
+\_long\_def\_tableB #1{\_egroup \_def\_tmpb{#1}%
\_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}%
@@ -199,8 +199,8 @@
\_doc -----------------------------
The default \"declaration letters" `c`, `l`, `r` and `p` are declared
- by setting \`\tabdeclarec`, \`\tabdeclarel`, \`\tabdeclarer` and
- \`\paramtabdeclarep` macros. In general, define
+ by setting \`\_tabdeclarec`, \`\_tabdeclarel`, \`\_tabdeclarer` and
+ \`\_paramtabdeclarep` macros. In general, define
`\def\_tabdeclare<letter>{...}` for a non-parametric
letter and `\def\_paramtabdeclare<letter>{...}` for a letter with a parameter.
The double hash `##` must be in the definition, it is replaced by a real table item data.
@@ -269,8 +269,7 @@
\_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}
-\_def\_crlpD{\_global\_advance\_tmpnum by1
- \_edef\_tmpa{\_noexpand\_isinlist\_noexpand\_crlplist{,\_the\_tmpnum,}}%
+\_def\_crlpD{\_incr\_tmpnum \_edef\_tmpa{\_noexpand\_isinlist\_noexpand\_crlplist{,\_the\_tmpnum,}}%
\_tmpa\_iftrue \_kern-\_drulewidth \_tablinefil \_kern-\_drulewidth\_else\_hfil \_fi}
\_def\_tskip{\_afterassignment\_tskipA \_tmpdim}
@@ -296,7 +295,7 @@
\_public \mspan ;
\_doc -----------------------------
- The \`\vspan``{<number>}{<text>}` implementation is here.
+ The \`\vspan``<number>{<text>}` implementation is here.
We need to lower the box by
\begtt \catcode`\<=13
(<number>-1)*(\ht+\dp of \tabstrut) / 2.
@@ -305,7 +304,8 @@
then use braces.
\_cod -----------------------------
-\_def\_vspan#1#2{\_vtop to\_zo{\_hbox{\_lower \_dimexpr
+\_def\_vspan#1#2#{\_vspanA{#1#2}}
+\_def\_vspanA#1#2{\_vtop to\_zo{\_hbox{\_lower \_dimexpr
#1\_dimexpr(\_ht\_tstrutbox+\_dp\_tstrutbox)/2\_relax
-\_dimexpr(\_ht\_tstrutbox+\_dp\_tstrutbox)/2\_relax \_hbox{#2}}\_vss}}
\_public \vspan ;
@@ -511,6 +511,7 @@ after the second one.
\_endinput
+2021-01-27 \_tableB: \long\def added, \vspan syntax improved
2020-05-26 \eqbox implemented
2020-05-20 \colnum implemented.
\vspan implemented.
diff --git a/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm b/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm
index 21a9b1caebf..a52a9a02cb3 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_ncharrmA {Uni math codes <2020-11-13>} % preloaded on demand by \loadmath
+\_codedecl \_ncharrmA {Uni math codes <2021-02-03>} % preloaded on demand by \loadmath
\_doc -----------------------------
The control sequences for `\alpha`, `\beta` etc are redefined here.
@@ -158,7 +158,7 @@
}
\_catcode`#=14
\_everypar={\_setbox0=\_lastbox \_par \_p}
- \_input mathclass.opm
+ \_setbox0=\_vbox{\_input mathclass.opm }
\_endgroup
\_doc -----------------------------
@@ -170,7 +170,9 @@
\_begingroup % \input unimath-table.opm (it is a copy of unicode-math-table.tex):
\_def\UnicodeMathSymbol #1#2#3#4{%
- \_global\_Umathcharnumdef#2=\_Umathcodenum#1\_relax
+ \_ifnum#1=\_Umathcodenum#1 % the code isn't set by mathclass.opm
+ \_global\_Umathchardef#2=0 1 #1 \_global\_Umathcode#1=0 1 #1
+ \_else \_global\_Umathcharnumdef#2=\_Umathcodenum#1 \_fi
\_ifx#3\_mathopen \_gdef#2{\_Udelimiter 4 1 #1 }\_fi
\_ifx#3\_mathclose \_gdef#2{\_Udelimiter 5 1 #1 }\_fi
\_ifx#3\_mathaccent \_gdef#2{\_Umathaccent fixed 7 1 #1 }\_fi
@@ -187,10 +189,21 @@
\_mit % default math alphabets setting
+% hyphen character is transformed to minus:
\_Umathcode `- = 2 1 "2212
-%\_Umathcode`: = 3 1 "3A % mathclass defines it as 6 1 "3A (punctuation)
+
+% mathclass defines : as Punct, plain.tex as Rel, we keep mathclass,
+% i.e. there is difference from plain.tex, you can use $f:A\to B$.
+
\_let\{=\lbrace \_let\}=\rbrace
+% mathclas defines ! as Ord, plain.tex as Close
+\_Umathcode `! = 5 1 `! % keep plain.tex declaration
+\_Umathchardef \mathexclam = 5 1 `!
+% mathclas defines ? as Punct, plain.tex as Close
+\_Umathcode `? = 5 1 `? % keep plain.tex declaration
+\_Umathchardef \mathquestion = 5 1 `?
+
\_protected\_def \_sqrt {\_Uradical 1 "0221A }
\_protected\_def \_cuberoot {\_Uradical 1 "0221B }
\_protected\_def \_fourthroot {\_Uradical 1 "0221C }
@@ -241,6 +254,20 @@
\_global\_Umathcode `/ = 0 1 `/ % mathclass says that / is Bin, Plain TeX says that it is Ord.
+% compressed dots in S and SS styles (usable in \matrix when it is in T, S and SS style)
+\_protected\_def \vdots {\_relax \_ifnum \_mathstyle>3 \_unicodevdots \_else \_vdots \_fi}
+\_protected\_def \ddots {\_relax \_ifnum \_mathstyle>3 \_unicodeddots \_else \_ddots \_fi}
+\_protected\_def \adots {\_relax \_ifnum \_mathstyle>3 \_unicodeadots \_else \_adots \_fi}
+
+% Unicode superscripts (²) and subscripts as simple macros with \mathcode"8000
+\_bgroup
+ \_def\_tmp#1#2{\_global\_mathcode#1="8000 \_lccode`\~=#1 \_lowercase{\_gdef~}{#2}}
+ \_fornum 0..1 \_do {\_tmp{"207#1}{{^#1}}}
+ \_tmp{"B2}{{^2}}\_tmp{"B3}{{^3}}
+ \_fornum 4..9 \_do {\_tmp{"207#1}{{^#1}}}
+ \_fornum 0..9 \_do {\_tmp{"208#1}{{_#1}}}
+\_egroup
+
\_doc -----------------------------
Aliases are declared here. They are names not mentioned in the `unimath-table.opm` file
but commonly used in \TeX.
@@ -379,7 +406,7 @@
\ldotp \cdotp \bullet \triangleleft \trianglerigt \mapstochar \rightarrow
\prime \lhook \rightarrow \leftarrow \rhook \triangleright \triangleleft
\Relbar \Rightarrow \relbar \rightarrow \Leftarrow \mapstochar
- \longrightarrow \Longleftrightarrow \vdots \ddots ;
+ \longrightarrow \Longleftrightarrow \unicodevdots \unicodeddots \unicodeadots ;
\_endcode
@@ -398,6 +425,9 @@ for technical details about Unicode-math.
\_endinput
History:
+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.
2020-11-13 Bug fix: \colon declared
2020-06-13 Umathcode of / declared as in Plain TeX
2020-06-07 \_itgreek \_itGreek, \_rmgreek \_rmGreek etc. introduced, names changed
diff --git a/Master/texmf-dist/tex/luatex/optex/base/unimath-table.opm b/Master/texmf-dist/tex/luatex/optex/base/unimath-table.opm
index 066f57d3525..252c1fc26ac 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/unimath-table.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/unimath-table.opm
@@ -3,6 +3,7 @@
% Only \ddots, \adots and \vdots are called differently:
% \unicodeddots, \unicodeadots and \unicodevdots
+% \mathquestion: Ord -> Close (because plain.tex declares it as Close)
\UnicodeMathSymbol{"00021}{\mathexclam }{\mathclose}{exclamation mark}%
\UnicodeMathSymbol{"00023}{\mathoctothorpe }{\mathord}{number sign}%
@@ -20,7 +21,7 @@
\UnicodeMathSymbol{"0003C}{\less }{\mathrel}{less-than sign r:}%
\UnicodeMathSymbol{"0003D}{\equal }{\mathrel}{equals sign r:}%
\UnicodeMathSymbol{"0003E}{\greater }{\mathrel}{greater-than sign r:}%
-\UnicodeMathSymbol{"0003F}{\mathquestion }{\mathord}{question mark}%
+\UnicodeMathSymbol{"0003F}{\mathquestion }{\mathclose}{question mark}%
\UnicodeMathSymbol{"00040}{\mathatsign }{\mathord}{commercial at}%
\UnicodeMathSymbol{"0005B}{\lbrack }{\mathopen}{left square bracket}%
\UnicodeMathSymbol{"0005C}{\backslash }{\mathord}{reverse solidus}%
diff --git a/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm b/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm
index dc701c96eba..8fd20ee5317 100644
--- a/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm
+++ b/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \begtt {Verbatim <2020-11-13>} % preloaded in format
+\_codedecl \begtt {Verbatim <2021-01-22>} % preloaded in format
\_doc ----------------------------
The internal parameters
@@ -59,13 +59,13 @@
\_def\_setverb{\_catcodetable\_verbatimcatcodes }%
\_doc ----------------------------
- \`\activettchar``<char>` saves original catcode of previously declared `<char>` (if
+ \`\verbchar``<char>` saves original catcode of previously declared `<char>` (if
such character was declared) using \`\_savedttchar` and \`\_savedttcharc`
values. Then new such values are stored. The declared character is activated
by `\_adef` as a macro (active character) which opens a group,
does `\_setverb` and other settings and reads its parameter until second the same
character. This is done by the \`\_readverb` macro. Finally, it prints scanned
- `<text>` by \^`\_printinverbatim` and closes group. Suppose that `\activettchar"` is
+ `<text>` by \^`\_printinverbatim` and closes group. Suppose that `\verbchar"` is
used. Then the following work is schematically done:
\begtt
\_def "{\_begingroup \_setverb ... \_readverb}
@@ -75,14 +75,15 @@
deactivates it.
\_cod ----------------------------
-\_def\_activettchar#1{%
+\_def\_verbchar#1{%
\_ifx\_savedttchar\_undefined\_else \_catcode\_savedttchar=\_savedttcharc \_fi
\_chardef\_savedttchar=`#1
\_chardef\_savedttcharc=\_catcode`#1
\_adef{#1}{\_begingroup \_setverb \_adef{ }{\_dsp}\_ttfont \_the\_everyintt\_relax \_readverb}%
\_def\_readverb ##1#1{\_printinverbatim{##1}\_endgroup}%
}
-\_public \activettchar ;
+\_let \_activettchar=\_verbchar % for backward compatibility
+\_public \verbchar \activettchar ;
\_doc ----------------------------
\`\begtt` is defined only as public. We don't need a private `\_begtt` variant.
@@ -158,7 +159,7 @@
\_cod ----------------------------
\_def\_printverb #1^^J#2{%
- \_ifx\_printverblinenum\_relax \_else \_global\_advance\_ttline by1 \_fi
+ \_ifx\_printverblinenum\_relax \_else \_incr\_ttline \_fi
\_testcommentchars #1\_relax\_relax\_relax
\_iftrue
\_ifx\_end#2 \_printcomments\_fi
@@ -269,7 +270,7 @@
\_ttskip
\_isnextchar\_par{}{\_noindent}%
}
-\_def\_vireadline{\_read\_vifile to \_tmp \_global\_advance\_viline by1 }
+\_def\_vireadline{\_read\_vifile to \_tmp \_incr\_viline }
\_def\_visaveline{\_ea\_addto\_ea\_tmpb\_ea{\_tmp}}
\_public \verbinput ;
@@ -362,6 +363,7 @@
\_endinput
History:
+2020-01-22 ... \activettchar changed to \verbchar
2020-12-30 ... \secc followed by \begtt must be unbreakable
2020-11-13 ... \commentchars implemented
2020-04-22 ... \ttshift introduced
diff --git a/Master/texmf-dist/tex/luatex/optex/demo/op-demo.tex b/Master/texmf-dist/tex/luatex/optex/demo/op-demo.tex
index c116682e59d..e17b2f0b2f7 100644
--- a/Master/texmf-dist/tex/luatex/optex/demo/op-demo.tex
+++ b/Master/texmf-dist/tex/luatex/optex/demo/op-demo.tex
@@ -6,7 +6,7 @@
\typosize[9/10.5] % 9pt font / 10.5pt baselineskip
\parindent=10pt % typesetting parameters
\hyperlinks \Blue\Blue % active hyperlinks
-\activettchar` % in-text verbatim by `...`
+\verbchar` % in-text verbatim by `...`
\everyintt={\Red} % in-text verbatim Red
\enquotes % use \"text" for English quotation
@@ -89,7 +89,7 @@ can be added if you need to refer to a figure.
\sec Verbatim
In-text verbatim is surrounded by the character declared
-by `\activettchar` sequence. The listing can be surrounded
+by `\verbchar` sequence. The listing can be surrounded
by `\begtt` and `\endtt` sequences
\begtt
This is verbatim.
diff --git a/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex b/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex
index 8c9bca24fc5..45b65fb6579 100644
--- a/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex
+++ b/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex
@@ -9,7 +9,7 @@
\hyperlinks\Blue\Blue % hyperlinks are used in the title page
\backgroundpic{op-slides-bg.png} % background picture
-\activettchar` % inline verbatim
+\verbchar` % inline verbatim
\enquotes % English quotes \"..."
\slideshow %------------------------------------------------------------