summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-20 21:25:16 +0000
committerKarl Berry <karl@freefriends.org>2020-03-20 21:25:16 +0000
commit09dc9d43b3c6fe632d71cef7cbd36c1f9bf238da (patch)
tree0f5f49db6030def159ee2add92a738cbee6c1442 /Master/texmf-dist/tex/luatex
parent3fa1d503478f8c0edf3a6a1e4b577820f5744509 (diff)
optex (20mar20)
git-svn-id: svn://tug.org/texlive/trunk@54430 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r--Master/texmf-dist/tex/luatex/optex/alloc.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/basics-macros.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/bib-iso690.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/bib-simple.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/cite-bib.opm1
-rw-r--r--Master/texmf-dist/tex/luatex/optex/colors.opm14
-rw-r--r--Master/texmf-dist/tex/luatex/optex/fams-ini.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/fnotes.opm19
-rw-r--r--Master/texmf-dist/tex/luatex/optex/fonts-catalog.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/fonts-opmac.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/fonts-preload.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/fonts-resize.opm4
-rw-r--r--Master/texmf-dist/tex/luatex/optex/fonts-select.opm19
-rw-r--r--Master/texmf-dist/tex/luatex/optex/graphics.opm146
-rw-r--r--Master/texmf-dist/tex/luatex/optex/hyperlinks.opm6
-rw-r--r--Master/texmf-dist/tex/luatex/optex/hyphen-lan.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/if-macros.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/languages.opm41
-rw-r--r--Master/texmf-dist/tex/luatex/optex/lists.opm5
-rw-r--r--Master/texmf-dist/tex/luatex/optex/logos.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/luatex-ini.opm4
-rw-r--r--Master/texmf-dist/tex/luatex/optex/makeindex.opm40
-rw-r--r--Master/texmf-dist/tex/luatex/optex/maketoc.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/margins.opm6
-rw-r--r--Master/texmf-dist/tex/luatex/optex/math-macros.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/math-preload.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/math-unicode.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/more-macros.opm (renamed from Master/texmf-dist/tex/luatex/optex/op-macros.opm)6
-rw-r--r--Master/texmf-dist/tex/luatex/optex/multicolumns.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/opmac-rest.opm65
-rw-r--r--Master/texmf-dist/tex/luatex/optex/optex.ini4
-rw-r--r--Master/texmf-dist/tex/luatex/optex/others.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/outlines.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/output.opm17
-rw-r--r--Master/texmf-dist/tex/luatex/optex/parameters.opm9
-rw-r--r--Master/texmf-dist/tex/luatex/optex/pdfuni-string.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/plain-macros.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/prefixed.opm3
-rw-r--r--Master/texmf-dist/tex/luatex/optex/ref-file.opm3
-rw-r--r--Master/texmf-dist/tex/luatex/optex/references.opm21
-rw-r--r--Master/texmf-dist/tex/luatex/optex/sections.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/slides.opm211
-rw-r--r--Master/texmf-dist/tex/luatex/optex/styles.opm9
-rw-r--r--Master/texmf-dist/tex/luatex/optex/table.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/uni-lcuc.opm2
-rw-r--r--Master/texmf-dist/tex/luatex/optex/unimath-codes.opm4
-rw-r--r--Master/texmf-dist/tex/luatex/optex/usebib.opm5
-rw-r--r--Master/texmf-dist/tex/luatex/optex/verbatim.opm13
48 files changed, 548 insertions, 173 deletions
diff --git a/Master/texmf-dist/tex/luatex/optex/alloc.opm b/Master/texmf-dist/tex/luatex/optex/alloc.opm
index 6ca5939ab1f..81d9e6606d7 100644
--- a/Master/texmf-dist/tex/luatex/optex/alloc.opm
+++ b/Master/texmf-dist/tex/luatex/optex/alloc.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \newdimen {Allocators for registers <2020-01-23>}
+\_codedecl \newdimen {Allocators for registers <2020-01-23>} % loaded in format
\_chardef\_maicount = 65535 % Max Allocation Index for counts registers in LuaTeX
\_let\_maidimen = \_maicount
diff --git a/Master/texmf-dist/tex/luatex/optex/basics-macros.opm b/Master/texmf-dist/tex/luatex/optex/basics-macros.opm
index 23b6a6a43c7..b86fd2e2e9b 100644
--- a/Master/texmf-dist/tex/luatex/optex/basics-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/basics-macros.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \sdef {Basic macros for OpTeX <2020-02-14>}
+\_codedecl \sdef {Basic macros for OpTeX <2020-02-14>} % loaded in format
\_doc ------------------------------
`\bgroup`, `\egroup`, `\empty`, `\space`, `\null` and `\wlog` are classical
diff --git a/Master/texmf-dist/tex/luatex/optex/bib-iso690.opm b/Master/texmf-dist/tex/luatex/optex/bib-iso690.opm
index 8f341330c6e..3265eaea05c 100644
--- a/Master/texmf-dist/tex/luatex/optex/bib-iso690.opm
+++ b/Master/texmf-dist/tex/luatex/optex/bib-iso690.opm
@@ -1,6 +1,6 @@
% This is part of OpTeX project, see http://petr.olsak.net/optex
-% bibliography style (iso690), version <2020-03-10>
+% bibliography style (iso690), version <2020-03-10>, loaded on demand by \usebib
\_ifx\_optexbibstyle\_undefined \_errmessage
{This file can be read by: \_string\usebib/? (iso690) bibfiles command only}
diff --git a/Master/texmf-dist/tex/luatex/optex/bib-simple.opm b/Master/texmf-dist/tex/luatex/optex/bib-simple.opm
index 46824cb81d7..347d90bb143 100644
--- a/Master/texmf-dist/tex/luatex/optex/bib-simple.opm
+++ b/Master/texmf-dist/tex/luatex/optex/bib-simple.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-% bibliography style (simple), version <2020-03-10>
+% bibliography style (simple), version <2020-03-10>, loaded on demand by \usebib
\_ifx\_optexbibstyle\_undefined \_errmessage
{This file can be read by: \_string\usebib/? (simple) bibfiles command only}
diff --git a/Master/texmf-dist/tex/luatex/optex/cite-bib.opm b/Master/texmf-dist/tex/luatex/optex/cite-bib.opm
index 505b18bb358..7f5b184d93a 100644
--- a/Master/texmf-dist/tex/luatex/optex/cite-bib.opm
+++ b/Master/texmf-dist/tex/luatex/optex/cite-bib.opm
@@ -187,6 +187,7 @@
\_def\_bibB[#1]{\_par \_bibskip
\_advance\_bibnum by1
\_noindent \_def\_tmpb{#1}\_wbib{#1}{\_the\_bibnum}{\_the\_bibmark}%
+ \_printlabel{#1}%
\_printbib \_ignorespaces
}
\_def\_wbib#1#2#3{\_dest[cite:\_the\_bibnum]%
diff --git a/Master/texmf-dist/tex/luatex/optex/colors.opm b/Master/texmf-dist/tex/luatex/optex/colors.opm
index 52dd349f5e8..c4ce83ecd91 100644
--- a/Master/texmf-dist/tex/luatex/optex/colors.opm
+++ b/Master/texmf-dist/tex/luatex/optex/colors.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \colordef {Colors <2020-03-07>}
+\_codedecl \colordef {Colors <2020-03-18>} % loaded in format
\_doc -----------------------------
We declare internal boolean value `\_iflocalcolor` ad do
@@ -107,7 +107,7 @@
\_cod -----------------------------
\_def\_rgbtocmyk #1 #2 #3 ;{%
- \_ea \_stripzeros \_directlua{
+ \_ea \_stripzeros \_detokenize \_ea{\_directlua{
local kr = math.max(#1,#2,#3)
if (kr==0) then
tex.print('0. 0. 0. 1 ;')
@@ -115,23 +115,23 @@
tex.print(string.format('\_pcent.3f \_pcent.3f \_pcent.3f \_pcent.3f ;',
(kr-#1)/kr, (kr-#2)/kr, (kr-#3)/kr, 1-kr))
end
-}}
+}}}
\_def\_cmyktorgb #1 #2 #3 #4 ;{%
- \_ea \_stripzeros \_directlua{
+ \_ea \_stripzeros \_detokenize \_ea{\_directlua{
local kr = 1-#4
tex.print(string.format('\_pcent.3f \_pcent.3f \_pcent.3f ;',
(1-#1)*kr, (1-#2)*kr, (1-#3)*kr))
-}}
+}}}
\_def\_colorcrop{\_directlua{
local m=math.max(color_C, color_M, color_Y, color_K)
if (m>1) then
color_C=color_C/m color_M=color_M/m color_Y=color_Y/m color_K=color_K/m
end
}}
-\_def\_colordefFin{\_colorcrop \_ea \_stripzeros \_directlua{
+\_def\_colordefFin{\_colorcrop \_ea \_stripzeros \_detokenize \_ea{\_directlua{
tex.print(string.format('\_pcent.3f \_pcent.3f \_pcent.3f \_pcent.3f ;',
color_C, color_M, color_Y, color_K))
-}}
+}}}
\_def\_douseK{\_colorcrop \_directlua{
kr=math.min(color_C, color_M, color_Y)
if (kr>=1) then
diff --git a/Master/texmf-dist/tex/luatex/optex/fams-ini.opm b/Master/texmf-dist/tex/luatex/optex/fams-ini.opm
index f9d3110f139..265150b1181 100644
--- a/Master/texmf-dist/tex/luatex/optex/fams-ini.opm
+++ b/Master/texmf-dist/tex/luatex/optex/fams-ini.opm
@@ -1,5 +1,7 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
+% Version <2020-02-28>. Loaded in format and secondly on demand by \fontfam[catalog]
+
\_famtext {Special name for printing a catalogue:}
\_faminfo [Catalogue] {Catalogue of all registered font families} {fonts-catalog} {}
diff --git a/Master/texmf-dist/tex/luatex/optex/fnotes.opm b/Master/texmf-dist/tex/luatex/optex/fnotes.opm
index 97982e7266e..9f9a9d3f5e1 100644
--- a/Master/texmf-dist/tex/luatex/optex/fnotes.opm
+++ b/Master/texmf-dist/tex/luatex/optex/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-11>}
+\_codedecl \fnote {Footnotes, marginal notes OpTeX <2020-03-19>} % loaded in format
\_doc -----------------------------
\begitems
@@ -36,9 +36,20 @@
\endtt
This code gives footnotes* and ** and*** and† etc.
and it supposes that there are no more than 6 footnotes at one page.
+
+ If you want to distinguish between footnote marks in the text and in the front of
+ footnote itself, then you can define `\_printfnotemarkA` and `\_printfnotemarkB`.
+ The following example shows an implementation of hyperlinked footnotes
+ (from text to footnote and bacward):
+ \begtt
+ \def\_printfnotemarkA{\ilink[fnB:\the\gfnotenum]{\_printfnotemark}\dest[fnA::\the\gfnotenum]}
+ \def\_printfnotemarkB{\ilink[fnA:\the\gfnotenum]{\_printfnotemark}\dest[fnB::\the\gfnotenum]}
+ \endtt
\_cod -----------------------------
-\_def \_printfnotemark {$^{\_fnotenum}$} % default fnote mark
+\_def \_printfnotemark {$^{\_fnotenum}$} % default footnote mark
+\_def \_printfnotemarkA {\_printfnotemark} % footnote marks used in text
+\_def \_printfnotemarkB {\_printfnotemark} % footnote marks used in front of footnotes
\_doc ----------------------------
Each footnote saves the `\_Xfnote` (without parameter) to the `.ref`
@@ -55,7 +66,7 @@
\_cod ----------------------------
\_def\_fnote{\_fnotemark1\_fnotetext}
-\_def\_fnotemark#1{{\_advance\_gfnotenum by#1\_advance\_lfnotenum by#1\relax \_printfnotemark}}
+\_def\_fnotemark#1{{\_advance\_gfnotenum by#1\_advance\_lfnotenum by#1\relax \_printfnotemarkA}}
\_doc ----------------------------
The `\_fnotetext` calls `\_opfootnote` which is equivalent to plain \TeX/
@@ -76,7 +87,7 @@
\_ifpgfnote \_ifcsname _fn:\_the\_gfnotenum \_endcsname \_else
\_opwarning{unknown \_noexpand\fnote mark. TeX me again}
\_fi\_fi
- \_opfootnote\_fnset\_printfnotemark
+ \_opfootnote\_fnset\_printfnotemarkB
}
\_def\_fnset{\_everypar={}\_the\_everyfnote \_scalemain \_typoscale[800/800]}
diff --git a/Master/texmf-dist/tex/luatex/optex/fonts-catalog.opm b/Master/texmf-dist/tex/luatex/optex/fonts-catalog.opm
index f9cd2af6df8..de45dd3dcfb 100644
--- a/Master/texmf-dist/tex/luatex/optex/fonts-catalog.opm
+++ b/Master/texmf-dist/tex/luatex/optex/fonts-catalog.opm
@@ -1,5 +1,7 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
+\_codedecl \_undefined {Font catalogue <2020-02-26>} % loaded on demand by \fontfam[catalog]
+
\_initunifonts
\_begingroup
diff --git a/Master/texmf-dist/tex/luatex/optex/fonts-opmac.opm b/Master/texmf-dist/tex/luatex/optex/fonts-opmac.opm
index c7a83389954..20d6d45bf39 100644
--- a/Master/texmf-dist/tex/luatex/optex/fonts-opmac.opm
+++ b/Master/texmf-dist/tex/luatex/optex/fonts-opmac.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \typosize {Font managing macros from OPmac <2019-05-21>}
+\_codedecl \typosize {Font managing macros from OPmac <2020-02-29>} % loaded in format
\_protected\_def \_typosize [#1/#2]{%
\_textfontsize{#1}\_mathfontsize{#1}\_setbaselineskip{#2}%
diff --git a/Master/texmf-dist/tex/luatex/optex/fonts-preload.opm b/Master/texmf-dist/tex/luatex/optex/fonts-preload.opm
index 704b665e9b2..49b1f226e21 100644
--- a/Master/texmf-dist/tex/luatex/optex/fonts-preload.opm
+++ b/Master/texmf-dist/tex/luatex/optex/fonts-preload.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \rm {Latin Modern fonts (EC) preloaded <2020-01-23>}
+\_codedecl \rm {Latin Modern fonts (EC) preloaded <2020-01-23>} % loaded in format
% Only few text fonts are preloaded:
diff --git a/Master/texmf-dist/tex/luatex/optex/fonts-resize.opm b/Master/texmf-dist/tex/luatex/optex/fonts-resize.opm
index 15f06661ff0..dbc5974852c 100644
--- a/Master/texmf-dist/tex/luatex/optex/fonts-resize.opm
+++ b/Master/texmf-dist/tex/luatex/optex/fonts-resize.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \setfontsize {Font resizing macros <2020-02-14>}
+\_codedecl \setfontsize {Font resizing macros <2020-03-17>} % preloaded in format
%% resizefont variant-name \fontswitch, for example \resizefont{bf}\_tenbf
@@ -81,7 +81,7 @@
% \fontdef \new {\<modifiers>\<var-selector>}
\_def \_fontdef #1#2{\_begingroup
\_ifx\_fontselector\_undefined \_def\_fontselector{#1}\_fi
- #2%
+ \_reloading #2%
\_ea \_keepmeaning \_fontselector \_endgroup
}
\_def\_fontlet#1#2{\_ifx #2=\_ea\_fontlet \_ea#1\_else
diff --git a/Master/texmf-dist/tex/luatex/optex/fonts-select.opm b/Master/texmf-dist/tex/luatex/optex/fonts-select.opm
index da010893332..eaadc0dedce 100644
--- a/Master/texmf-dist/tex/luatex/optex/fonts-select.opm
+++ b/Master/texmf-dist/tex/luatex/optex/fonts-select.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \fontfam {Fonts selection system <2020-02-14>}
+\_codedecl \fontfam {Fonts selection system <2020-03-18>} % preloaded in format
\_def\_initunifonts {%
\_ea\_newcount \_csname e@alloc@attribute@count\_endcsname
@@ -10,12 +10,15 @@
require('luaotfload-main') local _void = luaotfload.main ()
}%
\_gdef\_rfskipatX ##1" ##2\_relax{"##1"}%
- \_gdef\_doresizefont ##1{\_logfont{##1}%
- \_ifx\_fontnamegen\_undefined \_doresizetfmfont##1\_else
- \_font##1={\_fontnamegen} \_sizespec \_relax \_setwsp##1\_relax
- \_fi}%
- \_global\_let\_initunifonts=\_relax % we need not to do this work twice
- \_global\_let\initunifonts=\_relax
+ \_global\_let \_doresizefont=\_doresizeunifont
+ \_gdef\_tryloadtt {\_fontdef\_tentt{\def\_fontnamegen{[lmmono10-regular]}\_rm}}%
+ \_global\_let \_initunifonts=\_relax % we need not to do this work twice
+ \_global\_let \initunifonts=\_relax
+}
+\_gdef\_doresizeunifont #1{\_logfont{#1}%
+ \_ifx\_fontnamegen\_undefined \_doresizetfmfont#1\_else
+ \_font#1={\_fontnamegen} \_sizespec \_relax \_setwsp#1\_relax
+ \_fi
}
\_def\_fontdecl [#1]#2#3#4#5#6#7{%
\_initunifonts \_uniaccents
@@ -108,7 +111,7 @@
\_else
\_protected\_edef #1{\noexpand\_famdepend\noexpand#1{_f:\noexpand\_currfamily:\_tmp}}%
\_sdef{_f:\_currfamily:\_tmp}{#3#2}%
- \_def#3{\_fontdef#2{\_reloading#4}}%
+ \_def#3{\_fontdef#2{#4}}%
\_ifx#1\tt \addto#1{\_fam\_ttfam}\fi
\_sdef{_currvar:\csstring#2}{#1}%
\_fi
diff --git a/Master/texmf-dist/tex/luatex/optex/graphics.opm b/Master/texmf-dist/tex/luatex/optex/graphics.opm
index 2ce9ba76340..d4a868a3d1a 100644
--- a/Master/texmf-dist/tex/luatex/optex/graphics.opm
+++ b/Master/texmf-dist/tex/luatex/optex/graphics.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \inspic {Graphics <2020-02-29>}
+\_codedecl \inspic {Graphics <2020-03-18>} % preloaded in format
\_doc -----------------------------
`\inspic` accepts old syntax `\inspic <filename><space>`
@@ -14,18 +14,58 @@
write `\moveright\inspic ...` or something similar.
\_cod \_fin -----------------------
-\_def\_inspic{\hbox\bgroup\_isnextchar\_bgroup\_inspicB\_inspicA}
+\_def\_inspic{\_hbox\_bgroup\_isnextchar\_bgroup\_inspicB\_inspicA}
\_def\_inspicA #1 {\_inspicB {#1}}
\_def\_inspicB #1{%
\_pdfximage \_ifdim\_picwidth=0pt \_else width\_picwidth\_fi
\_ifdim\_picheight=0pt \_else height\_picheight\_fi
\_picparams {\_the\_picdir#1}%
- \_pdfrefximage\_pdflastximage\egroup}
+ \_pdfrefximage\_pdflastximage\_egroup}
\_def\_picparams{}
\_public \inspic ;
+ \_doc -----------------------------
+ Inkscape is able to save a picture to `*.pdf` file and labels for the ficture
+ to `*.pdf_tex` file. The second file is in \LaTeX/ format and it is intended to read
+ immediately it after `*.pdf` in included in order to place labels of this ficture in
+ the same font as document is printed.
+ We need to read this \LaTeX/ file by plain \TeX/ macros when `\inkinspic` is used.
+ These macros are stored in the `\_inkdefs` toknes list and it is used
+ localy in the group. The solution is borrowed from OPmac trick 0032.
+ \_cod -----------------------------
+
+\_def\_inkinspic{\_hbox\_bgroup\_isnextchar\_bgroup\_inkinspicB\_inkinspicA}
+\_def\_inkinspicA #1 {\_inkinspicB {#1}}
+\_def\_inkinspicB #1{%
+ \_ifdim\_picwidth=0pt \_setbox0=\_hbox{\_inspic{#1}}\_picwidth=\_wd0 \_fi
+ \_the\_inkdefs
+ \_opinput {\_the\_picdir #1_tex}% file with labels
+ \_egroup}
+
+\_newtoks\_inkdefs \_inkdefs={%
+ \_def\makeatletter#1\makeatother{}%
+ \_def\includegraphics[#1]#2{\_inkscanpage#1,page=,\_end \_inspic{#2}\_hss}%
+ \_def\_inkscanpage#1page=#2,#3\_end{\_ifx,#2,\_else\_def\_picparams{page#2}\_fi}%
+ \_def\put(#1,#2)#3{\_nointerlineskip\_vbox to0pt{\_vss\_hbox to0pt{\_kern#1\_picwidth
+ \_pdfsave\_hbox to0pt{#3}\_pdfrestore\_hss}\_kern#2\_picwidth}}%
+ \_def\begin#1{\_csname _begin#1\_endcsname}%
+ \_def\_beginpicture(#1,#2){\_vbox\_bgroup
+ \_hbox to\_picwidth{}\_kern#2\_picwidth \_def\end##1{\_egroup}}%
+ \_def\_begintabular[#1]#2#3\end#4{%
+ \_vtop{\_def\\{\_cr}\_tabiteml{}\_tabitemr{}\_table{#2}{#3}}}%
+ \_def\color[#1]#2{\_scancolor #2,}%
+ \_def\_scancolor#1,#2,#3,{\_pdfliteral{#1 #2 #3 rg}}%
+ \_def\makebox(#1)[#2]#3{\_hbox to0pt{\_csname _mbx:#2\_endcsname{#3}}}%
+ \_sdef{_mbx:lb}#1{#1\_hss}\_sdef{_mbx:rb}#1{\_hss#1}\_sdef{_mbx:b}#1{\_hss#1\_hss}%
+ \_sdef{_mbx:lt}#1{#1\_hss}\_sdef{_mbx:rt}#1{\_hss#1}\_sdef{_mbx:t}#1{\_hss#1\_hss}%
+ \_def\rotatebox#1#2{\_pdfrotate{#1}#2}%
+ \_def\lineheight#1{}%
+ \_def\setlength#1#2{}%
+}
+\_public \inkinspic ;
+
\_doc ----------------------------
`\pdfscale` and `\pdfrotate` macros are implemented by `\pdfsetmatrix`
primitive. or rotating we need to knos values of sin, cos function.
@@ -44,6 +84,104 @@
\_public \pdfscale \pdfrotate ;
-\_endcode % -------------------------------------
+ \_doc -----------------------------
+ The `\transformbox` is copied from OPmac trick 0046. The `\rotbox` is a
+ combination of `\rotsimple` from OPmac trick 0101 and `\transformbox`.
+ Note, that `\rotbox{-90}` puts the rotated text to the height of the outer
+ box (depth is zero) because code from `\rotsimple` is precessed.
+ But `\rotbox{-90.0}` puts the rotated text to
+ the depth of the outer box (height is zero) because `\transformbox` is
+ processed.
+ \_cod -----------------------------
+
+\_def\_multiplyMxV #1 #2 #3 #4 {% matrix * (vvalX, vvalY)
+ \_tmpdim = #1\_vvalX \_advance\_tmpdim by #3\_vvalY
+ \_vvalY = #4\_vvalY \_advance\_vvalY by #2\_vvalX
+ \_vvalX = \_tmpdim
+}
+\_def\_multiplyMxM #1 #2 #3 #4 {% currmatrix := currmatrix * matrix
+ \_vvalX=#1pt \_vvalY=#2pt \_ea\_multiplyMxV \_currmatrix
+ \_edef\_tmpb{\_ea\_ignorept\_the\_vvalX\_space \_ea\_ignorept\_the\_vvalY}%
+ \_vvalX=#3pt \_vvalY=#4pt \_ea\_multiplyMxV \_currmatrix
+ \_edef\_currmatrix{\_tmpb\_space
+ \_ea\_ignorept\_the\_vvalX\_space \_ea\_ignorept\_the\_vvalY\_space}%
+}
+\_def\_transformbox#1#2{\_hbox{\_setbox0=\_hbox{{#2}}%
+ \_dimendef\_vvalX 11 \_dimendef\_vvalY 12 % we use these variables
+ \_dimendef\_newHt 13 \_dimendef\_newDp 14 % only in this group
+ \_dimendef\_newLt 15 \_dimendef\_newRt 16
+ \_preptransform{#1}%
+ \_kern-\_newLt \_vrule height\_newHt depth\_newDp width0pt
+ \_setbox0=\_hbox{\_box0}\_ht0=0pt \_dp0=0pt
+ \_pdfsave#1\_rlap{\_box0}\_pdfrestore \_kern\_newRt}%
+}
+\_def\_preptransform #1{\_def\_currmatrix{1 0 0 1 }%
+ \_def\_pdfsetmatrix##1{\_edef\_tmpb{##1 }\_ea\_multiplyMxM \_tmpb\_unskip}%
+ \_let\pdfsetmatrix=\_pdfsetmatrix #1%
+ \_setnewHtDp 0pt \_ht0 \_setnewHtDp 0pt -\_dp0
+ \_setnewHtDp \_wd0 \_ht0 \_setnewHtDp \_wd0 -\_dp0
+ \_protected\_def \_pdfsetmatrix {\_pdfextension setmatrix}%
+ \_let\pdfsetmatrix=\_pdfsetmatrix
+}
+\_def\_setnewHtDp #1 #2 {%
+ \_vvalX=#1\_relax \_vvalY=#2\_relax \_ea\_multiplyMxV \_currmatrix
+ \_ifdim\_vvalX<\_newLt \_newLt=\_vvalX \_fi \_ifdim\_vvalX>\_newRt \_newRt=\_vvalX \_fi
+ \_ifdim\_vvalY>\_newHt \_newHt=\_vvalY \_fi \_ifdim-\_vvalY>\_newDp \_newDp=-\_vvalY \_fi
+}
+
+\_def\_rotbox#1#2{%
+ \_isequal{90}{#1}\_iftrue \_rotboxA{#1}{\_kern\_ht0 \_tmpdim=\_dp0}{\_vfill}{#2}%
+ \_else \_isequal{-90}{#1}\_iftrue \_rotboxA{#1}{\_kern\_dp0 \_tmpdim=\_ht0}{}{#2}%
+ \_else \_transformbox{\_pdfrotate{#1}}{#2}%
+ \_fi \_fi
+}
+\_def\_rotboxA #1#2#3#4{\_hbox{\_setbox0=\hbox{{#4}}#2%
+ \_vbox to\_wd0{#3\_wd0=0pt \_dp0=0pt \_ht0=0pt
+ \_pdfsave\_pdfrotate{#1}\_box0\_pdfrestore\vfil}%
+ \_kern\_tmpdim
+}}
+\_public \transformbox \rotbox ;
+ \_doc ---------------------------
+ The `\_scantwodimens` scans two objects with the syntactic rule <dimen>
+ and returns `{<number>}{<number>}` in sp unit.
+
+ The `\puttext <down> <right>{<text>}` puts the <text> to desired place:
+ From current point moves <down> and <right>, puts the <text> and returns
+ back. The cuuren tpoint is unchanged after this macro ends.
+
+ The `\putpic <down> <right> <width> <height> {<image-file>}`
+ does `\puttext` with the image scaled to desired <width> and <height>.
+ If <with> or <height> is zero, natural dimension is used.
+ The `\nospec` is a shortcut to such natural dimension.
+ \_cod ---------------------------
+
+\_def\_scantwodimens{%
+ \_directlua{tex.print(string.format('{\_pcent d}{\_pcent d}',
+ token.scan_dimen(),token.scan_dimen{}))}%
+}
+
+\_def\_puttext{\_ea\_ea\_ea\_puttextA\_scantwodimens}
+\_def\_puttextA#1#2#3{\_setbox0=\_hbox{{#3}}\_dimen1=#1sp \_dimen2=#2sp \_puttextB}
+\_def\_puttextB{%
+ \_ifvmode
+ \_ifdim\_prevdepth>0pt \_vskip-\_prevdepth \_relax \_fi
+ \_nointerlineskip
+ \_fi
+ \_wd0=0pt \_ht0=0pt \_dp0=0pt
+ \_vbox to0pt{\_kern\_dimen1 \_hbox to0pt{\_kern\_dimen2 \_box0\_hss}\_vss}}
+
+\_def\_putpic{\_ea\_ea\_ea\_putpicA\_scantwodimens}
+\_def\_putpicA#1#2{\_dimen1=#1sp \_dimen2=#2sp \_ea\_ea\_ea\_putpicB\_scantwodimens}
+\_def\_putpicB#1#2#3{\_setbox0=\_hbox{\_picwidth=#1sp \_picheight=#2sp \_inspic{#3}}\_puttextB}
+
+\_newbox\_bgbox
+\_def\_backgroundpic#1{%
+ \_setbox\_bgbox=\_hbox{\_picwidth=\_pdfpagewidth \_picheight=\_pdfpageheight \_inspic{#1}}%
+ \_pgbackground={\_copy\_bgbox}
+}
+\_def\nospec{0pt}
+\_public \puttext \putpic \backgroundpic ;
+
+\_endcode % -------------------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/hyperlinks.opm b/Master/texmf-dist/tex/luatex/optex/hyperlinks.opm
index 1cf48ac945e..02b33600bd5 100644
--- a/Master/texmf-dist/tex/luatex/optex/hyperlinks.opm
+++ b/Master/texmf-dist/tex/luatex/optex/hyperlinks.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \ulink {Hyperlinks <2020-02-22>}
+\_codedecl \ulink {Hyperlinks <2020-03-15>} % preloaded in format
\_newcount \_tocrefnum
@@ -73,8 +73,8 @@
\_cod ----------------------------
\_def\_pdfborder#1{\_if^#1^\_else \_isdefined{#1border}\_iftrue
- \_if^\_csname#1border\_endcsname^\_else
- attr{/C[\_csname#1border\_endcsname] /Border[0 0 .6]}\_fi
+ \_if^\_csname #1border\_endcsname^\_else
+ attr{/C[\_csname #1border\_endcsname] /Border[0 0 .6]}\_fi
\_else attr{/Border[0 0 0]}\_fi\_fi
}
diff --git a/Master/texmf-dist/tex/luatex/optex/hyphen-lan.opm b/Master/texmf-dist/tex/luatex/optex/hyphen-lan.opm
index 0dbdf181fb6..d8d035a7e0a 100644
--- a/Master/texmf-dist/tex/luatex/optex/hyphen-lan.opm
+++ b/Master/texmf-dist/tex/luatex/optex/hyphen-lan.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \langlist {Initialization of hypenation patterns <2019-05-21>}
+\_codedecl \langlist {Initialization of hypenation patterns <2020-03-10>} % preloaded in format
\_doc -----------------------------
The <iso-code> means a shortcut of language name (mostly by ISO 639-1).
diff --git a/Master/texmf-dist/tex/luatex/optex/if-macros.opm b/Master/texmf-dist/tex/luatex/optex/if-macros.opm
index d0423e5911e..5e56503bd87 100644
--- a/Master/texmf-dist/tex/luatex/optex/if-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/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-01-23>}
+\_codedecl \newif {Special if-macros, is-macros and loops <2020-02-27>} % preloaded in format
\_doc ----------------------------
The `\newif` macro works like in plain \TeX. It means that
diff --git a/Master/texmf-dist/tex/luatex/optex/languages.opm b/Master/texmf-dist/tex/luatex/optex/languages.opm
index b4d6f57d2af..5bfa2febdc3 100644
--- a/Master/texmf-dist/tex/luatex/optex/languages.opm
+++ b/Master/texmf-dist/tex/luatex/optex/languages.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_mtext {Languages <2020-02-14>}
+\_codedecl \_mtext {Languages <2020-03-15>} % preloaded in format
\_doc -----------------------------
Only three words are generated by \OpTeX/ macros: \"Chapter",
@@ -69,7 +69,44 @@
\_def\_today{\_mtext{today}}
\_public \today ;
+ \_doc -----------------------------
+ Quotes should be tagged by `\"<text>"` and `\'<text>'` if `\<iso-code>quotes`
+ is declared at beginning of the document. If not, then the control
+ sequences `\"` and `\'` are undefined. Remember, that they are used in
+ 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
+ <clqq>...<crqq> are normal quotes and <clq>...<crq> are alternative quotes.
+ or use `\altquotes` to swap between meaning of these two types of quotes.
+ \_cod -----------------------------
-\_endcode % -------------------------------------
+\_def \_enquotes {\_quoteschars “”‘’}
+\_def \_csquotes {\_quoteschars „“‚‘}
+\_def \_frquotes {\_quoteschars “”«»}
+\_let \_plquotes = \_frquotes
+\_let \_esquotes = \_frquotes
+\_let \_grquotes = \_frquotes
+\_let \_ruquotes = \_frquotes
+\_let \_itquotes = \_frquotes
+\_let \_skquotes = \_csquotes
+\_let \_dequotes = \_csquotes
+\_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}}
+ \_doc -----------------------------
+ Sometimes should be usable to leave the markup `"such"` or `'such'` i.e.~without
+ the first backslash. Then you can make the characters `"` and `'` active
+ by `\activequotes` macro and leave quotes without first backsash.
+ First, delare `\<iso-code>quotes`, then `\altwquotes` (if needed) and finally
+ `\activequotes`.
+ \_cod -----------------------------
+
+\def\_activequotes{\_ea\_activequotesA\"""\_ea\_activequotesA\'''}
+\def\_activequotesA#1#2#3{\_bgroup\_lccode`\~=`#3\_lowercase{\_egroup\_adef#3##1~{#1##1#2}}}
+
+\_public \quoteschars \activequotes \enquotes \csquotes \skquotes \frquotes \plquotes
+ \esquotes \grquotes \ruquotes \itquotes \dequotes ;
+
+\_endcode % -------------------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/lists.opm b/Master/texmf-dist/tex/luatex/optex/lists.opm
index 0b63409dce7..adc28a3617e 100644
--- a/Master/texmf-dist/tex/luatex/optex/lists.opm
+++ b/Master/texmf-dist/tex/luatex/optex/lists.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \begitems {Lists: begitems, enditems <2020-03-14>}
+\_codedecl \begitems {Lists: begitems, enditems <2020-03-18>} % preloaded in format
\_doc -----------------------------
`\aboveliskip` is used above the list of items,
@@ -32,6 +32,7 @@
\_itemnum=0 \_adef*{\_startitem}
\_advance\_leftskip by\_iindent
\_printitem=\_defaultitem
+ \_the\_everybegitems
}
\_def\_enditems{\_par\_egroup\_belowliskip}
@@ -58,7 +59,7 @@
\_sdef{_item:I}{\_uppercase\_ea{\_romannumeral\_itemnum}\_kern.5em}
\_sdef{_item:a}{\_athe\_itemnum) }
\_sdef{_item:A}{\_uppercase\_ea{\_athe\_itemnum}) }
-\_sdef{_item:x}{\_raise.3ex\_fullrectangle{.6ex} }
+\_sdef{_item:x}{\_raise.3ex\_fullrectangle{.6ex}\_kern.4em}
\_sdef{_item:X}{\_raise.2ex\_fullrectangle{1ex}\_kern.5em}
\_doc -----------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/logos.opm b/Master/texmf-dist/tex/luatex/optex/logos.opm
index 4465d56e9b4..59f1cd87f17 100644
--- a/Master/texmf-dist/tex/luatex/optex/logos.opm
+++ b/Master/texmf-dist/tex/luatex/optex/logos.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \TeX {Logos TeX, LuaTeX, etc. <2019-05-21>}
+\_codedecl \TeX {Logos TeX, LuaTeX, etc. <2020-02-28>} % preloaded in format
\_doc ----------------------------
Despite plain \TeX/ each macro for logos ends by `\ignoreslash`.
diff --git a/Master/texmf-dist/tex/luatex/optex/luatex-ini.opm b/Master/texmf-dist/tex/luatex/optex/luatex-ini.opm
index 872d808ee99..315836cab11 100644
--- a/Master/texmf-dist/tex/luatex/optex/luatex-ini.opm
+++ b/Master/texmf-dist/tex/luatex/optex/luatex-ini.opm
@@ -1,6 +1,6 @@
-%% This is part of SpTeX project, see http://petr.olsak.net/optex
+%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \pdfprimitive {LuaTeX initialization code <2020-01-23>}
+\_codedecl \pdfprimitive {LuaTeX initialization code <2020-02-21>} % preloaded in format
\_let\_pdfpagewidth \pagewidth
\_let\_pdfpageheight \pageheight
diff --git a/Master/texmf-dist/tex/luatex/optex/makeindex.opm b/Master/texmf-dist/tex/luatex/optex/makeindex.opm
index eae300dfba1..5f13f5ca5ae 100644
--- a/Master/texmf-dist/tex/luatex/optex/makeindex.opm
+++ b/Master/texmf-dist/tex/luatex/optex/makeindex.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \makeindex {Makeindex and sorting <2020-02-14>} % loaded in format
+\_codedecl \makeindex {Makeindex and sorting <2020-03-16>} % loaded in format
\_doc -----------------------------
`\makeindex` implements sorting algorithm at \TeX/ macrolanguage level.
@@ -104,9 +104,12 @@
\_ea\_let \_ea\_sortingdata \_csname _sortingdata\_sortinglang\endcsname
\_ea\_let \_ea\_compoundchars \_csname _compoundchars\_sortinglang\endcsname
\_ea\_let \_ea\_ignoredchars \_csname _ignoredchars\_sortinglang\endcsname
- \_ifx \_sortingdata\_relax \_let \_sortingdata = \_sortingdataen \fi
- \_ifx \_compoundchars\_relax \_let \_compoundchars = \_compoundcharsen \fi
- \_ifx \_ignoredchars\_relax \_let \_ignoredchars = \_ignoredcharsen \fi
+ \_ifx \_sortingdata\_relax \_addto\_nold{ sortingdata}%
+ \_let \_sortingdata = \_sortingdataen \fi
+ \_ifx \_compoundchars\_relax \_addto\_nold{ compoundchars}%
+ \_let \_compoundchars = \_compoundcharsen \fi
+ \_ifx \_ignoredchars\_relax \_addto\_nold{ ignoredchars}%
+ \_let \_ignoredchars = \_ignoredcharsen \fi
\_ifx \_compoundchars\_empty \_else
\_edef \_compoundchars {\_detokenize\_ea{\_compoundchars} }\_fi % all must be catcode 12
\_def \_act ##1{\_ifx##1\_relax \_else
@@ -247,7 +250,8 @@
\_newifi \_ifasciisorting \_asciisortingfalse
\_def\_dosorting #1{%
\begingroup
- \_ifx\_sotringlang\_undefined \_edef\_sortinglang{\_cs{_lan:\_the\_language}}\_fi
+ \_def\_nold{}%
+ \_ifx\_sotringlang\_undefined \_edef\_sortinglang{\_cs{_lan:\_the\_language}}\_fi
\_ifasciisorting
\_edef\_sortinglang{ASCII}%
\_def \_preparesorting##1{\_edef\_tmpb{\_ea\_ignorefirst\_csstring##1}}%
@@ -256,6 +260,7 @@
\_setprimarysorting
\_fi
\_message{OpTeX: Sorting \_string#1 (\_sortinglang) ...^^J}%
+ \_ifx\_nold\_empty\_else \_opwarning{Missing\_nold\_space for language (\_sortinglang)}\_fi
\_def \_act##1{\_preparesorting ##1\_edef##1{\_tmpb}}%
\_ea\_xargs \_ea\_act #1;%
\_def \_act##1{\_addto #1{##1,}}%
@@ -268,7 +273,7 @@
\_doc -----------------------------
The `\makeindex` prints the index. First, it sorts the `\_iilist`
second, it prints the sorted `\_iilist`, each item is printed
- using `\_printiitem`.
+ using `\_printindexitem`.
\_cod -----------------------------
\_def\_makeindex{\_par
@@ -295,7 +300,7 @@
\_ifcsname _\_csstring #1\_endcsname
\_ea\_ea\_ea \_printii \_csname _\_csstring #1\_endcsname &%
\_else
- \_ea\_printii \_ea\_ignorefirst \_csstring #1&%
+ \_ea\_ea\_ea\_printii \_ea\_ignorefirst \_csstring #1&%
\_fi
\_ea\_printiipages #1&
}
@@ -305,16 +310,27 @@
words in the form `<main-word>/<sub-word>/<sub-sub-word>`.
The `\everyii` tokens register is applied before `\noindent`. User can
declare something special here.
+
+ The `\_newiiletter{<letter>}` macro is empty by default. It is invoked if first
+ letter of index entries is changed. You can declare a design between
+ index entries here. You can try, for example:
+ \begtt
+ \def\_newiiletter#1#2{\bigskip\hbox{\setfontsize{at15pt}\bf\uppercase{#1}}\medskip}
+ \endtt
\_cod -----------------------------
-\_def\_printii #1&{\_gdef\_currii{#1}\_the\_everyii\_noindent
- \_hskip-\_iindent \_ignorespaces\_printiiA#1//}
+\_def\_printii #1#2&{%
+ \_ismacro\_lastii{#1}\_iffalse \_newiiletter{#1}{#2}\_def\_lastii{#1}\_fi
+ \_gdef\_currii{#1#2}\_the\_everyii\_noindent
+ \_hskip-\_iindent \_ignorespaces\_printiiA#1#2//}
\_def\_printiiA #1/{\_if^#1^\_let\_previi=\_currii \_else
\_ea\_scanprevii\_previi/&\_edef\_tmpb{\_detokenize{#1}}%
\_ifx\_tmpa\_tmpb \_iiemdash \_else#1 \_gdef\_previi{}\_fi
\_expandafter\_printiiA\_fi
}
\_def\_iiemdash{\_kern.1em---\_space}
+\_def\_lastii{}
+\_def\_newiiletter#1#2{}
\_def\_scanprevii#1/#2&{\_def\_previi{#2}\_edef\_tmpa{\_detokenize{#1}}}
\_def\_previi{} % previous index item
@@ -362,12 +378,14 @@
\_cod -----------------------------
\_def\_pgprint #1:#2{%
- \_ifx,#2,\_pgprintA{#1}\_returnfi \_fi
+ \_ifx ,#2,\_pgprintA{#1}\_returnfi \_fi
\_ifx b#2{\_bf \_pgprintA{#1}}\_returnfi \_fi
- \_ifx i#2{\_it \_pfprintA{#1}}\_returnfi \_fi
+ \_ifx i#2{\_it \_pgprintA{#1}}\_returnfi \_fi
+ \_ifx u#2\_pgu{\_pgprintA{#1}}\_returnfi \_fi
\_pgprintA{#1}\_relax
}
\_def\_pgprintA #1{\_ilink[pg:#1]{\_cs{_pgi:#1}}} % \ilink[pg:<gpageno>]{<pageno>}
+\_def\_pgu#1{\_leavevmode\_vtop{\_hbox{#1}\kern.3ex\_hrule}}
\_doc -----------------------------
The `\iindex{<word>}` puts one <word> to the index. It writes
diff --git a/Master/texmf-dist/tex/luatex/optex/maketoc.opm b/Master/texmf-dist/tex/luatex/optex/maketoc.opm
index 6589c66f728..6ab711657ec 100644
--- a/Master/texmf-dist/tex/luatex/optex/maketoc.opm
+++ b/Master/texmf-dist/tex/luatex/optex/maketoc.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \maketoc {Macros for maketoc <2020-02-14>}
+\_codedecl \maketoc {Macros for maketoc <2020-03-12>} % preloaded in format
\_doc ------------------------------------
`\_Xtoc{<level>}{<type>}{<number>}{<text>}` (in `.ref` file) reads the
diff --git a/Master/texmf-dist/tex/luatex/optex/margins.opm b/Master/texmf-dist/tex/luatex/optex/margins.opm
index 9503bc3940a..72c769f672a 100644
--- a/Master/texmf-dist/tex/luatex/optex/margins.opm
+++ b/Master/texmf-dist/tex/luatex/optex/margins.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \margins {Macros for margins setting <2019-05-21>}
+\_codedecl \margins {Macros for margins setting <2020-03-14>} % preloaded in format
\_newdimen\_pgwidth \_newdimen\_pgheight \_pgwidth=0pt
\_newdimen\_shiftoffset
@@ -65,8 +65,8 @@ OPmac declares paper formats a4, a4l (landscape~a4), a5, a5l, b5, letter and
user can declare another own format by "\sdef":
\begtt
-\sdef{pgs:b5l}{(250,176)mm}
-\sdef{pgs:letterl}{(11,8.5)in}
+\sdef{_pgs:b5l}{(250,176)mm}
+\sdef{_pgs:letterl}{(11,8.5)in}
\endtt
The "\margins" command declares margins of the document. This command have
diff --git a/Master/texmf-dist/tex/luatex/optex/math-macros.opm b/Master/texmf-dist/tex/luatex/optex/math-macros.opm
index ebd32fe2143..6ad97618ff8 100644
--- a/Master/texmf-dist/tex/luatex/optex/math-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/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-02-14>}
+\_codedecl \sin {Math macros plus mathchardefs <2020-03-14>} % preloaded in format
%% The character _ as subscript prefix:
diff --git a/Master/texmf-dist/tex/luatex/optex/math-preload.opm b/Master/texmf-dist/tex/luatex/optex/math-preload.opm
index 8ced2c1cc07..5251f09424c 100644
--- a/Master/texmf-dist/tex/luatex/optex/math-preload.opm
+++ b/Master/texmf-dist/tex/luatex/optex/math-preload.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \normalmath {Math fonts CM + AMS preloaded <2020-01-23>}
+\_codedecl \normalmath {Math fonts CM + AMS preloaded <2020-02-25>} % preloaded in format
% Only few text fonts are preloaded:
diff --git a/Master/texmf-dist/tex/luatex/optex/math-unicode.opm b/Master/texmf-dist/tex/luatex/optex/math-unicode.opm
index cf800ca5408..fe823b96f4a 100644
--- a/Master/texmf-dist/tex/luatex/optex/math-unicode.opm
+++ b/Master/texmf-dist/tex/luatex/optex/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-14>}
+\_codedecl \loadmath {Unicode Math fonts <2020-02-25>} % preloaded in format
\_newifi \_ifmathloading \_mathloadingtrue
diff --git a/Master/texmf-dist/tex/luatex/optex/op-macros.opm b/Master/texmf-dist/tex/luatex/optex/more-macros.opm
index 4cbb923b4cb..4f4c4d113bc 100644
--- a/Master/texmf-dist/tex/luatex/optex/op-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/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-02-14>}
+\_codedecl \eoldef {OpTeX useful macos <2020-03-15>} % preloaded in format
\_newcatcodetable \_optexcatcodes
\_savecatcodetable\_optexcatcodes
@@ -88,8 +88,6 @@
\def\catcode{\_catcode\_string} % more robust in cases \catcode` or \catcode"
-\_def\_enquotes{\_chardef\"="201C } % use \"text" for English quotes
-
% \removespaces text with spaces {} -> textwithspaces
\_def\_removespaces #1 {\_isempty{#1}\_iffalse #1\_ea\_removespaces\_fi}
@@ -126,7 +124,7 @@
\public
\setctable \restorectable
\normalcatodes \opt \optdef \eoldef \bracedparam \replstring
- \keepinputnames \lastinputname \enquotes \removespaces \trycs
+ \keepinputnames \lastinputname \removespaces \trycs
\ignorept \ignoreit ;
\_endcode % -------------------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/multicolumns.opm b/Master/texmf-dist/tex/luatex/optex/multicolumns.opm
index cc5a0fad091..291eb1cfd0a 100644
--- a/Master/texmf-dist/tex/luatex/optex/multicolumns.opm
+++ b/Master/texmf-dist/tex/luatex/optex/multicolumns.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \begmulti {Balanced columns <2020-03-08>}
+\_codedecl \begmulti {Balanced columns <2020-03-08>} % preloaded in format
\_doc -----------------------------
This code is documented in detail in the \"\TeX/book naruby", pages 244--246,
diff --git a/Master/texmf-dist/tex/luatex/optex/opmac-rest.opm b/Master/texmf-dist/tex/luatex/optex/opmac-rest.opm
deleted file mode 100644
index f8731fefdab..00000000000
--- a/Master/texmf-dist/tex/luatex/optex/opmac-rest.opm
+++ /dev/null
@@ -1,65 +0,0 @@
-% I plan to re-implement all macros from this file. Something is done already.
-
-% OPmac
-%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Petr Olsak, 2012 -- 2019
-
-%% The history of versions is at the end of this file, after \endpinput
-
-\ifx\OPmacversion\undefined \else \endinput \fi
-\def\OPmacversion{Jul. 2019}
-\immediate\write16{This is OPmac-rest, version <\OPmacversion>}
-
-%%%%%%%%%%%%%% Basic macros, sec. 3.1 in opmac-d.pdf
-
-%\newif\ifpdftex \pdftextrue
-
-%%%%%%%%%%%%%% Global parameters, sec. 3.2 in opmac-d.pdf
-
-%%%%%%%%%%%%%% OPmac, CSplain and LaTeX logos, sec. 3.3 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Sizes of fonts and \baselineskip, sec. 3.4 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Multilingual support, sec. 3.5 in opmac-d.pdf
-
-%%%%%%%%%%%%%% REF file, sec 3.6 in opmac-d.pdf
-
-%%%%%%%%%%%%%% \label, \ref, \pgref, sec. 3.7 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Chapters, sections, subsections -- sec. 3.8 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Captions, equations -- sec. 3.9 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Items -- sec. 3.10 in opmac-d.pdf
-
-%%%%%%%%%%%%%% TOC -- sec. 3.11 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Index -- sec. 3.12 on opmac-d.pdf
-
-%%%%%%%%%%%%%% \begmulti ... \endmulti TBN p. 244, 245 -- sec. 3.14 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Colors -- sec. 3.15 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Hyperrefs -- sec. 3.16 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Outlines -- sec. 3.17 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Verbatim, \begtt, \endtt -- sec. 3.18 in opmac-d.pdf
-
-%%%%%%%%%%%%%% \table -- sec. 3.19 in opmac-d.pdf
-
-%%%%%%%%%%%%%% \inspic -- sec. 3.20 in opmac-d.pdf
-
-%%%%%%%%%%%%%%% transformation matrix -- sec. 3.21 in opmac-d.pdf
-
-%%%%%%%%%%%%%% \fnote, \mnote -- sec 3.22 in opmac-d.pdf
-
-%%%%%%%%%%%%%% \cite, \bib, \usebibtex, \usebbl -- sec. 3.23 in opmac-d.pdf
-
-%%%%%%%%%%%%%% output -- sec. 3.24 in opmac-d.pdf
-
-%%%%%%%%%%%%%% margins -- sec. 3.25 in opmac-d.pdf
-
-%%%%%%%%%%%%%% Pre-defined document styles
-
-\endinput
diff --git a/Master/texmf-dist/tex/luatex/optex/optex.ini b/Master/texmf-dist/tex/luatex/optex/optex.ini
index 370f60f0993..e4a09eec0af 100644
--- a/Master/texmf-dist/tex/luatex/optex/optex.ini
+++ b/Master/texmf-dist/tex/luatex/optex/optex.ini
@@ -20,7 +20,7 @@
% OpTeX version
-\def\optexversion{Alpha 0.06 Mar 2020}
+\def\optexversion{Alpha 0.07 Mar 2020}
% Engine testing:
@@ -50,7 +50,7 @@
\input alloc.opm % allocators for registers
\input if-macros.opm % special \if-macros, \is-macros and loops
\input parameters.opm % parameters setting
-\input op-macros.opm % OpTeX useful macros (todo: doc)
+\input more-macros.opm % OpTeX useful macros (todo: doc)
\input plain-macros.opm % plainTeX macros (todo:doc)
\input fonts-preload.opm % preloaded Latin Modern fonts
\input fonts-resize.opm % font resizing (low-level macros) (todo: texdoc)
diff --git a/Master/texmf-dist/tex/luatex/optex/others.opm b/Master/texmf-dist/tex/luatex/optex/others.opm
index 7043a7589cb..4c6b49dd2de 100644
--- a/Master/texmf-dist/tex/luatex/optex/others.opm
+++ b/Master/texmf-dist/tex/luatex/optex/others.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \uv {Miscenaleous <2020-01-23>}
+\_codedecl \uv {Miscenaleous <2020-03-14>} % preloaded in format
% You can write \useOpTeX at begining of your document
diff --git a/Master/texmf-dist/tex/luatex/optex/outlines.opm b/Master/texmf-dist/tex/luatex/optex/outlines.opm
index fbad18cb206..90e9a4a0aa1 100644
--- a/Master/texmf-dist/tex/luatex/optex/outlines.opm
+++ b/Master/texmf-dist/tex/luatex/optex/outlines.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \pdfunidef {PDF outlines <2019-05-21>}
+\_codedecl \pdfunidef {PDF outlines <2020-03-12>} % preloaded in format
\_def\_outlines#1{\_pdfcatalog{/PageMode/UseOutlines}\_openref
\_ifx\_toclist\_empty
diff --git a/Master/texmf-dist/tex/luatex/optex/output.opm b/Master/texmf-dist/tex/luatex/optex/output.opm
index 0bdefdb1ec6..a81e5e8c0a5 100644
--- a/Master/texmf-dist/tex/luatex/optex/output.opm
+++ b/Master/texmf-dist/tex/luatex/optex/output.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \nopagenumbers {Output routine <2019-05-21>}
+\_codedecl \nopagenumbers {Output routine <2020-03-15>} % preloaded in format
\_doc -----------------------------
`\_optexouput` is default output routine. You can create another...
@@ -180,20 +180,17 @@
water color marks.
\_cod -----------------------------
-\_def\_draft{\_pgbackground={\_setdraftfont \_draftbox{\_draftfont DRAFT}}}
-
-\_def\_draftbox#1{\_setbox0=\_hbox{#1}%
+\_def \_draft {\_pgbackground={\_draftbox{\_draftfont DRAFT}}%
+ \_fontdef\_draftfont{\_setfontsize{at10pt}\_bf}%
+ \_global\_let\_draftfont=\_draftfont
+}
+\_def \_draftbox #1{\_setbox0=\_hbox{#1}%
\_kern.5\_vsize \_kern4.5\_wd0
\_hbox to0pt{\_kern.5\_hsize \_kern-1\_wd0
\_pdfsave \_pdfrotate{55}\_pdfscale{10}{10}%
\_hbox to0pt{\_localcolor\LightGrey \_box0\_hss}%
\_pdfrestore
- \_hss}}
-\_def\_setdraftfont {%
- \_ifx \_draftfont\_undefined
- \_fontdef\_draftfont{\_setfontsize{at10pt}\_bf}%
- \_global\_let\_draftfont=\_draftfont
- \_fi
+ \_hss}%
}
\_public \draft ;
diff --git a/Master/texmf-dist/tex/luatex/optex/parameters.opm b/Master/texmf-dist/tex/luatex/optex/parameters.opm
index 23702de37ad..4ae0aa4d98f 100644
--- a/Master/texmf-dist/tex/luatex/optex/parameters.opm
+++ b/Master/texmf-dist/tex/luatex/optex/parameters.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \normalbaselineskip {Parameter settings <2020-01-23>}
+\_codedecl \normalbaselineskip {Parameter settings <2020-03-17>} % preloaded in format
\_doc -----------------------------
The primitive registers with the same default value as in plain \TeX/ follow:
@@ -241,12 +241,15 @@
\_doc -----------------------------
The default item mark used between `\bgitems` and `\enditems` is bullet.
The `\everyitem` token list is applied in vertical mode
- at the start of each item.
+ at the start of each item.
+ The `\everybegitems` token list is applied after group is openem by
+ `\begitems`.
\_cod -----------------------------
\_newtoks\_defaultitem \_defaultitem={$\_bullet$\_enspace}
\_newtoks\_everyitem
-\_public \defaultitem \everyitem ;
+\_newtoks\_everybegitems
+\_public \defaultitem \everyitem \everybegitems ;
\_doc -----------------------------
The `\tit` macro includes `\vglue\titskip` above the title of the document.
diff --git a/Master/texmf-dist/tex/luatex/optex/pdfuni-string.opm b/Master/texmf-dist/tex/luatex/optex/pdfuni-string.opm
index 0aafcce27a0..e993e61a756 100644
--- a/Master/texmf-dist/tex/luatex/optex/pdfuni-string.opm
+++ b/Master/texmf-dist/tex/luatex/optex/pdfuni-string.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \pdfunidef {PDFunicode strings for outlines <2020-02-14>}
+\_codedecl \pdfunidef {PDFunicode strings for outlines <2020-03-12>} % preloaded in format
\_edef\_octalprint#1#2{\_noexpand\_directlua{% #1=character-code #2=character
if ('#2'>='A' and '#2'<='Z') or ('#2'>='a' and '#2'<='z') then
diff --git a/Master/texmf-dist/tex/luatex/optex/plain-macros.opm b/Master/texmf-dist/tex/luatex/optex/plain-macros.opm
index a9e4f2de1b7..18576c1ad72 100644
--- a/Master/texmf-dist/tex/luatex/optex/plain-macros.opm
+++ b/Master/texmf-dist/tex/luatex/optex/plain-macros.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \magstep {Macros from plain TeX <2019-02-14>}
+\_codedecl \magstep {Macros from plain TeX <2020-02-14>} % preloaded in format
\_chardef\_active = 13
diff --git a/Master/texmf-dist/tex/luatex/optex/prefixed.opm b/Master/texmf-dist/tex/luatex/optex/prefixed.opm
index 06c46ee65db..e6015bc7cb5 100644
--- a/Master/texmf-dist/tex/luatex/optex/prefixed.opm
+++ b/Master/texmf-dist/tex/luatex/optex/prefixed.opm
@@ -1,7 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \public {Prefixing and code syntax <2020-02-14>}
-
+\_codedecl \public {Prefixing and code syntax <2020-02-14>} % preloaded in format
\_doc ---------
All TeX82 primitives have alternative control sequence \_hbox \_string, ...
diff --git a/Master/texmf-dist/tex/luatex/optex/ref-file.opm b/Master/texmf-dist/tex/luatex/optex/ref-file.opm
index ba76563ca0a..5f2b50f06d2 100644
--- a/Master/texmf-dist/tex/luatex/optex/ref-file.opm
+++ b/Master/texmf-dist/tex/luatex/optex/ref-file.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_openref {File for references <2020-02-14>}
+\_codedecl \openref {File for references <2020-02-14>} % preloaded in format
\_doc --------------------------
The `\_inputref` macro is used in `\everyjob`. It reads `\jobname.ref` file
@@ -44,6 +44,7 @@
\_immediate\_write\_reffile {\_pcent\_pcent\_space OPTeX <\_optexversion> - REF file (#1)}%
\_immediate\_wref \Xrefversion{{\_REFversion}}%
}
+\def\openref{\_openref}
\_doc ----------------------
We are using a convention that the macros used in `.ref` file are named
diff --git a/Master/texmf-dist/tex/luatex/optex/references.opm b/Master/texmf-dist/tex/luatex/optex/references.opm
index 37d06982141..3cd27c043e7 100644
--- a/Master/texmf-dist/tex/luatex/optex/references.opm
+++ b/Master/texmf-dist/tex/luatex/optex/references.opm
@@ -1,11 +1,10 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \ref {References <2020-02-22>}
+\_codedecl \ref {References <2020-03-03>} % preloaded in format
\_doc ----------------------------
- `\_Xpage {<gpageno>}{<pageno>}` saves the patameter pair into `\_currpage`
- and actualizes `\lastpage`. Resets `\_lfnotenum` used if footnotes are
- numbered from one at each page.
+ `\_Xpage {<gpageno>}{<pageno>}` saves the patameter pair into `\_currpage`.
+ Resets `\_lfnotenum`, it is used if footnotes are numbered from one at each page.
\_cod ----------------------------
\_def\_Xpage#1#2{\_def\_currpage{{#1}{#2}}\_lfnotenum=0 }
@@ -31,6 +30,7 @@
\_def\_wlabel#1{%
\_ifx\_lastlabel\_undefined \_else
\_dest[ref:\_lastlabel]%
+ \_printlabel\_lastlabel
\_edef\_tmp{{\_lastlabel}{#1}}%
\_ea\_wref \_ea\_Xlabel \_ea{\_tmp}%
\_sxdef{_lab:\_lastlabel}{#1}\_sxdef{l0:\_lastlabel}{}%
@@ -62,6 +62,19 @@
\_public
\label \wlabel \ref \pgref ;
+ \_doc -----------------------------
+ Default `\_printlabel` is empty (labes are not printed).
+ The `\showlabels` redefines it as box with zero dimensions and
+ with left lapped `[<label>]` in blue 10pt `\tt` font shifted up by 1.7ex.
+ \_cod -----------------------------
+
+\_def\_printlabel#1{}
+\_def\_showlabels {%
+ \_def\_printlabel##1{\_vbox to0pt{\_vss\_llap{\_labelfont[##1]}\_kern1.7ex}}%
+ \_fontdef\_labelfont{\_setfontsize{at10pt}\setfontcolor{blue}\_tt}
+}
+\_public \showlabels ;
+
\_endcode %------------------------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/sections.opm b/Master/texmf-dist/tex/luatex/optex/sections.opm
index e528680d422..dae71df77a0 100644
--- a/Master/texmf-dist/tex/luatex/optex/sections.opm
+++ b/Master/texmf-dist/tex/luatex/optex/sections.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \chap {Titles, chapters, sections, subsections <2020-03-02>}
+\_codedecl \chap {Titles, chapters, sections, subsections <2020-03-14>} % preloaded in format
\_doc ---------------------------
We are using scaled fonts for titles. They are scaled from main fonts size
diff --git a/Master/texmf-dist/tex/luatex/optex/slides.opm b/Master/texmf-dist/tex/luatex/optex/slides.opm
new file mode 100644
index 00000000000..faff5797982
--- /dev/null
+++ b/Master/texmf-dist/tex/luatex/optex/slides.opm
@@ -0,0 +1,211 @@
+% This is part of OpTeX project, see http://petr.olsak.net/optex
+
+\_codedecl \slideshow {Slides style for OpTeX <2020-03-19>} % loaded on demand by \slides
+
+ \_doc -----------------------------
+ Default margins and design is declared here.
+ Note that `\_ttfont` is scaled by `mag1.15` in order to balance the
+ ex height of Helvetica (Heros) and LM fonts Typewriter.
+ The `\begtt`...`\endtt` verbatim is printed by smaller text.
+ \_cod -----------------------------
+
+\_margins/1 a5l (14,14,10,3)mm % landscape A5 format
+\_def\_wideformat{\_margins/1 (263,148) (16,16,10,3)mm } % 16:9 format
+
+\_fontfam[Heros]
+\_typosize[16/19]
+\_famvardef\_ttfont{\_setfontsize{mag1.15}\_tt}
+\_def\_urlfont{}
+\_everytt={\_typosize[13/16] \advance\hsize by10mm}
+\_fontdef\_fixbf{\_bf}
+
+\_nopagenumbers
+\_parindent=0pt
+\_ttindent=5mm
+\_parskip=5pt plus 4pt minus2pt
+\_rightskip=0pt plus 1fil
+\_ttindent=10pt
+\_def\_ttskip{\_smallskip}
+
+\_onlyrgb % RGB color space is better for presentations
+
+ \_doc -----------------------------
+ The bottom margin is set to 3\,mm. If we use 1\,mm, then baseline of
+ `\footline` is 2\,mm from the bottom page. This is depth of the `\Grey`
+ rectange used for page numbers. It is rlapped to `\hoffset` because left
+ margin = `\hoffset` = right margin. It is 14\,mm for narrow pages or
+ 16\,mm for wide pages.
+ \_cod -----------------------------
+
+\_footlinedist=1mm
+\_footline={\_hss \_rlap{%
+ \_rlap{\Grey\_kern.2\_hoffset\_vrule height6mm depth2mm width.8\_hoffset}%
+ \_hbox to\_hoffset{\White\_hss\_folio\_kern3mm}}}
+
+ \_doc -----------------------------
+ The `\subtit` is defined analogicaly like `\tit`.
+ \_cod -----------------------------
+
+\_eoldef\_subtit#1{\_vskip20pt {\_leftskip=0pt plus1fill \_rightskip=\_leftskip
+ \_subtitfont #1\_nbpar}}
+
+ \_doc -----------------------------
+ The `\pshow<num>` is implemented by printing the text in invisible
+ (transparent) font when `\layernum<<num>`.
+ The color font feature is used for this transparency.
+ \_cod -----------------------------
+
+\_famvardef\Transparent{\_setfontcolor{FF000000}\_currvar}
+\_def\_use#1#2{\_ifnum\_layernum#1\_relax#2\_fi}
+\_def\_pshow#1{\_use{=#1}\Red \_use{<#1}\Transparent \_ignorespaces}
+
+ \_doc -----------------------------
+ The main level list is activated here. The `\_item:X` and
+ `\_item:x` are used and are re-defined here.
+ If we are in nested level of items and `\pg+` is used then
+ `\egroups` macro xepands to the right number of `\egroup`s
+ in order to close page correctly. The level of nested item lists
+ is saved to the `\_ilevel` register and used when we start again
+ the next text after `\pg+`.
+ \_cod -----------------------------
+
+\_newcount\_ilevel \_newcount\_gilevel
+\_def\*{*}
+\_adef*{\_startitem}
+\_sdef{_item:X}{\Blue\_raise.2ex\_fullrectangle{.8ex}\_kern.5em}
+\_sdef{_item:x}{\Blue\_raise.3ex\_fullrectangle{.6ex}\_kern.4em}
+\_style X
+\_addto\_begitems{\_style x }\public \begitems ;
+\_def\_egroups{\_par\_global\_gilevel=\_ilevel \_egroup}
+\_everybegitems={\_advance\_ilevel by1 \_addto\_egroups{\_egroup}}
+
+ \_doc -----------------------------
+ The default values of `\pg;`, `\pg+` and `\pg.` are very simple.
+ They are used when `\showslides` is not specified.
+ \_cod -----------------------------
+
+\_def\_pg#1{\_cs{_spg:#1}}
+\_sdef{_spg:;}{\_vfil\_break \_lfnotenumreset}
+\_sdef{_spg:.}{\_end}
+\_sdef{_spg:+}{\_par}
+
+ \_doc -----------------------------
+ We need no numbers and no table of contents when using slides.
+ The `\_printsec` macro is redefined in order the title is centered
+ and typeset in `\Blue`.
+ \_cod -----------------------------
+
+\_def\_titfont{\_typosize[42/60]\_bf \Blue}
+\_def\_subtitfont{\_typosize[20/30]\_bf}
+\_def\_secfont{\_typosize[25/30]\_bf \Blue}
+
+\_nonum \_notoc \_let\_resetnonumnotoc=\_relax
+\_def\_printsec#1{\_par
+ \_abovetitle{\_penalty-400}\_bigskip
+ {\_secfont \_noindent \_leftskip=0pt plus1fill \_rightskip=\_leftskip
+ \_printrefnum[@\_quad]#1\_nbpar}\_insertmark{#1}%
+ \_nobreak \_belowtitle{\_medskip}%
+}
+
+ \_doc -----------------------------
+ When `\slideshow` is active then each page is opened (roughly speaking)
+ by `\setbox\_slidepage=\vbox\bgroup` and closed by `\egroup`. The material is
+ `\unvbox`ed and saved for the usage in the next usage if `\pg+` is in process.
+ The `\_slidelayer` is inceremnted instead `\pageno` if `\pg+`.
+ This counter is equal to `\count1`, so it is printed to the terminal and
+ log file next to `\pageno`.
+
+ The code is somewhat more complicated when `\layers` is used. Then
+ <layered-text> is saved to the `\_layertext` macro, the material before
+ it is in `\_sidepage` box and the material after it is in `\_slidepageB`
+ box. The pages are completrd in the `\loop` which increments the
+ `\layernum` register.
+ \_cod -----------------------------
+
+\_newbox\_slidepage \_newbox\_slidepageB
+\_countdef\_slidelayer=1
+\_def\_decr#1{\_global\_advance#1 by-1 }
+
+\_def\_slideshow{\_slidelayer=1 \_slideshowactive \_setbox\_slidepage=\_vbox\_bgroup}
+
+\_def\_slideshowactive{%
+ \_sdef{_spg:;}{\_closepage \_global\_slidelayer=1 \_resetpage \_openslide}
+ \_sdef{_spg:.}{\_closepage \_end}
+ \_sdef{_spg:+}{\_closepage \_incr\_slidelayer \_decr\_pageno \_openslide}
+ \_def\bye {\_closepage \_end}
+ \_let\_layers=\_layersactive
+ \_def\_destbox[##1:##2]{\_isequal{##1}{ref}\_iffalse \_destboxori[##1:##2]\_fi}%
+}
+\_def\_openslide{\_setbox\_slidepage=\_vbox\_bgroup \_setilevel
+ \_ifvoid\_slidepage \_else \_unvbox\_slidepage \_nointerlineskip\_lastbox \_fi}
+\_def\_setilevel{\_loop \_decr\_gilevel \_ifnum\_gilevel<0 \_else \_begitems \_repeat}
+
+\_def\_closepage{\_egroups
+ \_ifnum \_maxlayers=0 \_unvcopy\_slidepage \_vfil\_break
+ \_else \_begingroup \_setwarnslides \_layernum=0
+ \_loop
+ \_ifnum\_layernum<\_maxlayers \_advance\_layernum by1
+ \_printlayers \_vfil\_break
+ \_ifnum\_layernum<\_maxlayers \_incr\_slidelayer \_decr\_pageno \_fi
+ \_repeat
+ \_global\_maxlayers=0
+ \_incr\_layernum \_global\_setbox\_slidepage=\_vbox{\_printlayers}%
+ \_endgroup
+ \_fi}
+\_def\_resetpage{%
+ \_global\_setbox\_slidepage=\_box\_voidbox \_global\_setbox\_slidepageB=\_box\_voidbox
+ \_lfnotenumreset
+}
+\_def\_setwarnslides{%
+ \_def\pg##1{\_opwarning{\_string\pg##1 \_layersenv}\_def\pg####1{}}%
+ \_def\layers##1 {\_opwarning{\_string\layers\_space \_layersenv}\_def\layers####1{}}%
+}
+\_def\_layersenv{cannot be inside \_string\layers...\_string\endlayers, ignored}
+
+\_def\_printlayers{\_unvcopy\_slidepage \_nointerlineskip\_lastbox
+ \_layertext \_endgraf
+ \_ifdim\_prevdepth>-1000pt \_kern-\_prevdepth \_kern\_dp\_strutbox \_fi
+ \_vskip\_parskip
+ \_unvcopy\_slidepageB
+}
+\_let\_destboxori=\_destbox
+
+\_newcount\_layernum \_newcount\_maxlayers
+\_maxlayers=0
+
+\_long\_def\_layersactive #1 #2\endlayers{%
+ \_par\_egroup
+ \_gdef\_layertext{#2}%
+ \_global\_maxlayers=#1
+ \_setbox\_slidepageB=\_vbox\_bgroup
+}
+
+ \_doc -----------------------------
+ Default `\layers <num>` macro (when `\slideshow` is not activated) is simple.
+ It prints the <layered-text> with `\layernum=<num>+1` because we need the
+ result after last layer is processed.
+ \_cod -----------------------------
+
+\_def\_layers #1 {\_par\_layernum=\_numexpr#1+1\_relax}
+\_let\endlayers=\_relax
+
+\_def\layers{\_layers}
+\_public \subtit \slideshow \pg \wideformat \use \pshow ;
+
+ \_doc -----------------------------
+ We must to redefine `\fnotenumpages` because the data from `.ref` file
+ are less usable for implementing such feature: the
+ footnote should be in more layers repeatedly. But we can suppose that
+ each page starts by `\pg;` macro, so we can reset the footnote counter by
+ this macro.
+ \_cod -----------------------------
+
+\_def \_fnotenumpages {\def\_fnotenum{\_the\_lfnotenum}\_pgfnotefalse
+ \_def\_lfnotenumreset{\_global\_lfnotenum=0 }}
+\_let \_lfnotenumreset=\_relax
+\_public \fnotenumpages ;
+
+\_endcode % ----------------------------------------------
+
+The user manual of \OpTeX/ slides are in `op-slides.tex` file.
+
diff --git a/Master/texmf-dist/tex/luatex/optex/styles.opm b/Master/texmf-dist/tex/luatex/optex/styles.opm
index 66414f85ff6..13aaec91b2e 100644
--- a/Master/texmf-dist/tex/luatex/optex/styles.opm
+++ b/Master/texmf-dist/tex/luatex/optex/styles.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \report {Basic styles of OpTeX <2020-03-12>}
+\_codedecl \report {Basic styles of OpTeX <2020-03-18>} % preloaded in format
\_doc -----------------------------
The `{\boxlines <line-1><eol><line-2><eol>...<line-n><eol>}`
@@ -46,7 +46,12 @@
\_parskip=\_medskipamount
\_nopagenumbers
}
-\_public \boxlines \letter \report ;
+
+\_def\_slides{\_par
+ \_input slides.opm
+}
+
+\_public \boxlines \letter \report \slides ;
\_endcode % -------------------------------------
diff --git a/Master/texmf-dist/tex/luatex/optex/table.opm b/Master/texmf-dist/tex/luatex/optex/table.opm
index 3596275e488..c210c75b34c 100644
--- a/Master/texmf-dist/tex/luatex/optex/table.opm
+++ b/Master/texmf-dist/tex/luatex/optex/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-03-12>}
+\_codedecl \table {Basic macros for OpTeX <2020-03-13>} % preloaded in format
\_doc -----------------------------
The result of `\table` is inserted into `\_tablebox`. You can change
diff --git a/Master/texmf-dist/tex/luatex/optex/uni-lcuc.opm b/Master/texmf-dist/tex/luatex/optex/uni-lcuc.opm
index 3e753370d94..92ed39d24c8 100644
--- a/Master/texmf-dist/tex/luatex/optex/uni-lcuc.opm
+++ b/Master/texmf-dist/tex/luatex/optex/uni-lcuc.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-% A copy o uni-lcuc.tex fom csplain is here
+% Preloaded in format. A copy o uni-lcuc.tex fom csplain is here:
% uni-lcuc.tex -- sets \lccodes and \uccodes for Unicode chars, nothing more
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Master/texmf-dist/tex/luatex/optex/unimath-codes.opm b/Master/texmf-dist/tex/luatex/optex/unimath-codes.opm
index 3e5b95669d2..83d59835b5f 100644
--- a/Master/texmf-dist/tex/luatex/optex/unimath-codes.opm
+++ b/Master/texmf-dist/tex/luatex/optex/unimath-codes.opm
@@ -1,8 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-% This file is read when \loadmath is used.
-
-\_ifx \_ncharrmA\_undefined \_else \_endinput \_fi
+\_codedecl \_ncharrmA {Uni math codes <2020-03-14>} % preloaded on demand by \loadmath
\_umathnumB="0391
\_greekdef \Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa
diff --git a/Master/texmf-dist/tex/luatex/optex/usebib.opm b/Master/texmf-dist/tex/luatex/optex/usebib.opm
index ebaf912b539..de6a0bf40d2 100644
--- a/Master/texmf-dist/tex/luatex/optex/usebib.opm
+++ b/Master/texmf-dist/tex/luatex/optex/usebib.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_ifx\MakeReference\_udefined \_else \_endinput \_fi
+\_codedecl \MakeReference {Reading bib databases <2020-03-13>} % loaded on demand by \usebib
% we needn't \errmessage when bad TeX engnine is detected during \input librarian:
@@ -113,7 +113,8 @@
\_bibmark=\_ea{\_tmpb}%
\_else \_bibmark={}\_fi
\_edef\_tmpb{\EntryKey}%
- \_noindent \_dest[cite:\_the\_bibnum]\_printbib
+ \_noindent \_dest[cite:\_the\_bibnum]\_printlabel\EntryKey
+ \_printbib
{%
\_RetrieveFieldIn{entrytype}\_entrytype
\_csname _print:BEGIN\_endcsname
diff --git a/Master/texmf-dist/tex/luatex/optex/verbatim.opm b/Master/texmf-dist/tex/luatex/optex/verbatim.opm
index e0f86c810e2..c7593a7d7a6 100644
--- a/Master/texmf-dist/tex/luatex/optex/verbatim.opm
+++ b/Master/texmf-dist/tex/luatex/optex/verbatim.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \begtt {Verbatim <2020-02-14>}
+\_codedecl \begtt {Verbatim <2020-03-18>} % preloaded in format
\_doc ----------------------------
The internal parameters for verbatim macros are set.
@@ -10,6 +10,7 @@
\_mathchardef\_ttpenalty=100 % penalty between lines in \begtt, \verbinput
\_newcount\_viline % last line number in \verbinput
\_newread\_vifile % file fgiven by \verinput
+\_def\_ttfont{\_tt} % default tt font
\_doc ----------------------------
`\code{<text>}` expands to `\detokenize{<text>}` when `\escapechar=-1`. In
@@ -31,7 +32,7 @@
\_cod ----------------------------
\_def\_code#1{\_unexpanded\_ea{\_csname _code \_endcsname{#1}}}
-\_protected\_sdef{_code }#1{{\_escapechar=-1 \_tt \_the\_everyintt \_relax
+\_protected\_sdef{_code }#1{{\_escapechar=-1 \_ttfont \_the\_everyintt \_relax
\_ea\_printinverbatim\_ea{\_detokenize{#1}}}}
\_def\_printinverbatim#1{\_leavevmode\_hbox{#1}}
@@ -77,7 +78,7 @@
\_ifx\_savedttchar\_undefined\_else \_catcode\_savedttchar=\_savedttcharc \_fi
\_chardef\_savedttchar=`#1
\_chardef\_savedttcharc=\_catcode`#1
- \_adef{#1}{\_begingroup \_setverb \_adef{ }{\ }\_tt \_the\_everyintt\_relax \_readverb}%
+ \_adef{#1}{\_begingroup \_setverb \_adef{ }{\ }\_ttfont \_the\_everyintt\_relax \_readverb}%
\_def\_readverb ##1#1{\_printinverbatim{##1}\_endgroup}%
}
\_public \activettchar ;
@@ -126,7 +127,7 @@
\_setverb
\_ifnum\_ttline<0 \_let\_printverblinenum=\_relax \_else \_initverblinenum \_fi
\_adef{ }{\ }\_parindent=\_ttindent \_parskip=0pt
- \_the\_everytt \_relax #1\_relax \_tt
+ \_the\_everytt \_relax #1\_relax \_ttfont
\_endlinechar=`^^J
\_startverb
}
@@ -135,7 +136,7 @@
\_ea\_printverb \_tmpb\_end
\_par\_ttskip
\_endgroup
- \_noindent \_setbox0=\_lastbox
+ \_isnextchar\_par{}{\_noindent}%
}
\_def\_printverb #1^^J#2{\_ifx\_end#2
\_bgroup \_adef{ }{}\_if\_relax#1\_relax\_egroup \_else\_egroup \_printverbline{#1}\_fi
@@ -213,7 +214,7 @@
\_begingroup
\_ifnum\_ttline<-1 \_let\_printverblinenum=\_relax \_else \_initverblinenum \_fi
\_setverb \_adef{ }{\ }\_parindent=\_ttindent \_parskip=0pt
- \_the\_everytt\_relax \_tt
+ \_the\_everytt\_relax \_ttfont
\_endlinechar=`^^J \_tmpnum=0
\_loop \_ifeof\_vifile \_tmpnum=\_vinolines\_space \_fi
\_ifnum\_tmpnum<\_vinolines\_space