diff options
63 files changed, 1678 insertions, 528 deletions
diff --git a/Master/texmf-dist/doc/luatex/optex/README b/Master/texmf-dist/doc/luatex/optex/README index 09029521498..365ab41391e 100644 --- a/Master/texmf-dist/doc/luatex/optex/README +++ b/Master/texmf-dist/doc/luatex/optex/README @@ -19,32 +19,49 @@ doc/ ... PDF version of the OpTeX documentation and sources. History: -<0.17> optex.lua introduced (instead external ltluatex.lua) +<0.18> Dec. 2020 + Font support for next 9 families added. + Font selection system improved. + Documentation (especially about font selection system) corrected. + Macros supporting key=value included to the format. + \foreach macro improved. + Concept of multilang in bib rewritten. + \opwarning format changed (line numbers are printed too). + Several bugs fixed. +<0.17> Nov. 2020 + optex.lua introduced (instead external ltluatex.lua) hyph.patterns are loaded directly by \patterns, not using lua code \commentchars introduced (comments which are able to interrupt verbatim mode) -<0.16> callback.register_x introduced, namespaces for packages corrected +<0.16> Oct. 2020 + callback.register_x introduced, namespaces for packages corrected kerkis and EBGaramond fontfiles added little corrections optex-math manual: Index added -<0.15> Release for Overleaf - TL2020. +<0.15> Jun. 2020 + Release for Overleaf - TL2020. More vertical space above in \chap and \secc. -<0.14> Typeseting Math with OpTeX: new document added. +<0.14> Jun. 2020 + Typeseting Math with OpTeX: new document added. Math macros corrected. In-line verbatim in section titles allowed. \eqbox implemented. "\mnote up", "\displaylines to" (new features implemented) -<0.13> \table have more features: \tabskip, \table to, \table pxto, \vspan +<0.13> May 2020 + \table have more features: \tabskip, \table to, \table pxto, \vspan The \eqalign reimplemented to be more flexible. The boundary character ":" introduced in the \table. \| undefined in 8bit math: bug fixed. \isnextchar: \let\tmp=#1 -> \let\tmp= #1 -<0.12> The external macro qrcode.opm introduced +<0.12> May 2020 + The external macro qrcode.opm introduced New directory structure: base/, demo/, pkg/, doc/ introduced. \load macro introduced \newif: bug fixed, other bug fixed. -<0.11> \phi, \varpi in Unicode: bug fixed +<0.11> Apr. 2020 + \phi, \varpi in Unicode: bug fixed \mathstyles introduced. -<0.10> Technical documentation added +<0.10> Apr. 2020 + Technical documentation added \_famdecl instedad \_fontdecl in font family files (incompatible change). <0.09> Syntax highlighting implemented. <0.08> \numberedpar implmented. \emergencystretch=20pt added as default. diff --git a/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf b/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf Binary files differindex 62be299a6c7..2c54019fe36 100644 --- a/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf +++ b/Master/texmf-dist/doc/luatex/optex/optex-doc.pdf diff --git a/Master/texmf-dist/doc/luatex/optex/optex-doc.tex b/Master/texmf-dist/doc/luatex/optex/optex-doc.tex index ce043bcbec8..227718cc297 100644 --- a/Master/texmf-dist/doc/luatex/optex/optex-doc.tex +++ b/Master/texmf-dist/doc/luatex/optex/optex-doc.tex @@ -20,7 +20,7 @@ \tit Format Based on Plain \TeX/ and OPmac\fnotemark1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\hfill Version 0.17 +\hfill Version 0.18 \centerline{\it Petr Olšák, 2020} diff --git a/Master/texmf-dist/doc/luatex/optex/optex-math.tex b/Master/texmf-dist/doc/luatex/optex/optex-math.tex index 97d475af44f..29f56f68223 100644 --- a/Master/texmf-dist/doc/luatex/optex/optex-math.tex +++ b/Master/texmf-dist/doc/luatex/optex/optex-math.tex @@ -1632,6 +1632,10 @@ We have to settle for normal version of the font in the `\_boldmath` macro: \addto \_boldmath {\_loadmathfamily 5 bbold } \endtt +Another approach of using more Unicode math fonts in single formula is +shown in +\ulink[http://petr.olsak.net/optex/optex-tricks.html\#addumathfont]{OpTeX trick 0030}. + \sec Index Control sequences listed at pages \pgref[listA]--\pgref[listB] are not diff --git a/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex b/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex index a22e6baab26..1e95d269b75 100644 --- a/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex +++ b/Master/texmf-dist/doc/luatex/optex/optex-techdoc.tex @@ -111,6 +111,10 @@ We define first bundle of basic macros. The second bundle of \OpTeX/ macros is here. \printdoc more-macros.opm +\sec Using key=value format in parameters +\printdoctail keyval.opm +\printdoc keyval.opm + \sec Plain \TeX/ macros All macros from plain \TeX/ are rewritten here. Differences are mentioned in the documentation below. diff --git a/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex b/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex index 6083eef7ea6..1e94712426b 100644 --- a/Master/texmf-dist/doc/luatex/optex/optex-userdoc.tex +++ b/Master/texmf-dist/doc/luatex/optex/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. diff --git a/Master/texmf-dist/tex/luatex/optex/base/alloc.opm b/Master/texmf-dist/tex/luatex/optex/base/alloc.opm index 2272dd38619..9526a5d934a 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/alloc.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/alloc.opm @@ -109,20 +109,24 @@ \_newdimen \tmpdim \_newdimen \_tmpdim \_doc ----------------------------- - A few registers are initialized like in plain\TeX/. Note that `\z@skip` from - plain\TeX/ is `\zoskip` here because we absolutely - don't support the `@` category dance. - The `\z@` and `\p@` is not defined because we can write 0pt or 1pt which is more - legible in source code. You can see `plain-at.opm` file. + A few registers are initialized like in plain\TeX/. We absolutely + don't support the `@`category dance, so `\z@skip` + `\z@`, `\p@` etc. are not defined in \OpTeX/. If you need such + control sequences then you can initailaize them by `\load[plain-at]`. + + Only the \`\_zo` and \`\_zoskip` (equivalents to `\z@` and `\z@skip`) + are declared here and used in some internal macros of \OpTeX/ + for improving speed. \_cod ----------------------------- \_newdimen\_maxdimen \_maxdimen=16383.99999pt % the largest legal <dimen> +\_newdimen\_zo \_zo=0pt \_newskip\_hideskip \_hideskip=-1000pt plus 1fill % negative but can grow \_newskip\_centering \_centering=0pt plus 1000pt minus 1000pt \_newskip\_zoskip \_zoskip=0pt plus0pt minus0pt \_newbox\_voidbox % permanently void box register -\_public \maxdimen \hideskip \centering \zoskip \voidbox ; +\_public \maxdimen \hideskip \centering \voidbox ; \_endcode %--------------------------------------------------- diff --git a/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm index 83181f95107..ea9cced9c1a 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/basic-macros.opm @@ -75,7 +75,7 @@ \`\opwarning` `{<text>}` prints warning on the terminal and to the log file. \_cod ------------------------------ -\_def \_opwarning #1{\_wterm{WARNING: #1.}} +\_def \_opwarning #1{\_wterm{l.\_the\_inputlineno> WARNING: #1.}} \_public \opwarning ; \_doc ------------------------------ diff --git a/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm b/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm index e7af4c9595e..ccd373e3cc1 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm @@ -99,23 +99,10 @@ \_ifx\_tmp\_empty \_RetrieveFieldIn{year}\_tmp \_edef\_tmp{\_dobibmark, \_tmp}\_fi \_bibmark=\_ea{\_tmp}% } -% Multilinguals: English Czech Slovak - -\_mtdef{bib.and} {, and } { a } {} -\_mtdef{bib.etal} { et al.} { a~kol.} {} -\_mtdef{bib.edition} { ed.} { vyd.} {} -\_mtdef{bib.bachthesis} {Bachelor's Thesis} {Bakalářská práce} {Bakalárska práca} -\_mtdef{bib.masthesis} {Master's Thesis} {Diplomová práce} {Diplomová práca} -\_mtdef{bib.phdthesis} {Ph.D. Thesis} {Disertační práce} {Dizertačná práca} -\_mtdef{bib.available} {Available from } {Dostupné na } {} -\_mtdef{bib.availablealso} {Available also from } {Dostupné též na } {Dotupné tiež na } -\_mtdef{bib.citedate} {cit.~} {vid.~} {} -\_mtdef{bib.volume} {Vol.~} {ročník~} {} -\_mtdef{bib.number} {No.~} {č.~} {} -\_mtdef{bib.prepages} {pp.~} {s.~} {} -\_mtdef{bib.postpages} {~p.} {~s.} {} -\_mtdef{bib.editor} {,~ed.} {,~editor} {} -\_mtdef{bib.editors} {,~eds.} {,~editoři} {,~editori} + + \_doc ----------------------------- + Setting phrases. + \_cod ----------------------------- \_def\_bibconjunctionand{\_Mtext{bib.and}} \_def\_preurl{\_Mtext{bib.available}} @@ -127,14 +114,18 @@ \_def\_prepages{\_mtext{bib.prepages}} \_def\_posteditor{\_ifnum0\_namecountraw>1 \_Mtext{bib.editors}\_else\_Mtext{bib.editor}\_fi} + \_doc ---------------------------- + \`\_Mtext``{<identifier>}` expands to a + phrase by outer document language (no entry language). + \_cod ----------------------------- + \_chardef\_documentlanguage=\_language \_def\_Mtext#1{\_csname _mt:#1:\_csname _lan:\_the\_documentlanguage\_endcsname\_endcsname} \_CreateField {lang} \_def\_setlang#1{\_ifx#1\_empty \_else - \_ea \_ifx \_csname _#1Patt\_endcsname \_relax - \_opwarning{The language "#1" used in .bib file is unknown} - \_else \_language=\_csname _#1Patt\_endcsname + \_ifcsname _mt:bib.and:#1\_endcsname \_language=\_csname _#1Patt\_endcsname \_relax + \_else \_opwarning{No phrases for "#1" used by [\EntryKey] in .bib}% \_fi\_fi } @@ -167,19 +158,10 @@ \_def\_docitedate #1/#2/#3/#4\_relax{[\_Mtext{bib.citedate}% \_if^#2^#1\_else - \_if^#3^#1/#2\_else \_docitedateA{#1}{#2}{#3}% + \_if^#3^#1/#2\_else + \_cs{_\_cs{_lan:\_the\_documentlanguage}dateformat}#1/#2/#3\relax \_fi\_fi ]% } -\_def\_docitedateA#1#2#3{% - \_ifnum\_documentlanguage=\_csPatt \_docitedateCS{#1}{#2}{#3}% - \_else \_ifnum\_documentlanguage=\_skPatt \_docitedateSK{#1}{#2}{#3}% - \_else \_docitedateEN{#1}{#2}{#3}% - \_fi\_fi -} -\_def\_docitedateEN#1#2#3{#1-#2-#3} -\_def\_docitedateCS#1#2#3{\_hbox{\_tmpnum=#3 \_the\_tmpnum. \_tmpnum=#2 \_the\_tmpnum. #1}} -\_let\_docitedateSK=\_docitedateCS - \_def\_doyear#1{ \_biboptionvalue{yearprint}\_yearprint \_ifx\_yearprint\_empty#1\_else\_def\YEAR{#1}\_yearprint\_fi @@ -330,12 +312,12 @@ This is the iso690 bibliographic style used by \OpTeX/. -See `op-example.bib` for an example of the `.bib` input. You can try it by: +See `op-biblist.bib` for an example of the `.bib` input. You can try it by: \begtt \fontfam[LMfonts] \nocite[*] -\usebib/s (iso690) op-example +\usebib/s (iso690) op-biblist \end \endtt @@ -858,48 +840,33 @@ may be printed in the language of the outer document. The data of the entry have to be printed in the entry language (edition ed./vyd., Vol./ročník, No./č. etc.). Finally there are the phrases independent on the language (for example In:). Unfortunately, the bib\TeX/ supposes that the entry data -are not fully included in value parts of the fields (see edition, volume -etc. fields) so the automaton have to add some text during processing. +are not fully included in the fields so the automaton have to add some +text during processing (\"ed.", \"Vol.", \"see also", etc.). But what language have to be chosen? The current value of the `\language` register at the start of the `.bib` -processing is decided as the language of the outer document. This language -is used for technical notes regardless of the entry language. Each entry can -have the lang field with the two-letter mark of the entry language. This +processing is descided as the language of the outer document. This language +is used for technical notes regardless of the entry language. Moreover, +each entry can have the `lang` field (short name of the language). This language is used for ed./vyd., vol./ročník etc. and it is used for -hyphenation too. If the entry language is not set then the outer document +hyphenation too. If the `lang` is not set then the outer document language is used. -If the outer document language is known before creating of the `.bib` file, you -can store some language-dependent phrases into it. On the other hand, if the -main document language is unknown, you can use the `\Mtext` macro to -create the text multilingual. Example: - -\begtt -howpublished = "\Mtext{blue-ray}" -\endtt - -Now, you can set the variants of blue-ray into your macros: +You can use \^`\_Mtext{bib.<identifier>}` if you want to use a phrase +dependent on outer document language (no on entry language). +Example: \begtt -\_mtdef {blue-ray} {Blue-ray disc} {Blue-ray disk} {} +howpublished = "\_Mtext{bib.blue-ray}" \endtt +Now, you can set the variants of `bib.blue-ray` phrase for various +languages: -\seccc Tips for using more languages - -This style prefers English, Czech and Slovak languages. However, you can add -more languages. Use the shortcuts of language names (`de` and `pl` in the -example below). You can define all phrases for your language: \begtt -\def\mtdefx#1#2#3{\sdef{_mt:#1:de}{#2}\sdef{_mt:#1:pl}{#3}} - - % German % Polish -\mtdefx {bib.and} { und } { a } -\mtdefx {bib.phdthesis} {Ph.D. Dissertation} {Praca doktorska} -... +\_sdef{_mt:bib.blue-ray:en} {Blue-ray disc} +\_sdef{_mt:bib.blue-ray:cs} {Blue-ray disk} \endtt -See more about language phrases in the \ref[langphrases] section. \seccc Summary of non-standard fields diff --git a/Master/texmf-dist/tex/luatex/optex/base/bib-simple.opm b/Master/texmf-dist/tex/luatex/optex/base/bib-simple.opm index f152d87acda..b41d3d605ee 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/bib-simple.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/bib-simple.opm @@ -34,14 +34,6 @@ \_bibmark=\_ea{\_tmp}% } -% Multilinguals: English Czech Slovak - -\_mtdef{bib.and} {, and } { a } {} -\_mtdef{bib.edition} {edition} {vydání} {vydanie} -\_mtdef{bib.masterthesis} {Master's Thesis} {Diplomová práce} {Diplomová práca} -\_mtdef{bib.phdthesis} {Ph.D. Thesis} {Disertační práce} {Dizertačná práca} - - \_def\_preurl{\_hfil\_break} % Non-standard fieldnames: @@ -93,7 +85,7 @@ \_bprinta [year] {*.\ }{\_bibwarning}% \_bprinta [chapter] {*.\ }{% \_bprinta [pages] {*.\ }{}}% - \_bprinta [isbn] {ISBN~*.\ }{\_bibwarning}% + \_bprinta [isbn] {ISBN~*.\ }{}% \_bprintb [url] {\_preurl\_url{##1}. }{}% } \_slet{_print:inproceedings}{_print:inbook} @@ -121,19 +113,10 @@ \_bprinta [isbn] {ISBN~*.\ }{}% \_bprintb [url] {\_preurl\_url{##1}. }{}% } -\_sdef{_print:phdthesis}{% - \_bprinta [!author] {*\.\ }{\_bibwarning}% - \_bprintb [title] {{\_em##1}\.\ }{\_bibwarning}% - \_mtext{bib.phdthesis}, % - \_bprinta [school] {*.\ }{}% - \_bprinta [address] {*, }{}% - \_bprinta [year] {*.\ }{}% - \_bprintb [url] {\_preurl\_url{##1}. }{}% -} -\_sdef{_print:mastersthesis}{% +\_sdef{_print:thesis}{% \_bprinta [!author] {*\.\ }{\_bibwarning}% \_bprintb [title] {{\_em##1}\.\ }{\_bibwarning}% - \_mtext{bib.masterthesis}, % + \_bprinta [type] {*,\ }{\_bibwarning}% \_bprinta [school] {*.\ }{}% \_bprinta [address] {*, }{}% \_bprinta [year] {*.\ }{}% diff --git a/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm b/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm index ff46c1deaa6..4829b8b8f9a 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/cite-bib.opm @@ -88,7 +88,7 @@ \_if *#1\_addcitelist{*}\_ea\_skiptorelax \_fi \_ifcsname _bib:#1#2\_endcsname \_else \_addcitelist{#1#2}% - \_opwarning{The cite [#1#2] unknown. Try to TeX me again}\_openref + \_opwarning{\_noexpand\cite [#1#2] unknown. Try to TeX me again}\_openref \_incr\_unresolvedrefs \_addto\_savedcites{?,}\_def\_sortcitesA{}\_lastcitenum=0 \_ea\_gdef \_csname _bib:#1#2\_endcsname {}% @@ -173,7 +173,7 @@ \_def\_nonumcitations{\_lastcitenum=0\_def\_sortcitesA{}\_def\_etalchar##1{$^{##1}$}% \_def\_citelinkA##1{\_isdefined{_bim:##1}\_iftrue \_csname _bim:##1\_endcsname - \_else ##1\_opwarning{\_noexpand\_nonumcitations + empty bibmark. Maybe bad BibTeX style}\_fi} + \_else ##1\_opwarning{\_noexpand\nonumcitations + empty bibmark. Maybe bad bib style}\_fi} } \_def\_citelinkA{} @@ -233,6 +233,18 @@ \_def\_usebib{\_par \_opinput {usebib.opm} \_usebib} \_def\usebib{\_usebib} + \_doc ------------------------------ + \_forwardlink\`\nobibwarning` `[<list of bib-labels>]` + declares a list of bib labels + which are not fully declared in `.bib` file but we want to suppress the + warning about it. List of bib labels are comma separated case sensitive + list without spaces. + \_cod ------------------------------ + +\_def\_nobibwarnlist{,} +\_def\_nobibwarning[#1]{\_global\_addto\_nobibwarnlist{#1,}} +\_public \nobibwarning ; + \_doc ----------------------------- The macros above works if all `\cite` (or similar) commands are used before the `\usebib` command is used because `\usebib` prints only such diff --git a/Master/texmf-dist/tex/luatex/optex/base/doc.opm b/Master/texmf-dist/tex/luatex/optex/base/doc.opm index c86199d76c8..d098cc6754d 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/doc.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/doc.opm @@ -96,6 +96,8 @@ \_endgroup \_ttskip \_isnextchar\_par{}{\_noindent}% } +\_def\_remfirstunderscore#1{\_ea\_remfirstunderscoreA#1\_relax#1} +\_def\_remfirstunderscoreA#1#2\_relax#3{\_if _#1\_def#3{#2}\_fi} \_doc ----------------------------- The lines in the listing mode have Yellow background. @@ -183,6 +185,12 @@ \_doc ----------------------------- Main documentation point and hyperlinks to/from it. + Main documentation point: \code{\\`\\foo`}. + User-level documentation point: \code{\\^`\\foo}, first occurence only. + Next occurences are only links to main documentation point. + Link to user-level documentation point: \code{\\~`\\foo}. + If user-level documentation point follows the main documentation point + then use \code{\\_forwardlink\\`\\foo`}. \_cod ----------------------------- \_activettchar` @@ -194,6 +202,7 @@ \_link[cs:^\_tmp]{\Red}{\_tt\_csstring\\\_tmp}\_else {\_tt\Red\_csstring\\\_tmp}\_fi}% } +\_def\_forwardlink\`#1`{{\_slet{cs:^\_csstring#1}{relax}\`#1`}} \_def\^`#1{\_leavevmode\_edef\_tmp{\_csstring#1}\_iindex{\_tmp}% \_hbox{\_ifcsname cs:^\_tmp\_endcsname \_else \_dest[cs:^\_tmp]\_sxdef{cs:^\_tmp}{}\_fi diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-antt.opm b/Master/texmf-dist/tex/luatex/optex/base/f-antt.opm index 4ec379ab395..644b5192c0f 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-antt.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-antt.opm @@ -3,7 +3,7 @@ \_famdecl [Antykwa Torunska] \Antt {Traditional Polish font family} {\cond \medium \light \caps} {\rm \bf \it \bi} {Pagella} {[AntykwaTorunska-Regular]} - {\_def\_fontnamegen {[AntykwaTorunska\_sfamxV\_sfamyV-\_currV]:\_capsV\_fontfeatures}} + {\_def\_fontnamegen {[AntykwaTorunska\_sfamxV\_sfamyV-\_currV]:script=latn;\_capsV\_fontfeatures}} \_wlog{\_detokenize{% Modifiers:^^J diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-baskerville.opm b/Master/texmf-dist/tex/luatex/optex/base/f-baskerville.opm index a228c14a540..0d1b5582857 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-baskerville.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-baskerville.opm @@ -3,7 +3,7 @@ \_famdecl [Baskerville] \Baskerville {Free vaiants of classical Baskerville} {\caps} {\rm \bf \it \bi} {} {[BaskervilleF-Regular]} - {\_def \_fontnamegen {[BaskervilleF-\_currV]:\_capsV\_fontfeatures}} + {\_def \_fontnamegen {[BaskervilleF-\_currV]:script=latn;\_capsV\_fontfeatures}} \_wlog{\_detokenize{% Modifier:^^J diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-comicneue.opm b/Master/texmf-dist/tex/luatex/optex/base/f-comicneue.opm new file mode 100644 index 00000000000..267f0214248 --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-comicneue.opm @@ -0,0 +1,23 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [ComicNeue] \Comicneue {Comic Neue sans serif} + {\angular} {\lf \li \rm \it \bf \bi} {} + {[ComicNeue-Regular]} + {\_def\_fontnamegen {[ComicNeue\_anguV-\_currV]:\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifier:^^J + \angular ...... Angular ends of curves^^J +Variants:^^J + \lf (Light) \rm \bf \li (LightItalic) \it \bi^^J +}} + +\_moddef \resetmod {\_fsetV angu={} \_fvars Regular Bold RegularItalic Bolditalic } +\_moddef \angular {\_fsetV angu=Angular } +\_famvardef \lf {\_fsetV curr=Light \_rm} +\_famvardef \li {\_fsetV curr=LightItalic \_rm} + +\_initfontfamily % new font family must be initialized + +\_endcode + diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-dejavu.opm b/Master/texmf-dist/tex/luatex/optex/base/f-dejavu.opm new file mode 100644 index 00000000000..14b65fbb51d --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-dejavu.opm @@ -0,0 +1,31 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [DejaVu] \Dejavu {Derived from the Vera fonts} + {\sans \mono \cond \light \caps} {\rm \bf \it \bi} {TG-DejavuMath} + {[DejaVuSerif]} + {\_def\_fontnamegen {[DejaVu\_subfamV\_typfamV\_currV]:\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers:^^J + \sans ...... sans serif^^J + \serif ..... serif (default)^^J + \mono ...... non-proportional, only \sans^^J + \light ..... extra-light, only \sans, only \rm, others (\bf\it\bi) unchanged^^J + \cond ...... condensed (\sans or \serif, not \mono) +}} + +\_def\_BIfvars{\_fvars {} -Bold -Italic -BoldItalic } +\_def\_BOfvars{\_fvars {} -Bold -Oblique -BoldOblique } +\_moddef \resetmod {\_fsetV subfam=Serif,typfam={} \_BIfvars } +\_moddef \sans {\_fsetV subfam=Sans \_BOfvars } +\_moddef \serif {\_fsetV subfam=Serif,typfam={} \_BOfvars } +\_moddef \mono {\_fsetV subfam=Sans,typfam=Mono \_BOfvars } +\_moddef \light {\_fsetV subfam=Sans,typfam={} \_fvars -ExtraLight -Bold -Oblique -BoldOblique } +\_moddef \cond {\_fsetV typfam=Condensed } + +\_initfontfamily % new font family must be initialized + +\_loadmath {[texgyredejavu-math]} + +\_endcode + diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-ebgaramond.opm b/Master/texmf-dist/tex/luatex/optex/base/f-ebgaramond.opm index e2e30567209..ef73e2a51dd 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-ebgaramond.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-ebgaramond.opm @@ -1,29 +1,35 @@ %% This is part of OpTeX project, see http://petr.olsak.net/optex \_famdecl [EB Garamond] \EBGaramond {Based on Garamond} - {\medium \semibold \caps} {\rm \bf \it \bi \initials} {} + {\medium \semibold \caps \swash} {\rm \bf \it \bi \initials} {Garamond-Math} {[EBGaramond-Regular]} - {\_def\_fontnamegen {[EBGaramond-\_currV]:\_capsV\_fontfeatures}} + {\_def\_fontnamegen {[EBGaramond-\_currV]:\_capsV\_swaV\_fontfeatures}} \_wlog{\_detokenize{% Modifiers:^^J \caps ...... caps & small caps^^J + \swash ..... alternative capitals for \it, \bi, only non-accented letters^^J \medium .... medium weight^^J - \semibold .. semibold weight^^J + \semibold .. semibold weight (only \bf, \bi are changed)^^J Variant:^^J \initials .. Initials, only letters ADFGLNOQT^^J }} -\_moddef \resetmod {\_fsetV caps={} \_fvars Regular Bold Italic BoldItalic } +\_moddef \resetmod {\_fsetV caps={},swa={} \_fvars Regular Bold Italic BoldItalic } \_moddef \medium {\_fvars Medium ExtraBold MediumItalic ExtraBoldItalic } -\_moddef \semibold {\_fvars SemiBold ExtraBold SemiBoldItalic ExtraBoldItalic } +\_moddef \semibold {\_fvars Regular SemiBold Italic SemiBoldItalic } \_moddef \caps {\_fsetV caps=+smcp;+onum; } +\_moddef \nocaps {\_fsetV caps={} } +\_moddef \swash {\_fsetV swa=+swsh; } +\_moddef \noswash {\_fsetV swa={} } \_famvardef \initials {\_fvars Initials . . . \rm} \_initfontfamily % new font family must be initialized +\_loadmath {[Garamond-Math]} + \_endcode See the file `f-heros.opm` for information about principles of such diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-garamondl.opm b/Master/texmf-dist/tex/luatex/optex/base/f-garamondl.opm new file mode 100644 index 00000000000..00150bf153b --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-garamondl.opm @@ -0,0 +1,26 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [Garamond Libre] \Garamondl {Free, derived from old style font family} + {\caps \swash} {\rm \bf \it \bi} {Garamond-Math} + {[GaramondLibre-Regular]} + {\_def\_fontnamegen + {[GaramondLibre-\_currV]:script=latn;\_capsV\_swaV\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers:^^J + \caps ...... caps & small caps, only non-accented letters^^J + \swash ..... alternative capitals for \it, \bi, only non-accented letters^^J +}} + +\_moddef \resetmod {\_fsetV caps={},swa={} \_fvars Regular Bold Italic Bolditalic } +\_moddef \caps {\_fsetV caps=+smcp;+onum;-liga; } +\_moddef \nocaps {\_fsetV caps={} } +\_moddef \swash {\_fsetV swa=+swsh; } +\_moddef \noswash {\_fsetV swa={} } + +\_initfontfamily % new font family must be initialized + +\_loadmath {[Garamond-Math]} + +\_endcode + diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-gfsbodoni.opm b/Master/texmf-dist/tex/luatex/optex/base/f-gfsbodoni.opm index 369f2474b2b..5b8e6d41f16 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-gfsbodoni.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-gfsbodoni.opm @@ -3,14 +3,15 @@ \_famdecl [GFS Bodoni] \GFSBodoni {Based on Bodoni with greek letters} {} {\rm \bf \it \bi} {} {[GFSBodoni]} - {\_def\_fontnamegen {[GFSBodoni\_currV]:\_fontfeatures}} + {\_def\_fontnamegen{[GFSBodoni\_currV]:script=latn;\_capsV\_fontfeatures}} \_wlog{\_detokenize{% Modifier:^^J - \caps ...... doesn't work even though otfinfo -f lists smcp^^J + \caps ...... Caps & Small caps (only \rm)^^J }} -\_moddef \resetmod {\_fvars {} Bold It BoldIt } +\_moddef \resetmod {\_fsetV caps={} \_fvars {} Bold It BoldIt } +\_moddef \caps {\_fsetV caps=+smcp;+onum; } \_initfontfamily % new font family must be initialized diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-heros.opm b/Master/texmf-dist/tex/luatex/optex/base/f-heros.opm index d369ec89369..3a4518e1c31 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-heros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-heros.opm @@ -44,25 +44,25 @@ If you want to write such font file, you need to keep following rules. existence of `<font-for-testing>` in your system. If it doesn't exist, the file loading is skipped with a warning on the terminal. The \^`\_ifexistfam` macro returns false in such case. - The `\_fontnamegen` macro must be defined in the last parameter of the - `\_famdecl`. More about it is documented below. -* You can use `\_wlog{\_detokenize{...` to write aditional information into + The \^`\_fontnamegen` macro must be defined in the last parameter of the + \^`\_famdecl`. More about it is documented below. +* You can use `\_wlog{\_detokenize{...` to write additional information into log file. -* You can declare optical sizes using `\_regoptsizes` if there are more font files - with different optical sizes (like in Latin Modern). See `f-lmfonts.ofm` +* You can declare optical sizes using \~`\_regoptsizes` if there are more font files + with different optical sizes (like in Latin Modern). See `f-lmfonts.opm` file for more information about this special feature. -* Declare font modifiers using `\_moddef` if they are present. The \`\resetmod` +* Declare font modifiers using \~`\moddef` if they are present. The \`\resetmod` must be declared in each font family. * Check if all your declared modifiers does not produce any space in horizontal mode. For example check: `X\caps Y`, the letters `XY` must be printed without any space. * Optionally, declare new variants by the \^`\famvardef` macro. -* Run `\_initfontfamily` in order to start the family. +* Run `\_initfontfamily` in order to start the family (it is mandatory). * If math font should be loaded, use `\_loadmath{<math font>}`. \enditems {\noindent \bf The \`\_fontnamegen` macro} -(declared in the last parameter of the `\_famdecl`) +(declared in the last parameter of the \^`\_famdecl`) must expand (at expand processor level only) to a file name of loaded font (or to its font name) and to optional font features appended. The Font Selection System uses this macro at primitive level in the following sense: @@ -76,22 +76,22 @@ Note that the extended `\font` syntax `\font\<selector> {[<font file name>]:<font features>} <size spec.>` is expected here. -\bigskip -{\noindent\bf Example.} +\seccc Example 1 + Assume an abstract font family with fonts `xx-Regular.otf`, `xx-Bold.otf`, `xx-Italic.otf` and `xx-BoldItalic.otf`. Then you can declare -the `\resetmod` (for initializing the family) by: +the \^`\resetmod` (for initializing the family) by: \begtt \_moddef\resetmod{\_fvars Regular Bold Italic BoldItalic } \endtt -and define the `\_fontnamegen` in the last parameter of the `\_famdecl` by: +and define the \^`\_fontnamegen` in the last parameter of the \^`\_famdecl` by: \begtt \_famdecl ... {\def\_fontnamegen{[xx-\_currV]}} \endtt The following auxiliary macros are used here: \begitems -* \^`\moddef` declares the family dependent modifier. The `\resetmod` saves +* \^`\moddef` declares the family dependent modifier. The \^`\resetmod` saves initial values for the family. * \^`\_fvars` saves four names to the memory, they are used by the \^`\_currV` macro. * \^`\_currV` expands to one of the four names dependent on `\rm` or `\bf` or @@ -102,28 +102,31 @@ Assume that the user needs `\it` variant in this family. Then the `[xx-Italic]`. The Font Selection System uses `\font {[xx-Italic]}`. This command loads the `xx-Italic.otf` font file. -See more advanced examples in `f-<family>.opm` files. The `f-heros.opm` is listed -here. When Heros family is selected and `\bf` is asked then -\begtt -\font {[texgyreheros-bold]:+tlig;} at10pt -\endtt -% +See more advanced examples are in `f-<family>.opm` files. + +\seccc Example 2 + +The `f-heros.opm` is listed here. Look at it. +When Heros family is selected and `\bf` is asked then +`\font {[texgyreheros-bold]:+tlig;} at10pt` is processed. You can use any expandable macros or expandable primitives in the `\_fontnamegen` macro. The simple macros in our example with names `\_<word>V` are preferred. They -expand typically to their content. The macro `\_fsetV <word>=<content>` +expand typically to their content. The macro \^`\_fsetV` `<word>=<content>` (terminated by a space) is equivalent to `\def\_<word>V{<content>}` and you -can use it in font modifiers. You can use the `\_fsetV` macro in more +can use it in font modifiers. You can use the \^`\_fsetV` macro in more general form: \begtt \catcode`\<=13 \_fsetV <word-a>=<value-a>,<word-b>=<value-b> ...etc. terminated by a space \endtt % -with obvious result `\def \_<word-a>V {<value-a>}\def \_<word-b>V {<value-b>}` etc. +with obvious result `\def\_<word-a>V {<value-a>}\def\_<word-b>V {<value-b>}` etc. + +\seccc Example 3 -Example: if both font modifiers `\caps` and `\cond` were applied from the Heros +If both font modifiers `\caps`, `\cond` were applied in Heros family, then `\def\_capsV{+smcp;+onum}` and `\def\_condV{cn}` were processed by these font modifiers. If user needs the `\bf` variant at 11\,pt now then the @@ -133,19 +136,28 @@ the \endtt % is processed. We assume that a font file `texgyreheroscn-bold.otf` is present -in your TeX system. +in your \TeX/ system. + +\seccc The \code{\\_onlyif} macro -Recommendation: the \^`\_fontfeatures` macro at the end of the `\_fontnamegen` +has the syntax \^`\_onlyif` `<word>=<value-a>,<value-b>,...<value-n>: {<what>}`. It can +be used inside `\moddef` as simple IF statement: the `<what>` is processed only +if `<word>` has `<value-a>` or `<value-b>` \dots or `<value-n>`. See +`f-roboto.opm` for examples of usage of many `\_onlyif`'s. + +Recommendation: use the \^`\_fontfeatures` macro at the end of the `\_fontnamegen` macro in order to the \^`\setff`, \^`\setfontcolor`, \^`\setletterspace` macros can work. -\bigskip -{\noindent\bf The \^`\moddef` macro} -does more things than simple `\_def`: +\seccc The \code{\\moddef} macro + +has the syntax \^`\moddef\<modifier>{<what to do>}`. It does more things than simple `\_def`: \begitems * The modifier macros are defined as `\_protected`. * The modifier macros are defined as family-dependent. +* If the declared control sequence is defined already (and it is not font + modifier) then it is re-defined with warning. \enditems \noindent The \^`\famvardef` macro has the same features. @@ -156,42 +168,58 @@ is defined by the \^`\_famdecl` macro as: \begtt \catcode`<=13 \protected\def\<Familyselector> {% \_def\_currfamily {<Familyselector>}% - \_def\_fontnamegen {<font name or font file name generated>}% + \_def\_fontnamegen {...}% this is copied from 7-th parameter of \_famdecl \resetmod + <run all family-dependent font modifiers used before Familyselector without warnings> \endtt -{\noindent\bf The font context} consists from - \begitems - * Family context, i.\,e.\ \^`\_currfamily` and \^`\_fontnamegen` values - saved by the `\<Familyselector>`, - * \^`\_sizespec` value saved by the \^`\setfontsize` macro, - * whatever what influences the expansion of the `\_fontnamegen` macro, - they are typically macros `\_<key>V` saved by the font modifiers. - \enditems +{\noindent\bf The \^`\_initfontfamily`}\nl +must be run after modifers decaration. +It runs the `\<Familyselector>` and it runs `\_rm`, +so first font from new family is loaded and it is ready to use it. -{\noindent\bf The \^`\_initfontfamily` must be run} after modifers decaration. -It sets `\_let\_resetmod=\resetmod` and runs the `\<Familyselector>`. -Finally, it runs `\_rm`, so first font from new family is loaded and it -is ready to use it. +\seccc Name conventions -\bigskip -{\noindent\bf Name conventions.} Create font modifiers, new variants and the `\<Familyselector>` only as public, i.e. -without `_` prefix. We assume that if user re-defines them then he/she needs -not them, so we have no problems. +in user name space without `_` prefix. We assume that if user re-defines them then he/she needs +not them, so we have no problems. If user's definition done before loading +font family file is re-defined then \OpTeX/ warns about it. See the end of +section~\ref[fontcommands]. The name of `\<Familyselector>` should begin with uppercase letter. +Please, look at +\ulink[http://petr.olsak.net/ftp/olsak/optex/op-catalog.pdf]{\OpTeX/ font catalogue} +before you will create your own font family file and use the same names for +analogical font modifiers (like `\cond`, `\caps`, `\sans`, `\mono` etc.)\ +and for extra variant selectors (like `\lf`, `\li`, `\kf`, `\ki` etc.\ used in +Roboto font family). + +If you are using the same font modifier names to analogical font shapes then +such modifiers are kept when family is changend. For example: + +\begtt +\fontfam [Termes] \fontfam[Heros] +\caps\cond\it Caps+Cond italic in Heros \Termes\currvar Caps italic in Termes. +\endtt +% +The family selector first resets all modifiers data by +\^`\resetmod` and then it tries to run all currently used family-dependent modifiers +before the family switching (without warnings if such modifier is +unavailable in the new family). +In this example, `\Termes` does `\resetmod` followed by `\caps\cond`. +The `\caps` is applied and `\cond` is silently ignored in Termes family. + If you need to declare your private modifier (because it is used in another modifiers or macros, for example), use the name `\_wordM`. You can be sure that such name does not influence the private name space used by \OpTeX/. -\bigskip -{\noindent\bf Additional notes.} +\seccc Additional notes + See the font family file `f-libertine-s.opm` which is another example where no font files but font names are used. -See the font family file `f-lmfonts.opm` where you can find the +See the font family file `f-lmfonts.opm` or `f-poltawski.opm` where you can find the the example of the optical sizes declaration including a documentation about it. diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-kerkis.opm b/Master/texmf-dist/tex/luatex/optex/base/f-kerkis.opm index 133f776c599..40b5e90f1c0 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-kerkis.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-kerkis.opm @@ -3,11 +3,11 @@ \_famdecl [Kerkis] \Kerkis {Free Bookman alternative with Greek letters} {\semibold \sans \sanssemi \caps} {\rm \bf \it \bi \calli} {} {[Kerkis]} - {\_def\_fontnamegen {[Kerkis\_currV]:\_fontfeatures}} + {\_def\_fontnamegen {[Kerkis\_currV]:script=latn;\_fontfeatures}} \_wlog{\_detokenize{% Modifiers:^^J - \semibold .. semibold weight (only \rm, \it)^^J + \semibold .. semibold weight (changed only \bf, \bi)^^J \caps ...... caps & small caps (only \rm \bf, bad accents in \bf)^^J \sans ...... sans serif^^J \sanssemi .. semibold sans serif (only \rm, accented letters not available)^^J @@ -16,7 +16,7 @@ Variant:^^J }} \_moddef \resetmod {\_fvars {} -Bold -Italic -BoldItalic } -\_moddef \semibold {\_fvars -SemiBold . -SemiBold-Italic . } +\_moddef \semibold {\_fvars {} -SemiBold -Italic -SemiBold-Italic } \_moddef \caps {\_fvars -SmallCaps.otf -BoldSmallCaps . . } \_moddef \sans {\_fvars Sans Sans-Bold Sans-Italic Sans-BoldItalic } \_moddef \sanssemi {\_fvars Sans-SmallCaps . . . } diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-kpfonts.opm b/Master/texmf-dist/tex/luatex/optex/base/f-kpfonts.opm new file mode 100644 index 00000000000..e8915ba9e4d --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-kpfonts.opm @@ -0,0 +1,45 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [KP Fonts] \Kpfonts {KP fonts -- Johannes Kepler project} + {\sans \mono \light \caps \swash} {\rm \bf \it \bi} {KpMath} + {[KpRoman-Regular]} + {\_def\_fontnamegen {[Kp\_subfamV-\_currV]:\_capsV\_swaV\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers:^^J + \sans ...... sans serif^^J + \mono ...... non-proportional^^J + \light ..... light (\rm, \it) + semibold (\bf, \bi) variants^^J + \caps ...... caps & small caps^^J + \swash ..... alternative Q letter^^J +}} + +\_def\_RBIfvars{\_fvars Regular Bold Italic BoldItalic } +\_moddef \resetmod {\_fsetV subfam=Roman,caps={},swa={} \_RBIfvars } +\_moddef \sans {\_fsetV subfam=Sans \_RBIfvars } +\_moddef \mono {\_fsetV subfam=Mono \_RBIfvars } +\_moddef \light {\_fsetV subfam=Roman \_fvars Light Semibold LightItalic SemiboldItalic } +\_moddef \caps {\_fsetV caps=+smcp;+onum; } +\_moddef \nocaps {\_fsetV caps={} } +\_moddef \swash {\_fsetV swa=+swsh; } +\_moddef \noswash {\_fsetV swa={} } + +\_initfontfamily % new font family must be initialized + +\_loadmath {[KpMath-Regular]} +\_loadboldmath {[KpMath-Bold]} \to {[KpMath-Regular]} + +\_endcode + +The KP fonts family includes more variants of Math fonts. +Only Regular / Bold pair is loaded as default. + +There are alternatives: + +\doloadmath \loadmath {KpMath-Light} +\loadboldmath {[KpMath-Semibold]} \to {[KpMath-Light]} + +or + +\doloadmath \loadmath {KpMath-Sans} + diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-libertine.opm b/Master/texmf-dist/tex/luatex/optex/base/f-libertine.opm index 2aa52dad329..06ce3d9b556 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-libertine.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-libertine.opm @@ -1,7 +1,7 @@ %% This is part of OpTeX project, see http://petr.olsak.net/optex \_famdecl [Linux Libertine] \Libertine {Free Linux Libertine fonts} - {\sans \mono \caps \semi} {\rm \bf \it \bi \initials \displ \keybr} {Libertinus} + {\sans \mono \caps \semibold} {\rm \bf \it \bi \initials \displ \keybr} {Libertinus} {[LinLibertine_R]} {\_def\_fontnamegen {[Lin\_subfamV _\_currV]:\_capsV\_fontfeatures}} @@ -9,8 +9,8 @@ Modifiers:^^J \sans ...... smaller serifs^^J \mono ...... non-proportional^^J - \semi ...... semi-bold variants (\rm, \it)^^J - \caps ...... caps & small caps^^J + \semibold .. semi-bold variants (changed only \bf, \bi)^^J + \caps ...... caps & small caps^^J% Special variants:^^J \initials .. special initials (only uppercase letters)^^J \displ ..... display variant, suitable at big sizes^^J @@ -20,7 +20,7 @@ Special variants:^^J \_moddef \resetmod {\_fsetV subfam=Libertine,caps={} \_fvars R RB RI RBI } \_moddef \sans {\_fsetV subfam=Biolinum \_fvars R RB RI RBO } \_moddef \mono {\_fsetV subfam=Libertine \_fvars M MB MO MBO } -\_moddef \semi {\_fsetV subfam=Libertine \_fvars RZ . RZI . } +\_moddef \semibold {\_fsetV subfam=Libertine \_fvars R RZ RI RZI } \_moddef \caps {\_fsetV caps=+smcp;+onum; } \_moddef \nocaps {\_fsetV caps={} } diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-libertinus.opm b/Master/texmf-dist/tex/luatex/optex/base/f-libertinus.opm new file mode 100644 index 00000000000..fef53a6bebd --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-libertinus.opm @@ -0,0 +1,36 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [Libertinus] \Libertinus {Free fonts derived from Linux Libertine} + {\semibold \sans \caps} {\rm \bf \it \bi \mono \initials \displ \keybr} {Libertinus} + {[LibertinusSerif-Regular]} + {\_def\_fontnamegen {[Libertinus\_subfamV-\_currV]:\_capsV\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers:^^J + \semibold .. semi-bold variants, changed only \bf, \bi^^J + \sans ...... smaller serifs, only \rm, \bf \it^^J + \caps ...... caps & small caps^^J% +Special variants:^^J + \mono ..... non-proportional + \initials .. special initials (only uppercase letters)^^J + \displ ..... display variant, suitable at big sizes^^J + \keybr ..... keyboard, emulates keyboard buttons^^J +}} + +\_moddef \resetmod {\_fsetV subfam=Serif,caps={} \_fvars Regular Bold Italic BoldItalic } +\_moddef \semibold {\_fsetV subfam=Serif \_fvars Regular Semibold Italic SemiboldItalic } +\_moddef \sans {\_fsetV subfam=Sans \_fvars Regular Bold Italic . } +\_moddef \caps {\_fsetV caps=+smcp;+onum; } +\_moddef \nocaps {\_fsetV caps={} } + +\_famvardef \mono {\_fsetV subfam=Mono \_fvars Regular . . . \_rm} +\_famvardef \initials {\_fsetV subfam=SerifInitials \_fvars Regular . . . \_rm} +\_famvardef \displ {\_fsetV subfam=SerifDisplay \_fvars Regular . . . \_rm} +\_famvardef \keybr {\_fsetV subfam=Keyboard \_fvars Regular . . . \_rm} + +\_initfontfamily % new font family must be initialized + +\_loadmath {[LibertinusMath-Regular]} + +\_endcode + diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-lido.opm b/Master/texmf-dist/tex/luatex/optex/base/f-lido.opm index 947ed8ecc77..80922ed17b5 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-lido.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-lido.opm @@ -1,24 +1,24 @@ %% This is part of OpTeX project, see http://petr.olsak.net/optex \_famdecl [Lido] \Lido {by StormType Foundry designed for "lidove noviny"} - {\caps \cond} {\rm \bf \mr \mi \it \bi} {Termes} + {\caps \cond} {\rm \bf \mf \mi \it \bi} {Termes} {[LidoSTF]} - {\_def\_fontnamegen {[LidoSTF\_condV\_currV]:mode=node;script=latn;\_capsV\_fontfeatures}} + {\_def\_fontnamegen {[LidoSTF\_condV\_currV]:script=latn;\_capsV\_fontfeatures}} \_wlog{\_detokenize{% Variants:^^J \rm \bf \it \bi ... classical variants^^J - \mr \mi .... medium regular and medium italics (between normal and bold)^^J + \mf \mi .... medium regular and medium italics (between normal and bold)^^J Modifiers:^^J \cond ...... condensed (italic is not avalable for \cond variants)^^J - \medium .... sets \mr \bf \mi \bi family + \medium .... sets \mf \bf \mi \bi family }} \_moddef \resetmod {\_fsetV caps={},cond={},ital=Italic \_fvars {} Bold {\_italV} {Bold\_italV} } \_moddef \medium {\_fvars Medium Bold {Medium\_italV} {Bold\_italV} } \_moddef \cond {\_fsetV cond=Condensed,ital={} } -\_famvardef \mr {\_fvars Medium . . . \_rm} +\_famvardef \mf {\_fvars Medium . . . \_rm} \_famvardef \mi {\_fvars . . {Medium\_italV} . \_it} @@ -34,13 +34,13 @@ newspaper. It is similar to Times but it is not Times. The Lido font family supports 6 standard selectors \rm Regular \it Italics -\mr Medium-Regular \mi Medium-Italics +\mf Medium-Regular \mi Medium-Italics \bf Bold-Regular \bi Bold-Italics and three Condensed variants: \cond \rm Condensed - \mr Condensed-Medium + \mf Condensed-Medium \bf Condensed-Bold The italic variants are missing when \cond is selected. This means that diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-lmfonts.opm b/Master/texmf-dist/tex/luatex/optex/base/f-lmfonts.opm index 06e96c4df4a..4c9ce04760a 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-lmfonts.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-lmfonts.opm @@ -179,3 +179,8 @@ artists are very creative people), so you need to declare more systematic \fontalias crea-b-bolditalic {Creative Bold subfam Oblique} \endtt +Another example of font family with optical sizes is Antykwa Półtawskiego. +The optical sizes feature is deactivated by default and it is switched on by +`\osize` font modifier: + +\printdoc f-poltawski.opm diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-merriweather.opm b/Master/texmf-dist/tex/luatex/optex/base/f-merriweather.opm new file mode 100644 index 00000000000..c640138280a --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-merriweather.opm @@ -0,0 +1,33 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [Merriweather] \Merriweather {Modern shapes, sharp serifs} + {\caps \sans \serif} {\lf \li \rm \bf \it \bi \kr \ki} {} + {[Merriweather-Regular]} + {\_def\_fontnamegen {[Merriweather\_sansV-\_currV]:\_capsV\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers:^^J + \sans ...... sans serif^^J + \serif ..... variants with serifs (default)^^J + \caps ...... caps & small caps^^J + \nocaps .... no \caps^^J% +Extended variants:^^J + \lf \li .... Light, LightItalic^^J + \kf \ki .... Black, BlackItalic^^J +}} + +\_moddef \resetmod {\_fsetV caps={},sans={} \_fvars Regular Bold Italic BoldItalic } +\_moddef \caps {\_fsetV caps=+smcp;+onum; } +\_moddef \nocaps {\_fsetV caps={} } +\_moddef \sans {\_fsetV sans=Sans } +\_moddef \serif {\_fsetV sans={} } + +\_famvardef \lf {\_fsetV curr=Light \_rm} +\_famvardef \li {\_fsetV curr=LightItalic \_rm} +\_famvardef \kf {\_fsetV curr=ExtraBold \_onlyif sans={}: {\_fsetV curr=Black }\_rm} +\_famvardef \ki {\_fsetV curr=ExtraBoldItalic \_onlyif sans={}: {\_fsetV curr=BlackItalic }\_rm} + +\_initfontfamily % new font family must be initialized + +\_endcode + diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-poltawski.opm b/Master/texmf-dist/tex/luatex/optex/base/f-poltawski.opm new file mode 100644 index 00000000000..40af438f647 --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-poltawski.opm @@ -0,0 +1,34 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [Poltawski] \Poltawski {Antykwa Poltawskiego, Polish traditional font family} + {\light \noexpd \expd \eexpd \cond \ccond \osize \caps} {\rm \bf \it \bi} {} + {[antpolt-regular]} + {\_def\_fontnamegen {[antpolt\_liV\_condV-\_currV]\_capsV\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers:^^J + \light ..... light weight, \bf,\bi=semibold^^J + \noexpd .... no expanded, no condensed, designed for 10pt size (default)^^J + \eexpd ..... expanded, designed for 6pt size^^J + \expd ...... semi expanded, designed for 8pt size^^J + \cond ...... semi condensed, designed for 12pt size^^J + \ccond ..... condensed, designed for 17pt size^^J + \osize ..... auto-sitches between \ccond \cond \noexpd \expd \eexpd by size^^J + \caps ...... caps & small caps^^J +}} + +\_moddef \resetmod {\_fsetV li={},cond={},caps={} \_fvars regular bold italic bolditalic } +\_moddef \light {\_fsetV li=lt } +\_moddef \noexpd {\_fsetV cond={} } +\_moddef \eexpd {\_fsetV cond=expd } +\_moddef \expd {\_fsetV cond=semiexpd } +\_moddef \cond {\_fsetV cond=semicond } +\_moddef \ccond {\_fsetV cond=cond } +\_moddef \caps {\_fsetV caps=+smcp;+onum; } +\_moddef \nocaps {\_fsetV caps={} } +\_moddef \osize {\_def\_fontnamegen{[antpolt\_liV\_optname{x}-\_currV]:\_capsV\_fontfeatures}% + \_regoptsizes x ? expd <7 semiexpd <9 {} <11.1 semicond <15 cond <*} + +\_initfontfamily % new font family must be initialized + +\_endcode diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-roboto.opm b/Master/texmf-dist/tex/luatex/optex/base/f-roboto.opm new file mode 100644 index 00000000000..1baaec04422 --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-roboto.opm @@ -0,0 +1,59 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [Roboto] \Roboto {Geometric grotesk, thin variants included} + {\cond \mono \ttset \thin \light \normal \bolder \caps} + {\tf \ti \lf \li \rm \it \mf \mi \bf \bi \kf \ki} {} + {[Roboto-Regular]} + {\_def\_fontnamegen {[Roboto\_subV-\_currV]:\_capsV\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers (subfamilies):^^J + \cond ...... Condensed variants (no Thin, Medium, Black)^^J + \mono ...... Monospaced variants [Mono] (no Black)^^J + \ttset ..... Typewriter-like variants [Slab] (no Italic, no Medium, Black)^^J% +Modifiers (face weight):^^J + \thin ...... \rm, \it = Thin, \bf, \bi = Normal^^J + \light ..... \rm, \it = Light, \bf, \bi = Medium^^J + \normal .... \rm, \it = Normal, \bf, \bi = Bold^^J + \bolder .... \rm, \it = Medium, \bf, \bi = Black^^J% +Modifiers (Caps):^^J + \caps ...... Caps & small Caps^^J + \nocaps .... no \caps^^J% +Extended variants:^^J + \tf \ti .... Thin, ThinItalic^^J + \lf \li .... Light, LightItalic^^J + \mf \mi .... Medium, MediumItalic^^J + \kf \ki .... Black, BlackItalic^^J +}} + +\_moddef \resetmod {\_fsetV caps={},sub={},w=n \_fvars Regular Bold Italic BoldItalic } +\_moddef \mono {\_fsetV sub=Mono \_onlyif w=b: {\normal}} +\_moddef \cond {\_fsetV sub=Condensed \_onlyif w=b: {\normal}\_onlyif w=t: {\light}} +\_moddef \ttset {\_fsetV sub=Slab \_fvars Regular Bold . . } + +\_moddef \thin {\_onlyif sub={},Mono: {\_fsetV w=t \_fvars Thin Regular ThinItalic Italic }% + \_onlyif sub=Slab: {\_fsetV w=t \_fvars Thin Regular . . }} +\_moddef \light {\_onlyif sub={},Mono: {\_fsetV w=l \_fvars Light Medium LightItalic MediumItalic }% + \_onlyif sub=Condensed: {\_fsetV w=l \_fvars Light Regular LightItalic Italic }% + \_onlyif sub=Slab: {\_fsetV w=l \_fvars Light Bold . . }} +\_moddef \normal {\_fsetV w=n \_fvars Regular Bold Italic BoldItalic + \_onlyif sub=Slab: {\_fvars Regular Bold . . }} +\_moddef \bolder {\_onlyif sub={}: {\_fsetV w=b \_fvars Medium Black MediumItalic BlackItalic }} + +\_moddef \caps {\_fsetV caps=+smcp;+onum; } +\_moddef \nocaps {\_fsetV caps={} } + +\_famvardef \tf {\_thinM \_rm} +\_famvardef \ti {\_thinM \_it} +\_famvardef \lf {\_lightM \_rm} +\_famvardef \li {\_lightM \_it} +\_famvardef \mf {\_bolderM \_rm} +\_famvardef \mi {\_bolderM \_it} +\_famvardef \kf {\_bolderM \_bf} +\_famvardef \ki {\_bolderM \_bi} +\_let\_thinM=\thin \_let\_lightM=\light \_let\_bolderM=\bolder + +\_initfontfamily % new font family must be initialized + +\_endcode + diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-sourcepro.opm b/Master/texmf-dist/tex/luatex/optex/base/f-sourcepro.opm new file mode 100644 index 00000000000..47e81da6b0b --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-sourcepro.opm @@ -0,0 +1,39 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [Source Pro] \Sourcepro {SourceSerifPro,SourceSansPro,SourceCodePro} + {\serif \sans \mono \light \elight \bolder \medium \caps} {\rm \bf \it \bi} {Termes} + {[SourceSerifPro-Regular]} + {\_def\_fontnamegen {[Source\_typfV Pro-\_currV]:\_capsV\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers:^^J + \serif ..... Serif family (default)^^J + \sans ...... Sans family^^J + \mono ...... Code family^^J + \light ..... \rm=Light, \bf=Semibold^^J + \elight .... \rm=Extra light, \bf=Regular^^J + \bolder .... \rm=Semibold, \bf=Black^^J + \medium .... \rm=Medium, \bf=Bold (only for \mono family)^^J + \caps ...... caps & small caps, only for \sans (\serif: only \rm,\bf)^^J +}} + +\_moddef \resetmod {\_fsetV typf=Serif,caps={} \_fvars Regular Bold RegularIt BoldIt } +\_moddef \serif {\_fsetV typf=Serif } +\_moddef \sans {\_fsetV typf=Sans } +\_moddef \mono {\_fsetV typf=Code } +\_moddef \light {\_fvars Light Semibold LightIt SemiboldIt } +\_moddef \elight {\_fvars ExtraLight Regular ExtraLightIt RegularIt } +\_moddef \bolder {\_fvars Semibold Black SemiboldIt BlackIt } +\_moddef \medium {\_fsetV typf=Code \_fvars Medium Bold MediumIt BoldIt } +\_moddef \caps {\_fsetV caps=+smcp;+onum; } +\_moddef \nocaps {\_fsetV caps={} } + +\_initfontfamily % new font family must be initialized + +\_loadmath {[texgyretermes-math]} + +\_endcode + +See the file `f-heros.opm` for information about principles of such +font-macro-files. + diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-technika.opm b/Master/texmf-dist/tex/luatex/optex/base/f-technika.opm index 0d1af54100c..4366a1366b7 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-technika.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-technika.opm @@ -9,7 +9,7 @@ Modifiers:^^J \light ..... ligher variants: \rm\bf=light \bf\bi=normal^^J \book ...... semi-ligher variants: \rm\bf=book \bf\bi=bold^^J - \caps ...... caps & small caps^^J + \caps ...... caps & small caps^^J% Special variant:^^J \stencil ... dashed leters (only uppercase)^^J }} diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-xcharter.opm b/Master/texmf-dist/tex/luatex/optex/base/f-xcharter.opm index 7f6ff7a3561..de61e7c67f2 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-xcharter.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-xcharter.opm @@ -3,7 +3,7 @@ \_famdecl [XCharter] \XCharter {An extension of Bitstream Charter} {\caps \slant} {\rm \bf \it \bi} {} {[XCharter-Roman]} - {\_def\_fontnamegen {[XCharter-\_currV]:\_capsV\_fontfeatures}} + {\_def\_fontnamegen {[XCharter-\_currV]:script=latn;\_capsV\_fontfeatures}} \_wlog{\_detokenize{% Modifiers:^^J diff --git a/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm b/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm index 3fde594c350..0b7ea42d5cf 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm @@ -9,6 +9,7 @@ \_famtext {Computer Modern like family:} +\_famfrom {GUST} \_faminfo [Latin Modern] {TeX Gyre fonts based on Coputer Modern} {f-lmfonts} { -,\nbold,\sans,\sans\nbold,\slant,\ttset,\ttset\slant,\ttset\caps,% \ttprop,\ttprop\bolder,\quotset: {\rm\bf\it\bi} @@ -48,38 +49,101 @@ \_famtext {Other fonts:} +\_famfrom {Philipp H. Poll} \_faminfo [Linux Libertine] {Free fonts typically installed on systems} {f-libertine} - { -: {\rm\bf\it\bi} \semi: {\rm\it} + { -: {\rm\bf\it\bi} \semibold: {\bf\bi} \caps,\sans,\mono,\caps\sans: {\rm\bf\it\bi} -: {\initials\displ\keybr} } \_famalias [Libertine] \_famalias [LinLibertine] +\_famfrom {Philipp H. Poll, Khaled Hosny} +\_faminfo [Libertinus] {Free fonts derived from Linux Libertine} {f-libertinus} + { -: {\rm\bf\it\bi} \semibold: {\bf\bi} \sans: {\rm\bf\it} + \caps: {\rm\bf\it\bi} \caps\semibold: {\bf\bi} \caps\sans: {\rm\bf\it} + -: {\mono\initials\displ\keybr} } + +\_famfrom {Daniel Flipo} +\_faminfo [KP fonts] {KP fonts -- Johannes Kepler project} {f-kpfonts} + { -,\light,\sans,\mono, \caps, \caps\light, \caps\sans,\caps\mono,\swash: {\rm\bf\it\bi} } +\_famalias [KP] + +\_famfrom {DejaVu fonts team} +\_faminfo [DejaVu] {Derived from the Vera fonts} {f-dejavu} + { -,\cond,\sans,\sans\cond,\mono: {\rm\bf\it\bi} \light: {\rm} } + +\_famfrom {Zygfryd Gardzielewski, Janusz M. Nowacki} \_faminfo [Antykwa Torunska] {Traditional Polish font family} {f-antt} { -,\cond,\caps, \caps\cond: {\rm\bf\it\bi} \medium,\cond\medium, \light, \cond\light:{\rm\it} } \_famalias [Antt] +\_famfrom {Adam Półtawski, Janusz M. Nowacki, Bogusław Jackowski and Piotr Strzelczyk} +\_faminfo [Poltawski] {Antykwa Poltawskiego, Polish traditional font family} {f-poltawski} + { \ccond,\cond,-,\expd,\eexpd, + \light\ccond,\light\cond,\light,\light\expd,\light\eexpd, + \caps: {\rm\bf\it\bi} } +\_famalias [Antykwa Poltawskiego] \_famalias [Poltawskiego] \_famalias [APoltawskiego] + +\_famfrom {Michael Sharpe} \_faminfo [Baskerville] {Free variants of classical Baskerville} {f-baskerville} { -,\caps: {\rm\bf\it\bi} } \_famalias [BaskervilleF] +\_famfrom {Georg Duffner, Octavio Pardo} \_faminfo [EB Garamond] {Free variants of classical Garamond} {f-ebgaramond} { -,\caps,\medium,\medium\caps,\semibold,\semibold\caps: {\rm\bf\it\bi} - -: {\initials} } + \swash: {\it\bi} -: {\initials} } \_famalias [Garamond] +\_famfrom {George Douros, Benjamin Miller} +\_faminfo [Garamond Libre] {Free, derived from old style font family} {f-garamondl} + { -,\caps: {\rm\bf\it\bi} \swash: {\it\bi} } +\_famalias [GaramondL] + +\_famfrom {Adobe, Paul D. Hunt} +\_faminfo [Source Pro] {Adobe SourceSerifPro, SourceSansPro, SourceCodePro} {f-sourcepro} + { \elight,\light,-,\bolder: {\rm\it} -,\bolder: {\bf\bi} + \sans\elight,\sans\light,\sans,\sans\bolder: {\rm\it} \sans,\sans\bolder: {\bf\bi} + \elight\caps,\light\caps,\caps,\bolder\caps: {\rm} \caps,\bolder\caps: {\bf} + \sans\elight\caps,\sans\light\caps,\sans\caps,\sans\bolder\caps: {\rm\it} + \sans\caps,\sans\bolder\caps: {\bf\bi} + \mono\elight,\mono\light,\mono,\mono\medium,\mono\bolder: {\rm\it} \mono,\mono\bolder: {\bf\bi} + } +\_famalias [AdobeSource] \_famalias [AdobeSourcePro] + +\_famfrom {Uni. of the Aegean} \_faminfo [Kerkis] {Free Bookman alternative with Greek letters} {f-kerkis} - { -,\sans: {\rm\bf\it\bi} \caps: {\rm\bf} \semibold: {\rm\it} + { -,\sans: {\rm\bf\it\bi} \caps: {\rm\bf} \semibold: {\bf\bi} \sanssemi: {\rm} -:{\calli} } -\_faminfo [Technika] {Fonts from visual style of CTU in Prague} {f-technika} +\_famfrom {Craig Rozynski} +\_faminfo [ComicNeue] {Comic Neue sans serif} {f-comicneue} + { -,\angular: {\lf\li\rm\it\bf\bi} } + +\_famfrom {Eben Sorkin} +\_faminfo [Merriweather] {Modern shapes, sharp serifs} {f-merriweather} + { -,\sans: {\lf\li\rm\it\bf\bi\kf\ki} \caps,\sans\caps: {\rm\it} } + +\_famfrom {Google, Christian Robertson} +\_faminfo [Roboto] {Geometric grotesk, thin variants included} {f-roboto} + { -: {\tf\ti\lf\li\rm\it\mf\mi\bf\bi\kf\ki} + \cond: {\lf\li\rm\it\bf\bi} + \mono: {\tf\ti\lf\li\rm\it\mf\mi\bf\bi} + \ttset: {\tf\lf\rm\bf} + \caps, \caps\cond: {\rm\bf\it\bi} \caps\ttset: {\rm\bf} + } + +\_famfrom {CTU in Prague, Roman Cernohous} +\_faminfo [Technika] {Fonts from visual style of CTU in Prague} {f-technika} { -,\light,\book, \caps, \caps\book: {\rm\bf\it\bi} -:{\stencil} } \_famalias [CTU Technika] +\_famfrom {Bitstream, Andrey V. Panov, Michael Sharpe} \_faminfo [XCharter] {An extension of Bitstream Charter} {f-xcharter} { -,\slant,\caps,\caps\slant: {\rm\bf\it\bi} } +\_famfrom {George Matthiopoulos, Greek Font Society} \_faminfo [GFSBodoni] {Based on Bodoni with greek letters} {f-gfsbodoni} - { -: {\rm\bf\it\bi} } + { -: {\rm\bf\it\bi} \caps: {\rm} } \_endcode @@ -90,7 +154,7 @@ the file is read, so the information about the font family is loaded. The name `f-<famname>.opm`. On the other hand the `\fontfam` command is more tolerant: you can write uppercase letters and spaces here. The spaces are ignored and uppercase letters are converted to lowercase. -For example `\fontfam [LM Fonts]` is equivalent to \fontfam [LMfonts] and both +For example `\fontfam [LM Fonts]` is equivalent to `\fontfam [LMfonts]` and both commands load the file `f-lmfonts.opm`. You can use your font file in sense of previous paragraph without @@ -114,7 +178,7 @@ The `fams-ini.opm` and `fams-local.opm` files use the macros {\everytt={\typosize[8/10]\_let\_printverbline=\_printcodeline \medskip} \def\docfile{fams-ini.opm} -\verbinput (3-27) fams-ini.opm +\verbinput (3-28) fams-ini.opm ... etc. } \medskip @@ -126,9 +190,10 @@ The \^`\_faminfo` commad has the syntax: \endtt % The `<mod-plus-vars>` data is used only when printing catalogue. It consists with -one or more pairs `<mods>: {<vars>} <mods>: {<vars>}` etc. -For each pair: each modifiers (separated by comma) are applied to each <vars> -and prepared sample is printed. The `-` character means no modifiers +one or more pairs `<mods>: {<vars>}`. +For each pair: each modifiers (separated by comma) is applied to each +variant selector in <vars> +and prepared samples are printed. The `-` character means no modifiers should be applied. The \^`\_famalias` declares an alias to the last @@ -137,3 +202,8 @@ declared family. The \^`\_famtext` writes a line to the terminal and to the log file when all families are listed. +The \^`\_famfrom` saves the information about font type foundry or +manufacturer or designer or license owner. You can use it before `\_faminfo` +in order to print `\_famfrom` info into the catalogue. +The `\_famfrom` data is applied to each following declared families until new +`\_famfrom` is given. Use `\_famfrom {}` if the information is not known. diff --git a/Master/texmf-dist/tex/luatex/optex/base/fonts-catalog.opm b/Master/texmf-dist/tex/luatex/optex/base/fonts-catalog.opm index de45dd3dcfb..b71132f4d41 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/fonts-catalog.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/fonts-catalog.opm @@ -2,12 +2,13 @@ \_codedecl \_undefined {Font catalogue <2020-02-26>} % loaded on demand by \fontfam[catalog] +\_tracinglostchars=1 % only to log file \_initunifonts \_begingroup \_istoksempty\_catalogmathsample \_iftrue \_noloadmath \_fi -\_let\_ttfixed=\_tentt -\_fontlet\_smalltt=\_tentt at7pt +\_font\_ttfixed=[LMMono10-Regular]\_relax +\_fontlet\_smalltt=\_ttfixed at7pt \_suppressfontnotfounderror=1 \_lowercase\_ea{\_ea\_def\_ea\_cataloglist\_ea{\_the\_catalogonly}} @@ -66,8 +67,9 @@ \_def\_wlog#1{\_nobreak\_smallskip \_hbox to\_hsize{\_hskip25pt \_edef\_tmp{#1}\_replstring\_tmp{^^J}{\_par}% - \_smalltt \_noindent \_ea \string \_mainfamcommand + \_smalltt \_noindent \_ea \string \_csname \_currfamily\_endcsname \_vtop{\leftskip=1em \_baselineskip=9pt \_tmp \_par}\_hss + \_if\_relax\_the\_famfrom\_relax \_else from: \_the\_famfrom \_fi } } @@ -79,7 +81,7 @@ \_input fams-ini.opm -\_isfile {fams-local.opm}\_iftrue \_input fams-local.opm \_fi +\_isfile {fams-local.opm}\_iftrue \_famfrom{}\_input fams-local.opm \_fi \_endgroup diff --git a/Master/texmf-dist/tex/luatex/optex/base/fonts-opmac.opm b/Master/texmf-dist/tex/luatex/optex/base/fonts-opmac.opm index 7b831383358..7145d00b2a7 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/fonts-opmac.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/fonts-opmac.opm @@ -1,6 +1,6 @@ %% This is part of OpTeX project, see http://petr.olsak.net/optex -\_codedecl \typosize {Font managing macros from OPmac <2020-04-28>} % loaded in format +\_codedecl \typosize {Font managing macros from OPmac <2020-12-12>} % loaded in format \_doc ----------------------------- \`\typosize` `[<font-size>/<baselineskip>]` sets given parameters. @@ -92,7 +92,7 @@ \_def\_setmainvaluesL {\_ifmmode \_normalmath \_else \_rm \_everymath={\_normalmath}\_everydisplay={\_normalmath}\_fi} \_def\_scalemain {% - \_ifdim \_mainfosize=0pt + \_ifdim \_mainfosize=\_zo \_mainfosize=10pt \_mainbaselineskip=12pt \_let \_setmainvalues=\_setmainvaluesL \_fi @@ -134,7 +134,7 @@ \_ea\_ifx \_the\_font \_tenbi \_additcorr \_bf \_else \_it \_aftergroup\_afteritcorr\_fi\_fi\_fi } -\_def\_additcorr{\_ifdim\_lastskip>0pt +\_def\_additcorr{\_ifdim\_lastskip>\_zo \_skip0=\_lastskip \_unskip\_italcorr \_hskip\_skip0 \_else\_italcorr \_fi} \_def\_afteritcorr{\_futurelet\_next\_afteritcorrA} \_def\_afteritcorrA{\_ifx\_next.\_else\_ifx\_next,\_else \_italcorr \_fi\_fi} @@ -160,16 +160,16 @@ \_def \_rmfixed {% used in default \footline {\_ifdim\_mainfosize=0pt \_mainfosize=10pt \_fi - \_fontdef\_rmfixed{\_setfontsize{at\mainfosize}\_resetmod\_rm}% - \_global\_let\_rmfixed=\_rmfixed} % next use will be font switch only + \_fontdef\_tenrm{\_setfontsize{at\mainfosize}\_resetmod\_rm}% + \_global\_let\_rmfixed=\_tenrm}% next use will be font switch only \_rmfixed } \_let \rmfixed = \_tenrm % user can redefine it - \_endcode % ------------------------------------- History: +2020-12-12 \_rmfixed fixed 2020-04-28 \boldify: removed \let\_rm=\_bf 2020-04-14 \_setmainvaluesL: \_ifmmode test added 2020-03-27 \_setmainvalues: \_splittopskip=\_topskip added diff --git a/Master/texmf-dist/tex/luatex/optex/base/fonts-resize.opm b/Master/texmf-dist/tex/luatex/optex/base/fonts-resize.opm index 9611fbd5b93..9dcd6a03e82 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/fonts-resize.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/fonts-resize.opm @@ -25,7 +25,7 @@ \_def\_setoptsizeA at#1\_relax{\_optsize=#1\_relax\_lastmagsize=\_optsize} % at<dimen> \_def\_setoptsizeB scaled#1\_relax{\_optsize=\_defaultoptsize\_relax} % scaled<scalenum> \_def\_setoptsizeC mag#1\_relax{% - \_ifdim\_lastmagsize>0pt \_optsize=\_lastmagsize \_else \_optsize=\_pdffontsize\_font \_fi + \_ifdim\_lastmagsize>\_zo \_optsize=\_lastmagsize \_else \_optsize=\_pdffontsize\_font \_fi \_optsize=#1\_optsize \_lastmagsize=\_optsize \_edef\_sizespec{at\_the\_optsize}% @@ -53,7 +53,7 @@ \_edef\_whatresize{#1}% \_ifx \_fontselector \_undefined \_doresizefont#2% \_else \_ea \_doresizefont \_fontselector \_fi - \_lastmagsize=0pt + \_lastmagsize=\_zo \_slet{_tryload#1}{_relax}% } \_def\_doresizetfmfont#1{\_logfont{#1}% @@ -213,6 +213,8 @@ \sec[setfontsize] Scaling fonts in text mode (low-level macros) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\secc The `\setfontsize` macro + The \^`\setfontsize` `{<size spec>}` saves the information about `<size spec>`. This information is taken into account when a variant selector (for example `\rm`, `\bf`, `\it`, `\bi`) @@ -228,7 +230,7 @@ or `\resizethefont` is used. The `<size spec>` can be: \enditems The initialization value in \OpTeX/ is given by `\setfontsize{at10pt}`. -The \^`\resizethefont` resizes the current font to the size given by previous +The \^`\resizethefont` resizes the currently selected font to the size given by previous \^`\setfontsize`. For example \begtt @@ -250,9 +252,11 @@ typography. Text \smaller text \smaller text \smaller text. \endtt +\secc[fontprimitive] The `\font` primitive + If you load a font directly by `\font` primitive and you want to create a size-dependent selector for such font then you can use -\^`\resizethefont`: +\~`\resizethefont`: \begtt \font\tencomfortaa=Comfortaa-Regular-T1 at10pt @@ -281,7 +285,7 @@ these features by the \^`\initunifonts` command explicitly, for example: \secc[fontdef] The \code{\\fontdef} declarator -You can declare `\<newfont>` by the \^`\fontdef` command. +You can declare `\<newfont>` by the \~`\fontdef` command. \begtt \catcode`\<=13 \fontdef \<newfont> {<font modifiers> \<variant-selector>} @@ -289,15 +293,15 @@ You can declare `\<newfont>` by the \^`\fontdef` command. \fontdef \bigfont {\setfontsize{at15pt}\bf} \endtt % -This command runs `<font modifiers> \<variant-selector>` in a group and sets the -resulting current font as `\<newfont>`. +This command runs `<font modifiers> \<variant-selector>` in an internal group and sets the +resulting selected font as `\<newfont>`. -The resulting `\<newfont>` declared by \^`\fontdef` is \"fixed font switch" +The resulting `\<newfont>` declared by \~`\fontdef` is \"fixed font switch" independent of \^`\setfontsize` and other font modifiers. More exactly, it is fixed font switch when it is used but it can depend on the current font modifiers and font family and given font modifiers when it is declared. -The parameter of the \^`\fontdef` macro must be exactly finished by the +The parameter of the \~`\fontdef` macro must be exactly finished by the variant selector. More information about font modifiers and variant selectors are in the section~\ref[fontsystem]. @@ -306,7 +310,7 @@ and variant selectors are in the section~\ref[fontsystem]. We have another command for scaling: \^`\fontlet` which is able to resize arbitrary font given by its font switch. This font switch was declared it by the -`\font` primitive or the `\fontdef` macro. +`\font` primitive or the \~`\fontdef` macro. \begtt \catcode`\<=13 \fontlet \<newfont> = \<fontswitch> <sizespec> @@ -314,8 +318,8 @@ This font switch was declared it by the \fontlet \bigfont = \_tenbf at15pt \endtt -The resulted `\bigfont` is the same as in previous example where `\fontdef` -was used. The advantage of `\fontdef` macro will be more clear when you load +The resulted `\bigfont` is the same as in previous example where \~`\fontdef` +was used. The advantage of \~`\fontdef` macro will be more clear when you load font families by `\fontfam` and you are using more font modifiers declared in such families. @@ -323,7 +327,7 @@ Summary: you can declare font switches: \begitems * by the `\font` primitive if you know the font file, * by the \^`\fontlet` command if you know the font switch and the size, or -* by the \^`\fontdef` command if you know the variant and modifiers. +* by the \~`\fontdef` command if you know the variant and modifiers. \enditems \secc Optical sizes diff --git a/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm b/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm index 8e7ab81fcf4..20a8ead2b5f 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/fonts-select.opm @@ -1,6 +1,6 @@ %% This is part of OpTeX project, see http://petr.olsak.net/optex -\_codedecl \fontfam {Fonts selection system <2020-03-18>} % preloaded in format +\_codedecl \fontfam {Fonts selection system <2020-12-12>} % preloaded in format \_doc ----------------------------- \`\initunifonts` macro extends \LuaTeX's font capabalities, @@ -41,29 +41,33 @@ The \`\_famdecl` `[<Family Name>] \<Famselector> {<comment>} {<modifiers>} {<variants>} {<math>}`\nl `{<font for testing>} {\def`\^`\_fontnamegen``{<data>}}` runs \^`\initunifonts`, then checks if `\<Famselector>` is defined. If it is true, then closes the file by - `\endinput`. Else it defines `\<Famselector>` and saves it to the \`\_mainfamcommand` - macro because the \`\_initfontfamily` needs it. The \`\_currfamily` is set + `\endinput`. Else it defines `\<Famselector>` and saves it to the + internal `\_f:<currfamily>:main.fam` command. + The macro \`\_initfontfamily` needs it. The \`\_currfamily` is set to the `<Famselector>` because the following \^`\moddef` commands need to be in the right font family context. The `\_currfamily` is set to the `<Famselector>` by the `\<Famselector>` too, because `\<Famselector>` - must set the right faily context. The font family context is given by the current - `\_currfamily` value and by the actual meaning of the \^`\_fontnamegen` macro. + must set the right font family context. The font family context is given by the current + `\_currfamily` value and by the actual meaning of the \^`\_fontnamegen` macro. + The \`\_mathfaminfo` is saved for usage in the catalogue. \_cod ----------------------------- \_def\_famdecl [#1]#2#3#4#5#6#7#8{% \_initunifonts \_uniaccents - \_ifx #2\_undefined + \_unless\_ifcsname _f:\_csstring#2:main.fam\_endcsname \_isfont{#7}\_iffalse \_opwarning{Family [#1] skipped, font "#7" not found}\_ea\_ea\_ea\_endinput \_else - \_edef\_currfamily {\_csstring #2}% - \_def\_mainfamcommand{#2}\_def\_mathfaminfo{#6}% - \_protected\_edef#2{\_def\_noexpand\_currfamily{\_csstring #2}\_unexpanded{#8\_resetmod}}% + \_edef\_currfamily {\_csstring #2}\_def\_mathfaminfo{#6}% \_wterm {FONT: [#1] -- \_string#2 \_detokenize{(#3)^^J mods:{#4} vars:{#5} math:{#6}}}% + \_unless \_ifx #2\_undefined + \_opwarning{\_string#2 is redefined by \_string\_famdecl\_space[#1]}\_fi + \_protected\_edef#2{\_def\_noexpand\_currfamily{\_csstring #2}\_unexpanded{#8\_resetfam}}% + \_ea \_let \_csname _f:\_currfamily:main.fam\_endcsname =#2% \_fi - \_else \_ea #2\_ea\_endinput \_fi + \_else \_csname _f:\_csstring#2:main.fam\_endcsname \_reloading \_rm \_ea \_endinput \_fi } \_def\_initfontfamily{% - \_mainfamcommand \_reloading \_rm + \_csname _f:\_currfamily:main.fam\_endcsname \_reloading \_rm } \_doc ----------------------------- @@ -101,12 +105,15 @@ `<variant name>`. Usable only of standard four variants. Next variants can be declared by the \^`\famvardef` macro. \nl - \`\_fset` `<key>=<value>,...,<key>=<value>` expands to + \`\_fsetV` `<key>=<value>,...,<key>=<value>` expands to `\def\_<key>V{<value>}` in the loop. \nl \`\_onlyif` `<key>=<value-a>,<value-b>...,<value-z>: {<what>}` runs <what> only if the `\_<key>V` is defined as `<value-a>` or `<value-b>` or ... or `<value-z>`. + \nl + \`\_prepcommalist` `ab,{},cd,\_end,` expands to `ab,,cd,` (auxiliary macro + used in `\_onlyif`). \_cod ----------------------------- \_def\_fvars #1 #2 #3 #4 {% @@ -125,9 +132,10 @@ \_ifx,#1\_else\_sdef{_#1V}{#2}\_ea\_ea\_ea\_fsetVa\_fi\_fi } \_def \_onlyif #1=#2:#3{% - \_edef\_act{\_noexpand\_isinlist{,#2,}{,\_cs{_#1V},}}\_act + \_edef\_act{\_noexpand\_isinlist{,\_prepcommalist #2,\_end,}{,\_cs{_#1V},}}\_act \_iftrue #3\_fi } +\_def\_prepcommalist#1,{\_ifx\_end#1\_empty\_else #1,\_ea\_prepcommalist\_fi} \_doc ----------------------------- The \`\moddef` `\<modifier> {<data>}` simply speaking does @@ -145,22 +153,43 @@ `_<something>` or to `<something>`. The `\_remifirstunderscore` redefines `\_tmp` in the way that it expands only to `<something>` without the first `_`. + + \`\_setnewmeaning` `<cs-name>=\_tmpa <by-what>` does exactly `\_let <csname>=\_tmpa` + but warning is printed if <cs-name> is defined already and it is not a variant + selector or font modifier. + + \`\_addtomodlist` `<font modifier>` adds given modifier to \`\_modlist` + macro. This list is used after `\resetmod` when new family is selected by + a family selector, see \`\_resetfam` macro. + This allows to reinitialize the same current modifiers in the font context + after family is changed. \_cod ----------------------------- -\_def \_moddef #1#2{\_edef\_tmp{\_csstring#1}\_remfirstunderscore\_tmp - \_sdef{_f:\_currfamily:\_tmp}{#2\_reloading}% - \_protected \_edef #1{\noexpand\_famdepend\noexpand#1{_f:\noexpand\_currfamily:\_tmp}}% - \_ea \_ifx \_csname\_tmp\_endcsname #1\_else - \_ea \_public \_csname\_tmp\_endcsname ;\_fi +\_def \_moddef #1#2{\_edef\_tmp{\_csstring#1}% + \_sdef{_f:\_currfamily:\_tmp}{\_addtomodlist#1#2\_reloading}% + \_protected \_edef \_tmpa{\_noexpand\_famdepend\_noexpand#1{_f:\_noexpand\_currfamily:\_tmp}}% + \_setnewmeaning #1=\_tmpa \moddef } -\_def\_remfirstunderscore#1{\_ea\_remfirstunderscoreA#1\_relax#1} -\_def\_remfirstunderscoreA#1#2\_relax#3{\_if _#1\_def#3{#2}\_fi} - \_protected \_def\_resetmod {\_cs{_f:\_currfamily:resetmod}} % private variant of \resetmod -\_def\_currfamily{} % default current family is empty +\_def \_resetfam{\_def\_addtomodlist##1{}\_resetmod + \_edef \_modlist{\_ea}\_modlist + \_let\_addtomodlist=\_addtomodlistb +} +\_def \_currfamily{} % default current family is empty +\_def \_modlist{} % list of currently used modifiers + +\_def \_addtomodlist#1{\_addto\_modlist#1} +\_let \_addtomodlistb=\_addtomodlist \_def\_famdepend#1#2{\_ifcsname#2\_endcsname \_csname#2\_ea\_endcsname \_else - \_opwarning{\_string#1 is undeclared in current family "\_currfamily", ignored}\_fi + \_ifx\_addtomodlist\_addtomodlistb + \_opwarning{\_string#1 is undeclared in family "\_currfamily", ignored}\_fi\_fi +} +\_def\_setnewmeaning #1=\_tmpa#2{% + \_ifx #1\_undefined \_else \_ifx #1\_tmpa \_else + \_opwarning{\_string#1 is redefined by \_string#2}% + \_fi\_fi + \_let#1=\_tmpa } \_public \moddef ; @@ -171,27 +200,29 @@ \`\_famvardefA` `\<XX> \_ten<XX> \_tryload<XX> {<data>}` is used. It does: \begitems - * `\protected\def \<XX> {\_famdepend \<XX> {_f:\_currfamily:<XX>}}`, - * `\def \_f:<current family>:<XX> {\_tryload<XX>\_ten<XX>}` keeps family dependent definition, - * `\def \_tryload<XX> {`\^`\fontdef`` \_ten<XX> {<data>}}` loads actually the font `\_ten<XX>`, - * `\def \_currvar:_ten<XX> {\<XX>}` in ordef to the \^`\currvar` macro - work correctly. + * `\def \_tryload:<currfam>:<XX> {`\^`\fontdef`` \_ten<XX> {<data>}}` loads font `\_ten<XX>`, + * `\protected\def \<XX> {\_famdepend \<XX> {_f:<currfam>:<XX>}}`, + * `\def \_f:<currfam>:<XX> {\_tryload:<currfam>:<XX>\_ten<XX>}` keeps family dependent definition, + * `\def \_currvar:_ten<XX> {\<XX>}` in order to the \^`\currvar` macro work correctly. \enditems + `\famvardef\tt` behaves somewhat differently: it doesn't re-define the + `\tt` macro which is defined as `\_tryloadtt \_tentt` in sections~\ref[math-preload] + and~\ref[unimath-codes]. It only re-defines the internal `\_tryloadtt` macro. \_cod ----------------------------- -\_def\_famvardef#1{\_edef\_tmp{\_csstring#1}\_remfirstunderscore\_tmp +\_def\_famvardef#1{\_edef\_tmp{\_csstring#1}% \_ea\_famvardefA \_ea#1\_csname _ten\_tmp\_ea\_endcsname - \_csname _tryload:\_tmp\_endcsname + \_csname _tryload:\_currfamily:\_tmp\_endcsname } -\_def\_famvardefA #1#2#3#4{% #1=\_XX #2=\_tenXX #3=\_tryloadXX #4=data +\_def\_famvardefA #1#2#3#4{% #1=\XX #2=\_tenXX #3=\_tryload:currfam:XX #4=data \_isinlist{.\_rm\_bf\_it\_bi\currvar\_currvar}#1\_iftrue \_opwarning{\_string\famvardef: - You cannot re-declare private standard variant selector \_string#1}% + You cannot re-declare standard variant selector \_string#1}% \_else - \_protected\_edef #1{\_noexpand\_famdepend\_noexpand#1{_f:\_noexpand\_currfamily:\_tmp}}% - \_sdef{_f:\_currfamily:\_tmp}{#3#2}% \_def#3{\_fontdef#2{#4}}% - \_ifx#1\tt \_addto#1{\_fam\_ttfam}\_fi + \_protected\_edef\_tmpa{\_noexpand\_famdepend\_noexpand#1{_f:\_noexpand\_currfamily:\_tmp}}% + \_ifx #1\_tt \_let\_tryloadtt=#3\_else \_setnewmeaning #1=\_tmpa \famvardef \_fi + \_sdef{_f:\_currfamily:\_tmp}{#3#2}% \_sdef{_currvar:\_csstring#2}{#1}% \_fi } @@ -225,7 +256,7 @@ } \_def\_tryloadfamslocal{% \_isfile {fams-local.opm}\_iftrue - \_opinput {fams-local.opm} + \_opinput {fams-local.opm}\_famfrom={}% \_fi \_let \_tryloadfamslocal=\_relax % need not to load fams-local.opm twice } @@ -236,7 +267,7 @@ \_def\_faminfo [##1]##2##3##4{% \_wterm{ \_space\_noexpand\fontfam [##1] -- ##2}% \_let\_famalias=\_famaliasA}% - \_opinput {fams-ini.opm} + \_opinput {fams-ini.opm}% \_isfile {fams-local.opm}\_iftrue \_opinput {fams-local.opm}\_fi \_message{^^J}% \_endgroup @@ -247,8 +278,8 @@ \_public \fontfam ; \_doc ----------------------------- - When the `fams-ini.opm` or `fams-loca.opm` files are read then we need - to save ony a mapping from family names or alias names to the font family file + When the `fams-ini.opm` or `fams-local.opm` files are read then we need + to save only a mapping from family names or alias names to the font family file names. All other information is ignored in this case. But if these files are read by the `\_listfamnames` macro or when printing a catalog then more infrormation is used and printed.\nl @@ -260,7 +291,11 @@ \nl \`\_famalias` `[<Family Alias>]` does `\def \_famf:<familyalias> {<file-name>}` where `<file-name>` is stored from the previous `\_faminfo` command. Or - prints information on the terminal. + prints information on the terminal. + \nl + \`\_famfrom` declares type foundry or owner or designer of the font family. + It can be used in `fams-ini.opm` or `fams-local.opm` and it is printed + in the font catalog. \_cod ----------------------------- \_def\_famtext #1{} @@ -273,8 +308,10 @@ \_lowercase{\_edef\_famname{\_ea\_removespaces #1 {} }}% \_sdef{_famf:\_famname\_ea}\_ea{\_famfile}% } +\_newtoks\_famfrom \_input fams-ini.opm \_let\_famfile=\_undefined +\_famfrom={} \_doc ----------------------------- When the \^`\fontfam``[catalog]` is used then the file @@ -372,34 +409,38 @@ was documented in the section~\ref[fontfam]. We distinguish between \begitems * {\em font switchers}, they are declared by the `\font` primitive or by - \^`\fontlet` or \^`\fontdef` macros, + \^`\fontlet` or \~`\fontdef` macros, they select given font. * {\em variant selectors}, there are four basic variant selectors - `\rm`, `\bf`, `\it`, `\bi`, there is a special selector `\currvar` - and more variant selectors can be declared by the \^`\famvardef` macro. -* {\em font modifiers} (for example `\cond`, `\caps`, \^`\setfontsize``{<size spec>}`), - they are in two types: bulid in (like \^`\setfontsize`) or - declared modifiers (by by the \^`\moddef` macro). + \^`\rm`, \^`\bf`, \^`\it`, \^`\bi`, there is a special selector \^`\currvar`. + More variant selectors can be declared by the \~`\famvardef` macro. + They select the font depending on given variant and on the {\em font context} + (i.e.\ on current family and on more features given by font modifiers). + In addition, \OpTeX/ defines \~`\tt` as variant selector + independent of chosen font family. It selects typewriter-like font. +* {\em font modifiers} are declared in a family (`\cond`, `\caps`) or are + \"build in" (\^`\setfontsize``{<size spec>}`, \~`\setff{<features>}`). + They do appropriate change in the {\em font context} but do not select + the font. * {\em family selectors} (for example `\Termes`, `\LMfonts`), - they are declared typically in the {\em font family files}. + they are declared typically in the {\em font family files}. + They enable to swithch between font families, they do appropriate + change in the {\em font context} but do not select + the font. \enditems -These selectors / switchers sets its values locally. When the \TeX/ group is +These commands set their values locally. When the \TeX/ group is leaved then selected font and the {\em font context} are returned back to the values used when the group was opened. They have the following features: -\begitems -* The {\em font switchers} select fonts independent on the font context. -* The {\em variant selectors} select the font depending on the font context and on - the specified variant. -* The {\em font modifiers} create a change in the font context but they - don't select the font itself. -* The {\em family selectors} set a family in the font context and resets all - font modifiers. They dont't select the font itself. -\enditems +The {\em font context} is a set of macro values which will affect the +selection of real font when variant selector is processed. It includes the +value of {\em current family}, current font size and +more values stored by font modifiers. -The variant selectors and declared font modifiers are -defined in the family context. They can behave differently in different -families. +The {\em family context} is the current family value stored in the font +context. The variant selectors declared by \~`\famvardef` and +font modifiers declared by \~`\moddef` are dependent on the {\em family context}. +They can have the same names but different behavior in different families. The fonts registered in \OpTeX/ have their macros in the {\em font family files}, each family is declared in one font family file with the name `f-famname.opm`. @@ -411,8 +452,8 @@ declarations in the file `fams-local.opm`. The \^`\fontfam` `[<Font Family>]` opens the relevant font family file where the `<Font Family>` is declared. The family selector is defined here by rules described in the section~\ref[fontfamfiles]. Font modifiers and variant -selectors may be declared here. Their definitions depends on given family. -The family is set as active in the font context and `\rm` variant selector is run. +selectors may be declared here. +The loaded family is set as current and `\rm` variant selector is processed. The available declared font modifiers and declared variant selectors are listed in the log file when font family is load. Or you can print @@ -445,7 +486,7 @@ reloaded with respect to the current font context by previously given family selector and font modifiers. You can use the \^`\setfontsize` `{<sizespec>}` command in the same sense as -other font modifiers. It saves only information about font size to the font +other font modifiers. It saves information about font size to the font context. See section~\ref[setfontsize]. Example: \begtt @@ -453,10 +494,10 @@ context. See section~\ref[setfontsize]. Example: in 14pt size too \bf bold too. \endtt -Much more comfortable way to resize fonts is using OPmac-like command -`\typosize`, `\typoscale`. +Much more comfortable way to resize fonts is using OPmac-like commands +\~`\typosize` and \~`\typoscale`. These commands prepare the right sizes for math -fonts too and re-calculates many internal parameters like `\baselineskip`. +fonts too and they re-calculate many internal parameters like `\baselineskip`. See section~\ref[opmac-fonts] for more information. @@ -474,74 +515,106 @@ If you want to use your specially selected Unicode-math font then use `\fontfam` is used. -\secc Declaring font commands +\secc[fontcommands] Declaring font commands %---------------------------- -The font switches can be declared by `\font` primitive or by \^`\fontdef` or -\^`\fontlet` macros. See the sections~\ref[fontdef] and~\ref[fontlet] -for more details. The general format for \^`\fontdef` is +Font commands can be font switches, variant selectors, font modifiers, +family selectors and defined font macros doing something with fonts. + +\begitems +* Font switches can be decared by `\font` primitive (see + section~\ref[fontprimitive]) or by \^`\fontlet` command (see + section~\ref[fontlet]) or by \~`\fontdef` command (see + sections~\ref[fontdef2] and~\ref[fontdef]). + When the font switches are used then they select given font independently + of current font context. They can be used + in `\output` routine (for example) becuase we need to set fixed fonts + in hedares and footers. +* Variant selectors are \^`\rm`, \^`\bf`, \^`\it`, \^`\bi`, \~`\tt` and \^`\currvar`. More + variant selectors can be declared by \~`\famvardef` command. They select a + font dependent on the current font context, see section~\ref[famvardef]. + The `\tt` selector is documented in section~\ref[tt]. +* Font modifiers are \"build in" or declared by \~`\moddef` command. + They do modifications in the font context but don't select any font. + \begitems + * \"build-in" font modifiers are \^`\setfontsize` (see + section~\ref[setfontsize]), \~`\setff` (see section~\ref[setff]), + \~`\setfontcolor`, \~`\setletterspace` and \~`\setwordspace` + (see section~\ref[specff]). They are independent of font family. + * Font modifiers declared by \~`\moddef` depend on the font family and they + are typicaly declared in font family files, see + section~\ref[fontfamfiles]. + \enditems +* Family selectors set the given + font family as current and re-set data used by family-dependent font + modifiers to initial values and to the currently used modifiers. + They are declared in font family files + by \~`\_famdecl` macro, see section~\ref[fontfamfiles]. +* Font macros can be defined arbitrary by `\def` primitive by user. + See an example in section~\ref[fontmacros]. +\enditems + +All declaration commands mentioned here: `\font`, `\fontlet`, `\fontdef`, `\famvardef`, +`\moddef`, `\_famdecl` and `\def` make local assignment. + +\secc[fontdef2] The `\fontdef` declarator in detail + +The general format for \^`\fontdef` usage is \begtt \catcode`\<=13 \fontdef\<font switch> {\<family selector> <font modifiers> \<variant selector>} \endtt +% +where `\<family selector>` and `<font modifiers>` are optional and +`\<variant selector>` is mandatory. -Such font switches should be used in `\output` routine (headers, footers) for -example. We need fixed sizes here. But they are less usable in common -text. For example the document includes notices in smaller font. -When the notice is started then we want -to do all variants smaller: `\rm`, `\it`, `\bf`, etc. -It means that the smaller font for notices should be initialized by -`\setfontsize{at9pt}\rm` for example. If you want a \"notices font selector" -then you can do `\def\noticefont{\setfontsize{at9pt}\rm}`. This font -selector does not change the `\baselineskip`. If you want to do this then -put different `\baselineskip` setting to your definition. But you must not -forget that the end of group before `\par` is a typical mistake of \TeX/ -users: the last paragraph is in smaller font but in normal baselineskip, -because `\baselineskip` setting is taken into account when `\par` -command is processed. - -Somewhat more complicated task is the \"title font selector", because titles are -not only bigger but they are typically in bold variant. When the user puts -`{\it...}` into the title then he/she expects bold italic here, no normal -italic. You can remember the great song by John Lennon \"Let It Be" and -define: +The \^`\fontdef` does following steps. +It pushes current font context to a stack, it do modifications of the font +context by given `\<family selector>` and/or `<font modifiers>` and it +find the real font by `\<variant selector>`. This font is not selected but +it is assigned to the declared `\<font switch>` (like `\font` primitive does +it). Finally, `\fontdef` pops the font context stack, so the current +font context is the same as it was before `\fontdef` is used. + +More about `\fontdef` command including examples is written in +section~\ref[fontdef]. -\begtt -\def\titlefont{\setfontsize{at14pt}\bf \let\it\bi} -... -{\titlefont here we have bold 14pt font and {\it here} was bold 14pt italics} -\endtt -You can declare a new variant slector by the \^`\famvardef` macro. This +\secc[famvardef] The `\famvardef` declarator + +You can declare a new variant selector by the \^`\famvardef` macro. This macro has similar syntax as \^`\fontdef`: \begtt \catcode`\<=13 -\famvardef\<new variant selector> {<font modifiers> \<variant selector>} +\famvardef\<new variant selector> {\<family selector> <font modifiers> \<variant selector>} \endtt % +where `\<family selector>` and `<font modifiers>` are optional and +`\<variant selector>` is mandatory. The `\<new variant selector>` should be used in the same sense as `\rm`, -`\bf` etc. It can be used as the final command in the -`\fontdef` or `\famvardef` declarators +`\bf` etc. It can be used as the final command in next +\^`\fontdef` or \^`\famvardef` declarators too. When the `\<new variant selector>` is used in normal text then it does following steps: pushes current font context to a stack, modifies font -context by declared `<font modifiers>`, runs following `\<variant selector>`. -It selects a font. Then pops the stack. The font context have its original -values but new font is selected. - -The \^`\famvardef` creates the `\<new variant selector>` family dependent. -When the selector is used in another family than it is defined then warning is +context by declared `\<family selector>` and/or `<font modifiers>`, +runs following `\<variant selector>`. +This last one selects a real font. Then pops the font context stack. +The new font is selected but the font context has its original values. +This is main difference between `\famvardef\foo{...}` and `\def\foo{...}`. + +Moreover, the \^`\famvardef` creates the `\<new variant selector>` family dependent. +When the selector is used in another family context than it is defined then warning is printed on the terminal \"<var selector> is undeclared in current family" and nothing happens. But you can declare the same variant selector by \^`\famvardef` macro in the context of new family. Then the same command -will be do different work depending on the current font family. +may do different work depending on the current font family. Suppose that the selected font family provides the font modifier `\medium` for -mediate weight of fonts but supports only basic variant selectors `\rm`, `\bf`, `\it`, -and `\bi`. Then you can declare: +mediate weight of fonts. Then you can declare: \begtt -\famvardef \mr {\medium\rm} +\famvardef \mf {\medium\rm} \famvardef \mi {\medium\it} \endtt Now, you can use six independent variant selectors `\rm`, `\bf`, `\it`, -`\bi`, `\mr` and `\mi` in the selected font family. +`\bi`, `\mf` and `\mi` in the selected font family. A `\<family selector>` can be written before `<font modifiers>` in the `\famvardef` parameter. Then the `\<new variant selector>` is declared in @@ -561,11 +634,80 @@ into problem with incompatible ex-heights. This problem can be solved using Compare ex-height of Termes \rmsans with Heros \rm and Termes. \endtt -There exists analogical declarator `\moddef` for declaration family dependent -font modifiers. It is described in detail the section~\ref[fontfamfiles]. +The variant selectors (declared by \~`\famvardef`) or font +modifiers (declared by \~`\moddef`) are (typically) control sequences in user name +space (`\mf`, `\caps`). They are most often declared in font family files and +they are loaded by \^`\fontfam`. A conflict with such names in +user name space can be here. For example: if `\mf` is defined by user and then +`\fontfam[Roboto]` is used then `\famvardef\mf` is performed for Roboto +family and the original meaning of `\mf` is lost. But \OpTeX/ prints warning +about it. There are two cases: + +\begtt +\def\mf{Metafont} +\fontfam[Roboto] % warning: "The \mf is redefined by \famvardef" is printed + or +\fontfam[Roboto] +\def\mf{Metafont} % \mf variant selector redefined by user, we suppose that \mf + % is used only in the meaning of "Metafont" in the document. +\endtt + +\secc[tt] The `\tt` variant selector + +\^`\tt` is additional special variant selector which is defined as \"select typewriter +font independently of current font family". By default, the typewriter font-face +from LatinModern font family is used. + +The \^`\tt` variant selector is used in \OpTeX/ internal macros +\^`\_ttfont` (verbatim texts) and \^`\_urlfont` (printing URL's). + +You can redefine the behavior of `\tt` by \^`\famvardef`. For example: + +\begtt +\fontfam[Cursor] +\fontfam[Heros] +\fontfam[Termes] +\famvardef\tt{\Cursor\setff{-liga;-tlig}\rm} + +Test in Termes: {\tt text}. {\Heros\rm Test in Heros: {\tt text}}. +Test in URL \url{http://something.org}. +\endtt +% +You can see that `\tt` stay family independent. This is special feature only +for `\tt` selector. New definition is used in \^`\_ttfont` and \^`\_urlfont` too. +It is recommended to use `\setff{-liga;-tlig}` in order to supress the +liguatures in typewriter fonts. + +If Unicode math font is loaded then the `\tt` macro selects typewriter +font-face in math mode too. This face +is selected from used Unicode math font and it is independent of +`\famvardef\tt` declaration. + + +\secc[fontmacros] Font commands defined by `\def` + +Such font commands can be used as fonts selectors for titles, footnotes, +ctitations etc. User can define them. + +The following example shows how to define a \"title-font selector". +Titles are not only bigger but they are typically in bold variant. When the user puts +`{\it...}` into the title text then he/she expects bold italic here, no normal +italic. You can remember the great song by John Lennon \"Let It Be" and +define: + +\begtt +\def\titlefont{\setfontsize{at14pt}\bf \let\it\bi} +... +{\titlefont Title in bold 14pt font and {\it bold 14pt italics} too} +\endtt + +\OpTeX/ defines similar internal commands \^`\_titfont`, \^`\_chapfont`, \^`\_secfont` and +\^`\_seccfont`, see section~\ref[sections]. The commands \^`\typosize` and +\^`\boldify` are used in these macros. They set the math fonts to given size too and they +are defined in section~\ref[opmac-fonts]. -\secc Modifying font features +\secc[setff] Modifying font features %---------------------------- Each OTF font provides \"font features". You can list these font features @@ -581,9 +723,9 @@ reinitialize the font with the new font feature. For example selector too: \begtt - \fontfam[LinLibertine] - \famvardef \fraclig {\setff{+frac}\currvar} - Compare 1/2 or 1/10 \fraclig to 1/2 or 1/10. +\fontfam[LinLibertine] +\famvardef \fraclig {\setff{+frac}\currvar} +Compare 1/2 or 1/10 \fraclig to 1/2 or 1/10. \endtt If the used font does not supports given font feature then font is realoaded @@ -594,7 +736,7 @@ Caps+SmallCaps variant in \OpTeX/ font family files. So you need not to create a new modifier, just use `{\caps`\^`\currvar`` 012345}`. -\secc Special font modifiers +\secc[specff] Special font modifiers %--------------------------- Despite the font modifiers declared in the font family file (and dependent on @@ -694,6 +836,7 @@ Luaotfload documentation for more information. \endinput +2020-12-12 \_modlist added, doc improved 2020-04-18 \_tryloadfamslocal introduced \_fontdecl -> \_famdecl with different concept 2020-03-18 released diff --git a/Master/texmf-dist/tex/luatex/optex/base/graphics.opm b/Master/texmf-dist/tex/luatex/optex/base/graphics.opm index be2cfdab7ec..901dc4d3522 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/graphics.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/graphics.opm @@ -17,8 +17,8 @@ \_def\_inspic{\_hbox\_bgroup\_isnextchar\_bgroup\_inspicB\_inspicA} \_def\_inspicA #1 {\_inspicB {#1}} \_def\_inspicB #1{% - \_pdfximage \_ifdim\_picwidth=0pt \_else width\_picwidth\_fi - \_ifdim\_picheight=0pt \_else height\_picheight\_fi + \_pdfximage \_ifdim\_picwidth=\_zo \_else width\_picwidth\_fi + \_ifdim\_picheight=\_zo \_else height\_picheight\_fi \_picparams {\_the\_picdir#1}% \_pdfrefximage\_pdflastximage\_egroup} @@ -48,8 +48,8 @@ \_def\makeatletter#1\makeatother{}% \_def\includegraphics[#1]#2{\_inkscanpage#1,page=,\_end \_inspic{#2}\_hss}% \_def\_inkscanpage#1page=#2,#3\_end{\_ifx,#2,\_else\_def\_picparams{page#2}\_fi}% - \_def\put(#1,#2)#3{\_nointerlineskip\_vbox to0pt{\_vss\_hbox to0pt{\_kern#1\_picwidth - \_pdfsave\_hbox to0pt{#3}\_pdfrestore\_hss}\_kern#2\_picwidth}}% + \_def\put(#1,#2)#3{\_nointerlineskip\_vbox to\_zo{\_vss\_hbox to\_zo{\_kern#1\_picwidth + \_pdfsave\_hbox to\_zo{#3}\_pdfrestore\_hss}\_kern#2\_picwidth}}% \_def\begin#1{\_csname _begin#1\_endcsname}% \_def\_beginpicture(#1,#2){\_vbox\_bgroup \_hbox to\_picwidth{}\_kern#2\_picwidth \_def\end##1{\_egroup}}% @@ -57,7 +57,7 @@ \_vtop{\_def\\{\_cr}\_tabiteml{}\_tabitemr{}\_table{#2}{#3}}}% \_def\color[#1]#2{\_scancolor #2,}% \_def\_scancolor#1,#2,#3,{\_pdfliteral{#1 #2 #3 rg}}% - \_def\makebox(#1)[#2]#3{\_hbox to0pt{\_csname _mbx:#2\_endcsname{#3}}}% + \_def\makebox(#1)[#2]#3{\_hbox to\_zo{\_csname _mbx:#2\_endcsname{#3}}}% \_sdef{_mbx:lb}#1{#1\_hss}\_sdef{_mbx:rb}#1{\_hss#1}\_sdef{_mbx:b}#1{\_hss#1\_hss}% \_sdef{_mbx:lt}#1{#1\_hss}\_sdef{_mbx:rt}#1{\_hss#1}\_sdef{_mbx:t}#1{\_hss#1\_hss}% \_def\rotatebox#1#2{\_pdfrotate{#1}#2}% @@ -114,8 +114,8 @@ \_dimendef\_newHt 13 \_dimendef\_newDp 14 % only in this group \_dimendef\_newLt 15 \_dimendef\_newRt 16 \_preptransform{#1}% - \_kern-\_newLt \_vrule height\_newHt depth\_newDp width0pt - \_setbox0=\_hbox{\_box0}\_ht0=0pt \_dp0=0pt + \_kern-\_newLt \_vrule height\_newHt depth\_newDp width\_zo + \_setbox0=\_hbox{\_box0}\_ht0=\_zo \_dp0=\_zo \_pdfsave#1\_rlap{\_box0}\_pdfrestore \_kern\_newRt}% } \_def\_preptransform #1{\_def\_currmatrix{1 0 0 1 }% @@ -139,7 +139,7 @@ \_fi \_fi } \_def\_rotboxA #1#2#3#4{\_hbox{\_setbox0=\_hbox{{#4}}#2% - \_vbox to\_wd0{#3\_wd0=0pt \_dp0=0pt \_ht0=0pt + \_vbox to\_wd0{#3\_wd0=\_zo \_dp0=\_zo \_ht0=\_zo \_pdfsave\_pdfrotate{#1}\_box0\_pdfrestore\vfil}% \_kern\_tmpdim }} @@ -168,18 +168,18 @@ } \_def\_puttext{\_ea\_ea\_ea\_puttextA\_scantwodimens} -\_def\_puttextA#1#2#3{\_setbox0=\_hbox{{#3}}\_dimen1=#1sp \_dimen2=#2sp \_puttextB} +\_def\_puttextA#1#2#3{{\_setbox0=\_hbox{{#3}}\_dimen1=#1sp \_dimen2=#2sp \_puttextB}} \_def\_puttextB{% \_ifvmode - \_ifdim\_prevdepth>0pt \_vskip-\_prevdepth \_relax \_fi + \_ifdim\_prevdepth>\_zo \_vskip-\_prevdepth \_relax \_fi \_nointerlineskip \_fi - \_wd0=0pt \_ht0=0pt \_dp0=0pt - \_vbox to0pt{\_kern-\_dimen2 \_hbox to0pt{\_kern\_dimen1 \_box0\_hss}\_vss}} + \_wd0=\_zo \_ht0=\_zo \_dp0=\_zo + \_vbox to\_zo{\_kern-\_dimen2 \_hbox to\_zo{\_kern\_dimen1 \_box0\_hss}\_vss}} \_def\_putpic{\_ea\_ea\_ea\_putpicA\_scantwodimens} \_def\_putpicA#1#2{\_dimen1=#1sp \_dimen2=#2sp \_ea\_ea\_ea\_putpicB\_scantwodimens} -\_def\_putpicB#1#2#3{\_setbox0=\_hbox{\_picwidth=#1sp \_picheight=#2sp \_inspic{#3}}\_puttextB} +\_def\_putpicB#1#2#3{{\_setbox0=\_hbox{\_picwidth=#1sp \_picheight=#2sp \_inspic{#3}}\_puttextB}} \_newbox\_bgbox \_def\_backgroundpic#1{% @@ -262,14 +262,14 @@ \_def\_inovalA{\_isnextchar\_colorstackpop\_inovalB\_inovalC} \_def\_inovalB#1{#1\_isnextchar\_colorstackpop\_inovalB\_inovalC} \_def\_inovalC{\_egroup % of \setbox0=\hbox\bgroup - \_ifdim\_vvkern=0pt \_else \_ht0=\_dimexpr\_ht0+\_vvkern \_relax - \_dp0=\_dimexpr\_dp0+\_vvkern \_relax \_fi - \_ifdim\_hhkern=0pt \_else \_wd0=\_dimexpr\_wd0+\_hhkern \_relax \_fi + \_ifdim\_vvkern=\_zo \_else \_ht0=\_dimexpr\_ht0+\_vvkern \_relax + \_dp0=\_dimexpr\_dp0+\_vvkern \_relax \_fi + \_ifdim\_hhkern=\_zo \_else \_wd0=\_dimexpr\_wd0+\_hhkern \_relax \_fi \_ifx\_overlapmarginsvalue N\_dimen0=\_roundness \_dimen1=\_roundness \_else \_dimen0=-\_hhkern \_dimen1=-\_vvkern \_fi \_setflcolors\_tmp \_hbox{\_kern\_dimen0 - \_vbox to0pt{\_kern\_dp0 + \_vbox to\_zo{\_kern\_dp0 \_ifx\_shadowvalue N\_else \_edef\_tmpb{{\_bp{\_wd0+\_lwidth}}{\_bp{\_ht0+\_dp0+\_lwidth}}{\_bp{\_roundness}}}% \_doshadow\_oval @@ -298,7 +298,7 @@ \_dimen3=\_dimexpr \_ht0+\_dp0 \_relax \_dimen2=\_ratiovalue\_dimen3 \_else \_dimen2=\_wd0 \_dimen3=\_expr{1/\_ratiovalue}\_dimen2 \_fi \_setflcolors\_tmp - \_ifx\_overlapmarginsvalue N\_dimen0=0pt \_dimen1=0pt + \_ifx\_overlapmarginsvalue N\_dimen0=\_zo \_dimen1=\_zo \_else \_dimen0=-\_hhkern \_dimen1=-\_vvkern \_fi \_hbox{\_kern\_dimen0 \_ifx\_shadowvalue N\_else @@ -307,7 +307,7 @@ \_fi \_pdfliteral{q \_bp{\_lwidth} w \_tmp \_mv{\_bp{.5\_wd0}}{\_bp{(\_ht0-\_dp0)/2}} {\_circle{\_bp{\_dimen2}}{\_bp{\_dimen3}} B} Q}% - \_ifdim\_dimen1=0pt \_else + \_ifdim\_dimen1=\_zo \_else \_ht0=\_dimexpr \_ht0+\_dimen1 \_relax \_dp0=\_dimexpr \_dp0+\_dimen1 \_relax \_fi \_box0 \_kern\_dimen0} @@ -392,7 +392,7 @@ \_def\_clipinpath#1#2#3#4{% #1=x-pos[bp], #2=y-pos[bp], #3=curve, #4=text \_hbox{\_setbox0=\_hbox{{#4}}% - \_tmpdim=\_wd0 \_wd0=0pt + \_tmpdim=\_wd0 \_wd0=\_zo \_pdfliteral{q \_mv{#1}{#2}{#3 W n}}% \_box0\_pdfliteral{Q}\_kern\_tmpdim }% @@ -440,5 +440,6 @@ the \^`\transformbox{<transformation>}{\copy\mypic}`. \_endinput +2020-12-21: \puttext: \box0 in goup, bugfix 2020-04-12: \_public \clipinoval \clipincircle ; added, bug fixed diff --git a/Master/texmf-dist/tex/luatex/optex/base/hi-syntax.opm b/Master/texmf-dist/tex/luatex/optex/base/hi-syntax.opm index e4b09ebafac..540c6182427 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/hi-syntax.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/hi-syntax.opm @@ -105,7 +105,7 @@ \_global\_cs{_hicolors\_tmpa}=\_hicolors \_global\_hicolors={}% \_fi\_fi\_fi \_ea\_the \_csname _hisyntax\_tmpa\_endcsname % \_the\_hisyntax<name> - \_else\_opwarning{Syntax highlighting "\_tmpa" undeclared (no file hisyntax-\_tmpa.opm)} + \_else\_opwarning{Syntax "\_tmpa" undeclared (no file hisyntax-\_tmpa.opm)} \_fi\_fi \_replthis{\_start\n^^J}{}\_replthis{^^J\_end}{^^J}% \_def\n{}\_def\b{}\_adef{ }{\_dsp}% diff --git a/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm b/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm index ebcc8cf8141..14b8cbc1257 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm @@ -20,7 +20,7 @@ \_else \_destbox[#1:#2]% \_fi\_fi } -\_def\_destbox[#1]{\_vbox to0pt{\_kern-\_destheight \_pdfdest name{#1} xyz\_vss}} +\_def\_destbox[#1]{\_vbox to\_zo{\_kern-\_destheight \_pdfdest name{#1} xyz\_vss}} \_def\_dest[#1]{} \_public \dest ; @@ -45,7 +45,7 @@ \_public \ilink \link ; \_doc ---------------------------- - \`\ulink``[<url>]{<text>}` creates external link. It prints only te `<text>` by default but + \`\ulink``[<url>]{<text>}` creates external link. It prints only the `<text>` by default but the \^`\hyperlinks` declaration defines it as \`\_urlactive``[url:<url>]{<text>}`. The external link is created by the `\_pdfstartlink...\pdfendlink` primitives. The `<url>` is detokenized with `\escapechar=-1` before it is used, so diff --git a/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm b/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm index f78148ff912..9cbbf4cecf3 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm @@ -96,7 +96,7 @@ } \_def\_loadpattrsA #1,{\_ifx,#1,\_else \_isfile {hyph-#1}\_iftrue \_opinput{hyph-#1}% - \_else \_opwarning{Hyph. patterns #1 for \\ not loaded, probably missing package}% + \_else \_opwarning{No hyph. patterns #1 for \\, missing package?}% \_def\_opwarning##1{}\_fi \_ea \_loadpattrsA \_fi } diff --git a/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm index 82d3774628a..1745baa7ac2 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/if-macros.opm @@ -30,6 +30,17 @@ \_public \newif ; \_doc ---------------------------- + \`\afterfi` `{<what to do>}<ignored>\fi` closes condition by `\fi` and processes + <what to do>. Usage: + \begtt + \if<something> \afterfi{<result is true>} \else \afterfi{<resut is false>} \fi + \endtt + \_cod ---------------------------- + +\_def\_afterfi#1#2\_fi{\_fi#1} +\_def\afterfi#1#2\fi{\_fi#1} + + \_doc ---------------------------- \secc Loops The \`\loop` `<codeA> \ifsomething <codeB>` \`\repeat` loops `<codeA><codeB>` until `\ifsomething` is false. Then `<codeB>` is not executed and loop is @@ -50,20 +61,22 @@ \_def \_iterate {\_body \_ea \_iterate \_fi} \_doc ----------------------------- - \`\foreach` `<list>` \`\do` `{<what>}` + \`\foreach` `<list>`\`\do` `{<what>}` repeats `<what>` for each element of the `<list>`. The `<what>` can include `#1` which is substituted by each element of the `<list>`. The macro is expandable. + \nl + \`\foreach` `<list>`\`\do` `<parameter-mask>{<what>}` + reads parameters from <list> repeatedly and does <what> for each such reading. + The parameters are declared by <parameter-mask>. Examples: + \begtt + \foreach (a,1)(b,2)(c,3)\do (#1,#2){#1=#2 } + \foreach word1,word2,word3,\do #1,{Word is #1.} + \foreach A=word1 B=word2 \do #1=#2 {"#1 is set as #2".} + \endtt + Note that `\foreach <list>\do {<what>}` is equivalent to `\foreach <list>\do #1{<what>}`. - \`\fornum` `<from>..<to>` \`\do` `{<what>}` or - \`\fornumstep` `<num>: <from>..<to>` \`\do` `{<what>}` - repeats `<what>` for each number from `<from>` to `<to>` (with step `<num>` - or with step one). The `<what>` can include `#1` which is substituted by - current number. The sequence `<from>..<to>` can be decreasing too. - The macro is expandable. - - Recommendation: it is better to - use private variants of \`\_foreach` and \`\_fornum`. + Recommendation: it is better to use private variants of \`\_foreach`. When the user writes `\input tikz` then `\foreach` macro is redefined! The private variants use \`\_do` separator instead `\do` separator. \_cod ----------------------------- @@ -71,10 +84,26 @@ \_newcount\_frnum % the numeric variable used in \fornum \_def\_do{\_doundefined} % we need to ask \_ifx#1\_do ... -\_long\_def\_foreach #1\_do#2{\_putforstack - \_immediateassignment\_gdef\_fbody##1{#2}% - \_foreachA #1\_do} -\_long\_def\_foreachA #1{\_ifx\_do#1\_getforstack\_else\_fbody{#1}\_ea\_foreachA\_fi} +\_long\_def\_foreach #1\_do #2#{\_isempty{#2}\_iftrue + \_afterfi{\_foreachA{#1}{##1}}\_else\_afterfi{\_foreachA{#1}{#2}}\_fi} +\_long\_def\_foreachA #1#2#3{\_putforstack + \_immediateassignment \_long\_gdef\_fbody#2{\_testparam##1..\_iftrue #3\_ea\_fbody\_fi}% + \_fbody #1#2\_finbody\_getforstack +} +\_def\_testparam#1#2#3\_iftrue{\_ifx###1\_empty\_ea\_finbody\_else} +\_def\_finbody#1\_finbody{} + +\_def\foreach #1\do#2#{\_isempty{#2}\_iftrue + \_afterfi{\_foreachA{#1}{##1}}\_else\_afterfi{\_foreachA{#1}{#2}}\_fi} + + \_doc ----------------------------- + \`\fornum` `<from>..<to>` \`\do` `{<what>}` or + \`\fornumstep` `<num>: <from>..<to>` \`\do` `{<what>}` + repeats `<what>` for each number from `<from>` to `<to>` (with step `<num>` + or with step one). The `<what>` can include `#1` which is substituted by + current number. The sequence `<from>..<to>` can be decreasing too. + The macro is expandable. + \_cod ----------------------------- \_def\_fornum#1..#2\_do{\_fornumstep 1:#1..#2\_do} \_long\_def\_fornumstep#1:#2..#3\_do#4{\_putforstack @@ -93,9 +122,6 @@ \_immediateassignment\_global\_advance\_frnum by\_numexpr\_fornumsgn#2\_relax \_afterfi{\_fornumB{#1}{#2}}\_fi } -\_def\_afterfi#1#2\_fi{\_fi#1} - -\_def\foreach #1\do{\_foreach #1\_do} \_def\fornum#1..#2\do{\_fornumstep 1:#1..#2\_do} \_def\fornumstep#1:#2..#3\do{\_fornumstep #1:#2..#3\_do} @@ -132,6 +158,28 @@ }} \_doc ---------------------------- + User can define own expandable \"foreach" macro by + \`\foreachdef` `\macro <parameter-mask>{<what>}` + which can be used by `\macro {<list>}`. The macro reads repeatedly parameters from <list> + using <parameter-mask> and does <what> for each such reading. For example + \begtt + \foreachdef\mymacro #1,{[#1]} + \mymacro{a,b,cd,efg,} + \endtt + expands to [a][b][cd][efg]. Such user defined macros are more effecive during processing + than `\foreach` itself because they need not to operate with the for-stack. + \_cod ---------------------------- + +\_def\_foreachdef#1#2#{\_toks0{#2}% + \_long\_edef#1##1{\_ea\_noexpand\_csname _body:\_csstring#1\_endcsname + ##1\_the\_toks0 \_noexpand\_finbody}% + \_foreachdefA#1{#2}} +\_def\_foreachdefA#1#2#3{% + \_long\_sdef{_body:\_csstring#1}#2{\_testparam##1..\_iftrue #3\_cs{_body:\_csstring#1\_ea}\_fi}} + +\_public \foreachdef ; + + \_doc ---------------------------- \secc Is-macros There are a collection of macros \^`\isempty`, \^`\istoksempty`, \^`\isequal`, \^`\ismacro`, diff --git a/Master/texmf-dist/tex/luatex/optex/base/keyval.opm b/Master/texmf-dist/tex/luatex/optex/base/keyval.opm new file mode 100644 index 00000000000..f50cb868284 --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/keyval.opm @@ -0,0 +1,82 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_codedecl \readkv {Key-value dictionaries <2020-12-21>} % preloaded in format + + \_doc ---------------------------- + {\bf Implementation.} + The \`\readkv` expands its parameter and does replace-strings in order to + remove spaces around equal signs and after comma. Double comma is + removed. Then \`\_kvscan` reads the parameters list finished by double + comma and saves values to `\_kv:<key>` macros.\nl + The \`\kv``{<key>}` expands the `\_kv:<key>` macro. If this macro is not + defined then \`\_kvunknown` is processed. You can re-define it if you want. + \_cod ---------------------------- + +\_def\_readkv#1{\_ea\_def\_ea\_tmpb\_ea{#1}% + \_replstring\_tmpb{= }{=}\_replstring\_tmpb{ =}{=}% + \_replstring\_tmpb{, }{,}\_replstring\_tmpb{,,}{,}% + \_ea \_kvscan \_tmpb,,=,} +\_def\_kvscan #1#2=#3,{\_ifx#1,\_else \_sdef{_kv:#1#2}{#3}\_ea\_kvscan\_fi} +\_def\_kv#1{\_trycs{_kv:#1}{\_kvunknown}} +\_def\_kvunknown{???} + +\public \readkv \kv ; + +\_endcode + +User or macro programmer can define macros with options in key=value format. +It means a comma separated list of equations key=value. First, we give an +example. + +Suppose that you want to define a macro `\myframe` with options: color of +rules, color of text inside the frame, rule-width, space between text and +rules. You want to use this macro as: + +\begtt +\myframe [margins=5pt,rule-width=2pt,frame-color=\Red,text-color=\Blue] {text1} +or +\myframe [frame-color=\Blue] {text2} % other parameters are default +\endtt +% +You can define `\myframe` as follows: + +\begtt +\def\myframedefaults{% defaults: + frame-color=\Black, % color of frame rules + text-color=\Black, % color ot text nside the frame + rule-width=0.4pt, % width of rules used in the frame + margins=2pt, % space between text inside and rules. +} +\optdef\myframe [] #1{\bgroup + \ea\addto\ea\myframedefaults\ea{\ea,\the\opt}% + \readkv\myframedefaults + \rulewidth=\kv{rule-width} + \hhkern=\kv{margins}\vvkern=\kv{margins}\relax + \kv{frame-color}\frame{\kv{text-color}\strut #1}% + \egroup} +\endtt +% +We recommend to use \^`\optdef` for defining macros with optional parameters +written in `[]`. Then the optional parameters are saved in the \^`\opt` tokens +register. First: we append the \^`\opt` (actual optional parameters) to +`\myframedefault` by \^`\addto` macro. +Lua\TeX/ primitive. Second: we read the parameters by +\^`\readkv{<pramaters list>}` macro. +Third: the values can be used by expandable \^`\kv{<key>}` macro. +The \^`\kv{<key>}` returns `???` if such key is not declared. + +You can use keys without values in the parameters list too, but with +additional care. For example, suppose `draft` option without parameter. +If user write `\myframe [..., draft, ...]{text}` then `\myframe` should behave differently. +We have to add `DRAFTv=0,` in `\myframedefault` macro,. +Moreover, `\myframe` macro must include preprocessing of `\myframedefault` using +\^`\replstring` which replaces the occurence of `draft` by `DRAFTv=1`. +\begtt +\optdef\myframe [] #1{... + \ea\addto\ea\myframedefaults\ea{\the\opt}% + \replstring\myframedefaults{draft}{DRAFTv=1}% + \readkv\myframedefaults + ... + \ifnum\kv{DRAFTv}=1 draft mode\else normal mode\fi + ...} +\endtt diff --git a/Master/texmf-dist/tex/luatex/optex/base/languages.opm b/Master/texmf-dist/tex/luatex/optex/base/languages.opm index 9fa480d96af..eea821f6a63 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/languages.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/languages.opm @@ -1,6 +1,6 @@ %% This is part of OpTeX project, see http://petr.olsak.net/optex -\_codedecl \_mtext {Languages <2020-04-29>} % preloaded in format +\_codedecl \_mtext {Languages <2020-12-05>} % preloaded in format \_doc ----------------------------- Only four words are generated by \OpTeX/ macros: \"Chapter", @@ -146,7 +146,49 @@ \_public \quoteschars \activequotes \enquotes \csquotes \skquotes \frquotes \plquotes \esquotes \grquotes \ruquotes \itquotes \dequotes ; + \_doc ----------------------------- + Bibliography references generated by \^`\usebib` uses more + language-dependent phrases. They are declared here. We don't want to save + all these phrases into format, so the trick with {`\_endinput`} + is used here. When \^`\usebib` is processed then following part of the file + `languages.opm` is read again. + + Only phrases of few languages are declared here now. If you want to declare + phrases of your language, please create an \"issue" or a \"request" at + \url{https://github.com/olsak/OpTeX} or send me email with new + phrarses for your language (or language you know:). I am ready to put them here. + Temporarily, you can put your definitions into `\bibtexhook` token list. + \_cod ----------------------------- + +\_endinput % don't save these \def's to the format + +\_def\_langb#1 #2#3#4#5#6#7#8#9{\_def\_mbib##1##2{\_sdef{_mt:bib.##2:#1}{##1}}% + \_mbib{#2}{and}\_mbib{#3}{etal}\_mbib{#4}{edition}\_mbib{#5}{citedate}\_mbib{#6}{volume}% + \_mbib{#7}{number}\_mbib{#8}{prepages}\_mbib{#9}{postpages}\_langbA} +\_def\_langbA#1#2#3#4#5#6#7{\_mbib{#1}{editor}\_mbib{#2}{editors}\_mbib{#3}{available}% + \_mbib{#4}{availablealso}\_mbib{#5}{bachthesis}\_mbib{#6}{masthesis}\_mbib{#7}{phdthesis}} + +\_langb en {, and } { et al.} { ed.} {cit.~} {Vol.~} {No.~} {pp.~} {~p.} {,~ed.} {,~eds.} + {Available from } {Available also from } + {Bachelor's Thesis} {Master's Thesis} {Ph.D. Thesis} +%------------------------------------------------------------------------------------------ +\_langb cs { a } { a~kol.} { vyd.} {vid.~} {ročník~} {č.~} {s.~} {~s.} {,~editor} {,~editoři} + {Dostupné na } {Dostupné též na } + {Bakalářská práce} {Diplomová práce} {Disertační práce} +\_langb sk { a } { a~kol.} { vyd.} {vid.~} {ročník~} {č.~} {s.~} {~s.} {,~editor} {,~editoři} + {Dostupné na } {Dostupné tiež na } + {Bakalárska práca} {Diplomová práca} {Dizertačná práca} + +% \_<lang>dateformat year/month/day\relax, for example: \_csdateformat 2020/05/21\relax +% This is used in iso690 bib style when the the field "citedate" is used. + +\_def\_endateformat #1/#2/#3\relax{#1-#2-#3} +% \_csdateformat 2020/05/21\relax -> \hbox{21. 5. 2020} +\_def\_csdateformat #1/#2/#3\relax{\hbox{\_tmpnum=#3 \_the\_tmpnum. \_tmpnum=#2 \_the\_tmpnum. #1}} +\_let\_skdateformat =\_csdateformat + \_endcode % ------------------------------------- +2020-12-05 bib phrases moved here 2020-04-29 Obrazek -> Abbildung: bug fixed 2020-03-15 introduced diff --git a/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm b/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm index c7e9b8ef4a3..b6277e8abd6 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/makeindex.opm @@ -410,7 +410,7 @@ there is first occurrence of the <word>. The list of pages where `<word>` occurs, is the value of the macro `\,<word>`, so the `<gpageno>:<iitype>` is appended to this list. - Moreower, we need a mapping from <gpageno> to `<pageno>`, because we print + Moreover, we need a mapping from <gpageno> to `<pageno>`, because we print `<pageno>` in the index, but hyperlinks are implemented by `<gpageno>`. So, the macro `\_pgi:<gpageno>` is defined as `<pageno>`. \_cod ----------------------------- diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm index c6b22f247b7..7cb7532e739 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm @@ -23,7 +23,7 @@ You can ask by \`\_ifmathsb` if this feature is activated or deactivated. By default, it is activated in the `\everyjob`, see section~\ref[init]. Note, that the `\everyjob` is processed after the first line of the document is - read, so the \^`\matsbon` is activated from second line of the document. + read, so the \^`\mathsbon` is activated from second line of the document. \_cod ----------------------------- \catcode`\_ = 8 \let\sb = _ @@ -433,7 +433,7 @@ \_protected\_def\_ldots{\_mathinner{\_ldotp\_ldotp\_ldotp}} \_protected\_def\_cdots{\_mathinner{\_cdotp\_cdotp\_cdotp}} -\_protected\_def\_vdots{\_vbox{\_baselineskip=.4em \_lineskiplimit=0pt +\_protected\_def\_vdots{\_vbox{\_baselineskip=.4em \_lineskiplimit=\_zo \_kern.6em \_hbox{.}\_hbox{.}\_hbox{.}}} \_protected\_def\_ddots{\_mathinner{% \_mkern1mu\_raise.7em\_vbox{\_kern.7em\_hbox{.}}\_mkern2mu @@ -474,7 +474,7 @@ The last four are redefined when Unicode math is loaded. \_cod ----------------------------- -\_def\_math{\_mathsurround0pt } +\_def\_math{\_mathsurround\_zo} \_protected\_def\_skew #1#2#3{{\_muskip0=#1mu\_divide\_muskip0=by2 \_mkern\_muskip0 #2{\_mkern-\_muskip0{#3}\_mkern\_muskip0}\_mkern-\_muskip0}{}} \_protected\_def\_overrightarrow #1{\_vbox{\_math\_ialign{##\_crcr @@ -551,14 +551,14 @@ \_def\_mathphant#1#2{\_setbox0=\_hbox{$\_math#1{#2}$}\_finphant} \_def\_finphant{\_setbox2=\_null \_ifvp \_ht2=\_ht0 \_dp2=\_dp0 \_fi - \_ifhp \_wd2=\_wd0 \_fi \_box2 } + \_ifhp \_wd2=\_wd0 \_fi \_hbox{\_box2}} \_def\_mathstrut{\_vphantom(} \_protected\_def\_smash{\_relax % \_relax, in case this comes first in \halign \_ifmmode\_def\_next{\_mathpalette\_mathsmash}\_else\_let\_next\_makesmash \_fi\_next} \_def\_makesmash#1{\_setbox0=\_hbox{#1}\_finsmash} \_def\_mathsmash#1#2{\_setbox0=\_hbox{$\_math#1{#2}$}\_finsmash} -\_def\_finsmash{\_ht0=0pt \_dp0=0pt \_box0 } +\_def\_finsmash{\_ht0=\_zo \_dp0=\_zo \_hbox{\_box0}} \_public \mathpalette \vphantom \hphantom \phantom \mathstrut \smash ; \_doc ----------------------------- @@ -575,7 +575,7 @@ \_def\_rlhp#1{\_vcenter{\_math\_hbox{\_ooalign{\_raise.2em \_hbox{$#1\_rightharpoonup$}\_crcr $#1\_leftharpoondown$}}}} -\_protected\_def\_buildrel#1\over#2{\_mathrel{\_mathop{\_kern0pt #2}\_limits^{#1}}} +\_protected\_def\_buildrel#1\over#2{\_mathrel{\_mathop{\_kern\_zo #2}\_limits^{#1}}} \_protected\_def\_doteq{\_buildrel\_textstyle.\over=} \_private \in \sim ; \_public \cong \notin \rightleftharpoons \buildrel \doteq ; @@ -1036,6 +1036,7 @@ \_endcode %--------------------------------------------------- +2020=12-17 \box0->\hbox{\box0} in \_finphant and \_finsmash, see https://tex.stackexchange.com/questions/574997/ 2020-06-14 \borermatrix, \cases corrected 2020-06-13 \adots introduced, \matrix smaller in T mode too. 2020-06-03 \notin corrected diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm b/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm index 88b9cebe110..01595975aba 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/math-unicode.opm @@ -31,7 +31,7 @@ \_let\_normalmath = \_normalunimath \_let\_boldmath = \_boldunimath \_normalmath \_wterm {MATH-FONT: "#1" -- unicode math prepared.}% - \_opinput {unimath-codes.opm}% + \_ifx\_ncharrmA\_undefined \_opinput {unimath-codes.opm}\_fi \_mathloadingfalse \_fi\_fi} @@ -47,7 +47,7 @@ \_def\_loadboldmath#1#2\to #3{% \_def\_tmp{#3}\_ifx\_unimathfont\_tmp % do work only if #3 is loaded as normal Math - \_isfont"#1"\_iffalse + \_isfont{#1}\_iffalse \_opwarning{Bold-Math font "#1" not found, skipped...} \_else \_def\_unimathboldfont{#1}% diff --git a/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm index fc33596bc09..e31f43e065d 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm @@ -6,7 +6,7 @@ We define \`\opinput` `{<file name>}` macro which does `\input {<file name>}` but the catcodes are set to normal catcodes (like \OpTeX/ initializes them) and the catcodes setting are returned back to - the current values when the file is read. You can use `\optinput` + the current values when the file is read. You can use `\opinput` in any situation inside the document and you will be sure that the file is read correctly with correct catcode settings. @@ -17,13 +17,22 @@ The \`\setctable` `<catcode table>` pushes current catcode table to the stack and activates catcodes from the `<catcode table>`. The \`\restorectable` returns to the saved catcodes - from the catcode table stack. So, the `\opinput` macro can be implemented simply: + from the catcode table stack. + + The `\opinput` works inside catcode table stack. It reads `\optexcatcodes` + table and stores it to \`\_tmpcatcodes` table. + This table is actually used during `\input` (maybe catcodes are + changed here). Finally, `\_restoretable` pops the stacks and returns + to the catcodes used before `\opinput` is run. \_cod ----------------------------- -\_def\_opinput #1{\_setctable\_optexcatcodes \_input {#1}\_relax\_restorectable} +\_def\_opinput #1{\_setctable\_optexcatcodes + \_savecatcodetable\_tmpcatcodes \_catcodetable\_tmpcatcodes + \_input {#1}\_relax\_restorectable} \_newcatcodetable \_optexcatcodes \_newcatcodetable \_plaintexcatcodes +\_newcatcodetable \_tmpcatcodes \_public \optexcatcodes \plaintexcatcodes \opinput ; diff --git a/Master/texmf-dist/tex/luatex/optex/base/optex.ini b/Master/texmf-dist/tex/luatex/optex/base/optex.ini index 7702883e3d5..96744b8e1cf 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/optex.ini +++ b/Master/texmf-dist/tex/luatex/optex/base/optex.ini @@ -21,7 +21,7 @@ % OpTeX version -\def\optexversion{Beta 0.17 Nov.2020} +\def\optexversion{Beta 0.18 Dec.2020} \def\fmtname{OpTeX} % Engine testing: @@ -52,23 +52,24 @@ \input if-macros.opm % special \if-macros, \is-macros and loops \input parameters.opm % parameters setting \input more-macros.opm % OpTeX useful macros (todo: doc) -\input plain-macros.opm % plainTeX macros (todo:doc) +\input keyval.opm % key=value dictionaries +\input plain-macros.opm % plainTeX macros \input fonts-preload.opm % preloaded Latin Modern fonts -\input fonts-resize.opm % font resizing (low-level macros) (todo: texdoc) -\input fonts-select.opm % font selection system (todo: texdoc) -\input math-preload.opm % math fams CM + AMS preloaded (todo: doc) -\input math-macros.opm % basic macros for math plus mathchardefs (todo: x) -\input math-unicode.opm % macros for loading UnicodeMath fonts (todo: x) -\input fonts-opmac.opm % font managing macros from OPmac (todo: doc) +\input fonts-resize.opm % font resizing (low-level macros) +\input fonts-select.opm % font selection system +\input math-preload.opm % math fams CM + AMS preloaded +\input math-macros.opm % basic macros for math plus mathchardefs +\input math-unicode.opm % macros for loading UnicodeMath fonts +\input fonts-opmac.opm % font managing macros from OPmac \input output.opm % output routine -\input margins.opm % macros for margins setting (todo: texdoc) +\input margins.opm % macros for margins setting \input colors.opm % colors \input ref-file.opm % ref file \input references.opm % references \input hyperlinks.opm % hyperlinks \input maketoc.opm % maketoc -\input outlines.opm % PDF outlines (todo: x) -\input pdfuni-string.opm % PDFunicode strings for outlines (todo: x) +\input outlines.opm % PDF outlines +\input pdfuni-string.opm % PDFunicode strings for outlines \input sections.opm % titles, chapters, sections \input lists.opm % lists, \begitems, \enditems \input verbatim.opm % verbatim @@ -82,7 +83,7 @@ \input styles.opm % styles \report, \letter \input logos.opm % standard logos \input uni-lcuc.opm % Setting lccodes and uccodes for Unicode characters -\input hyphen-lan.opm % initialization of hyphenation patterns (todo: doc) +\input hyphen-lan.opm % initialization of hyphenation patterns \input languages.opm % languages \input others.opm % miscenaleous diff --git a/Master/texmf-dist/tex/luatex/optex/base/output.opm b/Master/texmf-dist/tex/luatex/optex/base/output.opm index c113eae1036..b21144c3008 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/output.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/output.opm @@ -75,7 +75,7 @@ } \_def \_ensureblack #1{#1} % will be re-defined by color macros \_let \_openfnotestack = \_relax % will be re-defined by color macros -\_def \_backgroundbox #1{\_moveleft\_hoffset\_vbox to0pt{\_kern-\_voffset #1\_vss}} +\_def \_backgroundbox #1{\_moveleft\_hoffset\_vbox to\_zo{\_kern-\_voffset #1\_vss}} \_doc ----------------------------- \`\_makeheadline` creates `\vbox to0pt` with its contents (the \^`\headline`) @@ -83,9 +83,9 @@ \_cod ----------------------------- \_def\_makeheadline {\_istoksempty \_headline \_iffalse - \_vbox to0pt{\_vss - \_baselineskip=\_headlinedist \_lineskiplimit=-\_maxdimen - \_hbox to\_xhsize{\_the\_headline}\_hbox{}}\_nointerlineskip + \_vbox to\_zo{\_vss + \_baselineskip=\_headlinedist \_lineskiplimit=-\_maxdimen + \_hbox to\_xhsize{\_the\_headline}\_hbox{}}\_nointerlineskip \_fi } @@ -155,7 +155,7 @@ \_def\_vfootnote{\_opfootnote{}} \_def \_opfootnote #1#2{\_insert\_footins\_bgroup \_interlinepenalty=\_interfootnotelinepenalty - \_leftskip=0pt \_rightskip=0pt \_spaceskip=0pt \_xspaceskip=0pt \_relax + \_leftskip=\_zo \_rightskip=\_zo \_spaceskip=\_zo \_xspaceskip=\_zo \_relax \_let\_colorstackcnt=\_fnotestack % special color stack for footnotes #1\_relax % local settings used by \fnote macro \_splittopskip=\_ht\_strutbox % top baseline for broken footnotes diff --git a/Master/texmf-dist/tex/luatex/optex/base/parameters.opm b/Master/texmf-dist/tex/luatex/optex/base/parameters.opm index f9fc3ee1501..75087be9503 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/parameters.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/parameters.opm @@ -488,7 +488,7 @@ `\globaldefs=1` prefix. The `\nextpages` is reset to empty after processing. Example of usage: \begtt - \headline={} \nexptages={\headline={\fixedrm \firstmark \hfil}} + \headline={} \nexptages={\headline={\rmfixed \firstmark \hfil}} \endtt This example sets current page with empty headline, but next pages have non-empty headlines. @@ -511,9 +511,9 @@ \_public \pgbackground ; \_doc ----------------------------- - The parameters used in `\inoval` and `\incircle` macros. - The default values (documented in user manual) are set in the macros. - The user can re-set these values using tokens \`\ovalparams`, \`\circleparams`. + The parameters used in \^`\inoval` and \^`\incircle` macros + can be re-set by \`\ovalparams`, \`\circleparams` tokens lists. + The default values (documented in the user manual) are set in the macros. \_cod ----------------------------- \_newtoks \_ovalparams diff --git a/Master/texmf-dist/tex/luatex/optex/base/plain-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/plain-macros.opm index c7ecdb75b50..7d8815f2470 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/plain-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/plain-macros.opm @@ -108,7 +108,7 @@ \_protected\_def \_supereject {\_par\_penalty-20000 } \_protected\_def \_dosupereject {\_ifnum \_insertpenalties>0 % something is being held over \_line{}\_kern-\_topskip \_nobreak \_vfill \_supereject \_fi} -\_def \_removelastskip {\_ifdim\_lastskip=0pt \_else \_vskip-\_lastskip \_fi} +\_def \_removelastskip {\_ifdim\_lastskip=\_zo \_else \_vskip-\_lastskip \_fi} \_def \_smallbreak {\_par\_ifdim\_lastskip<\_smallskipamount \_removelastskip \_penalty-50 \_smallskip \_fi} \_def \_medbreak {\_par\_ifdim\_lastskip<\_medskipamount @@ -129,9 +129,9 @@ \_def \_leftline #1{\_line{#1\_hss}} \_def \_rightline #1{\_line{\_hss#1}} \_def \_centerline #1{\_line{\_hss#1\_hss}} -\_def \_rlap #1{\_hbox to0pt{#1\_hss}} -\_def \_llap #1{\_hbox to0pt{\_hss#1}} -\_def\_underbar #1{$\_setbox0=\_hbox{#1}\_dp0=0pt \_math \_underline{\_box0}$} +\_def \_rlap #1{\_hbox to\_zo{#1\_hss}} +\_def \_llap #1{\_hbox to\_zo{\_hss#1}} +\_def\_underbar #1{$\_setbox0=\_hbox{#1}\_dp0=\_zo \_math \_underline{\_box0}$} \_public \line \leftline \rightline \centerline \rlap \llap \underbar ; @@ -225,9 +225,9 @@ are defined for backward compatibility. \_cod ----------------------------- -\_def \_oalign #1{\_leavevmode\_vtop{\_baselineskip=0pt \_lineskip=.25ex +\_def \_oalign #1{\_leavevmode\_vtop{\_baselineskip=\_zo \_lineskip=.25ex \_ialign{##\_crcr#1\_crcr}}} -\_def \_oalignA {\_lineskiplimit=0pt \_oalign} +\_def \_oalignA {\_lineskiplimit=\_zo \_oalign} \_def \_ooalign {\_lineskiplimit=-\_maxdimen \_oalign} % chars over each other \_def \_shiftx #1{\_dimen0=#1\_kern\_ea\_ignorept \_the\_fontdimen1\_font \_dimen0 } % kern by #1 times the current slant @@ -314,11 +314,11 @@ \_mathchardef \_braceld="37A \_mathchardef \_bracerd="37B \_mathchardef \_bracelu="37C \_mathchardef \_braceru="37D \_def \_downbracefill {$\_math \_setbox0=\_hbox{$\_braceld$}% - \_braceld \_leaders\_vrule height\_ht0 depth0pt \_hfill \_braceru - \_bracelu \_leaders\_vrule height\_ht0 depth0pt \_hfill \_bracerd$} + \_braceld \_leaders\_vrule height\_ht0 depth\_zo \_hfill \_braceru + \_bracelu \_leaders\_vrule height\_ht0 depth\_zo \_hfill \_bracerd$} \_def \_upbracefill {$\_math \_setbox0=\_hbox{$\_braceld$}% - \_bracelu \_leaders\_vrule height\_ht0 depth0pt \_hfill \_bracerd - \_braceld \_leaders\_vrule height\_ht0 depth0pt \_hfill \_braceru$} + \_bracelu \_leaders\_vrule height\_ht0 depth\_zo \_hfill \_bracerd + \_braceld \_leaders\_vrule height\_ht0 depth\_zo \_hfill \_braceru$} \_public \hrulefill \dotfill \rightarrowfill \leftarrowfill \downbracefill \upbracefill ; diff --git a/Master/texmf-dist/tex/luatex/optex/base/references.opm b/Master/texmf-dist/tex/luatex/optex/base/references.opm index e00a0a2fda0..36408797033 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/references.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/references.opm @@ -80,7 +80,7 @@ \_def\_printlabel#1{} \_def\_showlabels {% - \_def\_printlabel##1{\_vbox to0pt{\_vss\_llap{\_labelfont[##1]}\_kern1.7ex}}% + \_def\_printlabel##1{\_vbox to\_zo{\_vss\_llap{\_labelfont[##1]}\_kern1.7ex}}% \_fontdef\_labelfont{\_setfontsize{at10pt}\setfontcolor{blue}\_tt} } \_public \showlabels ; diff --git a/Master/texmf-dist/tex/luatex/optex/base/sections.opm b/Master/texmf-dist/tex/luatex/optex/base/sections.opm index 20f3f063dd3..0bfcb8e74e9 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/sections.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/sections.opm @@ -241,9 +241,9 @@ \_newskip \_savedtitleskip \_newskip \_savedlastskip \_def\_abovetitle #1#2{\_savedlastskip=\_lastskip % <whatever-skip> - \_ifdim\_lastskip>0pt \_vskip-\_lastskip \_fi + \_ifdim\_lastskip>\_zo \_vskip-\_lastskip \_fi \_ifnum\_lastpenalty=11333 \_vskip-\_savedtitleskip \_else #1\_fi - \_ifdim\_savedlastskip>0pt \_setbox0=\_vbox{#2\_global\_tmpdim=\_lastskip}% + \_ifdim\_savedlastskip>\_zo \_setbox0=\_vbox{#2\_global\_tmpdim=\_lastskip}% \_else \_tmpdim=\_maxdimen \_fi \_ifdim\_savedlastskip>\_tmpdim \vskip\_savedlastskip \_else #2\_fi } diff --git a/Master/texmf-dist/tex/luatex/optex/base/slides.opm b/Master/texmf-dist/tex/luatex/optex/base/slides.opm index 835bfa72a90..dff62e59319 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/slides.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/slides.opm @@ -12,11 +12,12 @@ \_margins/1 a5l (14,14,10,3)mm % landscape A5 format \_def\_wideformat{\_margins/1 (263,148) (16,16,10,3)mm } % 16:9 format -\_fontfam[Heros] +\_ifx\_fontnamegen\_undefined \_fontfam[Heros] + \_let\_ttfont=\_undefined \_famvardef\_ttfont{\_setfontsize{mag1.15}\_tt} +\_fi \_typosize[16/19] -\_famvardef\_ttfont{\_setfontsize{mag1.15}\_tt} \_def\_urlfont{} -\_everytt={\_typosize[13/16] \advance\hsize by10mm} +\_everytt={\_typosize[13/16] \_advance\_hsize by10mm} \_fontdef\_fixbf{\_bf} \_nopagenumbers @@ -93,10 +94,23 @@ \_def\_pg#1{\_cs{_spg:#1}} \_sdef{_spg:;}{\_vfil\_break \_lfnotenumreset} -\_sdef{_spg:.}{\_end} +\_sdef{_spg:.}{\_endslides} \_sdef{_spg:+}{\_par} \_doc ----------------------------- + The \`\_endslides` is defined as `\_end` primitive, but + slide-designer can redefine it. For example, + \ulink[http://petr.olsak.net/optex/optex-tricks.html\#slider]{OpTeX trick 0029} + shows how to define a clickable navigation to the pages and how to check + the data integrity at the end of document using `\_endslides`. + + The `\bye` macro is re-defined here as an alternative to `\pg.`. + \_cod ----------------------------- + +\_def\_endslides{\_end} +\_def\bye{\_pg.} + + \_doc ----------------------------- We need no numbers and no table of contents when using slides. The \^`\_printsec` macro is redefined in order the title is centered and typeset in `\Blue`. @@ -138,12 +152,13 @@ \_def\_slideshowactive{% \_sdef{_spg:;}{\_closepage \_global\_slidelayer=1 \_resetpage \_openslide} - \_sdef{_spg:.}{\_closepage \_end} + \_sdef{_spg:.}{\_closepage \_endslides} \_sdef{_spg:+}{\_closepage \_incr\_slidelayer \_decr\_pageno \_openslide} - \_def\bye {\_closepage \_byehook \_end} \_let\_layers=\_layersactive - \_def\_destbox[##1:##2]{\_isequal{##1}{ref}\_iffalse \_destboxori[##1:##2]\_fi}% + \_destboxslide % to prevent hyperlink-dests duplication } +\_def\_destboxslide{\_def\_destbox[##1:##2]{\_isequal{##1}{ref}\_iffalse \_destboxori[##1:##2]\_fi}} + \_def\_openslide{\_setbox\_slidepage=\_vbox\_bgroup \_setilevel \_ifvoid\_slidepage \_else \_unvbox\_slidepage \_nointerlineskip\_lastbox \_fi} \_def\_setilevel{\_loop \_decr\_gilevel \_ifnum\_gilevel<0 \_else \_begitems \_repeat} @@ -187,7 +202,7 @@ \_global\_maxlayers=#1 \_setbox\_slidepageB=\_vbox\_bgroup } -\_public \subtit \slideshow \pg \wideformat \use \pshow ; +\_public \subtit \slideshow \pg \wideformat \use \pshow \layernum ; \_doc ----------------------------- Default \`\layers` `<num>` macro (when \^`\slideshow` is not activated) is simple. diff --git a/Master/texmf-dist/tex/luatex/optex/base/styles.opm b/Master/texmf-dist/tex/luatex/optex/base/styles.opm index a51f4e998d3..c9ee3869592 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/styles.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/styles.opm @@ -60,7 +60,8 @@ \_cod ----------------------------- \_def\_slides{\_par - \_input slides.opm + \_opinput{slides.opm} + \_adef*{\_startitem} } \_public \slides ; diff --git a/Master/texmf-dist/tex/luatex/optex/base/table.opm b/Master/texmf-dist/tex/luatex/optex/base/table.opm index 43f294eb4c9..d129ba5a028 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/table.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/table.opm @@ -44,7 +44,7 @@ \_the\_thistable \_global\_thistable={}% \_ea\_ifx\_ea^\_the\_tabstrut^\_setbox\_tstrutbox=\_null \_else \_setbox\_tstrutbox=\_hbox{\_the\_tabstrut}% - \_setbox\_tstrutbox=\_hbox{\_vrule width0pt + \_setbox\_tstrutbox=\_hbox{\_vrule width\_zo height\_dimexpr\_ht\_tstrutbox+\_tablinespace depth\_dimexpr\_dp\_tstrutbox+\_tablinespace}% \_offinterlineskip @@ -207,7 +207,7 @@ \_def\_tabdeclarer{\_the\_tabiteml\_hfil##\_unsskip\_the\_tabitemr} \_def\_paramtabdeclarep#1{\_the\_tabiteml \_vtop{\_hsize=#1\_relax \_baselineskip=\_normalbaselineskip - \_lineskiplimit=0pt \_noindent##\_unsskip + \_lineskiplimit=\_zo \_noindent##\_unsskip \_ifvmode\_vskip\_dp\_tstrutbox \_else\_lower\_dp\_tstrutbox\_hbox{}\_fi}\_the\_tabitemr} \_doc ----------------------------- @@ -219,7 +219,7 @@ `\hideskip` macro: `&\hideskip text\hideskip&`. \_cod ----------------------------- -\_def\_unsskip{\_ifmmode\_else\_ifdim\_lastskip>0pt \_unskip\_fi\_fi} +\_def\_unsskip{\_ifmmode\_else\_ifdim\_lastskip>\_zo \_unskip\_fi\_fi} \_doc ----------------------------- The \`\fL`, \`\fR`, \`\fC` and \`\fX` macros only does a special parameters settings @@ -247,7 +247,7 @@ \_def\_crl{\_crcr\_noalign{\_hrule}} \_def\_crll{\_crcr\_noalign{\_hrule\_kern\_hhkern\_hrule}} -\_def\_zerotabrule {\_noalign{\_hrule height0pt width0pt depth0pt}} +\_def\_zerotabrule {\_noalign{\_hrule height\_zo width\_zo depth\_zo}} \_def\_crli{\_crcr \_zerotabrule \_omit \_gdef\_dditem{\_omit\_tablinefil}\_gdef\_vvitem{\_kern\_vvkern\_vrule}\_gdef\_vvitemA{\_vrule}% @@ -300,7 +300,7 @@ then use braces. \_cod ----------------------------- -\_def\_vspan#1#2{\_vtop to 0pt{\_hbox{\_lower \_dimexpr +\_def\_vspan#1#2{\_vtop to\_zo{\_hbox{\_lower \_dimexpr #1\_dimexpr(\_ht\_tstrutbox+\_dp\_tstrutbox)/2\_relax -\_dimexpr(\_ht\_tstrutbox+\_dp\_tstrutbox)/2\_relax \_hbox{#2}}\_vss}} \_public \vspan ; @@ -365,8 +365,9 @@ The `<declaration>` part of `\table{<declaration>}{<data>}` includes column declarators (letters) and other material: the `|` or `(<cmd>)`. -The boundaries of columns are just before each column declarator -(with exception of the first one) if the boundary declarator `:` is not used. +If the boundary declarator `:` is not used then +the boundaries of columns are just before each column declarator +with exception of the first one. For example, the declaration `{|c||c(xx)(yy)c}` should be written more exactly using the boundary declarator `:` by `{|c||:c(xx)(yy):c}`. But you can set these boundaries to @@ -374,7 +375,7 @@ another places using the boundary declarator~`:` explicitly, for example `{|c:||c(xx):(yy)c}`. The boundary declarator `:` can be used only once between each two column declarators. -Each table item have its own group. The `(<cmd>)` are parts of the given +Each table item has its own group. The `(<cmd>)` are parts of the given table item (depending on the boundary declarator position). If you want to apply a special setting for given column, you can do this by `(<setting>)` followed by column declarator. But if such column is not diff --git a/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm b/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm index 8b11e4e2927..58e4fed8c64 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/unimath-codes.opm @@ -384,7 +384,7 @@ \secc A few observations -You can combine more fonts in math, if you register them to another +{\bf 1.} You can combine more fonts in math, if you register them to another math families (5, 6, 7, etc.) in the \^`\normalmath` macro. The default value of \^`\normalmath` shows a combination of base Unicode Math @@ -392,8 +392,9 @@ font with 8bit Math font at family 4. See definition of the `\script` macro wher `\fam4` is used. Of course, we need to set `\rmvariables` too, because 8bit font accepts only codes less than 255. -XITSmath-bold needs correction: the norm symbol ||x|| is missing here. So, you -can define: +\medskip\noindent{\bf 2.} +XITSmath-bold needs correction: the norm symbol $\|x\|$ is missing here. +So, you can define: \begtt \def\_boldmath{% @@ -405,6 +406,10 @@ can define: } \endtt +\noindent{\bf 3.} You can combine more Unicode math fonts in single formula using +\ulink[http://petr.olsak.net/optex/optex-tricks.html#addumathfont]{\OpTeX/ trick 0030}. + + \_endinput History: diff --git a/Master/texmf-dist/tex/luatex/optex/base/usebib.opm b/Master/texmf-dist/tex/luatex/optex/base/usebib.opm index 7f772b09d2b..e278774c97a 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/usebib.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/usebib.opm @@ -32,8 +32,14 @@ \_ifx\_bibpart\_undefined \_def\_bibpart{none}\_fi \_def\_optexbibstyle{#2}% \_setctable\_optexcatcodes + \_ea \_skiptoendinput \_input languages.opm \_input bib-#2.opm \_the \_bibtexhook + \_ifcsname _mt:bib.and:\_cs{_lan:\_the\_language}\_endcsname \_else + \_opwarning{\_string\usebib: No phrases for language + "\_cs{_lan:\_the\_language}" (using "en")}% + \_language=0 \_chardef\_documentlanguage=0 + \_fi \_let\_citeI=\_relax \_xdef\_citelist{\_citelist\_citelistB}% \_global\_let\_addcitelist=\_writeXcite \_def\_tmp##1[*]##2\_relax{\_def\_tmp{##2}}\_expandafter\_tmp\_citelist[*]\_relax @@ -50,6 +56,7 @@ \_egroup \_fi } +\_long\_def\_skiptoendinput#1\_endinput{} \_def\_readbibentry#1#{\_readbibentryA} \_def\_readbibentryA#1{\_readbibentryB#1,,\_relax!.} \_def\_readbibentryB#1#2,#3\_relax!.{\_addto\_citelist{\_citeI[#1#2]}} @@ -64,7 +71,7 @@ \_unless\_ifx\lb@temp\lb@eoe \lb@ifcs{#1}{fields}% {}% - {\_opwarning{\_string\_usebib: entry [#1] isn't found in .bib file(s)}}% + {\_opwarning{\_string\usebib: entry [#1] isn't found in .bib}}% \_ea\lb@checkmissingentries \_fi } @@ -183,23 +190,20 @@ } \_doc ----------------------------- - Various macros + multilinguas. + Various macros + multilinguas. Note that \`\_nobibwarnlist` is used in + \`\_bibwarning` and it is set by \^`\nobibwarning` macro. \_cod ----------------------------- -\_def\_bibwarning{\_opwarning{Missing field "\_bibfieldname" in [\EntryKey]}} - -\_def\_mtdef#1#2#3#4{\_sdef{_mt:#1:en}{#2} \_sdef{_mt:#1:cs}{#3} - \_if$#4$\_slet{_mt:#1:sk}{_mt:#1:cs} - \_else \_sdef{_mt:#1:sk}{#4} - \_fi -} +\_def\_bibwarning{% + \_ea\_isinlist \_ea\_nobibwarnlist\_ea{\_ea,\EntryKey,}\_iffalse + \_opwarning{Missing field "\_bibfieldname" in [\EntryKey]}\_fi} \_endcode %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The file `usebib.opm` implements the command -`\usebib/<sorttype> (<style>) <bibfiles>` +\~`\usebib/<sorttype> (<style>) <bibfiles>` where `<sorttype>` is one letter `c` (references ordered by citation order in the text) or `s` (references ordered by key in the style file), `<style>` is the part of the name `bib-<style>.opm` of the style file @@ -211,89 +215,136 @@ comma without space. Example: \endtt This command reads the `<bibfiles>` directly and creates the list of -bibliographics references (only those declared by by `\cite[]` or -`\nocite[]` in the text). The formatting of such references is defined in the style -file. The usage is mentioned in user documentation too. +bibliographics references (only those declared by by \~`\cite[]` or +\~`\nocite[]` in the text). The formatting of such references is defined in the style +file. The principle \"first entry wins" is used. Suppose `\usebib/s (simple) local,global`. If an entry with the same label is declared in `local.bib` and in `global.bib` too then the first wins. So, you can set an exceptions in your `local.bib` file for your document. -\seccc Notes for style writers +The `bib-<style>.opm` declares entry types (like `@BOOK`, `@ARTICLE`) and declares +their mandatory and optionals fields (like `author`, `title`). When +mandatory field is missing in an entry in the `.bib` file then warning is printed on the +terminal about it. You can suppress such warnings by command +\^`\nobibwarning`~`[<bib-labels>]`, where <bib-labels> is comma separated list +of labels (without spaces) where missing mandatory fields will be no warned. + +Old `.bib` files may use obscure notation for accents like `{\"o}`. +Recommendation: convert such old files to Unicode encoding. If you are +unable to do this then you can set \^`\bibtexhook={`\^`\oldaccents}`. + +\secc Notes for bib style writers -The `bib-<style>.opm` file must define the commands: +The `.bib` files include records in the format: + +\begtt +@<entry-type>{<label>, + <field-name> = "<field-data>", + <field-name> = "<field-data>", + ...etc +} +\endtt +% +see the file `demo/op-biblist.bib` for a real example. The <entry-types> and +<field-names> are case insensitive. + +Ancient Bib\TeX/ has read such files and has generated files appropriate for +reading by \LaTeX. It has worked with a set of <entry-types>, see the www +page \url{http://en.wikipedia.org/wiki/BibTeX}. The set of entry types +listed on this www page is de facto the Bib\TeX/ standard. The \OpTeX/ bib +style writer must \"declare" all such entry types and more non-standard +entry types can be declared too, if there is a good reason for doing it. The +word \"declare" used in previous sentence means that bib style writer must +define the printing rules for each <entry-type>. +The printing rules for <entry-type> include: which fields will be printed, in +what oder, by what format they will printed on (italic, caps, etc.), +which fields are mandatory, which are optional and which are ingnored in +`.bib` records. + +The style writer can be inspired by two styles alredy done: `bib-simple.opm` +and `bib-iso690.opm`. The second one is documented in detail in +section~\ref[isobib]. + +The printing rules for each <entry-type> must be declared by +`\_sdef{_print:<entry-type>}` in `bib-<style>.opm` file. +The `<entry-type>` have to be lowercase here. \OpTeX/ supports following +macros for more comfortable setting of printing rules: \begitems -* `\_authorname` ... formatting of one name in the authors list. The macro can - use the following data: `\_NameCount` (the number of the currently - processed author name in the list), `0\_namecount` (the total number of the - authors in the list), `\_Lastname`, `\_Firstname`, `\_Von`, `\_Junior` - (the parts of the name). See the documentation of the librarian package - for more info. -* `\_editorname` ... the same as `\_authorname`, but for editors list. -* `_print:<entrytype>` (defined by `\_sdef`) for formatting the entry of `<entrytype>`. - The `<entrytype>` have to be lowercase. This command can use the command: -* `\_bprinta [<fieldname>] {<if defined>} {<if not defined>}`. The part <if defined> - is executed if <fieldname> is declared in .bib file for the entry which is +* \^`\_bprinta` `[<field-name>] {<if defined>} {<if not defined>}`. The part <if defined> + is executed if <field-name> is declared in .bib file for the entry which is currently processed. Else the part <if not defined> is processed. The part <if defined> can include the `*` parameter which is replaced - by the value of the <fieldname>. The part <if not defined> can include - the `\_bibwarning` command if the <fieldname> is mandatory. -* `\_bprintb [<fieldname>] {<if defined>} {<if not defined>}`. The same as + by the value of the <field-name>. +* The part <if not defined> can include + the \^`\_bibwarning` command if the <field-name> is mandatory. +* \^`\_bprintb` `[<field-name>] {<if defined>} {<if not defined>}`. The same as `\_bprinta`, but the `##1` parameter is used instead `*`. Differences: `##1` parameter can be used more than once and can be enclosed in nested - braces. The * parameter can be used at most once and cannot be enclosed + braces. The `*` parameter can be used at most once and cannot be enclosed in braces. Warning: if the `\_bprintb` commands are nested (`\_bprintb` in `\_bprintb`), then you need to write `####1` parameter for internal `\_bprintb`. But if `\_bprinta` commands are nested then the parameter is not duplicated. -* `\_pbprintc \macro {<if non-empty>}`. The <if non-empty> part is executed if - `\macro` is non-empty. The * parameter can be used, it is replaced by +* \^`\_bprintc` `\macro {<if non-empty>}`. The <if non-empty> part is executed if + `\macro` is non-empty. The `*` parameter can be used, it is replaced by the `\macro`. -* `\_bprintv [<field1>,<field2>,...] {<if defined>} {<if not defined>}`. +* \^`\_bprintv` `[<field1>,<field2>,...] {<if defined>} {<if not defined>}`. The part <if defined> is executed if <field1> or <filed2> or ... is defined, else the second part <if not defined> is executed. There is one filed name or the list field names separated by commas. The parts cannot include any parameter. \enditems -% -There are two special fieldnames: `!author` and `!editor`. The processed list of -authors or editors (by repeatedly calling `\_authorname` or `\_editorname`) are -used here instead of raw data. -You can define `_print:BEGIN` and/or `_print:END` which is executed at the begin or -end of each `<entrytype>`. The formatting does not solve the numbering and -paragraph indentation of the entry. This is processed by `\_printbib` macro +There are two special field-names: `!author` and `!editor`. The processed list of +authors or editors are printed here instead of raw data, see the commands +\~`\_authorname` and \~`\_editorname` below. + +The bib style writer can define `_print:BEGIN` and/or `_print:END`. +They are executed at the begin or +end of each `<entry-type>`. The formatting does not solve the numbering and +paragraph indentation of the entry. This is processed by \^`\_printbib` macro used in \OpTeX/ (and may be redefined by the author or document designer). -You can declare `\_bimark={something}` in the `_print:END` macro. This bibmark is -saved to the `.ref` file (created by \OpTeX/) and used in the next \TeX/ run as +The \^`\bibmark={something}` can be declared, for instance in the `_print:END` macro. +Such bibmark is saved to the `.ref` file and used in next \TeX/ run as `\cite` marks when `\nonumcitations` is set. +Moreover, the bib style writer must declare the format of +printing of special fields `author` and `editor`. These fields include a +list of names, each name is precessed individually in a loop. The +\^`\_authorname` or \^`\_editorname` is called for each name in the list. +The bib style writer must define +the \`\_authorname` and \`\_editorname` commands +in order to declare the format of printing each individual name. +The following control sequences can be used in these macros: + +\begitems +* `\_NameCount`: the number of currently processed author in the list +* `\_namecont`: the total number of the authors in the list +* `\_Lastname`, `\_Firstname`, `\_Von`, `\_Junior`: the parts of the name. +\enditems + The whole style file is read in the group during `\usebib` command is executed before typesetting the reference list. Each definition or setting is local here. -If you are using non-standard fieldnames in .bib database and bib. style, -you has to declare them by `\_CreateField {<fieldname>}`. - -You can declare `\_SortingOrder` in the manner documented by librarian package. +The auto-generated phrases (dependent on current language) can be used in +bib style files by `\_mtext{bib.<identifier>}`, where <ident> is an identifier of +the phrase and the phrase itself is defined by +`\_sdef{_mt:bib.<identifier>:<language>}{<phrase>}`. See section~\ref[langphrases] +for more detail. Phrases for <identifiers>: +and, etal, edition, citedate, volume, number, prepages, postpages, editor, +editors, available, availablealso, bachthesis, masthesis, phdthesis +are defined already, see the end of section~\ref[langphrases]. -If your style adds some words or abbreviations you can make them -multilingual by saying `\_mtext{<label>}` instead such word and -`\_mtdef{<label>} {<English>} {<Czech>} {<Slovak>}` declaration. -The right part is printed by current value of the `\language` regiter. -You can add more languages by re-defining the `\_mtdef` command. -See the section \ref[langphrases] for more information. +If you are using non-standard field-names in .bib database and bib style, +you have to declare them by `\_CreateField {<fieldname>}`. -If you are using `\nonumcitations`, then the `\_bibmark` tokens register have to be -prepared in the style file (in `_print:BEGIN`, `_print:END`, in -`\_authorname` etc.) This value will be used in the `\cite[]` places -in the document. - -The example of the style file is in `bib-simple.opm`. +You can declare `\_SortingOrder` in the manner documented by librarian package. -User or author of the `bib.` style can create the hidden field which has a +User or author of the bib style can create the hidden field which has a precedence while sorting names. Example: \begtt diff --git a/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm b/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm index 3930579e15c..028f544f7c2 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/verbatim.opm @@ -193,7 +193,7 @@ \_openin\_vifile={#3}% \_global\_viline=0 \_global\_let\_vifilename=\_tmpa \_ifeof\_vifile - \_opwarning{\_noexpand\verbinput - file "#3" is unable to reading} + \_opwarning{\_string\verbinput: file "#3" unable to read} \_ea\_ea\_ea\_skiptorelax \_fi \_fi diff --git a/Master/texmf-dist/tex/luatex/optex/demo/op-biblist.bib b/Master/texmf-dist/tex/luatex/optex/demo/op-biblist.bib new file mode 100644 index 00000000000..691a02ea0ea --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/demo/op-biblist.bib @@ -0,0 +1,298 @@ +This is an example of .bib file using by OpTeX. +Petr Olsak 2014 +---------------------------------------------------------- +See the section 1.5.3 of OpTeX documentation for more information. + +@BOOK{white, + author = "David J. Whitehouse", + title = "Handbook of surface and nanometrology", + edition = "2nd", + address = "Boca Raton", + publisher = "CRC Press", + year = 2011, + isbn = "978-1-4200-8201-2", + lang = "en", +} +@BOOK{lech, + author = "Richard Lech", + title = "Fundamental principles of engineering nanometrology", + howpublished = "online", + address = "Oxford", + publisher = "Elsevier", + year = 2009, + isbn = "978-0-08-096454-6", + citedate = "2011/08/29", + url = "http://www.sciencedirect.com/science/book/9780080964546", + option = "autrim:1", +} +@BOOK{Cmej, + author = "Světla Čmejrková and František Daneš and Jindra Světlá", + title = "Jak napsat odborný text", + address = "Praha", + publisher = "Leda", + year = 1999, + isbn = "80-85927-69-1", + key = "Czzmejrkova", +} +@BOOK{ tbn, + bibmark = "Ol00", + author = "Petr Olšák", + title = "\TeX{}book naruby", + edition = "2.", + address = "Brno", + publisher = "Konvoj", + year = 2001, + isbn = "80-7302-007-6", + url = "http://math.feld.cvut.cz/olsak/tbn.html", + option = "urlalso", +} +@BOOK{ tst, + author = "Petr Olšák", + title = "Typografický systém \TeX{}", + edition = "2.", + address = "Brno", + publisher = "Konvoj", + year = 2000, + url = "http://math.feld.cvut.cz/olsak/tst.html", + isbn = "80-85615-91-6", +} +@BOOK{ tpp, + author = "Petr Olšák", + title = "\TeX{} pro pragmatiky", + year = "2013", + address = "Brno", + publisher = "CsTUG", + isbn = "978-80-901950-1-1", + option = "titlepost:{\TeX{} -- CSplain -- OPmac}", + howpublished = "online", + url = "http://math.feld.cvut.cz/olsak/tpp.html", +} +@BOOK{texbook, + author = "Donald Ervin Knuth", + title = "The \TeX{}book", + address = "Boston", + publisher = "Addison-Wesley", + year = 1984, + isbn = "02-011-3448-9", +} +@BOOK{ rowling, + author = "Robert Calbraith", + option = "auprint:{\AU\space [pseudonym of J. K. Rowling]}", + title = "The Cuckoo's Calling", + address = "New York", + publisher = "Mulholland Books", + isbn = "0-316-20684-6", + year = 2013, +} +@BOOK{ earle, + author = "Richard Earle", + title = "The art of cause marketing: + how to use advertising to change personal behavior and public policy", + ednote = "Cover and interior design by Monica \upper{Baziuk}", + address = "New York", + publisher = "McGraw-Hill", + year = 2000, + isbn = "0-07-138702-1", + option = "yearprint:{\copyright2000}", +} +@BOOK{ novaci, + author = "Jan Novák and Helena Nováková", + title = "Alergenní rostliny", + address = "Praha", + publisher = "Knižní klub", + year = 2010, + isbn = "80-242-2591-3", +} +@BOOK{ adobe, + author = "Adobe\ creative\ team", + title = "Adobe Flash CS4 Professional: Oficiální výukový kurz", + ednote = "Přeložil Lukáš \upper{Krejčí}", + address = "Brno", + publisher = "Computer Press", + year = 2009, + isbn = "80-251-2334-8", +} +@BOOK{ nierhaus, + author = "Grehard Nierhaus", + title = "Algorithmic Composition: Paradigms of Automated Music Generation", + address = "Wien", + publisher = "Springer", + year = 2009, + isbn = "3-211-77539-6", + url = "http://www.springerlink.com/content/g7h129", + option = "yearprint:{\copyright2009} urlalso", +} +@BOOK{ taschen, + author = "Laszlo Taschen", + title = "Modern architekture A-Z", + ednote = "vol. 1, A-L", + address = "Köln", + publisher = "Tashen", + year = 2010, + isbn = "383-6521-321", +} +@ARTICLE{ opmactug, + author = "Petr Olšák", + title = "OPmac: Macros for Plain \TeX", + journal = "TUGboat", + publisher = "\TeX{} Users Group", + year = 2013, + volume = 34, + number = 1, + pages = "88--96", + issn = "0896-3207", + url = "http://petr.olsak.net/ftp/olsak/bulletin/tb106olsak-csplain.pdf", + option = "urlalso", + lang = "en", +} +@ARTICLE{ optextug, + author = "Petr Olšák", + title = "\OpTeX/ -- A new generation of Plain \TeX/", + journal = "TUGboat", + publisher = "\TeX{} Users Group", + year = 2020, + volume = 41, + number = 3, + pages = "348--354", + issn = "0896-3207", + url = "http://petr.olsak.net/ftp/olsak/bulletin/tb128olsak-optex.pdf", + option = "urlalso", + lang = "en", +} +@THESIS{ mirekB, + author = "Miroslav Olšák", + title = "Kvadratické rovnice na slovech", + school = "Univerzita Karlova v~Praze, fakulta Matematicko-fyzikální", + address = "Praha", + year = 2013, + url = "http://www.olsak.net/mirek/bakalarka/", + type = "Bakalářská práce", + option = "urlalso", +} +@THESIS{ mirekM, + author = "Miroslav Olšák", + title = "Součiny Fréchetovských prostorů", + school = "Univerzita Karlova v~Praze, fakulta Matematicko-fyzikální", + address = "Praha", + year = 2015, + url = "http://www.olsak.net/mirek/diplomka/", + type = "Diplomová práce", + option = "urlalso", +} +@THESIS{ mirekD, + author = "Miroslav Olšák", + title = "Generalizing CSP-related results to infinite algebras", + school = "Univerzita Karlova v~Praze, fakulta Matematicko-fyzikální", + address = "Praha", + year = 2019, + url = "https://dspace.cuni.cz/handle/20.500.11956/108756", + type = "Disertační práce", + option = "urlalso", + lang = "en", +} +@INBOOK{ zakonVS, + author = "Česko", + title = "Zákon č. 111 ze dne 22. dubna 1998 o vysokých školách a o změně a + doplnění dalších zákonů (zákon o vysokých školách)", + booktitle = "Sbírka zákonů České republiky", + year = 1998, + series = "částka 39, s. 5388--5419", + url = "http://aplikace.mvcr.cz/archiv2008/sbirka/1998/sb039-98.pdf", + issn = "1211-1244", + option = "urlalso unpublished", + key = "Czzesko", +} +@INBOOK{ lonka, + author = "Kristi Lonka", + title = "Helping doctoral students to finish their theses", + booktitle = "Teaching academic writing in European higher education", + editor = "Lennart Björk and Gerd Bräuer and Lotte Reinecker and Peter Stray Jörgensen", + address = "Dordrecht", + publisher = "Kluwer Academic Publ.", + year = 2003, + pages = "113--131", + isbn = "1-4020-1208-X", + option = "edprint:{\ED,~eds.}", +} +@INBOOK{ demay, + author = "Y. Demay", + title = "Computation of 2D viscoelastic flows for a differential constitutive equation", + editor = "J-M. Piau and J-F. Agassant", + booktitle = "Rheology for Polymer Melt Processing", + howpublished = "online", + publisher = "Elsevier", + year = 2011, + numbering = "s.~237--255", + isbn = "0444822369", + citedate = "2011/08/29", + url = "htpp://www.sciencedirect.com/science/article/pii/S0169310796800098", + option = "nowarn", +} +@INPROCEEDINGS{ distler, + author = "Tobias Distler and Rüdiger Kapitza", + title = "Increasing performance in Byzantine fault-tolerant systems on-demand replica consistency", + booktitle = "Proceedings of the Eurosys' 2011 conference. April 10 -- April 13, 2011, Salzburg, Austria", + address = "New York", + publisher = "Association of computer machinery", + year = 2011, + numbering = "pp.~91--105", + isbn = "1-4503-0634-8", +} +@INPROCEEDINGS{ talich, + author = "Milan Talich and Filip Antoš", + title = "Metody a postupy doigitalizace a online zpřístupnění starých kartografických děl", + howpublished = "online", + booktitle = "INFORUM 2011: 17. ročník konference o profesionálních informačních zdrojích, + 24.--26. května 2011, Vysoká škola ekonomická v Praze", + option = "unpublished", + url = "http://www.inforum.cz/pdf/2011/talich-milan.pdf", + citedate = "2011/08/29", + year = 2011, + option = "nowarn", +} +@ARTICLE{ mansouri, + author = "Majdi Mansouri and Quachani Ilham and Hicham Snoussi and Richard Cédric", + title = "Adaptive quantized target tracking in wireless sensors networks", + journal = "Wireles Networks", + number = 7, + volume = 17, + pages = "1625--1639", + lang = "en", + option = "nowarn", +} +@ARTICLE{ calafiore, + author = "Giuseppe C. Calafiore and Fabrizio Dabbene and Roberto Tempo", + title = "Research~ on probabilistic methods for control system design", + journal = "Automatica", + howpublished = "online", + Publisher = "Elsevier", + month = "July", + year = 2011, + volume = 47, + number = 7, + pages = "1279--1293", + issn = "0005-1090", + citedate = "2011/07/17", + doi = "10.1016/j.automatica.2011.02.029", + lang = "en", +} +@MISC{ bowles, + title = "What is fluid technology?", + ednote = "Bowles Fluidics Corp.", + citedate = "2011/10/10", + url = "http://www.bowlesfluidics.com/capabilites/technology/", + key = "zzzz" +} +@MISC{ biernatova, + author = "Olga Biernátová and Jan Skůpa", + title = "Bibliografické okazy a citace dokumentů: dle ČSN ISO 690 (01~0197) platné od 1. dubna 2011", + ednote = "Brno, 2011. Vytvořeno ve spolupráci s portálem citace.com", + url = "http://www.citace.com/dokumenty.php", +} +@MISC{ trtikova, + author = "Ilona Trtíková and Ludmila Tichá", + title = "Jak citovat", + ednote = "Ústřední knihovna ČVUT, 2011, 2012, 2013", + citedate = "2014/04/22", + url = "http://knihovna.cvut.cz/studium/jak-psat-vskp/doporuceni/jak-citovat/", +} diff --git a/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex b/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex index a7c40a854c1..c46a337524a 100644 --- a/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex +++ b/Master/texmf-dist/tex/luatex/optex/demo/op-slides.tex @@ -65,10 +65,10 @@ text * The paragraph texts are ragged right. * Titles, subtitles and section titles are centered. * The `\sec` and `\secc` are printed without numbers. -* Paragraph indentation is zero. There is a little vertical space between - paragraphs. +* No paragraph indentation, a little vertical space between paragraphs. * The Heros font family (aka Helvetica) is initialized as default.\nl - Sans-serif FiraMath font for math typesetting is used. + Sans-serif FiraMath font for math typesetting is used.\nl + If `\fontfam[<famname>]` precedes `\slides` then it rewrites default. * The items in lists are started by blue square (`\type X` and `\type x` ). \pg; %------------------------------------------------------------------ @@ -232,6 +232,7 @@ partially show): \def\use#1#2{\ifnum\layernum#1\relax#2\fi} \def\pshow#1{\use{=#1}\Red \use{<#1}\Transparent \ignorespaces} \endtt +`\use{=3}{do something}` does something only if `\layernum=3`. The `{\pshow<num> <text>}` prints <text> in Red when current layer is equal to <num> or it prints <text> normally when current layers is greater than <num>. diff --git a/Master/texmf-dist/tex/luatex/optex/pkg/plain-at.opm b/Master/texmf-dist/tex/luatex/optex/pkg/plain-at.opm index 8219ea7556b..3277d7b24ea 100644 --- a/Master/texmf-dist/tex/luatex/optex/pkg/plain-at.opm +++ b/Master/texmf-dist/tex/luatex/optex/pkg/plain-at.opm @@ -5,9 +5,9 @@ \_setctable \_optexcatcodes % PlainTeX obscure names: \_catcode`\@=11 -\_newdimen\z@ \z@=0pt -\_newdimen\p@ \p@=1pt +\_let\z@=\_zo \_let\z@skip=\_zoskip +\_newdimen\p@ \p@=1pt \_chardef\@ne=1 \_chardef\tw@=2 \_chardef\thr@@=3 |