
OpTEX 1 Format Based on Plain TEX and OPmac Version 0.15 Petr Olšák, 2020 http://petr.olsak.net/optex 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: • OpTEX keeps the simplicity (like in Plain TEX and OPmac macros). • There is no old obscurities concerning with 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 Index2, reading .bib files directly2, syntax highlighting2, colors, graphics, hyperlinks, references). • Macros are documented in the same place where code is. • User name space of control sequences is separated from internal name space of OpTEX and primitives (\foo versus \_foo). The name spaces for macro writers are designed too. If you need to customize your document or you need to use something very specific, then you can copy relevant parts of OpTEX macros into your macro file and do changes of these macros here. This is significant difference fromA LTEX or ConTeXt, which are an attempt to create a new user level with a plenty of non-primitive parameters and syntax hiding TEX internals. The macros from OpTEX are simple and straightforward because they solve only what is explicitly needed, they does not create a new user level for controlling your document. We have TEX. You can use OpTEX macros, understand them an modify them. OpTEX offers a markup language for authors of texts (likeA LTEX), i. e. the fixed set of tags to define the structure of the document. This markup is differentA fromtheLTEX 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 user knows TEX basics. They are described in many books. You can see a short document TEX in nutshell too. 1 The 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 http://petr.olsak.net/opmac-e.html for more information about it. 2 All these features are implemented by TEX macros, no external program is needed. 1 Contents 1 User documentation 5 1.1 Starting with OpTEX..................................... 5 1.2 Page layout . 5 1.2.1 Setting the margins . 5 1.2.2 Concept of default page . 6 1.2.3 Footnotes and marginal notes . 7 1.3 Fonts ............................................. 7 1.3.1 Font families . 7 1.3.2 Font sizes . 8 1.3.3 Typesetting math . 9 1.4 Typical elements of document . 10 1.4.1 Chapters and sections . 10 1.4.2 Another numbered objects . 10 1.4.3 References . 11 1.4.4 Hyperlinks, outlines . 12 1.4.5 Lists . 13 1.4.6 Tables . 14 1.4.7 Verbatim . 16 1.5 Autogenerated lists . 18 1.5.1 Table of contents . 18 1.5.2 Making the index . 18 1.5.3 BibTEXing....................................... 19 1.6 Graphics . 20 1.6.1 Colors . 20 1.6.2 Images . 21 1.6.3 PDF transformations . 22 1.6.4 Ovals, circles . 23 1.6.5 Putting images and texts wherever . 23 1.7 Others . 23 1.7.1 Using more languages . 23 1.7.2 Pre-defined styles . 24 1.7.3 Loading other macro packages . 25 1.7.4 Lorem ipsum dolor sit . 25 1.7.5 Logos . 25 1.7.6 The last page . 25 1.7.7 Use OpTEX....................................... 26 1.8 Summary . 26 1.9 Compatibility with Plain TEX............................... 27 2 Technical documentation 28 2.1 The main initialization file . 28 2.2 Concept of name spaces of control sequences . 30 2.2.1 Prefixing internal control sequences . 30 2.2.2 Name space of control sequences for users . 30 2.2.3 Macro files syntax . 31 2.2.4 Name spaces for package writers . 31 2.2.5 Summary about rules for external macro files published forE OpT X........ 31 2.2.6 The implementation of the name spaces . 32 2.3 pdfTEX initialization . 33 2 2.4 Basic macros . 35 2.5 Allocators for TEX registers . 36 2.6 If-macros, loops, is-macros . 38 2.6.1 Classical \newif .................................... 38 2.6.2 Loops.......................................... 38 2.6.3 Is-macros . 39 2.7 Setting parameters . 41 2.7.1 Primitive registers . 41 2.7.2 Plain TEX registers . 42 2.7.3 Different settings than in plainE T X......................... 42 2.7.4 OpTEX parameters . 43 2.8 More OpTEX macros . 47 2.9 Plain TEX macros . 50 2.10 Preloaded fonts for text mode . 54 2.11 Scaling fonts in text mode (low-level macros) . 54 2.11.1 The \fontdef declarator . 55 2.11.2 The \fontlet declarator . 55 2.11.3 Optical sizes . 56 2.11.4 Implementation notes . 56 2.12 The Font Selection System . 58 2.12.1 Terminology . 58 2.12.2 Font families, selecting fonts . 59 2.12.3 Math Fonts . 60 2.12.4 Declaring font commands . 60 2.12.5 Modifying font features . 61 2.12.6 Special font modifiers . 61 2.12.7 How to create the font family file . 62 2.12.8 How to write the font family file with optical sizes . 64 2.12.9 How to register the font family in the Font Selection System . 65 2.12.10 Implementation of the Font Selection System . 66 2.13 Preloaded fonts for math mode . 70 2.14 Math macros . 73 2.15 Unicode-math fonts . 81 2.15.1 Unicode-math macros preloaded in the format . 82 2.15.2 Macros and codes set when \loadmatfont is processed . 84 2.15.3 A few observations . 89 2.15.4 Printing all Unicode math slots in used math font . 90 2.16 Scaling fonts in document (high-level macros) . 90 2.17 Output routine . 93 2.18 Margins . 96 2.19 Colors . 97 2.20 The .ref file....................................... 101 2.21 References . 103 2.22 Hyperlinks . 104 2.23 Making table of contents.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages180 Page
-
File Size-