%% This is part of the OpTeX project, see http://petr.olsak.net/optex

% Run  optex optex-doc 
% (three times) to generate OpTeX documentation including references and the index. 

\load [doc.opm]  \let\enddocument=\endinput
\let\_catcodedot=\relax \catcode`\.=12 % we are not using \.foo sequences

\typosize[10/12]  % Main size (used in techdoc)

\begingroup \typosize [11/13.5] % Different size used in useroc.

\insertoutline{OpTeX}  % PDF outlines generated from TOC

% Title:

\vglue1cm
\centerline{\setfontsize{at50pt}\rm\OpTeX}
\vskip-8mm

\tit Format Based on Plain \TeX/ and OPmac\fnotemark1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\hfill Version 1.10

\centerline{\it Petr Olšák, 2020, 2021, 2022, 2023}

\bigskip
\centerline{\url{http://petr.olsak.net/optex}}

\fnotetext {OPmac package is a set of simple additional macros to Plain \TeX{}.
It enables users to take advantage of \LaTeX/ functionality but keeps
Plain \TeX/ simplicity. See
\url{http://petr.olsak.net/opmac-e.html} for more information about it.}

\bigskip
\noindent
\OpTeX/ is \LuaTeX/ format with Plain \TeX/ and OPmac. Only \LuaTeX/ engine
is supported. 

\OpTeX/ should be a modern Plain \TeX/ with power from OPmac (Fonts
Selection System, colors, graphics, references, hyperlinks,
indexing, bibliography, ...) with preferred Unicode fonts.

The main goal of \OpTeX/ is:

\begitems
* \OpTeX/ keeps the simplicity (like in Plain \TeX/ and OPmac macros).
* There is no old obscurities concerning various 8-bit encodings and
  various engines.
* \OpTeX/ provides a powerful Fonts Selection System (for Unicode font
  families, of course).
* \OpTeX/ supports hyphenations of all languages installed in your \TeX/ system.
* All features from OPmac macros are copied. For example sorting words in
  the Index\fnotemark1, reading `.bib` files directly\fnotemark1, syntax 
  highlighting\fnotemark1, colors, graphics, hyperlinks, references).
  \fnotetext{All these features are implemented by \TeX/ macros, no external
             program is needed.}
* Macros are documented in the same place where code is.
* User namespace of control sequences is separated from the internal namespace
  of \OpTeX/ and primitives (`\foo` versus `\_foo`).
  The namespaces for macro writers are designed too.
\enditems

If you need to customize your document or you need to use something
very specific, then you can copy relevant parts of \OpTeX/ macros into your macro
file and do changes to these macros here. This is a significant difference from
\LaTeX/ or ConTeXt, which is an attempt to create a new user level with a
plenty of non-primitive parameters and syntax hiding \TeX/ internals.
The macros from \OpTeX/ are simple and straightforward because they solve only
what is explicitly needed, they do not create a new user level for
controlling your document. We are using \TeX/ directly in this case.
You can use \OpTeX/ macros, understand them, and modify them.

\OpTeX/ offers a markup language for authors of texts (like \LaTeX),
i.\,e.\ the fixed set of tags to define the structure of the document. This
markup is different from the \LaTeX{} markup. It may offer to write the
source text of the document somewhat clearer and more attractive. 

The manual includes two parts: user documentation and technical
documentation. The second part is generated directly from the sources of
\OpTeX/. There are many hyperlinks from one part to second and vice versa.

This manual describes \OpTeX/ features only. We suppose that the user knows \TeX/
basics. They are described in many books. You can see a short
document \ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf]
{\TeX/ in nutshell} too.

\vfil\break

\insertoutline{CONTENTS} \outlines{0} 

\notoc\nonum \sec Contents
\maketoc

\thisoutline {USER DOCUMENTATION}

\chap User documentation

\input optex-userdoc
\endgroup

%\end

\input optex-techdoc

\vfil\break

\def\_printchap#1{\noindent{\_printrefnum[@]\_secfont #1}\medskip}

\nonum\chap Index

\noindent
There are all control sequences used in \OpTeX/ except \TeX/ primitives.
If you want to know something about \TeX/ primitives then you can use another index from
\ulink[http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf\#ref:index]{\TeX/ in a Nutshell}.

% active links directly to the main documentation point but not to the pages:
\def\_printii #1&{\noindent\hskip-\iindent \link[cs:#1]\Blue{\bslash #1} }
\def\_pgprintA #1{#1}
\begmulti 3 \tt \makeindex \endmulti

\bye
