From 66f7d795ee15bbbe970dccad9b0d5ecb1e9d4884 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 14 Jan 2021 21:53:33 +0000 Subject: optex (13jan21) git-svn-id: svn://tug.org/texlive/trunk@57419 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/luatex/optex/README | 8 + Master/texmf-dist/doc/luatex/optex/optex-doc.pdf | Bin 1326904 -> 1362584 bytes Master/texmf-dist/doc/luatex/optex/optex-doc.tex | 26 +- Master/texmf-dist/doc/luatex/optex/optex-math.tex | 402 ++++----- .../texmf-dist/doc/luatex/optex/optex-techdoc.tex | 40 +- .../texmf-dist/doc/luatex/optex/optex-userdoc.tex | 944 +++++++++++---------- 6 files changed, 757 insertions(+), 663 deletions(-) (limited to 'Master/texmf-dist/doc/luatex') diff --git a/Master/texmf-dist/doc/luatex/optex/README b/Master/texmf-dist/doc/luatex/optex/README index 365ab41391e..50d4f1d165a 100644 --- a/Master/texmf-dist/doc/luatex/optex/README +++ b/Master/texmf-dist/doc/luatex/optex/README @@ -19,6 +19,14 @@ doc/ ... PDF version of the OpTeX documentation and sources. History: +<0.19> Jan. 2020 + emoji support as pkg/emoji.opm. + non-braakable places generated by luavlna, suported as pkg/vlna.opm. + \begblock...\endblock introduced. + comment character allowed after \begtt. + more robust macros: \replstring, \table. + complete revision of documentation, spelling corrections. + Several bugs fixed. <0.18> Dec. 2020 Font support for next 9 families added. Font selection system improved. diff --git a/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf b/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf index 2c54019fe36..aacd564a608 100644 Binary files a/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf and b/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf differ diff --git a/Master/texmf-dist/doc/luatex/optex/optex-doc.tex b/Master/texmf-dist/doc/luatex/optex/optex-doc.tex index 227718cc297..4ce127f9036 100644 --- a/Master/texmf-dist/doc/luatex/optex/optex-doc.tex +++ b/Master/texmf-dist/doc/luatex/optex/optex-doc.tex @@ -1,4 +1,4 @@ -%% This is part of OpTeX project, see http://petr.olsak.net/optex +%% This is part of the OpTeX project, see http://petr.olsak.net/optex % Run optex optex-doc % (three times) to generate OpTeX documentation including references and the index. @@ -20,9 +20,9 @@ \tit Format Based on Plain \TeX/ and OPmac\fnotemark1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\hfill Version 0.18 +\hfill Version 0.19 -\centerline{\it Petr Olšák, 2020} +\centerline{\it Petr Olšák, 2020, 2021} \bigskip \centerline{\url{http://petr.olsak.net/optex}} @@ -45,7 +45,7 @@ The main goal of \OpTeX/ is: \begitems * \OpTeX/ keeps the simplicity (like in Plain \TeX/ and OPmac macros). -* There is no old obscurities concerning with various 8-bit encodings and +* There is no old obscurities concerning various 8-bit encodings and various engines. * \OpTeX/ provides a powerful Fonts Selection System (for Unicode font families, of course). @@ -56,20 +56,20 @@ The main goal of \OpTeX/ is: \fnotetext{All these features are implemented by \TeX/ macros, no external program is needed.} * Macros are documented in the same place where code is. -* User name space of control sequences is separated from internal name space - of \OpTeX/ and primitives (`\foo` versus `\_foo`). The name spaces for - macro writers are designed too. +* User namespace of control sequences is separated from the internal namespace + of \OpTeX/ and primitives (`\foo` versus `\_foo`). + The namespaces for macro writers are designed too. \enditems If you need to customize your document or you need to use something very specific, then you can copy relevant parts of \OpTeX/ macros into your macro -file and do changes of these macros here. This is significant difference from -\LaTeX/ or ConTeXt, which are an attempt to create a new user level with a +file and do changes to these macros here. This is a significant difference from +\LaTeX/ or ConTeXt, which is an attempt to create a new user level with a plenty of non-primitive parameters and syntax hiding \TeX/ internals. The macros from \OpTeX/ are simple and straightforward because they solve only -what is explicitly needed, they does not create a new user level for -controlling your document. We have \TeX. -You can use \OpTeX/ macros, understand them an modify them. +what is explicitly needed, they do not create a new user level for +controlling your document. We are using \TeX/ directly in this case. +You can use \OpTeX/ macros, understand them, and modify them. \OpTeX/ offers a markup language for authors of texts (like \LaTeX), i.\,e.\ the fixed set of tags to define the structure of the document. This @@ -80,7 +80,7 @@ The manual includes two parts: user documentation and technical documentation. The second part is generated directly from the sources of \OpTeX/. There are many hyperlinks from one part to second and vice versa. -This manual describes \OpTeX/ features only. We suppose that user knows \TeX/ +This manual describes \OpTeX/ features only. We suppose that the user knows \TeX/ basics. They are described in many books. You can see a short document \ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf] {\TeX/ in nutshell} too. diff --git a/Master/texmf-dist/doc/luatex/optex/optex-math.tex b/Master/texmf-dist/doc/luatex/optex/optex-math.tex index 29f56f68223..c36459f74ef 100644 --- a/Master/texmf-dist/doc/luatex/optex/optex-math.tex +++ b/Master/texmf-dist/doc/luatex/optex/optex-math.tex @@ -1,4 +1,4 @@ -%% This is part of OpTeX project, see http://petr.olsak.net/optex +%% This is part of the OpTeX project, see http://petr.olsak.net/optex % Run optex optex-math (two times) to generate this document % or look at PDF here: http://petr.olsak.net/ftp/olsak/optex/optex-math.pdf @@ -52,24 +52,24 @@ \author Petr Olšák -This document is a brief summary about typesetting math. It describes \TeX/, +This document is a brief summary of typesetting math. It describes \TeX/, Plain \TeX/ and \OpTeX/ features concerned to math. The first two types of -features are documented in \TeX/book in chapters 16, 17 and 18, but it is +features are documented in \TeX/book in chapters 16, 17, and 18, but it is summarized here in short again in order to give a complete guide about math typesetting for \OpTeX/ users. \new {} The \OpTeX/ features which differs from standard \TeX/ or Plain \TeX/ are documented with the red triangle at the margin (like in this paragraph). -Reader can simply distinguish between \"standard" features (given by +Reader can simply distinguish between \"standard" features (given by \TeX/ or Plain \TeX/) and new \OpTeX/ features. There are more types of extensions: e\TeX, lua\TeX/, Unicode math and -\OpTeX/ macros. The appropriate label (e\TeX, Lua\TeX/, Unicode, \OpTeX/) +\OpTeX/ macros. The appropriate label (e\TeX, Lua\TeX/, Unicode, \OpTeX/) 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 +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 +`\fonfam[lmfonts]`). See section 1.3.3 in \OpTeX/ documentation about loading Unicode math fonts. {\iindent=2em @@ -82,46 +82,46 @@ loading Unicode math fonts. \secc General rules and terminology The \ii in-line/math in-line math (in the paragraph) is created by `$$`. The -\ii display/math display math (standalone line between paragraphs) is created by `$$$$`. -More than one line can be here if appropriate macro is used. In-line math is +\ii display/math display math (a standalone line between paragraphs) is created by `$$$$`. +More than one line can be here if an appropriate macro is used. In-line math is processed in a \TeX/ group in \ii in-line/math/mode {\em in-line math mode}. The display math is processed in a \TeX/ group in \ii display/math/mode {\em display math mode}. Spaces are ignored in math modes, so `$x+y$` and `$x + y$` gives the same result: $x+y$. -The \ii math/list is a sequence of \ii math/atom,atom {\em math atoms} and -\ii other/material {\em other material}. -The math atoms are \ii single/math/object {\em single math objects} or +The \ii math/list is a sequence of \ii math/atom,atom {\em math atoms} and +\ii other/material {\em other material}. +The math atoms are \ii single/math/object {\em single math objects} or \ii composed/math/atom composed math atoms. \begitems \hfuzz=.6pt * The single math object is a single character to be printed in math mode like `x`, `+`, `\int`. -* The math atom is constructed in genereal by `{}^{}_{}`. - It consists from \ii nucleus {\em nucleus} , \ii exponent exponent +* The math atom is constructed in general by `{}^{}_{}`. + It consists from \ii nucleus {\em nucleus} , \ii exponent exponent and \ii subscript subscript . Each part of the atom should be empty. If or is empty, we need not to write brackets and the prefix `^` or `_`. If the or or - consist only from a single math object then we need not to use brackets. + consist only from a single math object then we need not 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.% + `x^2` is a math atom with `x` in the nucleus, `2` in the exponent, and with empty subscript. + Or `a_{i,j}` is a math atom with `a` in the nucleus, empty exponent, and `i,j` in the 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 + 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 - be sure that `_` is only subscript constructor in \OpTeX/ then you can set \code{\\catcode`\\_=8} + 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 for subscript `_` can be used in arbitrary order - after the nucleus, for example `z_1^{x+y}` is the same math atom as + The constructors for exponent `^` and 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 - considered as math atoms with this object in nucleus and with empty - exponent and subscript (this is very common case). + considered as math atoms with this object in the nucleus and with empty + exponent and subscript (this is a very common case). \TeX/ assigns the \ii class {\em class} for each math atom, see section~\ref[class]. -* Other material can be \TeX/ box or glue (space) or `\kern` or `\vrule` etc. +* Other material can be \TeX/ box or glue (space) or `\kern` or `\vrule` etc. \enditems -Example: The `Z = \int``_\Omega x^{2y} + z\, dx` generates +Example: The `Z = \int``_\Omega x^{2y} + z\, dx` generates $Z = \int_\Omega x^{2y} + z\, dx$ and it is which consists from: \begitems @@ -135,15 +135,15 @@ $Z = \int_\Omega x^{2y} + z\, dx$ and it is which consists from: \enditems * `+` is math atom with empty exponent and subscript, class: Bin, * `z` is math atom with empty exponent and subscript, class: Ord, -* `\,` is other material, the glue (space) in this case, +* `\,` is another material, the glue (space) in this case, * `d` is math atom with empty exponent and subscript, class: Ord, -* `x`is math atom with empty exponent and subscript, class: Ord. +* `x` is math atom with empty exponent and subscript, class: Ord. \enditems \secc[class] Classes of math atoms \TeX/ assigns \ii class {\em a class} for each math atom.\fnote -{Using terminology of \TeX/book, each single math object has its {\em class} but the +{Using terminology of \TeX/book, each single math object has its {\em class} but the math atom has its {\em kind} derived from this class. I use only one word for both meanings in this document.} This data type is used when @@ -153,13 +153,13 @@ that spaces in the input are ignored.) For example, small spaces around the `+` binary operator. Compare: $xy$ and $x+y$. The class is assigned depending on the nucleus of the atom. If the nucleus is -not single math object, i.e. it is constructed by `{}` with braces -then the atom has its class Ord. If the nucleus is single math object constructed +not a single math object, i.e. it is constructed by `{}` with braces +then the atom has its class Ord. If the nucleus is a single math object constructed without braces then the class of the atom depends on this single math object. Each single math object must be declared in \TeX/ with its default class. The following table lists the classes with typical examples. -Full set of all math objects used in math typesetting -is listed in the section~\ref[objects] with their default classes. +The full set of all math objects used in math typesetting +is listed in section~\ref[objects] with their default classes. \bigskip \noindent\hfil\table{llll}{ @@ -175,13 +175,13 @@ is listed in the section~\ref[objects] with their default classes. } \bigskip -There are \ii horizontal/spacing,spacing three space types used +There are \ii horizontal/spacing,spacing three space types used by the algorithm for horizontal spacing in the math formulas. \begitems * \ii thin/space Thin space: \x`\thinmuskip` primitive register, `\,` macro. Used around Op atoms. * \ii medium/space Medium space: \x`\medmuskip` primitive register, `\>` macro. Used around Bin atoms. -* \ii thick/space Thick space: \x`\thickmusip` primitive register, `\;` macro. Used around Rel atoms. +* \ii thick/space Thick space: \x`\thickmusip` primitive register, `\;` macro. Used around Rel atoms. \enditems \puttext 7.8cm -3.7cm {\rotbox{90}{Left atom}} @@ -191,7 +191,7 @@ by the algorithm for horizontal spacing in the math formulas. \table {l|8c|} { \omit & Ord & Op & Bin & Rel & Open & Close & Punct & \omit \hfil Inner \crlp{2-9} Ord & 0 & 1 & 2 & 3 & 0 & 0 & 0 & 1 \cr - Op & 1 & 1 & & 3 & 0 & 0 & 0 & 1 \cr + Op & 1 & 1 & & 3 & 0 & 0 & 0 & 1 \cr Bin & 2 & 2 & & & 2 & & & 2 \cr Rel & 3 & 3 & & 0 & 3 & 0 & 0 & 3 \cr Open & 0 & 0 & & 0 & 0 & 0 & 0 & 0 \cr @@ -202,22 +202,22 @@ by the algorithm for horizontal spacing in the math formulas. \hangindent=-8.7cm \hangafter=0 Ord atoms are printed without spaces between them. The spaces are not -cummulated, so the rule about spaces mentioned above is only rough idea. -The exact rule for horizontal spaces is given for each pairs of atoms -in the table here. The symbol 0 means no space, 1 thin space, 2 medium space +cumulated, so the rule about spaces mentioned above is only a rough idea. +The exact rule for horizontal spaces is given for each pairs of atoms +in the table here. The symbol 0 means no space, 1 thin space, 2 medium space, and 3 means thick space. \hangindent=-8.7cm \hangafter-2 -The Bin atom is automaticaly transformed to the -Ord atom if no atom precedes or if Op, Bin, Rel, Open or Punct atom +The Bin atom is automatically transformed to the +Ord atom if no atom precedes or if Op, Bin, Rel, Open, or Punct atom precedes. And it is transformed to the Ord atom if Rel, Close or Punct atom follows. This corresponds to the empty cells in the table. Why such behavior? Compare \"\hbox{$0-3$}" and \"$-3$". The Bin atom in the second case behaves like Ord atom because it is \ii unary/minus {\em unary minus}. -There is no space between unary minus and the following object. +There is no space between the unary minus and the following object. All medium spaces and thick spaces and some thin spaces from this table are -omitted if the is processed in +omitted if the is processed in \ii script/style,scriptscript/style script or scriptscript styles (smaller size). See section~\ref[styles] about math styles. @@ -225,20 +225,20 @@ You can overwrite the default class derived from the nucleus of the atom by \TeX/ primitives \x`\mathord`, \x`\mathop`, \x`\mathbin`, \x`\mathrel`, \x`\mathopen`, \x`\mathclose`, \x`\mathpunct` and \x`\mathinner`. They can precede a nucleus of the atom and they set the class of the atom. -For example, `x \mathrel+ y` behaves like `x = y` in spacing point of view but + +For example, `x \mathrel+ y` behaves like `x = y` from a spacing point of view but + is printed. Another example: `\mathop{\rm lim} z` creates the atom `lim` in roman font of class Op. So, the thin space is inserted between lim and $z$. There are more special kinds of math atoms: fractions, math accents, -radicals. They are constructed by special way (see next sections) but they behaves -like Ord atom in the horizontal spacing algorithm. +radicals. They are constructed in a special way (see next sections) but they behave +like Ord atom in the horizontal spacing algorithm. \secc[styles] Math styles When a formula (or a sub-formula) is processed by \TeX/ then one from four \ii math/style,display/style,text/style,script/style,scriptscript/style styles is active: display style ($D$), text style ($T$), script style ($S$) or -scriptscript style ($SS$). +scriptscript style ($SS$). \ii T/style,D/style,S/style,SS/style The $T$ style is started in in-line math mode `$...$` and the $D$ style is started in display math mode `$$...$$`. The first level of exponents or @@ -247,12 +247,12 @@ exponents or indexes are processed in $SS$ style. There are special rules for math styles when fractions are constructed, see section~\ref[frac]. -The $D$ and $T$ style uses basic \ii font/size font size, $S$ uses smaller font size (typically +The $D$ and $T$ styles use basic \ii font/size font size, $S$ uses smaller font size (typically 70~\%) and $SS$ style uses more smaller font size (typically 50~\%). Next levels of \"more smaller fonts" are not used due to classical typographic rules. The \ii nucleus nucleus of \iid Op atoms (big operators, $\sum$, $\int$, etc.) have typically bigger versions -of the character shape for $D$ style than for $T$ style. +of the character shape for $D$ style than for $T$ style. So, there are four sizes for such math objects: one size for each math style. All other math objects (with non Op class) are printed only in three sizes: The sizes for $T$ and $D$ styles are equal. @@ -272,7 +272,7 @@ objects above and below the nucleus (regardless of the current style). There can be more such primitives in a queue (due to a macro expansion, for instance). Then the last primitive in the queue wins. If the last primitive is \x`\displaylimits` then -default behavior is processed regardless there are \x`\limits` or \x`\nolimits` +the default behavior is processed regardless there are \x`\limits` or \x`\nolimits` before it. $$ `\sum\nolimits``_{i=1}^\infty` \quad \hbox{gives}\quad \sum\nolimits_{i=1}^\infty @@ -289,41 +289,49 @@ example, you can create a formula in in-line math mode and in $D$ style by by `$$\textstyle $$`. If a subformula is placed below something (below a line from root symbol, -below a fraction line), then the processed style $D, T, S$ or $SS$ is +below a fraction line), then the processed style $D, T, S$ or $SS$ is \ii cramped/style {\em cramped}. -The exponents are positioned slightly lower than in -\ii non-cramped/style non-cramped style. +The exponents are positioned slightly lower than in +\ii non-cramped/style non-cramped style. The selectors `\displaystyle`\,\dots +`\scriptscriptstyle` mentioned above select non-cramped style. The +non-cramped style is selected when math mode starts too. +\new \OpTeX/ +You can select a cramped style by the macro \x`\cramped` at the start of the +math formula or after the math-style selectors: `\scriptstyle\cramped` for +example. Several macros need to know what math style is currently processed (for example they need to draw something in an appropriate size). But it -not possible simply due to the syntax of fractions (section~\ref[frac]). +not possible simply due to the syntax of fractions (section~\ref[frac]). This syntax requires to process all math lists in two steps: the first step expands all macros and creates structured data of processed math list. The second step reads the output of the first step, switches between math -styles and creates definitive output. So, macros (working in first step) +styles and creates definitive output. So, macros (working in the first step) cannot know the current math style because it is set only in the second step. \TeX/ supports the primitive \x`\matchchioce``{}{}{}{}` which prepares four math lists in the first step and only one of these four lists are used in the second step. We can put different macros into each of the four parameters of `\mathchoice`. Plain \TeX/ supports the macro \x`\mathpalette` which gives a more comfortable -interface of \x`\mathchoice` to macro programmer. +interface of \x`\mathchoice` to the macro programmer. +The cramped/non-cramped variants of the current style are kept when `\mathchioce` +is used. \new \OpTeX/ -We describe another interface for creating macros depending on current -style. You can use \x`\mathstyles``{}`. It -behaves like `{}`, moreover, you can use following commands inside such +We describe another interface for creating macros depending on the current +style. You can use \x`\mathstyles``{}`. It +behaves like `{}`, moreover, you can use the following commands inside such : \begitems -* The macro \x`\currstyle`. It expands to +* The macro \x`\currstyle`. It expands to `\displaystyle`, `\textstyle`, `\scriptstyle` or `\scriptscriptstyle` depending on the current math style - when the `\mathstyles` was opened. + when the `\mathstyles` was opened. * The \x`\dobystyle``{}{}{}{}` is expandable macro. It expands its parameter ``, ``, `` or `` depending on the current math style when `\mathstyles` was opened. -* The value of the \x`\stylenum` register is 0, 1, 2 or 3 - depending on the current math style when `\mathstyles` was opened. +* The value of the \x`\stylenum` register is 0, 1, 2 or 3 + depending on the current math style when `\mathstyles` was opened. \enditems % Example of usage of \x`\mathstyles`: @@ -340,23 +348,23 @@ This example gives Test: $a\mysymbol b_{c \mysymbol d}$ or $a\mysymbol b\over c$ The \x`\mathstyles` macro mentioned above uses \TeX/ primitive \x`\mathchoice`, so it creates four math lists and only one is used. It may take more -computer time in special cases. +computer time in special cases. \new Lua\TeX/ -Lua\TeX/ supports the \x`\mathstyle` primitive +Lua\TeX/ supports the \x`\mathstyle` primitive (no \"`s`" at the end of this control sequence) which expands to values 0 to 7 depending on the current style: -$D, D', T, T', S, S', SS, SS'$ +$D, D', T, T', S, S', SS, SS'$ (where $X'$ means cramped variant of the style). This primitive does not use `\mathchoice` but it simply ignores the fraction syntax, so `$a\mysymbol b\over c$` cannot work if `\mysymbol` is defined using the `\mathstyle` -primitive. See section 7.3.1 of Lua\TeX/ documentation for more information. +primitive. See section 7.3.1 of Lua\TeX/ documentation for more information. \secc[frac] Fractions The \iid fraction can be constructed by `{`\x`\over``}`. If the -fraction is only single object in the whole math mode (between dollars), -you need not to use the outer braces, so you can write `$1\over2$` to get $1\over2$. +fraction is only a single object in the whole math mode (between dollars), +you need not use the outer braces, so you can write `$1\over2$` to get $1\over2$. The \ii numerator,denominator and are printed in \"smaller" math style than current math style. More exactly the following schema is used. @@ -371,12 +379,12 @@ $$ The \LaTeX/ macro \x`\frac``{}{}` is not supported in Plain \TeX/ nor in \OpTeX/ but you can define such macro if you want. -The syntax with \x`\over` is more preferred because it is more human readable +The syntax with \x`\over` is more preferred because it is more human-readable notation. You can write the fraction in the same manner as you can read it. You can compare: `$1\over2$` (one over two) with `$\frac12$` (frac twelve). Besides the `\over` primitive, there are analogical \TeX/ primitives which -create \"generalized" fractions. The result is similar as `{\over }` +create \"generalized" fractions. The result is similar to `{\over }` but there is something extra: \begitems @@ -396,7 +404,7 @@ declared as {\em math delimiter} in \TeX. They are vertically scalable math objects, typically brackets. See section~\ref[delims] for more information about math delimiters. Example: $$ - `{n \atopwithdelims() k}`\quad \hbox{ creates } + `{n \atopwithdelims() k}`\quad \hbox{ creates } {n \choose k} \hbox{ in $D$ style and } \textstyle {n \choose k} \hbox{ in $T$ style}. $$ @@ -404,7 +412,7 @@ The \x`\choose` macro is defined by `\def\choose{\atopwithdelims()}`, so the user can write `{n\choose k}` in order to get binomial coefficients. -\secc[delims] Vertically scalable objects: math delimiters +\secc[delims] Vertically scalable objects: math delimiters The vertically scalable objects are called \ii delimiters {\em delimiters}. For example, all types of brackets are declared as delimiters. @@ -412,55 +420,55 @@ This means that you can use a bracket in arbitrary vertical size.\fnote{ This is not exactly true, because traditional typography says that they cannot be scaled continuously but by visible steps. This means that there is -a sequence of increasing brackets in the font, reader must see a difference -between each two sizes of brackets.} +a sequence of increasing brackets in the font, the reader must see a difference +between every two sizes of brackets.} The following objects are declared as delimiters (i.e.\ vertically scalable): \bigskip {\tt \adef!{\bslash} \table{l 14c}{ - \rm source: & ( & ) & [ & ] & \code{\\\{} & \code{\\\}} & / - & !backslash & !langle & !rangle - & | & \code{\\|} & \cr - \rm output: &$($&$)$&$[$&$]$& $\{$ & $\}$ & $/$ - & $\backslash$ & $\langle$ & $\rangle$ + \rm source: & ( & ) & [ & ] & \code{\\\{} & \code{\\\}} & / + & !backslash & !langle & !rangle + & | & \code{\\|} & \cr + \rm output: &$($&$)$&$[$&$]$& $\{$ & $\}$ & $/$ + & $\backslash$ & $\langle$ & $\rangle$ & $|$ & $\|$ } \medskip \table{l 14c}{ \rm source: & !lfloor & !rfloor & !lceil & !rceil \cr - \rm output: & $\lfloor$ & $\rfloor$ & $\lceil$ & $\rceil$ + \rm output: & $\lfloor$ & $\rfloor$ & $\lceil$ & $\rceil$ } \medskip \table{l 14c}{ - \rm source: & !uparrow & !Uparrow & !dowarrow & !Downarrow + \rm source: & !uparrow & !Uparrow & !dowarrow & !Downarrow & !updownarrow & !Updownarrow \cr \rm output: & $\uparrow$ & $\Uparrow$ & $\downarrow$ & $\Downarrow$ & $\updownarrow$ & $\Updownarrow$ }} \bigskip \noindent \new Unicode -If you are able to produce the characters $\langle$, $\rangle$,\fnote +If you can produce the characters $\langle$, $\rangle$,\fnote {Do not confuse $\string<, >$ and $\langle, \rangle$. The first pair are Rel atoms with meaning \"less than" or \"greater than", but the second pair are special types of brackets. They are not directly available at computer keyboards without using a keyboard macro.} -$\lfloor$, $\rfloor$, ... $\updownarrow$, $\Updownarrow$ +$\lfloor$, $\rfloor$, ... $\updownarrow$, $\Updownarrow$ directly in your text editor then you can use these Unicode characters in your source instead of control sequences `\langle`, `\rangle`, `\lfloor`, `\rfloor` ... `\updownarrow`, `\Updownarrow`. For many users (including me), there is more simple to type `\lfloor` than to find -how to create the $\lfloor$ character in my text editor. Note that there exist +how to create the $\lfloor$ character in my text editor. Note that there exist text editors (Emacs, for example) enabling you to type `\lfloor` and this control sequence is immediately -converted to the $\lfloor$ Unicode character. +converted to the $\lfloor$ Unicode character. Your source text looks pretty and you can use classical \TeX/ sequences. \new Unicode There are more \ii delimiters delimiters, but it heavily depends on loaded Unicode Math font. For example, this document is printed in `latinmodern-math` font and -there are six more delimiters `\lBrack`~$\lBrack$, `\rBrack`~$\rBrack$, -`\lAngle` $\lAngle$, `\rAngle` $\rAngle$, `\lgroup` $\lgroup$, `\rgroup` $\rgroup$. +there are six more delimiters `\lBrack`~$\lBrack$, `\rBrack`~$\rBrack$, +`\lAngle` $\lAngle$, `\rAngle` $\rAngle$, `\lgroup` $\lgroup$, `\rgroup` $\rgroup$. See section~\ref[objects] for table of all Unicode symbols for math typesetting. Arbitrary tall formula can be surrounded by a pair of delimiters using @@ -469,14 +477,14 @@ The delimiters are scaled to the height and depth of the and vertically centered to the {\em math axis}.\fnote {Math axis is a horizontal line passing through the center of symbols $+$ and $-$. All vertically scalable objects are vertically centered with - respect to this axis.} + respect to this axis.} Example: $$ - `+ \left\{ \sum_{i=1}^\infty x_i \right)` \quad \hbox{ gives } + `+ \left\{ \sum_{i=1}^\infty x_i \right)` \quad \hbox{ gives } + \left\{ \sum_{i=1}^\infty x_i \right). $$ The pair `\left \right` creates the formula in a -\TeX/ group. Such group can be nested with another groups. +\TeX/ group. Such group can be nested with another groups. Each `\left` must have its `\right` counterpart at the same group level. If you don't want to create visible delimiter, use dot instead . Example: @@ -484,24 +492,24 @@ $$ `\left. \int``_0^t e^{x^2}\,dx\, \right|_{t=42}` \quad \hbox{ gives } \left. \int_0^t e^{x^2} \,dx\, \right|_{t=42} $$ - + \new e\TeX/ You can use \x`\middle``` inside the which is surrounded by `\left...\right`. Then the given is scaled to the same size like -their `\left` and `\right` counterparts. +their `\left` and `\right` counterparts. When a delimiter is used without `\left` nor `\right` prefix, then it is the Open, Close, Ord or Bin atom by its natural meaning: $(, [, \{, \ldots, \lfloor, \lceil$ are Open atoms, -$], ], \}, \ldots, \rfloor, \rceil$ are Close atoms, -$/, \backslash, |, \|$ are Ord atoms and +$], ], \}, \ldots, \rfloor, \rceil$ are Close atoms, +$/, \backslash, |, \|$ are Ord atoms and $\uparrow, \Uparrow, \ldots, \Updownarrow$ are Bin atoms. You can overwrite this default setting, for example `\mathclose(`. If delimiters are used with `\left` and `\right` prefixes then `\left` behaves like Open atom, `\right` behaves like Close atom and the math list `\left\right` is encapsulated as a single Inner atom. The `\middle` behaves like Open atom at its left side and like Close -atom at its right side. +atom at its right side. The sequence of increasing delimiters can be printed by the following macros: @@ -509,28 +517,28 @@ $$ `(` \to (,\quad \x`\big``(` \to \big(,\quad \x`\Big``(` \to \Big(,\quad \x`\bigg``(` \to \bigg(, \quad \x`\Bigg``(` \to \Bigg(. $$ -The `\Bigg` is not maximal size of the bracket. Try -`\left(\vbox to5cm{}\right.`, for example. You can see that the font +The `\Bigg` is not the maximal size of the bracket. Try +`\left(\vbox to5cm{}\right.`, for example. You can see that the font \"cheats" from certain sizes, because there are not all infinity number of sizes of brackets drawn in the font, of course. The `\big` creates Ord atom. We need to create Open atom -for opening bracket and Close atom for closing bracket more often. +for opening bracket and Close atom for closing bracket more often. Then we can use macros -\x`\bigl```, -\x`\Bigl```, -\x`\biggl```, +\x`\bigl```, +\x`\Bigl```, +\x`\biggl```, \x`\Biggl``` for creating Open atoms and -\x`\bigr```, -\x`\Bigr```, -\x`\biggr```, +\x`\bigr```, +\x`\Bigr```, +\x`\biggr```, \x`\Biggr``` for creating Close atoms. Unfortunately, the source is not too attractive when more sizes of brackets are used, but typographic traditions say that we have to distinguish brackets by the size in math mode if they are in equal types: $$ `\Bigl( f\bigl( 2(x+y) + z\bigr) \Bigr)'` \quad \hbox{gives } - \Bigl(f\bigl(2(x+y)+z\bigr)\Bigr)'. + \Bigl(f\bigl(2(x+y)+z\bigr)\Bigr)'. $$ \secc Horizontally scalable objects: math accents @@ -542,11 +550,11 @@ $$ $$ The usage is: control sequence of selected math accent followed by `{}`. -Standard scalable math accents are: -\x`\overline` $\overline{abc}$, +Standard scalable math accents are: +\x`\overline` $\overline{abc}$, \x`\overbrace` $\overbrace{abc}$, \x`\overrightarrow` $\overrightarrow{abc}$, -\x`\overleftarrow`~$\overleftarrow{abc}$, +\x`\overleftarrow`~$\overleftarrow{abc}$, \x`\underline` $\underline{abc}$, \x`\underbrace` $\underbrace{abc}$. @@ -556,9 +564,9 @@ $$ `\overbrace {b\cdot b\cdot b \cdots b}^{k\times}` \quad \hbox{gives } \overbrace {b\cdot b\cdot b \cdots b}^{k\times} $$ -There are scalable accents with limited maximum width: +There are scalable accents with a limited maximum width: \x`\widehat` $\widehat{abc}$ and \x`\widetilde` $\widetilde{abc}$. If the -formula is wider than the font is able to cover then widest variant from the +formula is wider than the font can cover then the widest variant from the font is used and it is horizontally centered. \new Unicode @@ -572,23 +580,23 @@ There are more scalable accents in Unicode math fonts: \secc Fixed math accents -Fixed \ii math/accent,accent math accents can be applied to single math object or to the `{}`. +Fixed \ii math/accent,accent math accents can be applied to single math object or to the `{}`. The accent is centered (with respect of slanting axis) and the result is a nucleus of Ord atom. For example `\dot x` gives $\dot x$. The list of fixed math accents -follows: \x`\acute`` x` $\acute x$, \x`\bar`` x` $\bar x$, +follows: \x`\acute`` x` $\acute x$, \x`\bar`` x` $\bar x$, \x`\breve`` x` $\breve x$, \x`\check`` x` $\check x$, -\x`\dot`` x` $\dot x$, \x`\ddot`` x` $\ddot x$, -\x`\grave`` x` $\grave x$, \x`\hat`` x` $\hat x$, +\x`\dot`` x` $\dot x$, \x`\ddot`` x` $\ddot x$, +\x`\grave`` x` $\grave x$, \x`\hat`` x` $\hat x$, \x`\vec`` x` $\vec x$, \x`\tilde`` x` $\tilde x$. \new Unicode The additional fixed accents depends on used Unicode math font. The `latinmodern-math` supports: -\x`\ovhook`` x` $\ovhook x$, \x`\ocirc`` x` $\ocirc x$, -\x`\leftharpoonaccent`` x` $\leftharpoonaccent x$, \x`\rightharpoonaccent`` x` $\rightharpoonaccent x$, -\x`\dddot`` x` $\dddot x$, \x`\ddddot`` x` $\ddddot x$, -\x`\widebridgeabove`` x` $\widebridgeabove x$, \x`\asteraccent`` x` $\asteraccent x$. +\x`\ovhook`` x` $\ovhook x$, \x`\ocirc`` x` $\ocirc x$, +\x`\leftharpoonaccent`` x` $\leftharpoonaccent x$, \x`\rightharpoonaccent`` x` $\rightharpoonaccent x$, +\x`\dddot`` x` $\dddot x$, \x`\ddddot`` x` $\ddddot x$, +\x`\widebridgeabove`` x` $\widebridgeabove x$, \x`\asteraccent`` x` $\asteraccent x$. There exist one special math accent `'` (single quote, ASCII 39) which can be appended after a symbol like this: `f'` @@ -608,9 +616,9 @@ example `\root k+1\of x` gives $\root k+1\of x$. \secc Math alphabets -Letters \ii math/alphapbet $a\dots z$, $A\dots Z$ and $\alpha$\dots$\omega$ are printed in italic +Letters \ii math/alphabet $a\dots z$, $A\dots Z$ and $\alpha$\dots$\omega$ are printed in italic in math mode. This follows the traditional typographic rule. -All other math symbols, digits and uppercase Greek letters must be +All other math symbols, digits, and uppercase Greek letters must be upright.\fnote {French typographic convention says that uppercase Greek letters have to be in italic too. Use `\_itGreek` declaration in this case.} @@ -618,7 +626,7 @@ These rules are independent of the current variant of surrounding text font. If we want to use the letters or digits in another than this default shape, then we can use -\ii math/alphabet/selector {\em math alphabet selectors}: +\ii math/alphabet/selector {\em math alphabet selectors}: \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 @@ -626,11 +634,11 @@ 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 -as math alphabet selectors in math mode. This \"overlaying" concept +of fonts in non-math mode (text mode) and they act +as math alphabet selectors in math mode. This \"overlaying" concept is given by Plain \TeX/. Example: math operators lim, sin, cos, log, etc.\ must be printed unslanted. We are using `\lim`, `\sin`, `\cos`, -`\log` etc.\ in math mode in order to comply this typographic convention. For +`\log` etc.\ in math mode in order to comply with this typographic convention. For example `\sin` is defined as: \begtt \def\sin {\mathop{\rm sin}\nolimits} @@ -681,7 +689,7 @@ Unicode font can include the following math alphabets: \_bisansGreek % bold slanted snas serif Greek letters \Alpha-\Omega \endtt % -Not all Unicode math fonts include all math alphabets listed here. Typically, +Not all Unicode math fonts include all math alphabets listed here. Typically, the lowercase letters of calligraphic shape and all letters of bold calligraphic shape are missing. @@ -698,14 +706,14 @@ of the \OpTeX/ manual). For example \def\rm {\_tryload\_tenrm \_inmath{\_rmavariables \_rmdigits}} \endtt % -The first part +The first part \new \OpTeX/ -`\_tryload\_tenrm` is applicable for text fonts and the +`\_tryload\_tenrm` is applicable for text fonts and the `\_inmath` part is processed only in math mode and sets the math alphabets. -You can see the file `unimath-codes.opm` where all user level selectors are +You can see the file `unimath-codes.opm` where all user-level selectors are defined. You can redefine them. For example, \OpTeX/ defines `\bf` as a math -alphabet selector which selects sans serif bold in math. This is common -notation for vectors, tensors and matrices. If you dislike this, then you can define: +alphabet selector that selects sans serif bold in math. This is the common +notation for vectors, tensors, and matrices. If you dislike this, then you can define: \begtt \typosize[10/12] \def\bf {\_tryloadbf\_tenbf \_inmath{\_bfvariables\_bfdigits\_bfgreek\_bfGreek}} \endtt @@ -716,15 +724,15 @@ notation for vectors, tensors and matrices. If you dislike this, then you can de \new Unicode All \ii single/math/object single math objects are listed in the `unimath-table.opm` or `unicode-math-table.tex` file. You can -look into this file. The codes, \TeX/ sequences, classes and comments -for all possible math codes are here. Maybe, your Unicode math font which is loaded, -does not support all these codes. +look into this file. The codes, \TeX/ sequences, classes, and comments +for all possible math codes are here. Maybe, your Unicode math font which is loaded +does not support all these codes. \new \OpTeX/ -You can try all codes of currently loaded font by +You can try all codes of the currently loaded font by \begtt \input print-unimath.opm \endtt -The `unimath-table` is printed with characters available in loaded font. +The `unimath-table` is printed with characters available in the loaded font. \new \OpTeX/ If the character is unsupported by the font then the slot is empty and only \TeX/ sequence and the class of the code is printed in the table. @@ -769,25 +777,25 @@ selectors `\bf` and `\bi` set `\_bsansgreek` and `\_bisansgreek`, so \new Unicode All characters available in the math font can be accessed by \TeX/ control -sequence or by direct using the Unicode character in the document source. +sequence or by directly using the Unicode character in the document source. Example: \begtt \adef/{} -$$ - \sum/_{k=0}^\infty e^{(\alpha+i\beta/_k)} = - e^\alpha \sum/_{k=0}^\infty e^{i\beta/_k} = - e^\alpha \sum/_{k=0}^\infty (\cos\beta/_k + i\sin\beta/_k). +$$ + \sum/_{k=0}^\infty e^{(\alpha+i\beta/_k)} = + e^\alpha \sum/_{k=0}^\infty e^{i\beta/_k} = + e^\alpha \sum/_{k=0}^\infty (\cos\beta/_k + i\sin\beta/_k). $$ \endtt or \begtt \ttspec $$ - ∑_{k=0}^∞ e^{(α + iβ_k)} = e^α ∑_{k=0}^∞ e^{iβ_k} - = e^α ∑_{k=0}^∞ (\cos β_k + i\sin β_k). + ∑_{k=0}^∞ e^{(α + iβ_k)} = e^α ∑_{k=0}^∞ e^{iβ_k} + = e^α ∑_{k=0}^∞ (\cos β_k + i\sin β_k). $$ \endtt both gives the same result: $$ - ∑_{k=0}^∞ e^{(α + iβ_k)} = e^α ∑_{k=0}^∞ e^{iβ_k} + ∑_{k=0}^∞ e^{(α + iβ_k)} = e^α ∑_{k=0}^∞ e^{iβ_k} = e^α ∑_{k=0}^∞ (\cos β_k + i\sin β_k). $$ \medskip @@ -798,19 +806,19 @@ $$ \secc The `\not` prefix You can apply \x`\not` before a following math object. -The slash $/$ is overprinted such math object, for example +The slash $/$ is overprinted such math object, for example `$a \not= b$` gives $a \not= b$. \new \OpTeX/ -If there exist a direct Unicode character for negation of a relation symbol -(for example `\ne` creates $\ne$ directly as a character U+2260) -then `\not` expands to appropriate Unicode character. +If there exists a direct Unicode character for the negation of a relation symbol +(for example `\ne` creates $\ne$ directly as a character U+2260) +then `\not` expands to appropriate Unicode character. For example `\not=` expands to `\ne` or `\not\in` expands to `\notin`. If such character does not exist then -the centered $/$ is overprinted over the next character. +the centered $/$ is overprinted over the next character. -\secc The `\buildrel` macro: text over relation +\secc The `\buildrel` macro: text over the relation The macro \x`\buildrel`` \over ` creates a new atom Rel with the and with the smaller above this . Example: @@ -840,9 +848,9 @@ The space size of `\,`, `\!` resp. `\>`, resp. `\;` is given by `\thinmuskip`, resp. `\medmuskip`, resp. `\thickmuskip` values. You can see in the `plain.tex` file that these default values differ very little in their basic size but there is no stretchability/shrinkability in the `\,` space, there is small -stretchability in the `\>` space and more stretchability in the `\;` space. +stretchability in the `\>` space, and more stretchability in the `\;` space. -The registers \x`\thinmuskip`, \x`\medmuskip` and \x`\thickmuskip` store so called +The registers \x`\thinmuskip`, \x`\medmuskip`, and \x`\thickmuskip` store so-called \ii mu/values {\em mu values} given by math unit `mu`. It is 1/18 em and this unit depends on the current font size used in the math formula ($S$ or $SS$ styles use smaller font size, the `mu` unit is smaller here). You can use \x`\muskip` @@ -863,8 +871,8 @@ $$ \alpha\,(x+y), \qquad \int_a^b \!\! f(x)\,{\rm d}x, \qquad \Gamma_{\!i}. $$ \secc Texts in math mode If you write `$Hello world!$` (i.e.\ Hello world in math mode), then you get -$Hello world!$. It is interpreted as product of variables $H$ and $e$ and -$l^2$ and $o$ etc., followed by the symbol ! used for factorial. +$Hello world!$. It is interpreted as the product of variables $H$, and $e$, and +$l^2$, and $o$, etc., followed by the symbol ! used for factorial. The non-ASCII letters (with accents) don't work at all because they are never used as symbols for variables. Spaces are ignored. @@ -912,8 +920,8 @@ The \x`\vcenter` primitive behaves like `\vbox`, but it can be used only in math mode and its result is vertically centered to the math axis. For example, matrices, are created by tables in `\vcenter`. -All big objects in math formula is centered to math axis and the baseline is -ignored. In the following example we create a new big math operator by +All big objects in math formula are centered on the math axis and the baseline is +ignored. In the following example, we create a new big math operator by `\vcenter`: \begtt $$ @@ -935,10 +943,10 @@ thin space between dots and after the last dot, so the five object: comma, dots, comma are exactly equidistant. Typographic conventions say that you have to use the repeating symbol -before and after three dots (comma in previous example) and the three dots -should be at baseline, if the repeating symbol is at baseline. Or they should be -at math axis, if the repeating symbol is at math axis. We have to use \x`\cdots` instead -`\dots` in second case. Example: +before and after three dots (comma in the previous example) and the three dots +should be at baseline if the repeating symbol is at baseline. Or they should be +at the math axis if the repeating symbol is at the math axis. We have to use \x`\cdots` instead +`\dots` in the second case. Example: $$ `a_1, a_2, \dots, a_n, \quad a_1 + a_2 + \cdots + a_n` \qquad a_1, a_2, \dots, a_n, \quad a_1 + a_2 + \cdots + a_n @@ -1027,8 +1035,8 @@ $$ = \qmatrix[b_1\cr b_2\cr b_3]. $$ -If you need to aling the columns by another way than to center, then you can -use phantom. Compare: +If you need to align the columns by another way than to center, then you can +use the phantom. Compare: \begtt $$ @@ -1052,8 +1060,8 @@ $$ $$ \new\OpTeX/ -Another option to set right aligned matrix is setting the \x`\lmfil`: -Its value is used at left side in each `\matrix` item. The right side is +Another option to set the right aligned matrix is setting the \x`\lmfil`: +Its value is used on the left side in each `\matrix` item. The right side is set directly to `\hfil`. \begtt $$ @@ -1082,7 +1090,7 @@ $$ \pmatrix{1 & 2 & 3 | 0 \cr 0 & 1 & 2 | -1/3 \cr 0 & 0 & 0 | 1 } $$ -If you want to put something before opening bracket in the matrix, you can +If you want to put something before the opening bracket in the matrix, you can use another `\matrix`. Example: \begtt @@ -1149,30 +1157,30 @@ $$ 0 & in other cases. } $$ -The `\cases` macro behaves like a special `\matrix` with two left aligned +The `\cases` macro behaves like a special `\matrix` with two left-aligned columns and with left vertically scaled brace $\{$. -First column is processed in math mode and $T$ style, second column +The first column is processed in math mode and $T$ style, the second column is processed in text mode. We have to use `$...$` in the second column if -there is a math material. +there is math material. \sec Lines in display mode \secc General principles -The \ii display/math,display/math/mode +The \ii display/math,display/math/mode `$$$$` finalizes previous paragraph, prints centered on single line with a vertical space above and below and opens next paragraph with no indentation. -From \TeX/'s point of view, the text above plus `$$$$` plus text -below is single paragraph interrupted by display . If there is no +From \TeX/'s point of view, the text above `$$$$` plus text +below is a single paragraph interrupted by display . If there is no text above (i.e. the opening `$$` are in vertical mode), then the internal -`\noindent` is processed first and empty line above is created. -Thus, it is definitely bad idea to open display mode in vertical mode: never -put empty line before `$$$$`. On the other hand, the empty line +`\noindent` is processed first and the empty line above is created. +Thus, it is definitely a bad idea to open display mode in vertical mode: never +put an empty line before `$$$$`. On the other hand, the empty line just after `$$$$` says that the paragraph is finalized by the - and the next text (after the empty line) opens next paragraph with + and the next text (after the empty line) opens the next paragraph with indentation. Summary: \begitems @@ -1193,7 +1201,7 @@ such task, see sections~\ref[dlines] and~\ref[elines]. On the other hand, the in-line math , i.e.\ the `$$` in a paragraph, can be broken after a Bin atom (with penalty `\binoppenalty`) or after a Rel atom (with penalty `\relpenalty`). If you don't want to break -such formula at a specific place then use `\nobreak`, for example +such a formula at a specific place then use `\nobreak`, for example `$a+\nobreak b$`. If you want never to break such formulas then you can set `\binoppenalty=10000`, `\relpenalty=10000`. (Default values are 700 and 500.) @@ -1376,7 +1384,7 @@ In \OpTeX/, \new\OpTeX/ the `\eqalign` macro is more flexible. You can set the `\baselineskip` value by the \x`\eqlines` parameter and math style by the \x`\eqstyle` parameter. -For example, you need to put the system of \"equations" as an subscript of sum +For example, you need to put the system of \"equations" as a subscript of a sum operator: \begtt \typosize[10/12] \adef/{} $$ @@ -1418,11 +1426,11 @@ equation systems one next second. \begitems * `\eqlines` and `\eqstyle` set baselineskip and math style of the formulas. * `\eqalign` allows more than two columns: - First column is right aligned (no space). Second is left aligned (no space). - Third column (if used) - is centered with `\eqspace/2` at left and right boundary of the column. - Fourth is the same as first. Fifth is the same as second etc. The number - of columns which can be used in `\eqalign` is unlimited. + The first column is right-aligned (no space). The second is left-aligned (no space). + The third column (if used) + is centered with `\eqspace/2` at the left and right boundary of the column. + The fourth is the same as the first. The fifth is the same as second etc. The number + of columns that can be used in `\eqalign` is unlimited. \enditems \secc The `\eqalign` macro with references @@ -1447,7 +1455,7 @@ $$ \eqalignno{ 4x - y + 5z &= -5 & \rm(C) \cr } $$ -The `\leqalignno` macro is similar as `\eqalignno` but the marks are at the left +The `\leqalignno` macro is similar to `\eqalignno` but the marks are at the left margin. The \OpTeX/ extensions of `\eqalign` are not available in `\eqalignno` nor `\leqalignno` macros. @@ -1467,8 +1475,8 @@ $$ \eqalignno{ \secc[fams] Math families -\TeX/ is able to use more than one math font in math mode. This was a -necessity in old days when only 128-characters fonts existed. +\TeX/can use more than one math font in math mode. This was a +necessity in the old days when only 128-characters fonts existed. Each math font used in math mode has its \ii math/family {\em math family} represented by a number. Math family is a collection of three (almost) equal fonts in three sizes: first for `\textstyle` and `\displaystyle`, second for `\scriptstyle` @@ -1476,7 +1484,7 @@ and third for `\scriptscriptstyle`. \new Unicode When Unicode math font is loaded then it includes all three optical sizes and -all characters needed for typeseting math formula. +all characters needed for typesetting math formula. Theoretically, we can use only one math family with this single font. But more math families (i.e.\ more fonts in math mode) is still possible. You can combine characters from more fonts (Unicode fonts and old TFM fonts together) in one math formula. @@ -1497,8 +1505,8 @@ loading more fonts. The default macro for loading math fonts looks like: \endtt % Whenever \OpTeX/ needs to resize math fonts (for example in footnotes or -titles), it calls the `\_normalmath` macro in order to reload all math -families to desired size. If you want to add a next font, you can add +titles), it calls the `\_normalmath` macro to reload all math +families to the desired size. If you want to add the next font, you can add `\_loadunimathfamily {}{}` or `\_loadmathfamily ` into the `\_normalmath` macro. The example in section~\ref[newfam] shows how to do it. @@ -1512,8 +1520,8 @@ such a bold title then all characters of this formula must be bolder. For example \"normal" variables must be in bold italic in titles, symbols like `+` `=` must be bold and \"normal bold" letters (e.g., indicating vectors in math formula) must be extra bold in titles. -It means that all fonts from collection of math fonts must be bolder. -We need second collection of math fonts with bolder +It means that all fonts from the collection of math fonts must be bolder. +We need a second collection of math fonts with bolder shape. Unfortunately, it is not always available. \new \OpTeX/ @@ -1546,15 +1554,15 @@ used). So, the default `\_boldmath` macro defined by \OpTeX/ looks like: \secc[newfam] Example of using additional math font -The font `bbold10.tfm` includes double stroked characters, for example +The font `bbold10.tfm` includes double stroked characters, for example, double stroked plus, double stroked Greek letters and digits. -Try to run `pdftex testfont`, then answer to the question about name of the +Try to run `pdftex testfont`, then answer the question about the name of the font: `bbold10` and then type command `\table\end`. The `testfont.pdf` is printed with the table of characters of this font. Most of these characters cannot be found in Unicode math fonts. \new \OpTeX/ -We show an example how to add this font to the collection of used math fonts. +We show an example of how to add this font to the collection of used math fonts. We can re-define the `\_normalmath` macro by: \begtt \typosize[10/12] \addto\_normalmath {\_loadmathfamily 5 bbold } @@ -1585,10 +1593,10 @@ from the new font, for example: \endtt % The \x`\Umathchardef` \TeX/ primitive declares new \TeX/ sequence used in math -typesetting. First parameter is class number (2 means Bin, 3 means Rel, -see the table in the section~\ref[class]). Second parameter is math +typesetting. The first parameter is a class number (2 means Bin, 3 means Rel, +see the table in the section~\ref[class]). The second parameter is a math family number. It is 5, see the redefinition of the `\_normalmath` macro above. -Third parameter is the slot in the font. Now you can try to use these characters: +The third parameter is a slot in the font. Now you can try to use these characters: $$ `a \bbplus b \bbge c` \quad \hbox{gives} \quad a \bbplus b \bbge c. $$ @@ -1632,7 +1640,7 @@ We have to settle for normal version of the font in the `\_boldmath` macro: \addto \_boldmath {\_loadmathfamily 5 bbold } \endtt -Another approach of using more Unicode math fonts in single formula is +Another approach of using more Unicode math fonts in a single formula is shown in \ulink[http://petr.olsak.net/optex/optex-tricks.html\#addumathfont]{OpTeX trick 0030}. diff --git a/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex b/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex index 1e95d269b75..2c0a71cc270 100644 --- a/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex +++ b/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex @@ -1,7 +1,7 @@ -%% This is part of OpTeX project, see http://petr.olsak.net/optex +%% This is part of the OpTeX project, see http://petr.olsak.net/optex % This file is read from optex-doc.tex -% Use: optex optex-doc +% Use: optex optex-doc % (three times) to create whole documentation including all references and the index. \load [doc.opm] @@ -22,9 +22,9 @@ optex optex-doc.tex then the same `*.opm` files are read when the second chapter of this documentation is printed. -A knowledge about \TeX/ is expected from the reader. -You can see a short document -\ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf]{\TeX/ in a Nutshell} +A knowledge about \TeX/ is expected from the reader. +You can see a short document +\ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf]{\TeX/ in a Nutshell} or more detail \ulink[https://eijkhout.net/texbytopic/texbytopic.html]{\TeX/ by topic}. @@ -32,15 +32,15 @@ Notices about hyperlinks. If a control sequence is printed in red color in this documentation then this denotes its \"main documentation point". Typically, the listing where the control sequence is declared follows immediately. If a control sequence is -printed in the blue color in the listing or in the text -then it is active link which points (usually) to the main documentation point. -The main documentation point can be active link which points to a previous +printed in the blue color in the listing or in the text +then it is an active link that points (usually) to the main documentation point. +The main documentation point can be an active link that points to a previous text where the control sequence was mentioned. Such occurrences are active links to the main documentation point. \sec[init] The main initialization file -The `optex.ini` file is read as main file when the format is generated. +The `optex.ini` file is read as the main file when the format is generated. {\everytt={\typosize[8/10]\_let\_printverbline=\_printcodeline \medskip} \def\docfile{optex.ini} @@ -62,8 +62,8 @@ is set as `\newlinechar`. \verbinput (27-36) optex.ini % -The basic macros for macro file syntax is defined, i.\,e.\ -`\_endcode`, `\_doc` and `\_cod`. +The basic macros for macro file syntax is defined, i.\,e.\ +`\_endcode`, `\_doc` and `\_cod`. The `\_codedecl` will be re-defined later. \verbinput (38-42) optex.ini @@ -77,7 +77,7 @@ It is documented in section~\ref[lua]. \verbinput (89-92) optex.ini -The `\everyjob` register is initialized and the format is saved by +The `\everyjob` register is initialized and the format is saved by the `\dump` command. \verbinput (94-102) optex.ini @@ -85,12 +85,12 @@ the `\dump` command. } \printdoctail prefixed.opm -\secc The implementation of the name spaces +\secc The implementation of the namespaces \printdoc prefixed.opm \sec pdf\TeX/ initialization \printdoctail luatex-ini.opm -\printdoc luatex-ini.opm +\printdoc luatex-ini.opm \sec Basic macros We define first bundle of basic macros. @@ -116,7 +116,7 @@ The second bundle of \OpTeX/ macros is here. \printdoc keyval.opm \sec Plain \TeX/ macros -All macros from plain \TeX/ are rewritten here. +All macros from plain \TeX/ are rewritten here. Differences are mentioned in the documentation below. \printdoc plain-macros.opm @@ -142,7 +142,7 @@ Differences are mentioned in the documentation below. \printdoctail math-unicode.opm \sec[opmac-fonts] Scaling fonts in document (high-level macros) -These macros are documented in section~\ref[sizes] from user point of view. +These macros are documented in section~\ref[sizes] from the user point of view. \printdoc fonts-opmac.opm \sec[output] Output routine @@ -191,7 +191,7 @@ The `\margins` macro is documented in the section~\ref[marg]. \printdoc verbatim.opm \secc[hisyntax] Listings with syntax highlighting \printdoctail hi-syntax.opm -\printdoc hi-syntax.opm +\printdoc hi-syntax.opm \sec Graphics \printdoctail graphics.opm @@ -228,8 +228,8 @@ The `\margins` macro is documented in the section~\ref[marg]. \sec Styles \OpTeX/ provides three styles: `\report`, `\letter` and `\slides`. - Their behavior is documented in user part of the manual in the section - \ref[styles] and `\slides` style (for presentations) is documented in + Their behavior is documented in user part of the manual in the section + \ref[styles] and `\slides` style (for presentations) is documented in `op-slides.pdf` which is an example of the presentation. \secc \code{\\report} and \code{\\letter} styles \printdoc styles.opm @@ -259,7 +259,7 @@ 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 +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. diff --git a/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex b/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex index 1e94712426b..8f2fe4d3d3e 100644 --- a/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex +++ b/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex @@ -1,4 +1,4 @@ -%% This is part of OpTeX project, see http://petr.olsak.net/optex +%% This is part of the OpTeX project, see http://petr.olsak.net/optex % This file is read from optex-doc.tex % Use: optex optex-doc (three times) to create whole documentation. @@ -10,7 +10,7 @@ \new \OpTeX/ is compiled as a format for \LuaTeX/. Maybe there is a command -`optex` in your \TeX/ distribution. Then you can write into command line +`optex` in your \TeX/ distribution. Then you can write into the command line \begtt optex document @@ -19,7 +19,7 @@ optex document You can try to process `optex op-demo` or `optex optex-doc`. If there is no `optex` command, see more information about installation -\OpTeX/ at \url{http://petr.olsak.net/optex}. +\OpTeX/ at \url{http://petr.olsak.net/optex}. A minimal document should be @@ -28,16 +28,16 @@ A minimal document should be Hello World! \bye \endtt -The first line \~`\fontfam[LMfonts]` tells that Unicode Latin Modern +The first line \~`\fontfam[LMfonts]` tells that Unicode Latin Modern fonts (derived from Computer Modern) are used. If you omit this line then preloaded Latin Modern fonts are used but preloaded fonts cannot be in Unicode\fnote {This is a technical limitation of \LuaTeX/ for fonts downloaded in formats: only 8bit fonts can be preloaded.}. -So the sentence `Hello World` will be OK without the first line, but you -cannot print such sentence in another languages (for example `Ahoj světe!`) +So the sentence `Hello World` will be OK without the first line, but you +cannot print such sentence in other languages (for example `Ahoj světe!`) where Unicode fonts are needed -because of the characters like `ě` are not mapped correctly in preloaded +because the characters like `ě` are not mapped correctly in preloaded fonts. A somewhat larger example with common settings should be: @@ -52,8 +52,7 @@ Tady je zkušební textík v českém jazyce. \bye \endtt % -You can look at `op-demo.tex` file for more complex, but still simple example. - +You can look at `op-demo.tex` file for a more complex, but still simple example. \sec Page layout %%%%%%%%%%%%%%%% @@ -87,7 +86,7 @@ centered in the paper format. The analogical rule works when or parameter is empty (`\vsize` instead `\hsize` is used). Examples: \begtt -\margins/1 a4 (,,,)mm % \hsize, \vsize untouched, +\margins/1 a4 (,,,)mm % \hsize, \vsize untouched, % typesetting area centered \margins/1 a4 (,2,,)cm % right margin set to 2cm % \hsize, \vsize untouched, vertically centered @@ -95,14 +94,14 @@ parameter is empty (`\vsize` instead `\hsize` is used). Examples: If `=1` then all pages have the same margins. If `=2` then the declared margins are true for odd pages. The margins at the even pages are -automatically mirrored in such case, it means that is replaced by +automatically mirrored in such case, it means that is replaced by and vice versa. -\OpTeX/ declares following paper formats: a4, a4l (landscape~a4), -a5, a5l, a3, a3l, b5, letter and user can declare another own format by `\sdef`: +\OpTeX/ declares following paper formats: a4, a4l (landscape~a4), +a5, a5l, a3, a3l, b5, letter and user can declare another own format by \~`\sdef`: \begtt -\sdef{_pgs:b5l}{(250,176)mm} +\sdef{_pgs:b5l}{(250,176)mm} \sdef{_pgs:letterl}{(11,8.5)in} \endtt @@ -117,10 +116,10 @@ used. For example: declares the paper 100$\times$200\,mm with all four margins 7\,mm. The spaces before and after parameter are necessary. -The command \^`\magscale[]` scales the whole typesetting area. -\new The fixed point of such scaling is the upper left corner of the paper sheet. +The command \^`\magscale[]` scales the whole typesetting area. +\new The fixed point of such scaling is the upper left corner of the paper sheet. Typesetting (breakpoints etc.) is unchanged. All units are relative after -such scaling. Only paper formats dimensions stays unscaled. Example: +such scaling. Only paper format's dimensions stay unscaled. Example: \begtt \margins/2 a5 (22,17,19,21)mm @@ -128,16 +127,16 @@ such scaling. Only paper formats dimensions stays unscaled. Example: \endtt % The first line sets the `\hsize` and `\vsize` and margins for final -printing at a5 format. The setting on the second line centers the scaled +printing at a5 format. The setting on the second line centers the scaled typesetting area to the true a4 paper while breaking points for paragraphs -and pages are unchanged. It may be usable for -review printing. After review is done, the second line can be commented out. +and pages are unchanged. It may be usable for +review printing. After the review is done, the second line can be commented out. -\secc Concept of default page +\secc Concept of the default page %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \OpTeX/ uses \"output routine" for page design. -It is very similar to Plain \TeX/ output routine. +It is very similar to the Plain \TeX/ output routine. There is \^`\headline` followed by \"page body" followed by \^`\footline`. The \^`\headline` is empty by default and it can be used for running headers repeated on each page. The \^`\footline` prints @@ -150,57 +149,56 @@ i.e.\ the \^`\headline` and \^`\footline` are placed to the top and bottom margins. The distance between the \^`\headline` and the top of the page body is given by -the \^`\headlinedist` register. The distance between bottom of the page body and +the \^`\headlinedist` register. The distance between bottom of the page body and the \^`\footline` is given by \^`\footlinedist`. The default values are: \begtt \headline = {} \footline = {\_hss\_rmfixed \_folio \_hss} % \folio expands to page number -\headlinedist = 14pt % from baseline of \headline to top of page body +\headlinedist = 14pt % from baseline of \headline to top of page body \footlinedist = 24pt % from last line in pagebody to baseline of footline \endtt -The page body should be divided to top insertions (floating tables and -figures) followed by a real text and followed by footnotes. -Typically, only real text is here. +The page body should be divided into top insertions (floating tables and +figures) followed by a real text and followed by footnotes. +Typically, the only real text is here. The \^`\pgbackground` tokens list is empty by default but it can be used for -creating background of each page (colors, picture, watermark for example). -The macro \^`\draft` uses this register and puts big text DRAFT as watermark +creating a background of each page (colors, picture, watermark for example). +The macro \^`\draft` uses this register and puts big text DRAFT as a watermark to each page. You can try it. More about the page layout is documented in sections~\ref[oparams] and~\ref[output]. - \secc Footnotes and marginal notes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -The Plain \TeX/'s macro \^`\footnote` can be used as usual. But a new macro +The Plain \TeX/'s macro \^`\footnote` can be used as usual. But a new macro \^`\fnote{}` is defined. The footnote mark is added automatically and it -is numbered +is numbered \new on each chapter from one\fnote {You can declare \^`\fnotenumglobal` if you want footnotes numbered in whole document from one or \^`\fnotenumpages` if you want footnotes numbered at each page from one. Default setting is \^`\fnotenumchapters`}. -The is scaled to 80 \%. +The is scaled to 80 \%. User can redefine footnote mark or scaling, as shown in the section~\ref[fnotes]. The \^`\fnote` macro is fully applicable only in \"normal outer" paragraph. It doesn't work inside boxes (tables, for example). If you are solving such -case then you can use the command \^`\fnotemark``` inside the box: only the -footnote mark is generated here. When the box is finished you can use -\^`\fnotetext{}`. This macro puts the to the footnote. -The have to be `1` if only one such command is in the box. -Second \^`\fnotemark` inside the same box have to have the parameter `2` etc. -The same number of \^`\fnotetext`s have to be written +a case then you can use the command \^`\fnotemark``` inside the box: only the +footnote mark is generated here. When the box is finished you can use +\^`\fnotetext{}`. This macro puts the to the footnote. +The has to be `1` if only one such command is in the box. +Second \^`\fnotemark` inside the same box has to have the parameter `2` etc. +The same number of \^`\fnotetext`s have to be written after the box as the number of \^`\fnotemark`s inserted inside the box. Example: \begtt Text in a paragraph\fnote{First notice}... % a "normal" footnote \table{...}{...\fnotemark1...\fnotemark2...} % two footnotes in a box -\fnotetext{Second notice} +\fnotetext{Second notice} \fnotetext{Third notice} ... \table{...}{...\fnotemark1...} % one footnote in a box @@ -210,8 +208,8 @@ Text in a paragraph\fnote{First notice}... % a "normal" footnote The marginal note can be printed by the \^`\mnote{}` macro. The is placed to the right margin on the odd pages and it is placed to the left margin on the even pages. This is done after second \TeX{} run because the -relevant information is stored in an external file and read from it again. -If you need to place the notes only to the fixed margin write +relevant information is stored in an external file and read from it again. +If you need to place the notes only to the fixed margin write \^`\fixmnotes\right` or \^`\fixmnotes\left`. The is formatted as a little paragraph with the maximal width @@ -224,7 +222,6 @@ in order to margin notes do not overlap. The positive value of shifts the note up and negative value shifts it down. For example \^`\mnote`` up 2\baselineskip{}` shifts this marginal note two lines up. - \sec Fonts %%%%%%%%%% @@ -234,26 +231,26 @@ shifts the note up and negative value shifts it down. For example You can select the font family by \^`\fontfam[]`. The argument is case insensitive and spaces are ignored in it. For example, \^`\fontfam[LM Fonts]` is equal to \^`\fontfam[LMfonts]` and it is equal -to \^`\fontfam[lmfonts]`. Several aliases are prepared, thus +to \^`\fontfam[lmfonts]`. Several aliases are prepared, thus \^`\fontfam[Latin Modern]` can be used for loading Latin Modern family too. -If you write \^`\fontfam[?]` then all font families registered in \OpTeX/ +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 -how to register your own font family is appended in such catalog. +on how to register your own font family are appended in the catalog. If the family is loaded then {\em font modifiers} applicable in such font family are listed on the terminal: (`\caps`, `\cond` for example). And there are four basic {\em variant selectors} (\^`\rm`, \^`\bf`, \^`\it`, \^`\bi`). -The usage of variant selectors is the same as in Plain \TeX: +The usage of variant selectors is the same as in Plain \TeX: `{\it italics text}`, `{\bf bold text}` etc. The font modifiers (`\caps`, `\cond` for example) can be used before a variant selector and they can be (independently) combined: `\caps\it` or `\cond\caps\bf`. The -modifiers keeps their internal setting until group ends or until another -modifier which negates the previous feature is used. So +modifiers keep their internal setting until the group ends or until another +modifier that negates the previous feature is used. So `{\caps \rm First text \it Second text}` gives {\caps \rm First text \it Second text}. @@ -263,9 +260,9 @@ There is one special variant selector \^`\currvar` which does not change the selected variant but reloads the font due to (maybe newly specified) font modifier(s). -The context between variants \^`\rm` $\leftrightarrow$ \^`\it` and +The context between variants \^`\rm` $\leftrightarrow$ \^`\it` and \^`\bf` $\leftrightarrow$ \^`\bi` is kept by the \^`\em` -macro (emphasize text). +macro (emphasize text). It switches from current \^`\rm` to \^`\it`, from current \^`\it` to \^`\rm`, from current \^`\bf` to \^`\bi` and from current \^`\bi` to \^`\bf`. The italics correction `\/` is inserted automatically, if needed. Example: @@ -281,7 +278,7 @@ This is {\em important} text. % = This is {\it important\/} text. More about the \OpTeX/ Font Selection System is written in the technical documentation in the section~\ref[fontsystem]. You can mix more font families in your document, you can -declare your own variant selectors or modifiers etc. +declare your own variant selectors or modifiers, etc. \secc[sizes] Font sizes %%%%%%%%%%%%%%%%%%%%% @@ -290,7 +287,7 @@ The command \^`\typosize[/]` sets the font size of text math fonts and baselineskip. If one of these two parameters is empty, the corresponding feature stays unchanged. Don't write the unit of these parameters. The unit is internally set to \^`\ptunit` which is 1pt by default. -You can change the unit by the command \^`\ptunit=`, +You can change the unit by the command \^`\ptunit=`, for instance \^`\ptunit=1mm` enlarges all font sizes declared by \^`\typosize`. Examples: @@ -301,12 +298,12 @@ Examples: \endtt The commands for font size setting described in this section -have local validity. If you put them into a group, -the settings are lost when the group is finished. If you set -something relevant with paragraph shape (baselineskip given by -\^`\typosize` for example) then you must first finalize the -paragraph before closing the group: -`{\typosize[12/14] ...... \par}`. +have local validity. If you put them into a group, +the settings are lost when the group is finished. If you set +something relevant with paragraph shape (baselineskip given by +\^`\typosize` for example) then you must first finalize the +paragraph before closing the group: +`{\typosize[12/14] ...... \par}`. The command \^`\typoscale[/]` sets the text and math fonts @@ -320,13 +317,12 @@ i.e. the value stays unchanged. Examples: \typoscale[\magstep2/] % fonts bigger 1,44times (\magstep2 expands to 1440) \endtt -First usage of \^`\typosize` or \^`\typoscale` macro in your document sets so -called {\em main values}, i.\,e.\ main font size and main baselineskip. They are internally -saved in registers \^`\mainfosize` and \^`\mainbaselineskip`. +First usage of \^`\typosize` or \^`\typoscale` macro in your document sets so-called {\em main values}, i.\,e.\ main font size and main baselineskip. They are internally +saved in registers \^`\mainfosize` and \^`\mainbaselineskip`. \new -The \^`\typoscale` command does scaling in respect to current values by default. -If you want to do it in respect to main values, type \^`\scalemain` immediately +The \^`\typoscale` command does scaling with respect to current values by default. +If you want to do it with respect to the main values, type \^`\scalemain` immediately before \^`\typoscale` command. \begtt @@ -344,13 +340,13 @@ baselineskip. \new There is \"low level" \^`\setfontsize{}` command which behaves like a font modifier and sets given font size used by next variant selectors. -It doesn't change the font size immediately, but following variant slelector +It doesn't change the font size immediately, but the following variant selector does it. For example \^`\setfontsize{at15pt}`\^`\currvar` sets current variant to 15pt. If you are using a font family with \"optical sizes feature" (i.\,e.\ there are more recommended sizes of the same font which are not scaled -linearly; good example is Computer Modern aka Latin Modern fonts) -then the recommended size is selected by all mentioned commands automatically. +linearly; a good example is Computer Modern aka Latin Modern fonts) +then the recommended size is selected by all mentioned commands automatically. More information about resizing of fonts is documented in the section~\ref[setfontsize]. @@ -362,21 +358,21 @@ See the additional document \ulink[http://petr.olsak.net/ftp/olsak/optex/optex-math.pdf] {Typesetting Math with \OpTeX/} for more details about this issue. -\OpTeX/ preloads a collection of 7bit Computer Modern math fonts -and AMS fonts in its format for math typesetting. -You can use them in any size and in the \^`\boldmath` variant. +\OpTeX/ preloads a collection of 7bit Computer Modern math fonts +and AMS fonts in its format for math typesetting. +You can use them in any size and in the \^`\boldmath` variant. % -\new -Most declared text font families (see \^`\fontfam` in the section~\ref[fontfam]) -are configured with recommended Unicode +\new +Most declared text font families (see \^`\fontfam` in the section~\ref[fontfam]) +are configured with a recommended Unicode math font. This font is automatically loaded unless you specify \^`\noloadmath` before first \^`\fontfam` command. See log file for more information about loading text font family and Unicode math fonts. If you prefer another Unicode math font, specify it by \^`\loadmath{[]}` or \^`\loadmath{}` before first \^`\fontfam` command. -Hundreds math symbols and operators like in AMS\TeX/ are accessible. -For example `\alpha` $\alpha$, `\geq`~$\geq$, `\sum` $\sum$, +Hundreds math symbols and operators like in AMS\TeX/ are accessible. +For example `\alpha` $\alpha$, `\geq`~$\geq$, `\sum` $\sum$, `\sphericalangle` $\sphericalangle$, `\bumpeq`, $\bumpeq$. See AMS\TeX/ manual or \ulink[http://petr.olsak.net/ftp/olsak/optex/optex-math.pdf] @@ -396,8 +392,7 @@ The following math alphabets are available: \bi % sans serif bold slanted $/bi abc-xyz,ABC-XYZ$ \endtt -The last two selectors \^`\bf` and \^`\bi` select the sans serif fonts in math regardless -the current text font family. This is common notation for vectors and +The last two selectors \^`\bf` and \^`\bi` select the sans serif fonts in math regardless of the current text font family. This is a common notation for vectors and matrices. You can re-declare them, see section~\ref[unimath-codes] where definitions of Unicode math variants of \^`\bf` and \^`\bi` selectors are documented. @@ -410,12 +405,9 @@ is usable for math formulae in titles typeset in bold, for example. You can use \^`\mathbox{}` inside math mode. It behaves as `{\hbox{}}` (i.e. the is printed in horizontal non-math mode) but the size of the is adapted to the context of math size (text or script or -scriptscript). Moreover, there is the macro \^`\mathstyles{}` which depends on -the current math style. It is documented at the end of the -section~\ref[math-macros]. +scriptscript). - -\sec Typical elements of document +\sec Typical elements of the document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \secc[chap] Chapters and sections @@ -434,36 +426,36 @@ braces are used): \endtt The chapters are automatically numbered by one number, sections by two numbers -(chapter.section) and subsections by three numbers. If there are no chapters -then section have only one number and subsection two. +(chapter.section), and subsections by three numbers. If there are no chapters +then sections have only one number and subsections two. -The implicit design of the titles of chapter etc.\ are implemented in the +The implicit design of the titles of chapter etc.\ is implemented in the macros \^`\_printchap`, \^`\_printsec` and \^`\_printsecc`. A designer can simply change these macros if he/she needs another behavior. -The first paragraph after the title of chapter, section and subsection is +The first paragraph after the title of chapter, section, and subsection is not indented but you can type `\let`\^`\_firstnoindent=\relax` if you need all paragraphs indented. -If a title is so long then it breaks to more lines in the output. It is better to hint the +If a title is so long then it breaks into more lines in the output. It is better to hint at the breakpoints because \TeX/ does not interpret the meaning of the title. -User can put the \^`\nl` (means newline) to the breakpoints. +Users can put the \^`\nl` (means newline) to the breakpoints. If you want to arrange a title to more lines in your source file then you can -use `^^J` at the end of each line (except the last one). -When `^^J` is used, then reading of the title continues at the next line. +use `^^J` at the end of each line (except the last one). +When `^^J` is used, then the reading of the title continues at the next line. The \"normal" comment character `%` doesn't work in titles. You can use \^`\nl`{\visiblesp` ^^J`} if you want to have corresponding lines in the source -and in the output. +and the output. -The chapter, section or subsection isn't numbered if the \^`\nonum` precedes. -And the chapter, section or subsection isn't delivered to the table of +The chapter, section, or subsection isn't numbered if the \^`\nonum` precedes. +And the chapter, section, or subsection isn't delivered to the table of contents if \^`\notoc` precedes. You can combine both prefixes. \secc[cap] Another numbered objects %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Apart from chapters, sections and subsections, there are another +Apart from chapters, sections, and subsections, there are another automatically numbered objects: equations, captions for tables and figures. The user can declare more numbered objects. @@ -483,7 +475,7 @@ before `\cr`. For example: Another automatically numbered object is a caption which is tagged by \^`\caption/t` for tables and \^`\caption/f` for figures. The caption text follows. The \^`\cskip` can be used between \^`\caption` text and the real object (table -or figure). You can use two orders: `\cskip ` or +or figure). You can use two orders: `\cskip ` or `\cskip `. The \^`\cskip` creates appropriate vertical space between them. Example: @@ -492,7 +484,7 @@ The \^`\cskip` creates appropriate vertical space between them. Example: \cskip \noindent\hfil\table{rl}{ age & value \crl\noalign{\smallskip} - 0--1 & unmeasured \cr + 0--1 & unmeasured \cr 1--6 & observable \cr 6--12 & significant \cr 12--20 & extremal \cr @@ -508,7 +500,7 @@ This example produces: \cskip \noindent\hfil\table{rl}{ age & value \crl\noalign{\smallskip} - 0--1 & unmeasured \cr + 0--1 & unmeasured \cr 1--6 & observable \cr 6--12 & significant \cr 12--20 & extremal \cr @@ -517,17 +509,17 @@ This example produces: 60--$\infty$ & moderate} \medskip -You can see that the word \"Table" followed by a number is added by the macro -`\caption/t`. -The caption text is centered. If it occupies more lines then the +You can see that the word \"Table" followed by a number is added by the macro +`\caption/t`. +The caption text is centered. If it occupies more lines then the last line is centered. The macro \^`\caption/f` behaves like \^`\caption/t` but it is intended for figure captions with independent numbering. -The word (Table, Figure) depends on the actual selected language (see -section~\ref[lang] about languages). +The word (Table, Figure) depends on the selected language (see +section~\ref[lang] about languages). -If you wish to make the table or figure as floating object, you need to use +If you wish to make the table or figure as a floating object, you need to use Plain \TeX/ macros \^`\midinsert` or \^`\topinsert` terminated by \^`\endinsert`. Example: @@ -545,7 +537,7 @@ behaves like \^`\topinsert`...\^`\endinsert`. There are five prepared counters `A`, `B`, `C`, `D` and `E`. They are reset in each chapter and section\fnote {This feature can be changed, see the section~\ref[sections] in the technical documentation.}. -They can be used in context of \^`\numberedpar` `{}` +They can be used in context of \^`\numberedpar` `{}` macro. For example: \begtt \def\theorem {\numberedpar A{Theorem}} @@ -558,16 +550,15 @@ Three independent numbers are used in this example. One for Theorems and Corolla second for Definitions and third for Examples. The user can write `\theorem Let $M$ be...` and the new paragraph is started with the text: {\bf Theorem 1.4.1.} Let $M$ be... -You can add an optional parameter in brackets. For example, -`\theorem [(L'Hôpital's rule)] Let $f$, $g$ be...` +You can add an optional parameter in brackets. For example, +`\theorem [(L'Hôpital's rule)] Let $f$, $g$ be...` is printed like {\bf Theorem 1.4.2 (L'Hôpital's rule).} Let $f$, $g$ be... - \secc References %%%%%%%%%%%%%%% Each automatically numbered object documented in -sections \ref[chap] and \ref[cap] can be referenced +sections \ref[chap] and \ref[cap] can be referenced \new if optional parameter `[ }` command makes the internal multiplication -with the current matrix so linear transformations can be composed. +with the current matrix so linear transformations can be composed. One linear transformation given by the `\pdfsetmatrix` above transforms the vector $[0,1]$ to [,\,] and $[1,0]$ to [,\,]. The stack-oriented commands `\pdfsave` and `\pdfrestore` gives a possibility of storing and restoring the current transformation matrix and the position of the current point. -This position have to be the same from \TeX{}'s point of -view as from transformation point of view when `\pdfrestore` is processed. -Due to this fact the `\pdfsave\rlap{}\pdfrestore` +This position has to be the same from \TeX{}'s point of +view as from the transformation point of view when `\pdfrestore` is processed. +Due to this fact the `\pdfsave\rlap{}\pdfrestore` or something similar is recommended. \OpTeX/ provides two special transformation macros \^`\pdfscale` and \^`\pdfrotate`: \begtt \catcode`\<=13 -\pdfscale{}{} +\pdfscale{}{} \pdfrotate{} -\endtt +\endtt -These macros simply calls the properly `\pdfsetmatrix` command. +These macros simply call the properly `\pdfsetmatrix` command. It is known that the composition of transformations is not commutative. It means that the order is important. You have to read the transformation @@ -1484,32 +1474,32 @@ third: \pdfsave \pdfrotate{-15.3}\pdfsetmatrix{2 0 1.5 2}\rlap{text3}% \endtt % \par\nobreak\bigskip\smallskip -This gives the following result. +This gives the following result. First: \pdfsave \pdfrotate{30}\pdfscale{-2}{2}\rlap{text1}\pdfrestore second: \pdfsave \pdfscale{-2}{2}\pdfrotate{30}\rlap{text2}\pdfrestore third: \pdfsave \pdfrotate{-15.3}\pdfsetmatrix{2 0 1.5 2}\rlap{text3}\pdfrestore \par\nobreak\bigskip\penalty0%\bigskip -You can see that \TeX/ knows nothing about dimensions of transfomed material, -it treats it as with a zero dimension object. +You can see that \TeX/ knows nothing about dimensions of transformed material, +it treats it as with a zero dimension object. \new The \^`\transformbox{}{}` macro solves the problem. This macro puts the transformed -material to a box with relevant dimension. The parameter -includes one or more transfromation commands `\pdfsetmatrix`, `\pdfscale`, +material into a box with relevant dimensions. The parameter +includes one or more transformation commands `\pdfsetmatrix`, `\pdfscale`, `\pdfrotate` with their parameters. The is transformed text. Example: \~`\frame{\transformbox{\pdfscale{1}{1.5}\pdfrotate{-10}}{moj}}` creates \frame{\transformbox{\pdfscale{1}{1.5}\pdfrotate{-10}}{moj}}. -The \^`\rotbox{}{}` is shortcut for +The \^`\rotbox{}{}` is shortcut for \^`\transformbox{\pdfrotate{}}{}`. \secc Ovals, circles %%%%%%%%%%%%%%%%%%%% \new -The \^`\inoval{}` creates a box like this: \inoval{text}. +The \^`\inoval{}` creates a box like this: \inoval{text}. Multiline text can be put in an oval by the command \^`\inoval{\vbox{}}`. Local settings can be set by \^`\inoval[]{}` or you can re-declare global settings by @@ -1524,7 +1514,7 @@ Local settings can be set by \overlapmargins=N % ignore margins by surrounding text \hhkern=0pt \vvkern=0pt} % left-righ margin, top-bottom margin \endtt -The total distance from text to oval boundary is `\hhkern+\roundness` at the left and right +The total distance from text to oval boundary is `\hhkern+\roundness` at the left and right sides and `\vvkern+\roundness` at the top and bottom sides of the text. @@ -1534,11 +1524,11 @@ put such setting right in front of the : \new The \^`\incircle[\ratio=1.8]{}` creates a box like this \incircle[\ratio=1.8]{text}. -The \^`\ratio` parameter means width/height. The usage is analogical like for oval. +The \^`\ratio` parameter means width/height. The usage is analogical like for oval. The default parameters are \begtt -\circleparams={\ratio=1 \fcolor=\Yellow \lcolor=\Red \lwidth=0.5bp +\circleparams={\ratio=1 \fcolor=\Yellow \lcolor=\Red \lwidth=0.5bp \shadow=N \ignoremargins=N \hhkern=2pt \vvkern=2pt} \endtt @@ -1551,22 +1541,22 @@ is used. The `\roundness=5mm` is default for \^`\clipinoval` and user can change it. Example: -\begtt -\clipincircle 3cm 3.5cm 6cm 7cm {\picw=6cm \inspic{myphoto.jpg}} +\begtt +\clipincircle 3cm 3.5cm 6cm 7cm {\picw=6cm \inspic{myphoto.jpg}} \endtt \secc Putting images and texts wherever \new The \^`\puttext` ` {}` puts the `` shifted by `` right and by -`` up from current point of typesetting and does not change the -position of the current point. Assume coordinate system with origin in the +`` up from the current point of typesetting and does not change the +position of the current point. Assume a coordinate system with origin in the current point. Then \^`\puttext` ` {}` puts the text at the coordinates ``, ``. More exactly the left edge of its baseline is at that -position. +position. \new -The \^`\putpic` ` {}` puts the `` of given +The \^`\putpic` ` {}` puts the `` of given `` and `` at given position (its left-bottom corner). You can write \^`\nospec` instead `` or `` if this parameter is not given. @@ -1578,15 +1568,15 @@ not given. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \OpTeX/ prepares hyphenation patterns for all languages if such patterns are -available in your \TeX/ system. +available in your \TeX/ system. \new Only USenglish patterns (original from Plain \TeX/) are preloaded. -Hyphenation patterns of all another languages are loaded on demand when you first use -the `\lang` command in your document. +Hyphenation patterns of all other languages are loaded on demand when you first use +the `\lang` command in your document. For example \^`\delang` for German, \^`\cslang` for -Czech, \^`\pllang` for Polish. The is a shortcut -of the language (mostly from ISO 639-1). -You can list all available languages by \^`\langlist` +Czech, \^`\pllang` for Polish. The is a shortcut +of the language (mostly from ISO 639-1). +You can list all available languages by \^`\langlist` macro. This macro prints now: \medskip @@ -1597,7 +1587,7 @@ macro. This macro prints now: \new For compatibility with e-plain macros, there is the command -\^`\uselanguage{}`. The parameter is long form of +\^`\uselanguage{}`. The parameter is long-form of language name, i.e.\ \^`\uselanguage{Czech}` works the same as \^`\cslang`. The \^`\uselanguage` parameter is case insensitive. @@ -1612,27 +1602,27 @@ articles or books: \"Chapter", \"Table" and \"Figure". These phrases need to be in used language and it depends on the previously used language selectors `\lang`. \OpTeX/ declares these words only for few languages: \new -Czech, German, Spanish, French, Greek, Italian, Polish, Russian, Slovak and -English, If you need to use these words in another languages or you want to -auto-generate more words in your macros, then you can declare it by -\^`\sdef` or \^`\_langw` commands as shown in section~\ref[langphrases]. +Czech, German, Spanish, French, Greek, Italian, Polish, Russian, Slovak and +English, If you need to use these words in other languages or you want to +auto-generate more words in your macros, then you can declare it by +\~`\sdef` or \^`\_langw` commands as shown in section~\ref[langphrases]. The \~`\makeindex` command needs to know the sorting rules used in your language. -\OpTeX/ defines only few language rules for sorting: Czech, +\OpTeX/ defines only a few language rules for sorting: Czech, Slovak and English. How to declare sorting rules for more languages are described in the section~\ref[makeindex]. If you declare `\quotes`, then the control sequences `\"` and `\'` -should be used like this: `\""` or `\''` +should be used like this: `\""` or `\''` (note that the terminating character is the same but it isn't escaped). -This prints language dependent normal or alternative quotes around +This prints language-dependent normal or alternative quotes around . The language is specified by . \OpTeX/ declares -quotes only for Czech, German, Spanish, French, Greek, Italian, Polish, -Russian, Slovak and English (\^`\csquotes`, \^`\dequotes`, \dots, \^`\enquotes`). +quotes only for Czech, German, Spanish, French, Greek, Italian, Polish, +Russian, Slovak and English (\^`\csquotes`, \^`\dequotes`, \dots, \^`\enquotes`). You can simply define your own quotes as shown in section~\ref[langphrases]. -The `\"` is used for quotes visualy more similar to the `"` character which +The `\"` is used for quotes visually more similar to the `"` character which can be primary quotes or secondary quotes depending on the language rules. -May be you want to alternate meaning of these two types of quotes. Use +Maybe you want to alternate the meaning of these two types of quotes. Use `\quotes\altquotes` in such case. \secc[styles] Pre-defined styles @@ -1640,19 +1630,19 @@ May be you want to alternate meaning of these two types of quotes. Use \OpTeX/ defines three style-declaration macros \~`\report`, \~`\letter` and \~`\slides`. You can use them at the beginning of your document if you are -preparing these types of document and you don't need to create your own +preparing these types of documents and you don't need to create your own macros. -The \^`\report` declaration is intended to create reports. It +The \^`\report` declaration is intended to create reports. It sets default font size to 11\,pt and `\parindent` (paragraph indentation) to 1.2\,em. The `\tit` macro uses smaller font because we assume that \"chapter level" -will be not used in reports. The first page has no page number, but next pages -are numbered (from number~2). Footnotes are numbered from one in whole -document. The macro `\author ` can be used when -\^`\report` is declared. It prints `` in italics at center of the +will be not used in reports. The first page has no page number, but the next pages +are numbered (from number~2). Footnotes are numbered from one in the whole +document. The macro `\author ` can be used when +\^`\report` is declared. It prints `` in italics at the center of the line. You can separate authors by `\nl` to more lines. -The \^`\letter` declaration is intended to create letters. +The \^`\letter` declaration is intended to create letters. See the files `op-letter-*.tex` for examples. The \^`\letter` style sets default font size to 11\,pt and `\parindent` to 0\,pt. It sets half-line space @@ -1670,21 +1660,21 @@ looks like: \endtt -It means that you need not to use any special mark at the end of lines: end +It means that you need not use any special mark at the end of lines: the ends of lines in the source file are the same as in printed output. The \^`\address` macro creates `\vtop` with address lines. The width of such -`\vtop` is equal to the most wide line used in it. So, you can use -`\hfill\address...` in order to put the address box to the right side of the -document. Or you can use `\address...` to put -`` before first line of the address. +`\vtop` is equal to the widest line used in it. So, you can use +`\hfill\address...` to put the address box to the right side of the +document. Or you can use `\address...` to put +`` before the first line of the address. The \^`\slides` style creates a simple presentation slides. See an example in the file `op-slides.tex`. Run `optex op-slides.tex` and see the documentation of -\^`\slides` style in the file `op-slides.pdf`. +\^`\slides` style in the file `op-slides.pdf`. -Analogical declaration macro `\book` is not prepared. Each book needs an +Analogical declaration macro `\book` is not prepared. Each book needs individual typographical care. You need to create specific macros for -design. +design. \secc Loading other macro packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1692,30 +1682,40 @@ design. You can load more macro packages by `\input{}` or by \^`\load[]`. The first case (`\input`) is \TeX/ primitive command, it can be used in the alternative old syntax `\input ` too. The -second case (\^`\load`) allows to specify a comma separated list of included files. +second case (\^`\load`) allows specifying a comma-separated list of included files. Moreover, it loads each macro file only once, it sets temporarily standard category codes during loading and it tries to -load `.opm` or `.tex` or ``, first occurence -wins. Example: +load `.opm` or `.tex` or ``, the first occurence +wins. Example: \begtt -\load [qrcode, tikz] +\load [qrcode, tikz] \endtt % does `\input qrcode.opm` \,and `\input tikz.tex` \,and it saves local information about the fact that these file names -`qrcode` and `tikz` were already used, i.\,e. next \^`\load` will skip them. +`qrcode` and `tikz` were already used, i.\,e. next \^`\load` will skip them. It is strongly recommended to use the `\load` macro for loading external -macros, if you need them. On the other hand, if your source document is structured +macros if you need them. On the other hand, if your source document is structured to more files (with individual chapters or sections), use simply the `\input` primitive. +The macro packages intended to \OpTeX/ have the name `*.opm`. +The following packages are distributed as part of \OpTeX/: +\begitems +* `qrcodes.opm` enables to create QR codes. +* `vlna.opm` enables to protect of one-letter prepositions and more things automatically. +* `emoji.opm` defines `\emoji{}` command for colored emoticons. +* `plain-at.opm` defines the old names from plain \TeX/. +\enditems +See the directory `optex/pkg/` and these files for more information about +them. \secc Lorem ipsum dolor sit %%%%%%%%%%%%%%%%%%%%%%%%%%% \new -A designer needs to concentrate to the design of the output and maybe he/she -needs a material for testing macros. There is the possibility to generate a +A designer needs to concentrate on the design of the output and maybe he/she +needs material for testing macros. There is the possibility to generate a neutral text for such experiments. Use \^`\lorem[]` or \^`\lorem[-]`. It prints a paragraph (or paragraphs) with neutral text. The numbers or , must be in the range 1 to 150 @@ -1728,7 +1728,7 @@ prints all prepared paragraphs. \new The control sequences for typical logos can be terminated by optional `/` -which is ignored when printing. This makes logos more legible in source file: +which is ignored when printing. This makes logos more legible in the source file: \begtt We are using \TeX/ because it is cool. \OpTeX/ is better than \LaTeX. @@ -1737,11 +1737,11 @@ We are using \TeX/ because it is cool. \OpTeX/ is better than \LaTeX. \secc The last page %%%%%%%%%%%%%%%%%%% -The number of the last page (it may be different from number of pages) is +The number of the last page (it may be different from the number of pages) is expanded by \^`\lastpage` macro. It expands to `?` in first \TeX/ run and to -the last page in next \TeX/ runs. +the last page in next \TeX/ runs. -There is an example for footlines in the format \"current page / last page": +There is an example for footlines in the format \"current page / last page": \begtt \footline={\hss \fixedrm \folio/\lastpage \hss} @@ -1750,80 +1750,159 @@ There is an example for footlines in the format \"current page / last page": \new The \^`\lastpage` expands to the last \^`\folio` which is a decimal number or Roman numeral (when \^`\pageno` is negative). If you need to know -total pages used in the document, use \^`\totalpages` macro. It expands to +the total pages used in the document, use \^`\totalpages` macro. It expands to zero (in first \TeX/ run) or to the number of all pages in the document -(in next \TeX/ runs). +(in next \TeX/ runs). \secc Use \OpTeX/ %%%%%%%%%%%%%%%%% \new -The command \^`\useOpTeX` (or \^`\useoptex`) does nothing in \OpTeX/ but it causes +The command \^`\useOpTeX` (or \^`\useoptex`) does nothing in \OpTeX/ but it causes an error (undefined control sequence) when another format is used. You can put it as the first command in your document: \begtt -\useOpTeX % we are using OpTeX format, no LaTeX :) +\useOpTeX % we are using OpTeX format, no LaTeX :) \endtt \sec Summary %%%%%%%%%%%% -\begtt \typosize[9/11]\adef!{\string\endtt}\adef&{\kern.25em} -\tit Title (terminated by end of line) -\chap Chapter Title (terminated by end of line) -\sec Section Title (terminated by end of line) -\secc Subsection Title (terminated by end of line) - -\maketoc % table of contents generation -\ii item1,item2 % insertion the items to the index -\makeindex % the index is generated - -\label [labname] % link target location -\ref [labname] % link to the chapter, section, subsection, equation -\pgref [labname] % link to the page of the chapter, section, ... - -\caption/t % a numbered table caption -\caption/f % a numbered caption for the picture -\eqmark % a numbered equation - -\begitems % start list of the items -\enditems % end of list of the items -\begtt % start verbatim text -! % end verbatim text -\activettchar X % initialization character X for in-text verbatim -\code % another alternative for in-text verbatim -\verbinput % verbatim extract from the external file -\begmulti num % start multicolumn text (num columns) -\endmulti % end multicolumn text - -\cite [labnames] % refers to the item in the lits of references -\rcite [labnames] % similar to \cite but [] are not printed. -\sortcitations \shortcitations \nonumcitations % cite format -\bib [labname] % an item in the list of references -\usebib/? (style) bib-base % direct using of .bib file, ? in {s,c} - -\load [] % loadaing macro files -\fontfam [FamilyName] % selection of font family -\typosize [font-size/baselineskip] % size setting of typesetting -\typoscale [factor-font/factor-baselineskip] % size scaling -\thefontsize [size] \thefontscale [factor] % current font size - -\inspic file.ext % insert a picture, extensions: jpg, png, pdf -\table {rule}{data} % macro for the tables like in LaTeX - -\fnote {text} % footnote (local numbering on each page) -\mnote {text} % note in the margin (left or right by page number) - -\hyperlinks {color-in}{color-out} % PDF links activate as clickable -\outlines {level} % PDF will have a table of contents in the left tab - -\magscale[factor] % resize typesetting, line/page breaking unchanged -\margins/pg format (left, right, top, bottom)unit % margins setting - -\report \letter \slides % style declaration macros +\def\ttref#1'{\ea\~\ea`\csname#1\endcsname`} + +\begtt \typosize[9/11]\adef&{\kern.25em}\adef~#1'{\ea\~\ea`\csname#1\endcsname`} +~tit' Title (terminated by end of line) +~chap' Chapter Title (terminated by end of line) +~sec' Section Title (terminated by end of line) +~secc' Subsection Title (terminated by end of line) + +~maketoc' % table of contents generation +~ii' item1,item2 % insertion the items to the index +~makeindex' % the index is generated + +~label' [labname] % link target location +~ref' [labname] % link to the chapter, section, subsection, equation +~pgref' [labname] % link to the page of the chapter, section, ... + +~caption'/t % a numbered table caption +~caption'/f % a numbered caption for the picture +~eqmark' % a numbered equation + +~begitems' % start a list of the items +~enditems' % end of list of the items +~begblock' % start a block of text +~endblock' % end of block of text +~begtt' % start a verbatim text +~endtt' % end verbatim text +~activettchar' X % initialization character X for in-text verbatim +~code' % another alternative for in-text verbatim +~verbinput' % verbatim extract from the external file +~begmulti' num % start multicolumn text (num columns) +~endmulti' % end multicolumn text + +~cite' [labnames] % refers to the item in the lits of references +~rcite' [labnames] % similar to \cite but [] are not printed. +~sortcitations' ~shortcitations' ~nonumcitations' % cite format +~bib' [labname] % an item in the list of references +~usebib'/? (style) bib-base % direct using of .bib file, ? in {s,c} + +~load' [filenames] % loadaing macro files +~fontfam' [FamilyName] % selection of font family +~typosize' [font-size/baselineskip] % size setting of typesetting +~typoscale' [factor-font/factor-baselineskip] % size scaling +~thefontsize' [size] ~thefontscale' [factor] % current font size + +~inspic' file.ext % insert a picture, extensions: jpg, png, pdf +~table' {rule}{data} % macro for the tables like in LaTeX + +~fnote' {text} % footnote (local numbering on each page) +~mnote' {text} % note in the margin (left or right by page number) + +~hyperlinks' {color-in}{color-out} % PDF links activate as clickable +~outlines' {level} % PDF will have a table of contents in the left tab + +~magscale'[factor] % resize typesetting, line/page breaking unchanged +~margins'/pg format (left, right, top, bottom)unit % margins setting + +~report' ~letter' ~slides' % style declaration macros \endtt +\sec API for macro writers +%%%%%%%%%%%%%%%%%%%%%%%%%% + +All \TeX/ primitives and almost all \OpTeX/ macros are accesible by two +names: `\foo` (public or user name space) and `\_foo` (private name space). +For example `\hbox` and `\_hbox` means the same \TeX/ primitive. More about +it is documented in section~\ref[prefixed]. + +If this manual refers `\foo` then `\_foo` equivalent exists too. For example, +we mention the `\addto` macro below. The `\_addto` equivalent exists too, but it +is not explicitly mentioned here. If we refer only `\_foo` then its public +equivalent does not exist. For example, we mention the `\_codedecl` macro below, so +this macro is not available as `\codedecl`. + +If you are writing a document or macros specific for the document, then use +simply user namespace (`\foo`). If you are writing more general macros, +then use private namespace (`\_foo`), but you should declare your own namespace +by \~`\_namespace` macro and you have to follow the naming discipline described in +section~\ref[pkg-namespace]. + +The alphabetically sorted list of macros typically usable for macro writers follows. +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{}` adds at the end of `\macro` body.\nl +\^`\adef` `{}` defines active character with meaning .\nl +\^`\afterfi` `{}\fi` expands to `\fi`.\nl +\^`\bp`` {}` expands \TeX/ dimension to decimal number in `bp` without unit.\nl +\~`\_codedecl`` {}` is used at beginning of macro files.\nl +\~`\colordef`` \macro {}` declares `\macro` as color switch.\nl +\^`\cs` `{}` expands `\`.\nl +\~`\_doc` `...` \~`\_cod` encloses documenation text in the macro code.\nl +\^`\eoldef`` \macro #1{}` defines `\macro` with parameter separated to end of line.\nl +\~`\_endcode` closes the part of macro code in macro files.\nl +\~`\_endnamespace` closes name space declared by \~`\_namespace`.\nl +\~`\eqbox`` [