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.tex71
1 files changed, 40 insertions, 31 deletions
diff --git a/macros/luatex/optex/doc/optex-userdoc.tex b/macros/luatex/optex/doc/optex-userdoc.tex
index 6083eef7ea..1e94712426 100644
--- a/macros/luatex/optex/doc/optex-userdoc.tex
+++ b/macros/luatex/optex/doc/optex-userdoc.tex
@@ -99,7 +99,7 @@ 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, b5, letter and user can declare another own format by `\sdef`:
+a5, a5l, a3, a3l, b5, letter and user can declare another own format by `\sdef`:
\begtt
\sdef{_pgs:b5l}{(250,176)mm}
@@ -222,7 +222,7 @@ by using the `up` keyword: \~`\mnote`` up<dimen>{<text>}`.
You can set such <dimen> to each \^`\mnote` manually in final printing
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\badselineskip{<text>}` shifts this marginal note two lines up.
+\^`\mnote`` up 2\baselineskip{<text>}` shifts this marginal note two lines up.
\sec Fonts
@@ -257,7 +257,8 @@ modifier which negates the previous feature is used. So
`{\caps \rm First text \it Second text}`
gives {\caps \rm First text \it Second text}.
-\new
+The font modifier without following variant selector does not change the font
+actually, it only prepares data used by next variant selectors.
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).
@@ -334,8 +335,9 @@ before \^`\typoscale` command.
\scalemain \typoscale[800/800] % reduces from main values, no from current.
\endtt
-The size of the current font can be changed by the command
-\^`\thefontsize[<font-size>]` or can be rescaled by
+The \^`\typosize` and \^`\typoscale` macros initialize the font family by `\rm`.
+You can re-size only the current font by the command
+\^`\thefontsize[<font-size>]` or the font can be rescaled by
\^`\thefontscale[<factor>]`. These macros don't change math fonts sizes nor
baselineskip.
@@ -445,7 +447,7 @@ paragraphs indented.
If a title is so long then it breaks to more lines in the output. It is better to hint the
breakpoints because \TeX/ does not interpret the meaning of the title.
-User can put the \^`\nl` (it means newline) macro to the breakpoints.
+User 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).
@@ -467,7 +469,7 @@ figures. The user can declare more numbered objects.
If the user writes the \^`\eqmark` as the last element of the display mode then
this equation is numbered. The equation number is printed in brackets. This number
-resets in each section by default.
+is reset in each section by default.
If the \^`\eqalignno` is used, then user can put \^`\eqmark` to the last column
before `\cr`. For example:
@@ -614,8 +616,8 @@ If the command \^`\hyperlinks` `<color-in> <color-out>` is used at the beginning
the document, then the following objects are hyperlinked in the PDF output:
\begitems
-* numbers generated by \^`\ref` or \^`\pgref`,
-* numbers of chapters, sections and subsections in the table of contents,
+* numbers and texts generated by \^`\ref` or \^`\pgref`,
+* 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
@@ -640,10 +642,10 @@ color. Example:
\def\_citeborder {0 0 1} % links to references: blue frame
\endtt
-By default these macros are not defined. It means that no frames are created.
+By default, these macros are not defined. It means that no frames are created.
The hyperlinked footnotes can be activated by \^`\fnotelinks` `<color-fnt> <color-fnf>`
-where footnote marks in text have `<color-fnt>` and the same footnote marks
+where footnote marks in the text have `<color-fnt>` and the same footnote marks
in footnotes have <color-fnf>. You can define relevant borders
\^`\_fntborder` and \^`\_fnfborder` analogically as \^`\_pgborder` (for example).
@@ -654,7 +656,7 @@ active text linked to the \^`\dest` can be created by
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
+The \^`\url` macro prints its parameter in \~`\tt` font and creates a potential
breakpoints in it (after slash or dot, for example). If \^`\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}.
@@ -984,7 +986,7 @@ in-line verbatim surrounded by an \^`\activettchar` or processed by the \~`\code
command.
The \^`\everytt` is applied to all \^`\begtt...`\^`\endtt` environments (if it is not
-decared in a group). There are tips for such global `\everytt` definitions here:
+declared in a group). There are tips for such global `\everytt` definitions here:
\begtt \adef!{\char9251 }
\everytt={\typosize[9/11]} % setting font size for verbatim
@@ -1057,8 +1059,8 @@ codes. Automatic syntax highlighting is possible, for example
\OpTeX/ implements C, Python, \TeX/, HTML and XML syntax highlighting.
More languages can be declared, see the section~\ref[hisyntax].
-If the code is read by \^`\verbinput` and it uses two characters at the front
-of the lines as a comment lines,
+If the code is read by \^`\verbinput` and there are comment lines prefixed
+by two characters then
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.
@@ -1092,7 +1094,7 @@ 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 the parameters are accumulated (for more macros).
+used repeatedly: then its parameters are accumulated (for more macros).
If a parameter is empty then original definition is used in given case.
For example:
@@ -1102,7 +1104,7 @@ For example:
% another variants:
\regmacro {\def\mylogo{\hbox{\Red My\Black LoGo}}} % used in TOC
{\def\mylogo{\hbox{{\it My}\/LoGo}}} % used in running heads
- {\def\mylogo{MyLoGo}} % used in outlines
+ {\def\mylogo{MyLoGo}} % used in PDF outlines
\endtt
\secc Making the index
@@ -1156,7 +1158,7 @@ Example:
{\em Linear space} (or {\em vector space}) is a nonempty set of...
\endtt
-The number of the parts of one index entry is unlimited. Note, that you can
+The number of the parts of one index entry (separated by `/`) is unlimited. Note, that you can
spare your typing by the comma in the \~`\ii` parameter. The previous example
is equivalent to `\ii linear/space \ii vector/space`~.
@@ -1202,11 +1204,11 @@ 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 by the \^`\iis` command. Example:
+real word which is printed in the index. Such mapping is done by
+\^`\iis` command. Example:
\begtt
-The \ii chiquadrat $\chi$-quadrat method is
-...
+The \ii chiquadrat $\chi$-quadrat method is ...
If the \ii relax `\relax` command is used then \TeX/ is relaxing.
...
\iis chiquadrat {$\chi$-quadrat}
@@ -1293,7 +1295,7 @@ The usage is:
\usebib/c (<style>) <bib-base> % sorted by \cite-order (c=cite),
\usebib/s (<style>) <bib-base> % sorted by style (s=style).
% example:
-\usebib/s (simple) op-example
+\nocite[*] \usebib/s (simple) op-biblist % prints all from op-biblist.bib
\endtt
The <bib-base> is one or more `*.bib` database source files (separated by
@@ -1301,11 +1303,12 @@ spaces and without extension) and the <style> is the part of the filename
`bib-<style>.opm` where the formatting of the references list is
defined. \OpTeX/ supports `simple` or `iso690` styles. The features of
the `iso690` style is documented in the section~\ref[isobib] in detail.
+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 only tells that mentioned bib-record should be printed in the
+nothing. It tells only that mentioned bib-record should be printed in the
reference list. If \^`\nocite[*]` is used then all records from <bib-base>
are printed.
@@ -1338,7 +1341,8 @@ or three RGB components. For example
\endtt
\new
-The command \^`\morecolors` reads more definitions of color selectors.
+The command \^`\morecolors` reads more definitions of color selectors from
+the \LaTeX/ file `x11nam.def`.
There is 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
@@ -1409,7 +1413,7 @@ The \^`\inspic` `{<filename>.<extension>}` or
inserts the picture stored in
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
+before \^`\inspic` command which declares the width of the picture.
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
@@ -1436,7 +1440,7 @@ If you want to create a 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.
-It works in Plain \TeX.
+It works in Plain \TeX/ and \OpTeX.
\secc PDF transformations
%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1555,7 +1559,7 @@ Example:
\new
The \^`\puttext` `<x> <y> {<text>}` puts the `<text>` shifted by `<x>` right and by
-`<y>` up from current point of typesetting and does'n not change the
+`<y>` up from current point of typesetting and does not change the
position of the current point. Assume 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
@@ -1611,7 +1615,7 @@ in used language and it depends on the previously used language selectors
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 the section~\ref[langphrases].
+\^`\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,
@@ -1625,7 +1629,7 @@ 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`).
-You can simply define your own quotes as shown in `languages.opm` file.
+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
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
@@ -1827,8 +1831,8 @@ 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 such Plain
-\TeX/ control sequences (for example you are reading an old macro file),
+prefixed by `_` (like `\_this`). If you need to use 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
@@ -1873,6 +1877,11 @@ 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
margin.
+The tabbing macros `\settabs`\iindex{settabs} and `\+` (from Plain \TeX/)
+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
control sequence for math secans.