summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-11-18 22:07:01 +0000
committerKarl Berry <karl@freefriends.org>2020-11-18 22:07:01 +0000
commit02b9b5088ecbc641f23303a276dd360ecfd0a805 (patch)
tree6ad10b2e03f0ed872dd770a1fb6d63da1572dda5 /Master/texmf-dist/doc
parentd0c7f8c4e981eb166507f4d5d09c36b9318fdd51 (diff)
optex (18nov20)
git-svn-id: svn://tug.org/texlive/trunk@56960 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/luatex/optex/README3
-rw-r--r--Master/texmf-dist/doc/luatex/optex/optex-doc.pdfbin1246822 -> 1279767 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/optex/optex-doc.tex4
-rw-r--r--Master/texmf-dist/doc/luatex/optex/optex-math.tex12
-rw-r--r--Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex38
-rw-r--r--Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex8
6 files changed, 56 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/luatex/optex/README b/Master/texmf-dist/doc/luatex/optex/README
index bcff2e144e7..09029521498 100644
--- a/Master/texmf-dist/doc/luatex/optex/README
+++ b/Master/texmf-dist/doc/luatex/optex/README
@@ -19,6 +19,9 @@ doc/ ... PDF version of the OpTeX documentation and sources.
History:
+<0.17> optex.lua introduced (instead external ltluatex.lua)
+ hyph.patterns are loaded directly by \patterns, not using lua code
+ \commentchars introduced (comments which are able to interrupt verbatim mode)
<0.16> callback.register_x introduced, namespaces for packages corrected
kerkis and EBGaramond fontfiles added
little corrections
diff --git a/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf b/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf
index d7242d9d045..62be299a6c7 100644
--- a/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf
+++ b/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/optex/optex-doc.tex b/Master/texmf-dist/doc/luatex/optex/optex-doc.tex
index 742b35dc35b..ce043bcbec8 100644
--- a/Master/texmf-dist/doc/luatex/optex/optex-doc.tex
+++ b/Master/texmf-dist/doc/luatex/optex/optex-doc.tex
@@ -20,14 +20,14 @@
\tit Format Based on Plain \TeX/ and OPmac\fnotemark1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hfill Version 0.16
+\hfill Version 0.17
\centerline{\it Petr Olšák, 2020}
\bigskip
\centerline{\url{http://petr.olsak.net/optex}}
-\fnotetext {The OPmac package is a set of simple additional macros to Plain \TeX{}.
+\fnotetext {OPmac package is a set of simple additional macros to Plain \TeX{}.
It enables users to take advantage of \LaTeX/ functionality but keeps
Plain \TeX/ simplicity. See
\url{http://petr.olsak.net/opmac-e.html} for more information about it.}
diff --git a/Master/texmf-dist/doc/luatex/optex/optex-math.tex b/Master/texmf-dist/doc/luatex/optex/optex-math.tex
index be25db3970f..97d475af44f 100644
--- a/Master/texmf-dist/doc/luatex/optex/optex-math.tex
+++ b/Master/texmf-dist/doc/luatex/optex/optex-math.tex
@@ -22,13 +22,13 @@
\addto\_secfont\Blue \addto\_seccfont\Blue
\_def\_printsec#1{\_par
\_abovetitle{\_penalty-400}\_bigskip
- {\_secfont \_noindent \_raggedright \llap{\_printrefnum[@\_quad]}#1\_nbpar}\_insertmark{#1}%
+ {{\_secfont \_noindent \_raggedright \llap{\_printrefnum[@\_quad]}#1}\_nbpar}\_insertmark{#1}%
\_nobreak \_belowtitle{\_medskip}%
\_firstnoindent
}
\_def\_printsecc#1{\_par
\_abovetitle{\_penalty-200}\_medskip
- {\_seccfont \_noindent \_raggedright \llap{\_printrefnum[@\_quad]}#1\_nbpar}%
+ {{\_seccfont \_noindent \_raggedright \llap{\_printrefnum[@\_quad]}#1}\_nbpar}%
\_nobreak \_belowtitle{\_medskip}%
\_firstnoindent
}
@@ -105,7 +105,13 @@ The math atoms are \ii single/math/object {\em single math objects} or
consist only from a single math object then we need not to use brackets.
For example
`x^2` is a math atom with `x` in nucleus, `2` in exponent and with empty subscript.
- Or `a_{i,j}` is a math atom with `a` in nucleus, empty exponent and `i,j` in subscript.
+ Or `a_{i,j}` is a math atom with `a` in nucleus, empty exponent and `i,j` in subscript.%
+ \fnote{In \OpTeX/, the character `_` can be interpreted as a part of
+ control sequence name, not as the subscript constructor. But in common cases,
+ constructions of math atoms are interpreded exactly as in plain \TeX. See sections
+ 2.2.2 and 2.14 of \OpTeX/ documentation for more details. If you want to
+ be sure that `_` is only subscript constructor in \OpTeX/ then you can set \code{\\catcode`\\_=8}
+ but after this, you cannot use control sequences with `_` character.}
The constructors for exponent `^` and for subscript `_` can be used in arbitrary order
after the nucleus, for example `z_1^{x+y}` is the same math atom as
`z^{x+y}_1`. The single math objects not followed by `^` nor `_` are
diff --git a/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex b/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex
index d35e6faf4e7..a22e6baab26 100644
--- a/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex
+++ b/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex
@@ -71,12 +71,16 @@ The `\_codedecl` will be re-defined later.
Individual `*.opm` macro files are read.
\verbinput (44-87) optex.ini
-
%
+The file `optex.lua` is embedded into the format as byte-code.
+It is documented in section~\ref[lua].
+
+\verbinput (89-92) optex.ini
+
The `\everyjob` register is initialized and the format is saved by
the `\dump` command.
-\verbinput (89-97) optex.ini
+\verbinput (94-102) optex.ini
}
@@ -179,7 +183,7 @@ The `\margins` macro is documented in the section~\ref[marg].
\printdoc lists.opm
\sec Verbatim, listings
-\secc Inline and \"display" verbatim
+\secc[verb] Inline and \"display" verbatim
\printdoc verbatim.opm
\secc[hisyntax] Listings with syntax highlighting
\printdoctail hi-syntax.opm
@@ -244,6 +248,34 @@ The `\margins` macro is documented in the section~\ref[marg].
Miscellaneous macros are here.
\printdoc others.opm
+\sec[lua] Lua code embedded to the format
+
+The file `optex.lua` is loaded into the format in `optex.ini` as byte-code
+and initialized by `\everyjob`, see section~\ref[init].
+
+The file implements part of the functionality from `luatexbase` namespace,
+nowadays defined by \LaTeX/ kernel. `luatexbase` deals with modules,
+allocators and callback management. Callback management is a nice extension
+and is actually used in \OpTeX/. Other functions are defined more or less just
+to suit luaotfload's use.
+
+\newtoks \_hisyntaxlua
+\_hisyntaxlua={%
+ \_hicolor C \Green
+ \_replfromto {--}{^^J} {\z C{--#1}^^J}%
+}
+
+{\everytt={\typosize[8/10]\_let\_printverbline=\_printcodeline \medskip}
+ \commentchars-- \def\docfile{optex.lua} \ttline=-1
+ \_def\_printcomments{\_medskip
+ {\_catcodetable0 \_typosize[10/12]\_everypar={}\_scantextokens\_ea{\_vcomments}\par}%
+ \_bigskip
+ }
+
+\verbinput \hisyntax{lua} (4-) optex.lua
+}
+
+
\sec Printing documentation
\printdoctail doc.opm
\printdoc doc.opm
diff --git a/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex b/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex
index f8ec1cba55d..6083eef7ea6 100644
--- a/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex
+++ b/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex
@@ -1055,7 +1055,13 @@ codes. Automatic syntax highlighting is possible, for example
`\begtt` \^`\hisyntax{C}` activates colors for C programs. Or
`\verbinput` \^`\hisyntax{HTML} (-) file.html` can be used for HTML or XML codes.
\OpTeX/ implements C, Python, \TeX/, HTML and XML syntax highlighting.
-More languages can be declared, see the section~\ref[hisyntax].
+More languages can be declared, see the section~\ref[hisyntax].
+
+If the code is read by \^`\verbinput` and it uses two characters at the front
+of the lines as a comment lines,
+you can set them by \~`\commentchars``<first><second>`. Such comments are
+fully interpreted by \TeX/ (i.e. not verbatim).
+Section~\ref[verb] (page \pgref[commentchars]) says more about this feature.
\sec Autogenerated lists