summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/doc/optex-userdoc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/doc/optex-userdoc.tex')
-rw-r--r--macros/luatex/optex/doc/optex-userdoc.tex944
1 files changed, 511 insertions, 433 deletions
diff --git a/macros/luatex/optex/doc/optex-userdoc.tex b/macros/luatex/optex/doc/optex-userdoc.tex
index 1e94712426..8f2fe4d3d3 100644
--- a/macros/luatex/optex/doc/optex-userdoc.tex
+++ b/macros/luatex/optex/doc/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 <top> or <bot>
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 `<pg>=1` then all pages have the same margins. If `<pg>=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 <left> is replaced by
+automatically mirrored in such case, it means that <left> is replaced by
<right> 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 <fmt> parameter are necessary.
-The command \^`\magscale[<factor>]` scales the whole typesetting area.
-\new The fixed point of such scaling is the upper left corner of the paper sheet.
+The command \^`\magscale[<factor>]` 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{<text>}` 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 <text> is scaled to 80 \%.
+The <text> 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``<numeric-label>` inside the box: only the
-footnote mark is generated here. When the box is finished you can use
-\^`\fnotetext{<text>}`. This macro puts the <text> to the footnote.
-The <numeric-label> 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``<numeric-label>` inside the box: only the
+footnote mark is generated here. When the box is finished you can use
+\^`\fnotetext{<text>}`. This macro puts the <text> to the footnote.
+The <numeric-label> 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{<text>}` macro. The <text>
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 <text> 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 <dimen>
shifts the note up and negative value shifts it down. For example
\^`\mnote`` up 2\baselineskip{<text>}` 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[<Family-name>]`.
The argument <Family-name> 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[<fontsize>/<baselineskip>]` 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=<something-else>`,
+You can change the unit by the command \^`\ptunit=<something-else>`,
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] ...<text of paragraph>... \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] ...<text of paragraph>... \par}`.
The command \^`\typoscale[<font-factor>/<baselineskip-factor>]`
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{<size-spec>}` 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{[<font-file>]}`
or \^`\loadmath{<font-name>}` 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{<text>}` inside math mode. It behaves as `{\hbox{<text>}}`
(i.e. the <text> is printed in horizontal non-math mode)
but the size of the <text> is adapted to the context of math size (text or script or
-scriptscript). Moreover, there is the macro \^`\mathstyles{<math list>}` 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: `<caption>\cskip <object>` or
+or figure). You can use two orders: `<caption>\cskip <object>` or
`<object>\cskip <caption>`.
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` `<letter>{<text>}`
+They can be used in context of \^`\numberedpar` `<letter>{<text>}`
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
`[<label>]` is appended to \^`\chap`, \^`\sec`,
@@ -586,18 +577,18 @@ Example:
\label[pythagoras]
$$ a^2 + b^2 = c^2 \eqmark $$
-Now we can point to the section~\ref[beatle] on the page~\pgref[beatle]
-or write something about the equation~\ref[pythagoras]. Finally there
+Now we can point to the section~\ref[beatle] on the page~\pgref[beatle]
+or write something about the equation~\ref[pythagoras]. Finally there
is an interesting Table~\ref[comp-depend].
\endtt
-If there are forward referenced objects then user have to run \TeX{} twice.
+If there are forward referenced objects then users have to run \TeX{} twice.
During each pass, the working `*.ref` file (with references data) is created
and this file is used (if it exists) at the beginning of the document.
-You can use the \^`\label[<label>]` before the `\theorem`, `\definition` etc.\
+You can use the \^`\label[<label>]` before the `\theorem`, `\definition` etc.\
(macros defined with `\numberedpar`) if you want to reference these numbered objects.
-You can't use `\theorem[<label>]` because the optional parameter
+You can't use `\theorem[<label>]` because the optional parameter
is reserved to another purpose here.
You can create a reference to whatever else by commands
@@ -605,9 +596,8 @@ You can create a reference to whatever else by commands
<text> is established. The \^`\ref[<label>]` will print <text>.
By default, labels are not printed, of course. But if you are preparing a
-draft version of your document then you can declare \^`\showlabels`. The labels
-are printed at their destination places after such declaration.
-
+draft version of your document then you can declare \^`\showlabels`. The labels
+are printed at their destination places after such a declaration.
\secc Hyperlinks, outlines
%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -617,13 +607,13 @@ the document, then the following objects are hyperlinked in the PDF output:
\begitems
* numbers and texts generated by \^`\ref` or \^`\pgref`,
-* numbers of chapters, sections, subsections and page numbers in the table of contents,
+* numbers of chapters, sections, subsections, and page numbers in the table of contents,
* numbers or marks generated by \~`\cite` command (bibliography references),
* texts printed by \~`\url` or \~`\ulink` commands.
\enditems
The last object is an external link and it is colored by
-<color-out>. Others links are internal and they are colored by
+<color-out>. Other links are internal and they are colored by
<color-in>. Example:
\begtt
@@ -653,11 +643,11 @@ There are \"low level" commands to create the links. You can specify the
destination of the internal link by \^`\dest[<type>:<label>]`. The
active text linked to the \^`\dest` can be created by
\^`\ilink[<type>:<label>]{<text>}`. The `<type>` parameter is one of
-the `toc`, `pg`, `cite`, `ref` or another special for your purpose.
+the `toc`, `pg`, `cite`, `ref`, or another special for your purpose.
These commands create internal links only when \^`\hyperlinks` is declared.
The \^`\url` macro prints its parameter in \~`\tt` font and creates a potential
-breakpoints in it (after slash or dot, for example). If \^`\hyperlinks`
+breakpoints in it (after slash or dot, for example). If the \^`\hyperlinks`
declaration is used then the parameter of \^`\url` is treated as an external URL link.
An example: `\url{http://www.olsak.net}` creates \url{http://www.olsak.net}.
The characters \code{\%}, `\`, `#`, `{` and `}` have to be protected by
@@ -665,7 +655,7 @@ backslash in the \^`\url` argument, the other special characters `~`,
`^`, `&` can be written as single character\fnote
{More exactly, there are the same rules as for `\code` command, see
section~\ref[verbatim].}.
-You can insert the `\|` command
+You can insert the `\|` command
in the `\url` argument as a potential breakpoint.
If the linked text have to be different than the URL, you can use
@@ -675,25 +665,25 @@ outputs to the text
\ulink[http://petr.olsak.net/optex]{\OpTeX/ page}.
The PDF format provides {\em outlines} which are notes placed in the special frame of
-the PDF viewer. These notes can be managed as structured and hyperlinked
+the PDF viewer. These notes can be managed as a structured and hyperlinked
table of contents of the document. The command \^`\outlines{<level>}` creates
-such outlines from data used for table of contents in the document. The
+such outlines from data used for the table of contents in the document. The
<level> parameter gives the level of opened sub-outlines
in the default view. The deeper levels can be opened by mouse click on the
triangle symbol after that.
\new
If you are using a special unprotected macro in section titles then \^`\outlines` macro
-may crash. You must declare variant of the macro for outlines case which is
-expandable. Use \~`\regmacro` in such case. See the section \ref[toc] for more information
+may crash. You must declare a variant of the macro for outlines case which is
+expandable. Use \~`\regmacro` in this case. See the section \ref[toc] for more information
about \~`\regmacro`.
-The command \^`\insertoutline{<text>}` inserts next entry into PDF outlines at
-the main level~0. These entries can be placed before table of contents (created
-by \^`\outlines`) or after it. Theirs hyperlink destination is in the place
+The command \^`\insertoutline{<text>}` inserts a next entry into PDF outlines at
+the main level~0. These entries can be placed before the table of contents (created
+by \^`\outlines`) or after it. Their hyperlink destination is in the place
where the \^`\insertoutline` macro is used.
-\secc Lists
+\secc Lists
%%%%%%%%%%
The list of items is surrounded by \^`\begitems` and \^`\enditems` commands.
@@ -742,7 +732,7 @@ produces:
* Finito
\enditems
-Another style can be defined by the command \^`\sdef{_item:<style>}{<text>}`.
+Another style can be defined by the command \~`\sdef{_item:<style>}{<text>}`.
Default item can be set by \^`\defaultitem={<text>}`.
The list environments can be nested. Each new level of items is indented by
next multiple of \^`\iindent` value which is set to `\parindent` by default.
@@ -754,15 +744,19 @@ example:
\endtt
You can say \^`\begitems` \^`\novspaces` if you don't want vertical spaces above
-and below the list. The nested item list are without vertical spaces
-automatically. More information about design of lists of items should be
+and below the list. The nested item list is without vertical spaces
+automatically. More information about the design of lists of items should be
found in the section~\ref[lists].
+A \"selected block of text" can be surrounded by
+\^`\begblock`\dots\^`\endblock`. The default design of blocks of text is
+indented text in smaller font. The blocks of text can be nested.
+
\secc Tables
%%%%%%%%%%%
The macro \^`\table{<declaration>}{<data>}` provides similar <declaration>
-of tables as in \LaTeX: you can use letters `l`, `r`, `c`, each letter declares
+of tables as in \LaTeX: you can use letters `l`, `r`, `c`, each letter declares
one column (aligned to left, right, center, respectively).
These letters can be combined by the `|` character (vertical line). Example
@@ -785,7 +779,7 @@ generates the following result:
\medskip
Apart from `l`, `r`, `c` declarators, you can use the `p{<size>}` declarator
-which declares the column with paragraphs of given width. More precisely,
+which declares the column with paragraphs of given width. More precisely,
a long text in the table cell is printed as a multiline paragraph with given width.
By default, the paragraph is left-right justified. But there are
alternatives:
@@ -794,21 +788,21 @@ alternatives:
* `p{<size>`\^`\fL}` fit left, i.e.\ left justified, ragged right,
* `p{<size>`\^`\fR}` fit right, i.e.\ right justified, ragged left,
* `p{<size>`\^`\fC}` fit center, i.e.\ ragged left plus right,
-* `p{<size>`\^`\fS}` fit special, short one-line pararaph centered,
+* `p{<size>`\^`\fS}` fit special, short one-line pararaph centered,
long paragraph normal,
-* `p{<size>`\^`\fX}` fit extra, left-right justified but last line centered.
-\enditems
+* `p{<size>`\^`\fX}` fit extra, left-right justified but last line centered.
+\enditems
You can use `(<text>)` in the <declaration>. Then this text is applied in
each line of the table. For example `r(\kern10pt)l` adds more 10\,pt space
-between `r` and `l` rows.
+between `r` and `l` rows.
An arbitrary part of the <declaration> can be repeated by a <number>
prefixed. For example `3c` means `ccc` or `c 3{|c}` means
-`c|c|c|c`. Note that spaces in the <declaration> are ignored and you
+`c|c|c|c`. Note that spaces in the <declaration> are ignored and you
can use them in order to more legibility.
-
-The command `\cr` used in the <data> part of the table
+
+The command `\cr` used in the <data> part of the table
is generally known from Plain \TeX. It marks the end of each row in the table.
Moreover \OpTeX/ defines following similar commands:
@@ -819,17 +813,17 @@ Moreover \OpTeX/ defines following similar commands:
vertical double lines.
* \^`\crlli` \dots\ like \^`\crli` but horizontal line is doubled.
* \^`\crlp{<list>}` \dots\ like \^`\crli` but the lines are drawn only in the
- columns mentioned in comma separated `<list>` of their numbers.
+ columns mentioned in comma-separated `<list>` of their numbers.
The <list> can include `<from>-<to>` declarators, for example
- \^`\crlp{1-3,5}` is equal to \^`\crlp{1,2,3,5}`.
+ \^`\crlp{1-3,5}` is equal to \^`\crlp{1,2,3,5}`.
\enditems
The \^`\tskip``<dimen>` command works like the `\noalign{\vskip<dimen>}`
immediately after `\cr*` commands but it doesn't interrupt the vertical lines.
\new
-You can use following parameters for the \^`\table` macro. Default values are listed
-too.
+You can use the following parameters for the \^`\table` macro. Default values are listed
+too.
\begtt
\everytable={} % code used in \vbox before table processing
@@ -841,13 +835,13 @@ too.
\vvkern=1pt % space between lines in double vertical line
\hhkern=1pt % space between lines in double horizontal line
\tabskip=0pt % space between columns
-\tabskipl=0pt \tabskipr=0pt % space before first and after last column
+\tabskipl=0pt \tabskipr=0pt % space before first and after last column
\endtt
Example: if you do \^`\tabiteml={$\enspace}`\^`\tabitemr={\enspace$}` then
the \^`\table` acts like \LaTeX's array environment.
-If there is an item which spans to more than one column in the table then
+If there is an item that spans to more than one column in the table then
the macro \^`\multispan{<number>}` (from Plain \TeX) can help you. Another
alternative is
the command \^`\mspan``<number>[<declaration>]{<text>}`
@@ -857,8 +851,8 @@ with the same syntax as common \^`\table` <declaration>.
If your table includes vertical rules and you want to
create continuous vertical rules by \^`\mspan`, then use rule declarators `|`
after `c`, `l` or `r` letter in \^`\mspan` <declaration>. The
-exception is only in the case when \^`\mspan` includes first
-column and the table have rules on the left side. The example of \^`\mspan`
+exception is only in the case when \^`\mspan` includes the first
+column and the table have rules on the left side. The example of \^`\mspan`
usage is below.
The \^`\frame{<text>}` makes a frame around <text>. You can put the whole \^`\table`
@@ -884,48 +878,47 @@ like to be in the center of the <number> lines (current line is first).
You can use this for creating tables like in the following example:
\begtt \typosize[8.7/11]
-\thistable{\tabstrut={\vrule height 20pt depth10pt width0pt}
- \baselineskip=20pt \tablinespace=0pt \rulewidth=.8pt}
-\table{|8{c|}}{\crlp{3-8}
- \mspan2[c|]{} & \mspan3[c|]{Singular} & \mspan3[c|]{Plural} \crlp{3-8}
+\thistable{\tabstrut={\vrule height 20pt depth10pt width0pt}
+ \baselineskip=20pt \tablinespace=0pt \rulewidth=.8pt}
+\table{|8{c|}}{\crlp{3-8}
+ \mspan2[c|]{} & \mspan3[c|]{Singular} & \mspan3[c|]{Plural} \crlp{3-8}
\mspan2[c|]{} & Neuter & Masculine & Feminine & Masculine & Feminine & Neuter \crl
- \vspan2{I} & Inclusive & \mspan3[c|]{\vspan2{O}} & \mspan3[c|]{X} \crlp{2,6-8}
- & Exclusive & \mspan3[c|]{} & \mspan3[c|]{X} \crl
- \vspan2{II} & Informal & \mspan3[c|]{X} & \mspan3[c|]{X} \crlp{2-8}
- & Formal & \mspan6[c|]{X} \crl
- \vspan2{III} & Informal & \vspan2{O} & X & X & \mspan2[c|]{X} &\vspan2{O} \crlp{2,4-7}
- & Formal & & \mspan4[c|]{X} & \crl
-}
+ \vspan2{I} & Inclusive & \mspan3[c|]{\vspan2{O}} & \mspan3[c|]{X} \crlp{2,6-8}
+ & Exclusive & \mspan3[c|]{} & \mspan3[c|]{X} \crl
+ \vspan2{II} & Informal & \mspan3[c|]{X} & \mspan3[c|]{X} \crlp{2-8}
+ & Formal & \mspan6[c|]{X} \crl
+ \vspan2{III} & Informal & \vspan2{O} & X & X & \mspan2[c|]{X} &\vspan2{O} \crlp{2,4-7}
+ & Formal & & \mspan4[c|]{X} & \crl
+}
\endtt
\puttext 8.9cm -4cm {\pdfsave\pdfscale{.5}{.5}\rlap{%
-\thistable{\tabstrut={\vrule height 20pt depth10pt width0pt}
- \baselineskip=20pt \tablinespace=0pt \rulewidth=.8pt}
-\table{|8{c|}}{\crlp{3-8}
- \mspan2[c|]{} &\mspan3[c|]{Singular} &\mspan3[c|]{Plural} \crlp{3-8}
+\thistable{\tabstrut={\vrule height 20pt depth10pt width0pt}
+ \baselineskip=20pt \tablinespace=0pt \rulewidth=.8pt}
+\table{|8{c|}}{\crlp{3-8}
+ \mspan2[c|]{} &\mspan3[c|]{Singular} &\mspan3[c|]{Plural} \crlp{3-8}
\mspan2[c|]{} & Neuter & Masculine & Feminine & Masculine & Feminine & Neuter \crl
- \vspan2{I} & Inclusive & \mspan3[c|]{\vspan2{O}} &\mspan3[c|] X \crlp{2,6-8}
- & Exclusive & \mspan3[c|]{} &\mspan3[c|] X \crl
- \vspan2{II} & Informal & \mspan3[c|] X &\mspan3[c|] X \crlp{2-8}
- & Formal & \mspan6[c|] X \crl
- \vspan2{III} & Informal & \vspan2 O & X & X &\mspan2[c|] X & \vspan2 O \crlp{2,4-7}
- & Formal & &\mspan4[c|] X & \crl
+ \vspan2{I} & Inclusive & \mspan3[c|]{\vspan2{O}} &\mspan3[c|] X \crlp{2,6-8}
+ & Exclusive & \mspan3[c|]{} &\mspan3[c|] X \crl
+ \vspan2{II} & Informal & \mspan3[c|] X &\mspan3[c|] X \crlp{2-8}
+ & Formal & \mspan6[c|] X \crl
+ \vspan2{III} & Informal & \vspan2 O & X & X &\mspan2[c|] X & \vspan2 O \crlp{2,4-7}
+ & Formal & &\mspan4[c|] X & \crl
}}\pdfrestore}
-
-\hangindent=-7.5cm \hangafter=0
-The <number> parameter of \^`\vspan` must be one-digit number.
-If you want to set more digits then use braces.
+\hangindent=-7.5cm \hangafter=0
+The <number> parameter of \^`\vspan` must be one-digit number.
+If you want to set more digits then use braces.
You can use non-integer values too if you feel that the
result is better, for example \^`\vspan{2.1}{text}`.
-\hangindent=-7.5cm \hangafter=0
+\hangindent=-7.5cm \hangafter=0
The rule width of tables and implicit width of all `\vrule`s and `\hrule`s
-can be set by the command \^`\rulewidth=<dimen>`. The default value given
+can be set by the command \^`\rulewidth=<dimen>`. The default value given
by \TeX/ is 0.4\,pt.
The `c`, `l`, `r` and `p` are default \"declaration letters" but you can define
-more such letters by `\def\_tabdeclare<letter>{<left>##<right>}`.
+more such letters by `\def\_tabdeclare<letter>{<left>##<right>}`.
More about it is in technical documentation in section~\ref[table.impl].
See the definition of the \^`\tabdeclarec` macro, for example.
@@ -935,51 +928,50 @@ More about it is in section~\ref[table.w]
Many tips about tables can be seen on the site
\url{http://petr.olsak.net/optex/optex-tricks.html}.
-
\label[verbatim]\secc Verbatim
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The display verbatim text have to be surrounded by the \^`\begtt` and
-\^`\endtt` couple.
-The in-line verbatim have to be tagged (before and after)
+\^`\endtt` couple.
+The in-line verbatim have to be tagged (before and after)
by a character which is declared by
-\^`\activettchar``<char>`. For example \code{\\activettchar`}
-declares the character \code{`}
-for in-line verbatim markup.
+\^`\activettchar``<char>`. For example \code{\\activettchar`}
+declares the character \code{`}
+for in-line verbatim markup.
And you can use \code{`\\relax`} for
verbatim `\relax` (for example).
\new
Another alternative of printing in-line
-verbatim text is \~`\code{<text>}` (see below).
+verbatim text is \~`\code{<text>}` (see below).
If the numerical register \^`\ttline` is set to the non-negative value then
display verbatim will number the lines. The first line has the number
\^`\ttline+1` and when the verbatim ends then the \^`\ttline` value is equal to the
-number of last line printed. Next \^`\begtt...`\^`\endtt` environment will follow
+number of the last line printed. Next \^`\begtt...`\^`\endtt` environment will follow
the line numbering. \OpTeX/ sets \^`\ttline=-1` by default.
The indentation of each line in display verbatim is controlled by
\^`\ttindent` register. This register is set to the `\parindent` by default.
-User can change values of the `\parindent` and \^`\ttindent` independently.
+Users can change the values of the `\parindent` and \^`\ttindent` independently.
-The \^`\begtt` command starts internal group in which the catcodes are changed.
+The \^`\begtt` command starts the internal group in which the catcodes are changed.
\new
-Then the \^`\everytt` tokens register is run. It is empty by default and user can
-control fine behavior by it. For example the catcodes can be re-declared here. If
-you need to define active character in the \^`\everytt`, use \^`\adef` as in the
+Then the \^`\everytt` tokens register is run. It is empty by default and the user can
+control fine behavior by it. For example, the catcodes can be re-declared here. If
+you need to define an active character in the \^`\everytt`, use \~`\adef` as in the
following example:
\begtt \adef@{\string\endtt}
\everytt={\adef!{?}\adef?{!}}
\begtt
-Each occurrence of the exclamation mark will be changed to
-the question mark and vice versa. Really? You can try it!
+Each occurrence of the exclamation mark will be changed to
+the question mark and vice versa. Really? You can try it!
@
\endtt
%
-The \^`\adef` command sets its parameter as active {\it after\/}
+The \~`\adef` command sets its parameter as active {\it after\/}
the parameter of \^`\everytt` is read. So you don't have to worry about active
-categories in this parameter.
+categories in this parameter.
There is an alternative to \^`\everytt` named \^`\everyintt` which is used for
in-line verbatim surrounded by an \^`\activettchar` or processed by the \~`\code`
@@ -996,12 +988,12 @@ declared in a group). There are tips for such global `\everytt` definitions here
\new
If you want to apply a special code only for one \^`\begtt...`\^`\endtt`
-environment then don't set any \^`\everytt` but put desired material at the
+environment then don't set any \^`\everytt` but put desired material at the
same line where \^`\begtt` is. For example:
\begtt \adef@{\string\endtt}
\begtt \adef!{?}\adef?{!}
-Each occurrence of ? will be changed to ! and vice versa.
+Each occurrence of ? will be changed to ! and vice versa.
@
\endtt
@@ -1011,21 +1003,21 @@ parameter of macros and macro definitions. (It works in titles declared by
specially defined in \OpTeX/).
\new
You can use more robust command \^`\code{<text>}` in problematic
-situations, but you have to escape following characters in the <text>:
-`\`, `#`, `%`, braces (if the braces are unmatched in the <text>),
-and space or `^` (if there are more than one subsequent spaces or `^` in
+situations, but you have to escape the following characters in the <text>:
+`\`, `#`, `%`, braces (if the braces are unmatched in the <text>),
+and space or `^` (if there are more than one subsequent spaces or `^` in
the <text>). Examples:
\begtt
\code{\\text, \%\#} ... prints \text, %#
\code{@{..}*&^$ $} ... prints @{..}*&^$ $ without escaping, but you can
escape these characters too, if you want.
-\code{a \ b} ... two spaces between a b, second one must be escaped
+\code{a \ b} ... two spaces between a b, the second must be escaped
\code{xy\{z} ... xy{z ... unbalanced brace must be escaped
\code{^\^M} ... prints ^^M, the second ^ must be escaped
\endtt
-You can print verbatim listing from external files by the \^`\verbinput` command.
+You can print verbatim listing from external files by the \^`\verbinput` command.
Examples:
\begtt
@@ -1034,19 +1026,19 @@ Examples:
\verbinput (61-) program.c % from line 61 to the end
\verbinput (-) program.c % whole file is printed
\verbinput (70+10) program.c % from line 70, only 10 lines printed
-\verbinput (+10) program.c % from the last line read, print 10 lines
+\verbinput (+10) program.c % from the last line read, print 10 lines
\verbinput (-5+7) program.c % from the last line read, skip 5, print 7
\verbinput (+) program.c % from the last line read to the end
\endtt
\new
-You can insert additional commands for the \^`\verbinput` before
-first opening bracket. They are processed in the local group.
+You can insert additional commands for \^`\verbinput` before
+the first opening bracket. They are processed in the local group.
For example, `\verbinput \hsize=20cm (-) program.c`.
The \~`\ttline` influences the line numbering by the same way as in
\~`\begtt...`\~`\endtt` environment. If \~`\ttline=-1` then real line numbers are
-printed (this is default). If \code{\\ttline<-1} then no line
+printed (this is the default). If \code{\\ttline<-1} then no line
numbers are printed.
The \^`\verbinput` can be controlled by \^`\everytt`, \^`\ttindent` just like
@@ -1065,7 +1057,6 @@ you can set them by \~`\commentchars``<first><second>`. Such comments are
fully interpreted by \TeX/ (i.e. not verbatim).
Section~\ref[verb] (page \pgref[commentchars]) says more about this feature.
-
\sec Autogenerated lists
%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1073,11 +1064,11 @@ Section~\ref[verb] (page \pgref[commentchars]) says more about this feature.
%%%%%%%%%%%%%%%%%%%%%%
The \^`\maketoc` command prints the table of contents of all \~`\chap`, \~`\sec`
-and \~`\secc` used in the document. These data are read from external `*.ref` file, so
+and \~`\secc` used in the document. These data are read from the external `*.ref` file, so
you have to run \TeX/ more than once (typically three times if the table of
-contents is at the beginning of the document).
+contents is at the beginning of the document).
-Typically, we don't want to repeat the name of the section \"table of contents"
+Typically, we don't want to repeat the name of the section \"Table of contents"
in the table of contents again. The direct usage
of \~`\chap` or \~`\sec` isn't recommended here because the table of contents
is typically not referenced to itself. You can print the unnumbered and unreferenced
@@ -1090,8 +1081,8 @@ If you need a customization of the design of the TOC, read the
section~\ref[maketoc].
\new
-If you are using a special macro in section or chapter titles
-and you need different behavior of such macro in other cases then use
+If you are using a special macro in section or chapter titles
+and you need different behavior of such macro in other cases then use
\^`\regmacro{<case-toc>}{<case-mark>}{<case-outline>}`.
The parameters are applied locally in given cases. The \^`\regmacro` can be
used repeatedly: then its parameters are accumulated (for more macros).
@@ -1107,15 +1098,15 @@ For example:
{\def\mylogo{MyLoGo}} % used in PDF outlines
\endtt
-\secc Making the index
+\secc Making the index
%%%%%%%%%%%%%%%%%%%%%
-The index can be included into document by the \^`\makeindex` macro. No external
-program is needed, the alphabetical sorting are done inside \TeX/ at macro
+The index can be included in the document by the \^`\makeindex` macro. No external
+program is needed, the alphabetical sorting is done inside \TeX/ at macro
level.
The \^`\ii` command (insert to index) declares the word separated by the space
-as the index item. This declaration is represented as invisible item on the
+as the index item. This declaration is represented as an invisible item on the
page connected to the next visible word. The page number of the page where
this item occurs is listed in the index entry. So you can type:
@@ -1123,7 +1114,7 @@ this item occurs is listed in the index entry. So you can type:
The \ii resistor resistor is a passive electrical component ...
\endtt
-You cannot double the word if you use the \^`\iid` instead \^`\ii`:
+You cannot double the word if you use the \^`\iid` instead of \^`\ii`:
\begtt
The \iid resistor is a passive electrical component ...
@@ -1131,8 +1122,8 @@ or:
Now we'll deal with the \iid resistor .
\endtt
-Note that the dot or comma have to be separated by space when \^`\iid` is
-used. This space (before dot or comma) is removed by the macro in
+Note that the dot or comma has to be separated by space when \^`\iid` is
+used. This space (before dot or comma) is removed by the macro in
the current text.
The multiple-words entries are commonly arranged in the index as follows:
@@ -1163,7 +1154,7 @@ spare your typing by the comma in the \~`\ii` parameter. The previous example
is equivalent to `\ii linear/space \ii vector/space`~.
Maybe you need to propagate to the index the similar entry to the
-linear/space in the form space/linear. You can do this by the shorthand `,@`
+linear/space in the form of space/linear. You can do this by the shorthand `,@`
at the end of the \~`\ii` parameter. Example:
\begtt
@@ -1175,17 +1166,17 @@ is equivalent to:
If you really need to insert the space into the index entry, write `~`.
The \~`\ii` or \~`\iid` commands can be preceded by \^`\iitype` `<letter>`, then such
-reference (or more references generated by one \~`\ii`) has specified type.
+reference (or more references generated by one \~`\ii`) has the specified type.
The page numbers of such references should be formatted
-specially in the index. \OpTeX/ implements only \^`\iitype` `b`,
-\^`\iitype` `i` and \^`\iitype` `u`:
+specially in the index. \OpTeX/ implements only \^`\iitype` `b`,
+\^`\iitype` `i` and \^`\iitype` `u`:
the page number in bold or in italics or underlined is printed
-in the index when these types are used. Default index type is empty, which
-prints page numbers in normal font. The \TeX/book index is good example.
+in the index when these types are used. The default index type is empty, which
+prints page numbers in normal font. The \TeX/book index is a good example.
The \^`\makeindex` creates the list of alphabetically sorted index entries
without the title of the section and without creating more columns. \OpTeX/
-provides another macros \^`\begmulti` and \^`\endmulti` for more columns:
+provides other macros \^`\begmulti` and \^`\endmulti` for more columns:
\begtt \catcode`\<=13
\begmulti <number of columns>
@@ -1201,10 +1192,10 @@ code:
\endtt
Only \"pure words" can be propagated to the index by the \~`\ii` command. It
-means that there cannot be any macro, \TeX/ primitive, math selector etc.
-But there is another possibility to create such complex index entry. Use
-\"pure equivalent" in the \~`\ii` parameter and map this equivalent to the
-real word which is printed in the index. Such mapping is done by
+means that there cannot be any macro, \TeX/ primitive, math selector, etc.
+But there is another possibility to create such a complex index entry. Use
+\"pure equivalent" in the \~`\ii` parameter and map this equivalent to a
+real word that is printed in the index. Such mapping is done by
\^`\iis` command. Example:
\begtt
@@ -1215,11 +1206,11 @@ If the \ii relax `\relax` command is used then \TeX/ is relaxing.
\iis relax {\code{\\relax}}
\endtt
%
-The \^`\iis` `<equivalent> {<text>}` creates one entry in the \"dictionary
+The \^`\iis` `<equivalent> {<text>}` creates one entry in the \"dictionary
of the exceptions". The sorting is done by the <equivalent> but the
<text> is printed in the index entry list.
-The sorting rules when \^`\makeindex` runs depends on the current language.
+The sorting rules when \^`\makeindex` runs depends on the current language.
See section~\ref[lang] about languages selection.
\secc Bib\TeX/ing
@@ -1227,15 +1218,15 @@ See section~\ref[lang] about languages selection.
The command \^`\cite[<label>]` (or
\hbox{\^`\cite[<label-1>,<label-2>,...,<label-n>]`})
-creates the citation in the form [42] (or [15,~19,~26]).
-If \^`\shortcitations` is declared at the beginning of the document then
-continuous sequences of numbers are re-printed like this:
+creates the citation in the form [42] (or [15,~19,~26]).
+If \^`\shortcitations` is declared at the beginning of the document then
+continuous sequences of numbers are re-printed like this:
\hbox{[3--5,~7,~9--11]}. If
\^`\sortcitations` is declared then numbers generated by one \^`\cite` command
are sorted upward.
-If \^`\nonumcitations` is declared then the marks instead numbers are generated
-depending on the used bib-style. For example the citations look like
+If \^`\nonumcitations` is declared then the marks instead of numbers are generated
+depending on the used bib-style. For example, the citations look like
[Now08] or [Nowak, 2008].
The \^`\rcite[<labels>]` creates the same list as \^`\cite[<labels>]` but without
@@ -1247,7 +1238,7 @@ is linked to the references list.
You can define alternative formating of \^`\cite` command. Example:
-\begtt
+\begtt \catcode`\<=13
\def\cite[#1]{(\rcite[#1])} % \cite[<label>] creates (27)
\def\cite[#1]{$^{\rcite[#1]}$} % \cite[<label>] creates^{27}
\endtt
@@ -1259,20 +1250,20 @@ references list:
\begitems
* Manually using \~`\bib[<label>]` commands.
* By \~`\usebib/<type> (<style>) <bib-base>` command which reads `*.bib`
- files directly.
+ files directly.
\enditems
\new
Note that another two possibilities documented in OPmac (using external
-Bib\TeX/ program) isn't supported because Bib\TeX/ is old program which does not
+Bib\TeX/ program) isn't supported because Bib\TeX/ is an old program that does not
support Unicode. And Biber seems to be not compliant with Plain \TeX.
\medskip\noindent
{\bf References created manually using \^`\bib[<label>]` command.}
-\begtt
+\begtt
\bib [tbn] P. Olšák. {\it\TeX{}book naruby.} 468~s. Brno: Konvoj, 1997.
-\bib [tst] P. Olšák. {\it Typografický systém \TeX.}
+\bib [tst] P. Olšák. {\it Typografický systém \TeX.}
269~s. Praha: CSTUG, 1995.
\endtt
@@ -1282,16 +1273,16 @@ command in the format \^`\bib[<label>] = {<mark>}`. The spaces around
equal sign are mandatory. Example:
\begtt
-\bib [tbn] = {Olšák, 2001}
+\bib [tbn] = {Olšák, 2001}
P. Olšák. {\it\TeX{}book naruby.} 468~s. Brno: Konvoj, 2001.
\endtt
\noindent
{\bf Direct reading of `.bib` files} is possible by \^`\usebib` macro.
-This macro reads and uses macro package `librarian.tex` by Paul Isambert.
+This macro reads and uses macro package `librarian.tex` by Paul Isambert.
The usage is:
-\begtt
+\begtt \catcode`\<=13
\usebib/c (<style>) <bib-base> % sorted by \cite-order (c=cite),
\usebib/s (<style>) <bib-base> % sorted by style (s=style).
% example:
@@ -1308,30 +1299,29 @@ The \^`\usebib` command is more documented in section~\ref[usebib].
Not all records are printed from <bib-base> files: the command \^`\usebib`
selects only such bib-records which were used in \~`\cite` or \^`\nocite`
commands in your document. The \^`\nocite` behaves as \~`\cite` but prints
-nothing. It tells only that mentioned bib-record should be printed in the
+nothing. It tells only that the mentioned bib-record should be printed in the
reference list. If \^`\nocite[*]` is used then all records from <bib-base>
are printed.
-
\sec Graphics
%%%%%%%%%%%%%
\secc Colors
%%%%%%%%%%%
-\OpTeX/ provides a small number of color selectors:
-{\Blue `\Blue`},
-{\Red `\Red`},
+\OpTeX/ provides a small number of color selectors:
+{\Blue `\Blue`},
+{\Red `\Red`},
{\Brown `\Brown`},
-{\Green `\Green`},
-{\Yellow `\Yellow`},
-{\Cyan `\Cyan`},
-{\Magenta `\Magenta`},
-{`\White`},
-{\Grey `\Grey`},
+{\Green `\Green`},
+{\Yellow `\Yellow`},
+{\Cyan `\Cyan`},
+{\Magenta `\Magenta`},
+{`\White`},
+{\Grey `\Grey`},
{\LightGrey `\LightGrey`} and
`\Black`. User can define more
-such selectors by setting four CMYK components
+such selectors by setting four CMYK components
\new
or three RGB components. For example
@@ -1343,29 +1333,29 @@ or three RGB components. For example
\new
The command \^`\morecolors` reads more definitions of color selectors from
the \LaTeX/ file `x11nam.def`.
-There is about 300 color names like
+There are about 300 color names like
`\DeepPink`, `\Chocolate` etc. If there are numbered variants of the same
-name, then the letters B, C, etc. are appended to the name in \OpTeX/. For example
+name, then the letters B, C, etc. are appended to the name in \OpTeX/. For example
`\Chocolate` is Chocolate1, `\ChocolateB` is Chocolate2 etc.
\new
-The color selectors work locally in groups by default but with limitations. See
+The color selectors work locally in groups by default but with limitations. See
the technical documentation, section~\ref[colors] for more information.
-The basic colors \^`\Blue`, \^`\Red`, \^`\Cyan`, \^`\Yellow` etc.\ are defined
-with CMYK components using \^`\setcmykcolor`.
-On the other hand, you can define a color with three
-RGB components and \^`\morecolors` defines such RGB colors.
+The basic colors \^`\Blue`, \^`\Red`, \^`\Cyan`, \^`\Yellow` etc.\ are defined
+with CMYK components using \^`\setcmykcolor`.
+On the other hand, you can define a color with three
+RGB components and \^`\morecolors` defines such RGB colors.
By default, the color model isn't converted but only stored to
PDF output for each used color. Thus, there may be a mix of color
-models in the PDF output which is not good idea. You can overcome this
-problem by declaration \^`\onlyrgb` or \^`\onlycmyk`. Then only selected color
+models in the PDF output which is not a good idea. You can overcome this
+problem by declaration \^`\onlyrgb` or \^`\onlycmyk`. Then only the selected color
model is used for PDF output and if a used color is declared by another color
model then it is converted.
The \^`\onlyrgb` creates colors more bright (usable for computer
-presentations). On the other hand CMYK makes colors more true\fnote
-{Printed output is more equal to the monitor preview specially if you are
-using ICC profile for your printer.}
+presentations). On the other hand, CMYK makes colors more true\fnote
+{Printed output is more equal to the monitor preview especially if you are
+using ICC profile for your printer.}
for printing.
\new
@@ -1373,18 +1363,18 @@ You can define your color by a linear combination of previously defined colors u
\^`\colordef`. For example:
\begtt
-\colordef \myCyan {.3\Green + .5\Blue} % 30 % green, 50 % blue, 20% white
-\colordef \DarkBlue {\Blue + .4\Black} % Blue mixed with 40 % of black
+\colordef \myCyan {.3\Green + .5\Blue} % 30 % green, 50 % blue, 20% white
+\colordef \DarkBlue {\Blue + .4\Black} % Blue mixed with 40 % of black
\colordef \myGreen{\Cyan+\Yellow} % exact the same as \Green
\colordef \MyColor {.3\Orange+.5\Green+.2\Yellow}
\endtt
%
-The linear combination is done in CMYK substractive color space by default
-(RGB colors used in \^`\colordef` argument are converted first).
+The linear combination is done in CMYK subtractive color space by default
+(RGB colors used in \^`\colordef` argument are converted first).
If the resulting component is greater than 1 then it is truncated to 1.
If a convex linear combination (as in the last example above) is used then it
emulates color behavior on a painter's palette.
-You can use \^`\rgbcolordef` instead \^`\colordef` if you want to mix colors
+You can use \^`\rgbcolordef` instead of \^`\colordef` if you want to mix colors
in the additive RGB color space.
\def\coloron#1#2#3{%
@@ -1411,35 +1401,35 @@ The `\coloron` can be defined as follows:
The \^`\inspic` `{<filename>.<extension>}` or
\^`\inspic` `<filename>.<extension><space>`
inserts the picture stored in
-the graphics file with the name `<filename>.<extension>` to the document.
+the graphics file with the name `<filename>.<extension>` to the document.
You can set the picture width by \^`\picw=<dimen>`
before \^`\inspic` command which declares the width of the picture.
-The image files can be in the PNG, JPG, JBIG2 or PDF format.
+The image files can be in the PNG, JPG, JBIG2 or PDF format.
-The \^`\picwidth` is an equivalent register to `\picw`. Moreover there is an
+The \^`\picwidth` is an equivalent register to `\picw`. Moreover, there is an
\^`\picheight` register which denotes the height of the picture. If both
-registers are set then the picture will be (probably) deformed.
+registers are set then the picture will be (probably) deformed.
-The image files are searched in \^`\picdir`. This token list is empty
-by default, this means that the image files are searched in the
+The image files are searched in \^`\picdir`. This token list is empty
+by default, this means that the image files are searched in the
current directory. Example: \^`\picdir={img/}` supposes that image files are
-in `img` subdirectory. Note: the directory name must end by `/` in
+in `img` subdirectory. Note: the directory name must end by `/` in
the \^`\picdir` declaration.
Inkscape\fnote
-{A powerfull and free wysiwyg editor for creating vector graphics.}
+{A powerful and free Wysiwyg editor for creating vector graphics.}
is able to save a picture to PDF and labels of the picture to another
file\fnote
-{Chose \"Omit text in PDF and create LaTeX file" option.}.
-This second file should be read by \TeX/ in order to print labels
+{Chose \"Omit text in PDF and create LaTeX file" option.}.
+This second file should be read by \TeX/to print labels
in the same font as document font. \OpTeX/ supports this feature by
-\^`\inkinspic` `{<filename>.pdf}` command. It reads and displays
+\^`\inkinspic` `{<filename>.pdf}` command. It reads and displays
both: PDF image and labels generated by Inkscape.
-If you want to create a vector graphics (diagrams, schema, geometry
+If you want to create vector graphics (diagrams, schema, geometry
skicing) then you can do it by Wysiwyg graphics editor (Inkscape, Geogebra for
example), export the result to PDF and include it by \^`\inspic`.
-If you want to \"programm" such pictures then Tikz package is recommended.
+If you want to \"program" such pictures then Tikz package is recommended.
It works in Plain \TeX/ and \OpTeX.
\secc PDF transformations
@@ -1448,25 +1438,25 @@ It works in Plain \TeX/ and \OpTeX.
All typesetting elements are transformed by linear
transformation given by the current transformation matrix. The
`\pdfsetmatrix` `{<a> <b> <c> <d>}` 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 [<a>,\,<b>] and $[1,0]$ to [<c>,\,<d>].
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{<transformed text>}\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{<transformed text>}\pdfrestore`
or something similar is recommended.
\OpTeX/ provides two special transformation macros
\^`\pdfscale` and \^`\pdfrotate`:
\begtt \catcode`\<=13
-\pdfscale{<horizontal-factor>}{<vertical-factor>}
+\pdfscale{<horizontal-factor>}{<vertical-factor>}
\pdfrotate{<angle-in-degrees>}
-\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{<transformation>}{<text>}`
macro solves the problem. This macro puts the transformed
-material to a box with relevant dimension. The <transfromation> parameter
-includes one or more transfromation commands `\pdfsetmatrix`, `\pdfscale`,
+material into a box with relevant dimensions. The <transfromation> parameter
+includes one or more transformation commands `\pdfsetmatrix`, `\pdfscale`,
`\pdfrotate` with their parameters. The <text> 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{<deg>}{<text>}` is shortcut for
+The \^`\rotbox{<deg>}{<text>}` is shortcut for
\^`\transformbox{\pdfrotate{<deg>}}{<text>}`.
\secc Ovals, circles
%%%%%%%%%%%%%%%%%%%%
\new
-The \^`\inoval{<text>}` creates a box like this: \inoval{text}.
+The \^`\inoval{<text>}` creates a box like this: \inoval{text}.
Multiline text can be put in an oval by the command \^`\inoval{\vbox{<text>}}`.
Local settings can be set by
\^`\inoval[<settings>]{<text>}` 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 <text>:
\new
The \^`\incircle[\ratio=1.8]{<text>}` 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` `<x> <y> {<text>}` puts the `<text>` shifted by `<x>` right and by
-`<y>` up from current point of typesetting and does not change the
-position of the current point. Assume coordinate system with origin in the
+`<y>` 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` `<x> <y> {<text>}` puts the text at the
coordinates `<x>`, `<y>`. More exactly the left edge of its baseline is at that
-position.
+position.
\new
-The \^`\putpic` `<x> <y> <width> <height> {<image>}` puts the `<image>` of given
+The \^`\putpic` `<x> <y> <width> <height> {<image>}` puts the `<image>` of given
`<width>` and `<height>` at given position (its left-bottom corner).
You can write \^`\nospec` instead `<width>` or `<height>` 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 `\<iso-code>lang` command in your document.
+Hyphenation patterns of all other languages are loaded on demand when you first use
+the `\<iso-code>lang` command in your document.
For example \^`\delang` for German, \^`\cslang` for
-Czech, \^`\pllang` for Polish. The <iso-code> is a shortcut
-of the language (mostly from ISO 639-1).
-You can list all available languages by \^`\langlist`
+Czech, \^`\pllang` for Polish. The <iso-code> 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{<language>}`. The parameter <language> is long form of
+\^`\uselanguage{<language>}`. The parameter <language> 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
`\<iso-code>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 `\<iso-code>quotes`, then the control sequences `\"` and `\'`
-should be used like this: `\"<quoted text>"` or `\'<quoted text>'`
+should be used like this: `\"<quoted text>"` or `\'<quoted text>'`
(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
<quoted text>. The language is specified by <iso-code>. \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
`\<isocode>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 <authors><end-line>` can be used when
-\^`\report` is declared. It prints `<authors>` 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 <authors><end-line>` can be used when
+\^`\report` is declared. It prints `<authors>` 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:
<empty line>
\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 `<prefixed text>\address...` to put
-`<prefixed text>` 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 `<prefixed text>\address...` to put
+`<prefixed text>` 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{<file-name>}` or by
\^`\load[<file-names>]`. The first case (`\input`) is \TeX/ primitive command, it can be
used in the alternative old syntax `\input <filename><space>` 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 `<filename>.opm` or `<filename>.tex` or `<filename>`, first occurence
-wins. Example:
+load `<filename>.opm` or `<filename>.tex` or `<filename>`, 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{<name>}` 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[<number>]` or
\^`\lorem[<from>-<to>]`. It prints a paragraph (or paragraphs) with neutral
text. The numbers <number> or <from>, <to> 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 [<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
+\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{<text>}` adds <text> at the end of `\macro` body.\nl
+\^`\adef` `<char>{<body>}` defines <char> active character with meaning <body>.\nl
+\^`\afterfi` `{<text>}<ignored>\fi` expands to `\fi<text>`.\nl
+\^`\bp`` {<dimen expression>}` expands \TeX/ dimension to decimal number in `bp` without unit.\nl
+\~`\_codedecl`` <sequence> {<info>}` is used at beginning of macro files.\nl
+\~`\colordef`` \macro {<mix of colors>}` declares `\macro` as color switch.\nl
+\^`\cs` `{<string>}` expands `\<string>`.\nl
+\~`\_doc` `...` \~`\_cod` encloses documenation text in the macro code.\nl
+\^`\eoldef`` \macro #1{<body>}` defines `\macro` with parameter separated to end of line.\nl
+\~`\_endcode` closes the part of macro code in macro files.\nl
+\~`\_endnamespace` closes name space declared by \~`\_namespace`.\nl
+\~`\eqbox`` [<label>]{<text>}` creates `\hbox{<text>}` with common width across whole document.\nl
+\^`\expr`` {<expression>}` expands to result of the <expression> with decimal numbers.\nl
+\~`\fontdef`` \f {<font spec.>}` declares `\f` as font switch.\nl
+\~`\fontlet` `\fa=\fb <sizespec.>` declares `\fa` as the same font switch
+ like `\fb` at given <sizespec.>.\nl
+\^`\foreach` `<list>\do <parameters>{<what>}` is exapandable loop over <list>.\nl
+\^`\foreachdef` `\macro <parameters>{<what>}` declares expandable `\macro` as loop over <list>.\nl
+\^`\fornum` `<from>..<to>\do {<what>}` is expanadable loop with numeric variable.\nl
+\^`\ignoreit` `<one>`, \^`\ignoresecond` `<one><two>`, \^`\usesecond` `<one><two>` ignores parameters.\nl
+`\expandafter` \^`\ignorept` `\the<dimen>` expands to decimal number <dimen> without `pt`.\nl
+\~`\isempty`, \~`\istoksempty`, \~`\isequal`, \~`\ismacro`, \~`\isdefined`, \~`\isinlist`
+\~`\isfile`, \~`\isfont` do various tests. Example: \~`\isinlist\list{<text>}\iftrue` does
+ `\iftrue` if <text> is in `\list`.\nl
+\^`\isnextchar`` <char>{<text1>}{<text2>}` performs <text1> if next
+ character is <char>, else <text2>.\nl
+\~`\kv` `{<key>}` expands to value when key-value parameters are used.\nl
+\^`\loop` `...` \^`\repeat` is classical Plain \TeX/ loop.\nl
+\^`\mathstyles`` {<math list>}` enables to create macros dependent on current math style.\nl
+\~`\_namespace`` {<pkg>}` declares name space used by package writers.\nl
+\^`\newcount`, \^`\newdimen` etc. are classical Plain \TeX/ allocators.\nl
+\^`\newif` `\iffoo` declares boolean `\iffoo` as in Plain \TeX/.\nl
+\^`\_newifi` `\_iffoo` declares boolean `\_iffoo`.\nl
+\^`\opinput`` {<filename>}` reads file like `\input` but with standard catcodes.\nl
+\^`\optdef`` \macro [<opt-default>] <parameters>{<body>}` defines `\macro` with [opt.parameter].\nl
+\^`\opwarning` `{<text>}` prints <text> to the terminal and .log file as warning.\nl
+\~`\private`` <sequence> <sequence> ... ;` declares <sequence>s for private name space.\nl
+\~`\public`` <sequence> <sequence> ... ;` declares <sequence>s for public name space.\nl
+\~`\readkv` `\macro` reads parameters from `\macro` in key-value format.\nl
+\^`\replstring`` \macro{<stringA>}{<stringB>}` replaces all <stringA> to <stringB> in `\macro`.\nl
+\^`\sdef` `{<string>}<parameters>{<body>}` behaves like `\def\<string><parameters>{<body>}`.\nl
+\^`\setctable` and \^`\restorectable` manipulate with stack of catcode tables.\nl
+\^`\slet` `{<stringA>}{<stringB>}` behaves like `\let\<stringA>=\<stringB>`\nl
+\^`\sxdef` `{<string>}<parameters>{<body>}` behaves like `\xdef\<string><parameters>{<body>}`.\nl
+\^`\trycs`` {<string>}{<text>}` expands `\<string>` if it is defined else expands <text>.\nl
+\^`\wlog`` {<text>}` writes <text> to .log file.\nl
+\^`\wterm`` {<text>}` writes <text> to the terminal and .log file.\nl
+\^`\xargs`` <what> <token> <token> ... ;` repeats <what><token> for each <token>.\nl
+\unpenalty\unskip
\sec Compatibility with Plain \TeX/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1831,16 +1910,16 @@ put it as the first command in your document:
All macros of Plain \TeX/ are re-written in \OpTeX/. Common macros should
work in the same sense as in original Plain \TeX. Internal control sequences
like `\p@` or `\f@@t` are removed and mostly replaced by control sequences
-prefixed by `_` (like `\_this`). If you need to use basic set of old Plain
+prefixed by `_` (like `\_this`). If you need to use the basic set of old Plain
\TeX/ control sequences like `\p@` (for example you are reading an old macro file),
use `\load[plain-at]`.
All primitives and common macros have two
control sequences with the same meaning: in prefixed and unprefixed form.
-For example `\hbox` is equal to `\_hbox`.
+For example `\hbox` is equal to `\_hbox`.
Internal macros of \OpTeX/ have and use only prefixed form. User should use
-unprefixed forms, but prefixed forms are accessible too, because the `_` is
-set as a letter category code globally (in macro files and in users document too). User
+unprefixed forms, but prefixed forms are accessible too because the `_` is
+set as a letter category code globally (in macro files and users document too). User
should re-define unprefixed forms of control sequences without worries that
something internal will be broken (only the sequence `\par` cannot be
re-defined without change of internal \TeX/ behavior because it is
@@ -1848,7 +1927,7 @@ hard-coded in \TeX/, unfortunately).
\new
The Latin Modern 8bit fonts instead Computer Modern 7bit fonts are
-preloaded in the format, but only few ones. The full family set is ready to
+preloaded in the format, but only a few ones. The full family set is ready to
use after the command \~`\fontfam[LMfonts]` which reads the fonts in OTF
format.
@@ -1859,7 +1938,7 @@ doesn't set any macro as `\outer`. Macros like `\TeX`, `\rm` are defined as
\new
The text accents macros `\"`, `\'`, `\v`, `\u`, `\=`, `\^`, `\.`, `\H`,
-`\~`, \code{\\`}, `\t` are undefined\fnote
+`\~`, \code{\\`}, `\t` are undefined\fnote
{The math accents macros like `\acute`, `\bar`, `\dot`, `\hat` still work.}
in \OpTeX/. Use real
letters like á, ř, ž in your source document instead of these old accents macros.
@@ -1867,14 +1946,14 @@ If you really want to use them, you can initialize them by the \^`\oldaccents`
command. But we don't recommend it.
\new
-The default paper size is not set as letter with 1\,in margins but as A4 with
-2.5\,cm margins. You can change it, for example by
+The default paper size is not set as the letter with 1\,in margins but as A4 with
+2.5\,cm margins. You can change it, for example by
\^`\margins/1 letter (1,1,1,1)in`. This example sets the classical Plain \TeX/
page layout.
\new
-The origin for typographical area is not at top left 1\,in 1\,in coordinates
-but at top left paper corner exactly. For example, `\hoffset` includes directly left
+The origin for the typographical area is not at the top left 1\,in 1\,in coordinates
+but at the top left paper corner exactly. For example, `\hoffset` includes directly left
margin.
The tabbing macros `\settabs`\iindex{settabs} and `\+` (from Plain \TeX/)
@@ -1882,13 +1961,12 @@ are not defined in \OpTeX/ because they are obsolete. But you can use the
\ulink[http://petr.olsak.net/optex/optex-tricks.html\#tabs]{\OpTeX/ trick 0021}
if you really need such feature.
-The `\sec` macro is reserved to sections but original Plain \TeX/ declares this
+The `\sec` macro is reserved for sections but original Plain \TeX/ declares this
control sequence for math secans.
\enddocument
-
\sec Dependencies
%%%%%%%%%%%%%%%%%
@@ -1896,7 +1974,7 @@ When `optex.fmt` is created then the following must be installed
\begitems
* The `\luatex` program.
-* Latin moder font metrics
+* Latin moder font metrics
`ec-lmr10.tfm`, `ec-lmbx10.tfm`, `ec-lmri10.tfm`,
`ec-lmbxi10.tfm`, `ec-lmtt10.tfm` (for basic text font initializing).
* Computer rmodern font metrics
@@ -1906,27 +1984,27 @@ When `optex.fmt` is created then the following must be installed
* The file `hyphen.tex` form plain \TeX.
\enditems
-When `\fontfam` is used then the ability of Unicode fonts reading
-is initialized using Lua scripts: `ltluatex.lua` (from \LaTeX/ package),
+When `\fontfam` is used then the ability of Unicode fonts reading
+is initialized using Lua scripts: `ltluatex.lua` (from \LaTeX/ package),
`luaotfload-main.lua` and more 20 similar `.lua` files (from `luaotfload`
package).
When a font family is needed using `\fontfam` then such font family must be
-installed in the OTF format otherwise the `\fontfam` command is ignored
+installed in the OTF format otherwise, the `\fontfam` command is ignored
(only warning about no-existent font family is printed).
-When `\cslang`, `\delang` etc. commands are used in the document
-then the hyphenation patterns of relevant languages must be installed.
+When `\cslang`, `\delang` etc. commands are used in the document
+then the hyphenation patterns of relevant languages must be installed.
Moreover the Lua script `luatex-hyphen.lua` (from `hyph-utf8` package)
-and data file `language-dat.lua` (from `hyphen-base` package)
+and data file `language-dat.lua` (from `hyphen-base` package)
must be installed.
-When `\usebib` command is used then `librarian.tex` file
+When `\usebib` command is used then `librarian.tex` file
(from the `librarian` macro package) must be installed.
-When `\morecolors` command is used then `x11nam.def` file
+When `\morecolors` command is used then `x11nam.def` file
(from the `xcolor` package) must be installed.
-When `\lorem` command is used then `lipsum.ltd.tex` file
+When `\lorem` command is used then `lipsum.ltd.tex` file
(from the `lipsum` package) must be installed.