summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/optex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-12-03 21:02:14 +0000
committerKarl Berry <karl@freefriends.org>2022-12-03 21:02:14 +0000
commit29bf525f876e4654f4acff755e0ec7b925041c2e (patch)
tree9e1d83b02eecb573645616613dc073cccad2b079 /Master/texmf-dist/doc/optex
parent1b14d7809c520eb9ccb785f44c93c1616351f54e (diff)
optex (3dec22)
git-svn-id: svn://tug.org/texlive/trunk@65185 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/optex')
-rw-r--r--Master/texmf-dist/doc/optex/base/README11
-rw-r--r--Master/texmf-dist/doc/optex/base/mte-doc.tex26
-rw-r--r--Master/texmf-dist/doc/optex/base/optex-doc.pdfbin1437685 -> 1484007 bytes
-rw-r--r--Master/texmf-dist/doc/optex/base/optex-doc.tex2
-rw-r--r--Master/texmf-dist/doc/optex/base/optex-math.tex33
-rw-r--r--Master/texmf-dist/doc/optex/base/optex-techdoc.tex8
-rw-r--r--Master/texmf-dist/doc/optex/base/optex-userdoc.tex32
7 files changed, 62 insertions, 50 deletions
diff --git a/Master/texmf-dist/doc/optex/base/README b/Master/texmf-dist/doc/optex/base/README
index 0cd39b8770e..f6a86e51d2e 100644
--- a/Master/texmf-dist/doc/optex/base/README
+++ b/Master/texmf-dist/doc/optex/base/README
@@ -22,6 +22,17 @@ doc/ ... PDF version of the OpTeX documentation and sources.
History:
+<1.09> Dec 2022:
+ New math.opm package: doing math more comfortable.
+ The math.opm package can be a package template for macro writers.
+ \docgen for printing doucumantation of packages introduced.
+ unimath control sequences are almost all declared by \chardef, no \mathchardef.
+ \casesof, \currfile, \nospaceafter (tools for macro programmers) introduced.
+ \setpos, \posx, \posy moved from OpTeX trick to the format.
+ \sfont, \ufont introduced.
+ More robust \caption parameter.
+ Lato, Kurier, Iwona font families registered.
+ Minor more improvements and bug fixing.
<1.08> Aug 2022:
Sorting rules for German, French, Polish, Hungarian, ... added.
Font files for Montserrat, STIX, XITS, STIXtwo, Overlock added.
diff --git a/Master/texmf-dist/doc/optex/base/mte-doc.tex b/Master/texmf-dist/doc/optex/base/mte-doc.tex
deleted file mode 100644
index 030f023d3f7..00000000000
--- a/Master/texmf-dist/doc/optex/base/mte-doc.tex
+++ /dev/null
@@ -1,26 +0,0 @@
-% This is part of mte.opm macro package for OpTeX
-
-% Run optex mte-doc
-% (two times) to generate documentation including references and the index.
-
-\load [doc]
-
-\def\elink[#1]#2{%
- \ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf\#cs:#1]%
- {\tt\string#2}%
-}
-\def\olink[#1]#2{%
- \ulink[http://petr.olsak.net/ftp/olsak/optex/optex-doc.pdf\#cs:#1]%
- {\tt\string#2}%
-}
-\let\_urllinkcolor=\Cyan
-
-\printdoctail mte.opm
-\printdoc mte.opm
-
-\nonum\sec Index
-\begmulti 3
-\tt \makeindex
-\endmulti
-
-\bye
diff --git a/Master/texmf-dist/doc/optex/base/optex-doc.pdf b/Master/texmf-dist/doc/optex/base/optex-doc.pdf
index bf9f70a3267..666e8793e6e 100644
--- a/Master/texmf-dist/doc/optex/base/optex-doc.pdf
+++ b/Master/texmf-dist/doc/optex/base/optex-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/optex/base/optex-doc.tex b/Master/texmf-dist/doc/optex/base/optex-doc.tex
index 785a181b1da..de9639a5767 100644
--- a/Master/texmf-dist/doc/optex/base/optex-doc.tex
+++ b/Master/texmf-dist/doc/optex/base/optex-doc.tex
@@ -21,7 +21,7 @@
\tit Format Based on Plain \TeX/ and OPmac\fnotemark1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hfill Version 1.08
+\hfill Version 1.09
\centerline{\it Petr Olšák, 2020, 2021, 2022}
diff --git a/Master/texmf-dist/doc/optex/base/optex-math.tex b/Master/texmf-dist/doc/optex/base/optex-math.tex
index ab127ea7622..e94b742d660 100644
--- a/Master/texmf-dist/doc/optex/base/optex-math.tex
+++ b/Master/texmf-dist/doc/optex/base/optex-math.tex
@@ -37,6 +37,20 @@
\def\x`{\bgroup\_setverb\xx}
\bgroup \lccode\string`\.=\string`\` \lowercase{\egroup \def\xx #1#2.{\i #2 \egroup `#1#2.}}
+\bgroup
+\globaldefs=-1
+\def\refs{} \tmpnum=0
+\def\_Xtoc#1#2#3{\incr\tmpnum
+ \ea\addto \ea\refs \expanded{{\noexpand\sdef{r:#3}{\the\tmpnum}}}
+ \scantoeol\ignoreit
+}
+\isfile{optex-doc.ref}\iftrue \input{optex-doc.ref}\fi
+\ea
+\egroup
+\refs
+
+\def\urloptexdoc{https://petr.olsak.net/ftp/olsak/optex/optex-doc.pdf}
+\def\optexdoc[#1]{\ea\ulink\expanded{[\urloptexdoc\#toc:\trycs{r:#1}{}]}}
\hyperlinks\Green\Green
@@ -69,8 +83,8 @@ There are more types of extensions: e\TeX, lua\TeX/, Unicode math and
is appended to the red triangle to inform you about the extension type.
Nevertheless, \OpTeX/ user doesn't have to worry about it, all extensions
are available if Unicode Math font is loaded (e.g., by the command
-`\fonfam[lmfonts]`). See section 1.3.3 in \OpTeX/ documentation about
-loading Unicode math fonts.
+`\fonfam[lmfonts]`). See \optexdoc[1.3.3]{section 1.3.3} in \OpTeX/
+documentation about loading Unicode math fonts.
{\iindent=2em
\bigskip
@@ -109,7 +123,8 @@ The math atoms are \ii single/math/object {\em single math objects} or
\fnote{In \OpTeX/, the character `_` can be interpreted as a part of
the control sequence name, not as the subscript constructor. But in common cases,
constructions of math atoms are interpreted exactly as in plain \TeX. See sections
- 2.2.2 and 2.14 of \OpTeX/ documentation for more details. If you want to
+ \optexdoc[2.2.2]{2.2.2} and \optexdoc[2.15]{2.15}
+ of \OpTeX/ documentation for more details. If you want to
be sure that `_` is just a 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 subscript `_` can be used in arbitrary order
@@ -644,8 +659,8 @@ in another than this default shape, then we can use
\x`\mit`, \x`\rm`, \x`\it`, \x`\bf`, \x`\cal`.
\new \OpTeX/
\OpTeX/ supports more such selectors \x`\script`, \x`\frak`, \x`\bbchar`, \x`\bi`, see
-section 1.3.3 in the \OpTeX/ documentation. The math selectors have local
-validity in the group.
+\optexdoc[1.3.3]{section 1.3.3} in the \OpTeX/ documentation.
+The math selectors have local validity in the group.
The control sequences \x`\rm`, \x`\it`, \x`\bf`, and \x`\bi` act as variant selectors
of fonts in non-math mode (text mode) and they act
@@ -1410,7 +1425,7 @@ operator:
$$
\sum/_{\eqlines{\baselineskip=.7\baselineskip}\eqstyle{\scriptstyle}\eqalign{
i &\in A \cr
- \quad j &\in B\cup C \cr
+ j &\in B\cup C \cr
m &\in C }}
i + j + m
$$
@@ -1418,7 +1433,7 @@ $$
$$
\sum_{\eqlines{\baselineskip=.7\baselineskip}\eqstyle{\scriptstyle}\eqalign{
i &\in A \cr
- \quad j &\in B\cup C \cr
+ j &\in B\cup C \cr
m &\in C }}
i + j + m
$$
@@ -1585,8 +1600,8 @@ characters from main math font and these additional fonts. This can be
usable if the main math font doesn't include all desired characters or you
dislike some character shapes from main font. \OpTeX/ enables to load
additional math fonts by `\addUmathfont` and characters from additional
-fonts can be declared by `\resetmathchars`. See the section 2.16 of \OpTeX/
-documentation for more details about this.
+fonts can be declared by `\mathchars`. See the \optexdoc[2.16]{section 2.16}
+of \OpTeX/ documentation for more details about this.
The rest of this section includes an example which shows another task: how
to combine main Unicode math font with old 8-bit math font `bbold10.tfm`.
diff --git a/Master/texmf-dist/doc/optex/base/optex-techdoc.tex b/Master/texmf-dist/doc/optex/base/optex-techdoc.tex
index 5a51ba4d8ac..78156194047 100644
--- a/Master/texmf-dist/doc/optex/base/optex-techdoc.tex
+++ b/Master/texmf-dist/doc/optex/base/optex-techdoc.tex
@@ -87,7 +87,7 @@ the `\dump` command.
}
\printdoctail prefixed.opm
-\secc The implementation of the namespaces
+\secc The implementation of the namespaces and macros for macro-files
\printdoc prefixed.opm
\sec pdf\TeX/ initialization
@@ -145,7 +145,7 @@ section~\ref[fselect].
\printdoc math-macros.opm
\sec Unicode-math fonts
-\printdoctail math-unicode.opm
+\printdoctail unimath-macros.opm
\sec[opmac-fonts] Scaling fonts in document (high-level macros)
These macros are documented in section~\ref[sizes] from the user point of view.
@@ -274,7 +274,7 @@ The allocations are declared in subsection~\ref[lua-alloc], calbacks are
implemented in subsection~\ref[callbacks] and handling with colors can be
found in the subsection~\ref[lua-colors].
-{\everytt={\typosize[8/10]\_let\_printverbline=\_printcodeline \medskip}
+{\everytt={\typosize[8/10]\_let\_printverbline=\_printcodeline \_hfuzz=1em \medskip}
\commentchars-- \def\docfile{optex.lua} \ttline=-1
\_def\_printcomments{\_medskip
{\_catcodetable0 \_typosize[10/12]\_everypar={}\_scantextokens\_ea{\_vcomments}\par}%
@@ -285,7 +285,7 @@ found in the subsection~\ref[lua-colors].
}
-\sec Printing documentation
+\sec[doc] Printing documentation
\printdoctail doc.opm
\printdoc doc.opm
diff --git a/Master/texmf-dist/doc/optex/base/optex-userdoc.tex b/Master/texmf-dist/doc/optex/base/optex-userdoc.tex
index 23609f7bad6..e04014b991f 100644
--- a/Master/texmf-dist/doc/optex/base/optex-userdoc.tex
+++ b/Master/texmf-dist/doc/optex/base/optex-userdoc.tex
@@ -237,8 +237,8 @@ to \^`\fontfam[lmfonts]`. Several aliases are prepared, thus
If you write \^`\fontfam[?]` then all font families registered in \OpTeX/
are listed on the terminal and in the log file.
If you write \^`\fontfam[catalog]` then a catalog of all fonts registered in
-\OpTeX/ and available in your \TeX/ system is printed. The instructions
-on how to register your own font family are appended in the catalog.
+\OpTeX/ and available in your \TeX/ system is printed.
+See also \ulink[http://petr.olsak.net/ftp/olsak/optex/op-catalog.pdf]{this catalog}.
If the family is loaded then {\em font modifiers} applicable in such font family
are listed on the terminal: (`\caps`, `\cond` for example).
@@ -1128,7 +1128,7 @@ this item occurs is listed in the index entry. So you can type:
The \ii resistor resistor is a passive electrical component ...
\endtt
-You cannot double the word if you use the \^`\iid` instead of \^`\ii`:
+You don't have to double the word if you use the \^`\iid` instead of \^`\ii`:
\begtt
The \iid resistor is a passive electrical component ...
@@ -1304,7 +1304,7 @@ The usage is:
\endtt
The <bib-base> is one or more `*.bib` database source files (separated by
-spaces and without extension) and the <style> is the part of the filename
+commas and without extension) and the <style> is the part of the filename
`bib-<style>.opm` where the formatting of the references list is
defined. \OpTeX/ supports `simple` or `iso690` styles. The features of
the `iso690` style is documented in the section~\ref[isobib] in detail.
@@ -1746,7 +1746,11 @@ to more files (with individual chapters or sections), use simply the `\input` pr
The macro packages intended to \OpTeX/ have the name `*.opm`.
The list of packages supported by \OpTeX/ follows. Most of them are directly part of \OpTeX/:
-\begitems
+\begitems \typosize[9/11]
+* \ulink[https://petr.olsak.net/ftp/olsak/optex/math-doc.pdf]{\tt math.opm}
+ provides usable features for math typesetting and shows
+ \ulink[https://petr.olsak.net/ftp/olsak/optex/math-doc.pdf\#ref:pkgtemplate]
+ {how to create new packages}.
* `qrcode.opm` enables to create QR codes.
* `tikz.opm` does `\input tikz.tex`, i.e.\ loads Ti{\it k\/}Z. It adds \OpTeX/-specific code.
* \ulink[http://petr.olsak.net/ftp/olsak/optex/mte-doc.pdf]{\tt mte.opm}
@@ -1907,14 +1911,19 @@ More information about such macros can be found in the technical documentation.
You can use hyperlinks here in order to go to the appropriate place of the technical
documentation.
-\medskip \noindent
-\^`\addto`` \macro{<text>}` adds <text> at the end of `\macro` body.\nl
+\bgroup \medskip \noindent \typosize[9/11]
+\^`\addto` `\macro{<text>}` adds <text> at the end of `\macro` body,
+\^`\aheadto` `\macro{<text>}` puts <text> at the begin.\nl
\^`\adef` `<char>{<body>}` defines <char> active character with meaning <body>.\nl
\^`\afterfi` `{<text>}<ignored>\fi` expands to `\fi<text>`.\nl
+\^`\basefilename` \^`\currfile` returns the name of the file currently read.\nl
\^`\bp`` {<dimen expression>}` expands \TeX/ dimension to decimal number in `bp` without unit.\nl
+\^`\casesof` `<token> <list of cases>` expands to a given case by meaning of the `<token>`.
+ See also \^`\xcasesof`.\nl
\~`\_codedecl`` <sequence> {<info>}` is used at beginning of macro files.\nl
\~`\colordef`` \macro {<mix of colors>}` declares `\macro` as color switch.\nl
\^`\cs` `{<string>}` expands `\<string>`.\nl
+\^`\cstochar` `<sequence>` converts <sequence> to <character> if there was `\let<sequence>=<character>`.\nl
\~`\_doc` `...` \~`\_cod` encloses documenation text in the macro code.\nl
\^`\eoldef`` \macro #1{<body>}` defines `\macro` with parameter separated to end of line.\nl
\~`\_endcode` closes the part of macro code in macro files.\nl
@@ -1931,8 +1940,8 @@ documentation.
\^`\ignoreit` `<one>`, \^`\ignoresecond` `<one><two>` ignores given parameter.\nl
`\expandafter` \^`\ignorept` `\the<dimen>` expands to decimal number <dimen> without `pt`.\nl
\~`\isempty`, \~`\istoksempty`, \~`\isequal`, \~`\ismacro`, \~`\isdefined`, \~`\isinlist`
-\~`\isfile`, \~`\isfont` do various tests. Example: \~`\isinlist\list{<text>}\iftrue` does
- `\iftrue` if <text> is in `\list`.\nl
+\~`\isfile`, \~`\isfont` do various tests.\nl
+ Example: \~`\isinlist\list{<text>}\iftrue` does `\iftrue` if <text> is in `\list`.\nl
\^`\isnextchar`` <char>{<text1>}{<text2>}` performs <text1> if next
character is <char>, else <text2>.\nl
\~`\kv` `{<key>}` expands to value when key-value parameters are used.\nl
@@ -1942,9 +1951,12 @@ documentation.
\^`\newcount`, \^`\newdimen` etc. are classical Plain \TeX/ allocators.\nl
\^`\newif` `\iffoo` declares boolean `\iffoo` as in Plain \TeX/.\nl
\^`\_newifi` `\_iffoo` declares boolean `\_iffoo`.\nl
+\^`\nospaceafter``\macro`, \^`\nospacefuturelet`: they ignore the following optional space.\nl
\^`\opinput`` {<filename>}` reads file like `\input` but with standard catcodes.\nl
\^`\optdef`` \macro [<opt-default>] <parameters>{<body>}` defines `\macro` with [opt.parameter].\nl
\^`\opwarning` `{<text>}` prints <text> to the terminal and .log file as warning.\nl
+\~`\posx``[<label>]`, \~`\posy``[<label>]`, \~`\pospg``[<label>]`
+ provide coordinates of absolute position of the \~`\setpos``[<label>]`.
\~`\private`` <sequence> <sequence> ... ;` declares <sequence>s for private name space.\nl
\~`\public`` <sequence> <sequence> ... ;` declares <sequence>s for public name space.\nl
\~`\readkv` `\macro` reads parameters from `\macro` in key-value format.\nl
@@ -1958,7 +1970,7 @@ documentation.
\^`\wlog`` {<text>}` writes <text> to .log file.\nl
\^`\wterm`` {<text>}` writes <text> to the terminal and .log file.\nl
\^`\xargs`` <what> <token> <token> ... ;` repeats <what><token> for each <token>.\nl
-\unpenalty\unskip
+\unpenalty\unskip \par \egroup
\sec Compatibility with Plain \TeX/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%