| 1 |
%% This is part of the OpTeX project, see http://petr.olsak.net/optex |
| 2 |
|
| 3 |
% Run optex optex-doc |
| 4 |
% (three times) to generate OpTeX documentation including references and the index. |
| 5 |
|
| 6 |
\load [doc.opm] \let\enddocument=\endinput |
| 7 |
|
| 8 |
\typosize[10/12] % Main size (used in techdoc) |
| 9 |
\directlua{optex.glyphstroked = false} % see section 2.39.6 of OpTeX doc. |
| 10 |
|
| 11 |
\begingroup \typosize [11/13.5] % Different size used in useroc. |
| 12 |
|
| 13 |
\insertoutline{OpTeX} % PDF outlines generated from TOC |
| 14 |
|
| 15 |
% Title: |
| 16 |
|
| 17 |
\vglue1cm |
| 18 |
\centerline{\setfontsize{at50pt}\rm\OpTeX} |
| 19 |
\vskip-8mm |
| 20 |
|
| 21 |
\tit Format Based on Plain \TeX/ |
| 22 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 23 |
|
| 24 |
\hfill Version 1.20 |
| 25 |
|
| 26 |
\centerline{\it Petr Olšák, 2020, 2021, 2022, 2023, 2024, 2025, 2026} |
| 27 |
|
| 28 |
\bigskip |
| 29 |
\centerline{\url{http://petr.olsak.net/optex}} |
| 30 |
|
| 31 |
\bigskip |
| 32 |
\noindent |
| 33 |
\OpTeX/ is \LuaTeX/ format with Plain \TeX/ macros |
| 34 |
and with extended powerful macros, especially those taken from OPmac\fnote |
| 35 |
{OPmac package is a set of simple additional macros to Plain \TeX{}. |
| 36 |
It enables users to take advantage of \LaTeX/ functionality but keeps |
| 37 |
Plain \TeX/ simplicity. See |
| 38 |
\url{http://petr.olsak.net/opmac-e.html} for more information about it.}. |
| 39 |
Only \LuaTeX/ engine |
| 40 |
is supported (more exactly: \LuaHBTeX/ engine is used from 2025). |
| 41 |
|
| 42 |
\OpTeX/ should be a modern Plain \TeX/ with power from OPmac |
| 43 |
(Fonts Selection System, colors, graphics, references, hyperlinks, |
| 44 |
indexing, bibliography, ...) with preferred Unicode fonts. |
| 45 |
|
| 46 |
The main goal of \OpTeX/ is: |
| 47 |
|
| 48 |
\begitems |
| 49 |
* \OpTeX/ keeps the simplicity (like in Plain \TeX/ and OPmac macros). |
| 50 |
* There is no old obscurities concerning various 8-bit encodings and |
| 51 |
various engines. |
| 52 |
* \OpTeX/ provides a powerful Fonts Selection System (for Unicode font |
| 53 |
families, of course). |
| 54 |
* \OpTeX/ supports hyphenations of all languages installed in your \TeX/ system. |
| 55 |
* All features from OPmac macros are copied. For example sorting words in |
| 56 |
the Index\fnotemark1, reading `.bib` files directly\fnotemark1, syntax |
| 57 |
highlighting\fnotemark1, colors, graphics, hyperlinks, references). |
| 58 |
\fnotetext{All these features are implemented by \TeX/ macros, no external |
| 59 |
program is needed.} |
| 60 |
* Macros are documented in the same place where code is. |
| 61 |
* User namespace of control sequences is separated from the internal namespace |
| 62 |
of \OpTeX/ and primitives (`\foo` versus `\_foo`). |
| 63 |
The namespaces for macro writers are designed too. |
| 64 |
\enditems |
| 65 |
|
| 66 |
If you need to customize your document or you need to use something |
| 67 |
very specific, then you can copy relevant parts of \OpTeX/ macros into your macro |
| 68 |
file and do changes to these macros here. This is a significant difference from |
| 69 |
\LaTeX/ or \ConTeXt/, which is an attempt to create a new user level with a |
| 70 |
plenty of non-primitive parameters and syntax hiding \TeX/ internals. |
| 71 |
The macros from \OpTeX/ are simple and straightforward because they solve only |
| 72 |
what is explicitly needed, they do not create a new user level for |
| 73 |
controlling your document. We are using \TeX/ directly in this case. |
| 74 |
You can use \OpTeX/ macros, understand them, and modify them. |
| 75 |
|
| 76 |
\OpTeX/ offers a markup language for authors of texts (like \LaTeX), |
| 77 |
i.\,e.\ the fixed set of tags to define the structure of the document. This |
| 78 |
markup is different from the \LaTeX{} markup. It may offer to write the |
| 79 |
source text of the document somewhat clearer and more attractive. |
| 80 |
|
| 81 |
The manual includes two parts: user documentation and technical |
| 82 |
documentation. The second part is generated directly from the sources of |
| 83 |
\OpTeX/. There are many hyperlinks from one part to second and vice versa. |
| 84 |
|
| 85 |
This manual describes \OpTeX/ features only. We suppose that the user knows \TeX/ |
| 86 |
basics. They are described in many books. You can see a short |
| 87 |
document \ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf] |
| 88 |
{\TeX/ in nutshell} too. |
| 89 |
|
| 90 |
\vfil\break |
| 91 |
|
| 92 |
\insertoutline{CONTENTS} \outlines{0} |
| 93 |
|
| 94 |
{\baselineskip=13.4pt |
| 95 |
\notoc\nonum \sec Contents |
| 96 |
\maketoc |
| 97 |
\par} |
| 98 |
|
| 99 |
\thisoutline {USER DOCUMENTATION} |
| 100 |
|
| 101 |
\chap User documentation |
| 102 |
|
| 103 |
\input optex-userdoc |
| 104 |
\endgroup |
| 105 |
|
| 106 |
%\end |
| 107 |
|
| 108 |
\input optex-techdoc |
| 109 |
|
| 110 |
\vfil\break |
| 111 |
|
| 112 |
\def\_printchap#1{\noindent{\_printrefnum[@]\_secfont #1}\medskip} |
| 113 |
|
| 114 |
\nonum\chap Index |
| 115 |
|
| 116 |
\noindent |
| 117 |
Control sequences declared by \OpTeX/ have page list here and they are |
| 118 |
internal links to their main documentation point. \TeX/ primitives used by |
| 119 |
\OpTeX/ have no page list here and they are external links to |
| 120 |
\ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf]{\TeX/ in a Nutshell} |
| 121 |
to the place where the primitive is briefly described. |
| 122 |
%Only primitives used in \OpTeX/ macros are listed here. There are much more |
| 123 |
%primitives implemented in \LuaTeX/, see |
| 124 |
%\ulink[https://www.pragma-ade.com/general/manuals/luatex.pdf]{\LuaTeX/ manual}, |
| 125 |
%section \"primitives". |
| 126 |
|
| 127 |
% active links directly to the main documentation point but not to the pages: |
| 128 |
\def\_printiiD #1#2#3{% |
| 129 |
\ea\ifx \csname,#3\endcsname \empty % primitive |
| 130 |
\_dest[cs:\_tmp]% main documentation point for primitives is in the Index |
| 131 |
{\tt\link[url:\exurl\#cs:\_tmp]\_elinkcolor{\bslash\_tmp}} |
| 132 |
\nopages \fi |
| 133 |
} |
| 134 |
\def\exurl{https://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf} |
| 135 |
|
| 136 |
\def\_pgprintA #1{#1} |
| 137 |
\def\nopages#1&{\fi\fi\fi{\tt*}\_par} |
| 138 |
\begmulti 3 \makeindex \endmulti |
| 139 |
|
| 140 |
\bye |