summaryrefslogtreecommitdiff
path: root/macros/optex/doc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-12-04 03:01:36 +0000
committerNorbert Preining <norbert@preining.info>2022-12-04 03:01:36 +0000
commitb153d9b098596910fb2be9311f13c4415233c2a2 (patch)
treef0f44c9b4caa5756e6957885e8691c0268920a56 /macros/optex/doc
parent34896a353fe22e8ac88ef0b4e39f4fa878e2b0b6 (diff)
CTAN sync 202212040301
Diffstat (limited to 'macros/optex/doc')
-rw-r--r--macros/optex/doc/mte-doc.tex26
-rw-r--r--macros/optex/doc/optex-doc.pdfbin1437685 -> 1484007 bytes
-rw-r--r--macros/optex/doc/optex-doc.tex2
-rw-r--r--macros/optex/doc/optex-math.tex33
-rw-r--r--macros/optex/doc/optex-techdoc.tex8
-rw-r--r--macros/optex/doc/optex-userdoc.tex32
6 files changed, 51 insertions, 50 deletions
diff --git a/macros/optex/doc/mte-doc.tex b/macros/optex/doc/mte-doc.tex
deleted file mode 100644
index 030f023d3f..0000000000
--- a/macros/optex/doc/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/macros/optex/doc/optex-doc.pdf b/macros/optex/doc/optex-doc.pdf
index bf9f70a326..666e8793e6 100644
--- a/macros/optex/doc/optex-doc.pdf
+++ b/macros/optex/doc/optex-doc.pdf
Binary files differ
diff --git a/macros/optex/doc/optex-doc.tex b/macros/optex/doc/optex-doc.tex
index 785a181b1d..de9639a576 100644
--- a/macros/optex/doc/optex-doc.tex
+++ b/macros/optex/doc/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/macros/optex/doc/optex-math.tex b/macros/optex/doc/optex-math.tex
index ab127ea762..e94b742d66 100644
--- a/macros/optex/doc/optex-math.tex
+++ b/macros/optex/doc/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/macros/optex/doc/optex-techdoc.tex b/macros/optex/doc/optex-techdoc.tex
index 5a51ba4d8a..7815619404 100644
--- a/macros/optex/doc/optex-techdoc.tex
+++ b/macros/optex/doc/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/macros/optex/doc/optex-userdoc.tex b/macros/optex/doc/optex-userdoc.tex
index 23609f7bad..e04014b991 100644
--- a/macros/optex/doc/optex-userdoc.tex
+++ b/macros/optex/doc/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/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%