From cfcab0823d16bb9acd6d6a7d3f80a7b2176a6260 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 27 Feb 2020 03:01:13 +0000 Subject: CTAN sync 202002270301 --- macros/luatex/optex/doc/optex-doc.pdf | Bin 145296 -> 150405 bytes macros/luatex/optex/doc/optex-doc.tex | 256 ++++++++++++++++++++-------------- 2 files changed, 153 insertions(+), 103 deletions(-) (limited to 'macros/luatex/optex/doc') diff --git a/macros/luatex/optex/doc/optex-doc.pdf b/macros/luatex/optex/doc/optex-doc.pdf index 93a6d13eb3..7f161eaeb0 100644 Binary files a/macros/luatex/optex/doc/optex-doc.pdf and b/macros/luatex/optex/doc/optex-doc.pdf differ diff --git a/macros/luatex/optex/doc/optex-doc.tex b/macros/luatex/optex/doc/optex-doc.tex index 514a322dd7..7b0f6ff286 100644 --- a/macros/luatex/optex/doc/optex-doc.tex +++ b/macros/luatex/optex/doc/optex-doc.tex @@ -19,17 +19,17 @@ \insertoutline{CONTENTS} \outlines{0} + \tit \OpTeX/\nl Format Based on Plain \TeX/ and OPmac\fnotemark1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\hfill Version Alpha 0.03 +\hfill Version Alpha 0.05 \centerline{\it Petr Olšák, 2020} \bigskip \centerline{\url{http://petr.olsak.net/optex}} - \fnotetext {The OPmac package is a set of simple additional macros to plain\TeX{}. It enables users to take advantage of basic \LaTeX/ functionality but keeps plain \TeX/ simplicity. See @@ -53,8 +53,7 @@ is supported. The main goal of \OpTeX/ is: * \OpTeX/ provides a powerful font 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, you can see - opmac-prospectus.pdf) +* All features from OPmac macros are copied. * Macros are documented in the same place where code is (macros for printing this documentation will come in the future). * User name space of control sequences is separated from internal name space @@ -62,17 +61,28 @@ is supported. The main goal of \OpTeX/ is: \enditems \OpTeX/ should be a modern plain \TeX/ with power from OPmac (fonts selection -system, colors, external graphics, references, hyperlinks...) with unicode -fonts. - -\OpTeX/ (like OPmac) offers a markup language for authors of texts (like \LaTeX), +system, colors, external graphics, references, hyperlinks, indexing, +bibliography, ...) with preferred Unicode fonts. + +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 from +\LaTeX/ or ConTeXt, which are an attempt to create a new user level with a +plenty of non-primitive parameters and syntax hidding \TeX/ internals. +The macros from \OpTeX/ are simple and straightforward because they solves only +what is excplicitly needed, they does not create a new user level over \TeX/. +And you can use them, understand them an 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. -\new -{\bf Disclaimer:} This software is under construction. -It is possible that some features documented here will be changed in future. +\new +{\bf Disclaimer:} This software is under construction. It is possible +that some features documented here will be changed in future. There exists a +large part of original OPmac macros included in \OpTeX/ which waits to its +re-implementation at current state of development. \sec Using \OpTeX/ @@ -86,7 +96,7 @@ It is possible that some features documented here will be changed in future. optex document \endtt % -You can try to process `optex demo` or `optex optex-doc`. +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}. @@ -102,15 +112,15 @@ 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 technical limitations of \LuaTeX/ for fonts in formats: +{This is technical limitations 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 languges (like `Ahoj světe!`) +cannot print such sentence in another languages (for example `Ahoj světe!`) where Unicode fonts are needed because of the characters like `ě` are not mapped correctly in preloaded -font. +fonts. -A somewhat larger example with common settings shoud be: +A somewhat larger example with common settings should be: \begtt \fontfam[Termes] % selecting Unicode font family Termes @@ -122,7 +132,7 @@ Tady je text. \bye \endtt % -You can look at `demo.tex` file for more examples. +You can look at `op-demo.tex` file for more examples. \sec Compatibility with Plain \TeX/ @@ -136,8 +146,8 @@ prefixed by `_` (like `\_this`). All primitives and common macros have two control sequences in prefixed and unprefixed form with the same meaning. 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 accessibe too, bacause the `_` is -set as a letter 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 in users document too). User should re-define unprefixed forms of control sequences with no worries that something internal will be broken (only the sequence `\par` cannot be re-defined without internal change of \TeX/ behavior because it is @@ -157,14 +167,14 @@ internal point of view. \new The accents macros like `\'`, `\v` are undefined in \OpTeX/. Use real -letters like ř, ž in your soucre document instead these old accents macros. +letters like á, ř, ž in your source document instead these old accents macros. If you really want to use them, you can initialize them by `\oldaccents` command. \new The paper size is not set as letter with 1\,in margins but as a4 with 2\,cm -marins. You can change it by `\margins/1 letter (1,1,1,1)in` (this example -sets the classical plainTeX parameters). +margins. You can change it by `\margins/1 letter (1,1,1,1)in` (this example +sets the classical plain TeX parameters). \new The origin for typographical area is not at top left 1\,in 1\,in coordinates @@ -172,11 +182,11 @@ but at top left paper corner exactly. For example, `\hoffset` includes directly margin. -\sec Selection of font family +\sec Font families and fonts %%%%%%%%%%%%%%%%%%%%%%%%%%%%% -You can select the font family by `\fontfam[]`. -The argument is case insensitive and spaces are ignored. So, +You can select the font family by `\fontfam[]`. +The argument is case insensitive and spaces are ignored. So, `\fontfam[LM Fonts]` is equal to `\fontfam[LMfonts]` and it is equal to `\fontfam[lmfonts]`. Several aliases are prepared, thus `\fontfam[Latin Modern]` can be used for loading Latin Modern family too. @@ -184,36 +194,30 @@ to `\fontfam[lmfonts]`. Several aliases are prepared, thus 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 catalogue of all fonts registered in +If you write `\fontfam[catalog]` then a catalog of all fonts registered in \OpTeX/ and available in your \TeX/ system is printed. And the instructions -how to register your own font family is appedned in such catalogue. +how to register your own font family is appended in such 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 varinat selectors} (`\rm`, `\bf`, `\it`, `\bi`). -The font modifiers of basic variants (`\caps`, `\cond` for example) can +And there are four basic {\em variant selectors} (`\rm`, `\bf`, `\it`, `\bi`). +The font modifiers (`\caps`, `\cond` for example) can be used immediately before a basic 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 -`\caps \rm... \it...` uses normal and italics in Caps and SmallCaps. +`\caps \rm text \it text` uses normal and italics in Caps and SmallCaps. \new There is one special variant selector `\currvar` which does not change the -selected variant but reloads the font in respect of tne (maybe newly -specified) font slector(s). +selected variant but reloads the font in respect of the (maybe newly +specified) font modifiers(s). -\new Most declared font families are configured with recommended Unicode -Math font. This font is automaticlally loaded unless you specify -`\noloadmath` before first `\fontfam` command. See log file for more -information about loading Text font family and UnicodeMath fonts. If you -prefer another Unicode Math font, specify it by `\loadmath{[]}` -or `\loadmath{font_name}` before first `\loadfam` command. - -The `\em` macro acts as `\it` if the current font is `\rm`, acts as `\rm` if -the current font is `\it`, acts as `\bi` if the current font is `\bf` and -acts as `\bf` if the current font is `\bi`. The `\/` spaces are inserted -automatically. Example: +The context between variants `\rm`--`\it` and `\bf`--`\bi` is kept by the `\em` +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 needed italics correction `\/` is inserted automatically. Example: \begtt This is {\em important} text. % = This is {\it important\/} text. @@ -225,33 +229,18 @@ This is {\em important} text. % = This is {\it important\/} text. \new More about the \OpTeX/ font selection system is written the file `fonts-select.opm`. You can mix more font families in your document, you can -declare your variant selectors o modifiers etc. - -\new -The `\boldify` macro can be used for titles. It sets `\it` to `\bi` and -`\rm` to `\bf`. It means that user can write `{\it something}` in the title -and the result is the same as `{\bi something}`. Math formulae are in bold -variant too. The `\boldify` macro has local validity like others font -modifiers. Example: - -\begtt -{\boldify\typosize[14/16] Title in {\it bold}\par} -\endtt +declare your variant selectors or modifiers etc. \sec Font sizes %%%%%%%%%%%%%%% -The commands for font size setting described below, for variant selectors and -modifiers desribed above have local validity. If you put them into a group, -the font features are selected locally. - The command `\typosize[/]` sets the font size of text and 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=`, -for instance `\ptunit=1mm` enlages all font sizes declared by `\typosize`. +for instance `\ptunit=1mm` enlarges all font sizes declared by `\typosize`. Examples: \begtt @@ -260,6 +249,14 @@ Examples: \typosize[8/] % font 8pt, baseline unchanged \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 and second to close the group: +`{\typosize[12/14] ...... \par}`. + The command `\typoscale[/]` sets the text and math fonts @@ -274,7 +271,7 @@ i.e. the value stays unchanged. Examples: \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 +called {\em main values}, i.~e. main font size and main baselineskip. They are internally saved in registers `\mainfosize` and `\mainbaselineskip`. \new @@ -294,8 +291,9 @@ The size of the current font can be changed by the command baselineskip. \new -There is `\setfontsize{}` command which behaves like other -font modifiers. For example `\setfontsize{at15pt}\currvar`. +There is `\setfontsize{}` command which behaves like +font modifiers and sets given font size o fonts loaded by next variant selectors. +For example `\setfontsize{at15pt}\currvar`. More information about resizing of fonts is documented in `fonts-resize.opm` file. @@ -305,7 +303,7 @@ file. %%%%%%%%%%%%%%%%%%%%%%%%%% The document can be divided into chapters, sections and subsections and titled -by `\tit` command. The parameters are separed by the end of current line (no +by `\tit` command. The parameters are separated by the end of current line (no braces are used): \begtt @@ -428,8 +426,8 @@ is an interesting Table~\ref[comp-dependence]. \endtt If there are forward referenced objects then user have to run \TeX{} twice. -During each pass, the working `*.ref` file (with refereces data) is created -and this file is used (if it exists) at the begin of the document. +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 create a reference to whatever else by commands `\label[