diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/optex')
18 files changed, 165 insertions, 73 deletions
diff --git a/Master/texmf-dist/tex/luatex/optex/base/alloc.opm b/Master/texmf-dist/tex/luatex/optex/base/alloc.opm index b981c25b564..e68db40266f 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/alloc.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/alloc.opm @@ -75,7 +75,7 @@ \_chardef\_insertmin = 201 \_def\_newinsert #1{% - \_advance\_insertalloc by-1 + \_global\_advance\_insertalloc by-1 \_ifnum\_insertalloc <\_insertmin \_errmessage {No room for a new \_string\insert}% \_else @@ -150,11 +150,11 @@ the array-like declarator of counters. \_maicount = \maicount % first value is top of the array \def\newcountarray #1[#2]{% \newcountarray \foo[100] - \advance\_maicount by -#2\relax + \global\advance\_maicount by -#2\relax \ifnum \_countalloc > \_maicount \errmessage{No room for a new array of \string\count}% \else - \chardef#1=\_maicount + \global\chardef#1=\_maicount \fi } \def\usecount #1[#2]{% \usecount \foo[2] 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 612258baee7..e7af4c9595e 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/bib-iso690.opm @@ -882,7 +882,7 @@ howpublished = "\Mtext{blue-ray}" Now, you can set the variants of blue-ray into your macros: \begtt -\mtdef {blue-ray} {Blue-ray disc} {Blue-ray disk} {} +\_mtdef {blue-ray} {Blue-ray disc} {Blue-ray disk} {} \endtt diff --git a/Master/texmf-dist/tex/luatex/optex/base/f-ebgaramond.opm b/Master/texmf-dist/tex/luatex/optex/base/f-ebgaramond.opm new file mode 100644 index 00000000000..e2e30567209 --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-ebgaramond.opm @@ -0,0 +1,31 @@ +%% 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} {} + {[EBGaramond-Regular]} + {\_def\_fontnamegen {[EBGaramond-\_currV]:\_capsV\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers:^^J + \caps ...... caps & small caps^^J + \medium .... medium weight^^J + \semibold .. semibold weight^^J +Variant:^^J + \initials .. Initials, only letters ADFGLNOQT^^J +}} + +\_moddef \resetmod {\_fsetV caps={} \_fvars Regular Bold Italic BoldItalic } +\_moddef \medium {\_fvars Medium ExtraBold MediumItalic ExtraBoldItalic } +\_moddef \semibold {\_fvars SemiBold ExtraBold SemiBoldItalic ExtraBoldItalic } +\_moddef \caps {\_fsetV caps=+smcp;+onum; } + +\_famvardef \initials {\_fvars Initials . . . \rm} + + +\_initfontfamily % new font family must be initialized + +\_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-kerkis.opm b/Master/texmf-dist/tex/luatex/optex/base/f-kerkis.opm new file mode 100644 index 00000000000..133f776c599 --- /dev/null +++ b/Master/texmf-dist/tex/luatex/optex/base/f-kerkis.opm @@ -0,0 +1,32 @@ +%% This is part of OpTeX project, see http://petr.olsak.net/optex + +\_famdecl [Kerkis] \Kerkis {Free Bookman alternative with Greek letters} + {\semibold \sans \sanssemi \caps} {\rm \bf \it \bi \calli} {} + {[Kerkis]} + {\_def\_fontnamegen {[Kerkis\_currV]:\_fontfeatures}} + +\_wlog{\_detokenize{% +Modifiers:^^J + \semibold .. semibold weight (only \rm, \it)^^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 +Variant:^^J + \calli ..... Calligraphic (only upercase, lowercase letters equal to Italic)^^J +}} + +\_moddef \resetmod {\_fvars {} -Bold -Italic -BoldItalic } +\_moddef \semibold {\_fvars -SemiBold . -SemiBold-Italic . } +\_moddef \caps {\_fvars -SmallCaps.otf -BoldSmallCaps . . } +\_moddef \sans {\_fvars Sans Sans-Bold Sans-Italic Sans-BoldItalic } +\_moddef \sanssemi {\_fvars Sans-SmallCaps . . . } + +\_famvardef \calli {\_fvars -Calligraphic . . . \rm} + + +\_initfontfamily % new font family must be initialized + +\_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-lmfonts.opm b/Master/texmf-dist/tex/luatex/optex/base/f-lmfonts.opm index 9f9a650a839..06e96c4df4a 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/f-lmfonts.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/f-lmfonts.opm @@ -105,7 +105,7 @@ Sub-modifiers (selects special variants of given subfamily):^^J \_moddef \caps {\_onlyif subfam=rm,tt: {\_fvars rc . ic . }} \_def \_tryloadtt {\_fontdef\_tentt{\_LMfonts \_addto\_fontfeatures{-tlig;}\_ttset \_rm}} -\_private \LMfonts \ttset ; % \tt variant selector re-defined +\_private \LMfonts \ttset ; % used in \_tryloadtt \_initfontfamily % new font family must be initialized 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 d89a29c7a1a..c92782260b7 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/fams-ini.opm @@ -62,6 +62,15 @@ { -,\caps: {\rm\bf\it\bi} } \_famalias [BaskervilleF] +\_faminfo [EB Garamond] {Free variants of classical Garamond} {f-ebgaramond} + { -,\caps,\medium,\medium\caps,\semibold,\semibold\caps: {\rm\bf\it\bi} + -: {\initials} } +\_famalias [Garamond] + +\_faminfo [Kerkis] {Free Bookman alternative with Greek letters} {f-kerkis} + { -,\sans: {\rm\bf\it\bi} \caps: {\rm\bf} \semibold: {\rm\it} + \sanssemi: {\rm} -:{\calli} } + \_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] 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 1709cb05cf0..c21f426c890 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/fonts-resize.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/fonts-resize.opm @@ -203,7 +203,7 @@ \_regtfm lmbx 0 ec-lmbx5 5.5 ec-lmbx6 6.5 ec-lmbx7 7.5 ec-lmbx8 8.5 ec-lmbx9 9.5 ec-lmbx10 11.1 ec-lmbx12 * \_regtfm lmri 0 ec-lmri7 7.5 ec-lmri8 8.5 ec-lmri9 9.5 ec-lmri10 11.1 ec-lmri12 * -\_regtfm lmtt 0 ec-lmtt10 11.1 ec-lmtt12 * +\_regtfm lmtt 0 ec-lmtt8 8.5 ec-lmtt9 9.5 ec-lmtt10 11.1 ec-lmtt12 * \_setfontsize {at10pt} % default font size diff --git a/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm b/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm index ab0909b553d..ebcc8cf8141 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/hyperlinks.opm @@ -63,18 +63,18 @@ \_doc ---------------------------- The `\_pdfstartlink` primitive uses `\_pdfborder{<type>}` in its parameter - (see \^`\_linkactive` or \^`\_urlactive` macros). The \`\_pdfborder``{<type>}` - expands to `attr{/C[? ? ?] /Border[0 0 .6]}` if the - `\<type>border` (i.e.\ \`\refborder`, \`\citeborder`, \`\tocborder`, \`\pgborder`, - \`\urlborder`, \`\fntborder` or \`\fnfborder`) + (see \^`\_linkactive` or \^`\_urlactive` macros). The \`\_pdfborder``{<type>}` + expands to `attr{/C[? ? ?] /Border[0 0 .6]}` if the + `\_<type>border` (i.e.\ \`\_refborder`, \`\_citeborder`, \`\_tocborder`, + \`\_pgborder`, \`\_urlborder`, \`\_fntborder` or \`\_fnfborder`) is defined. User can define it in order to create colored frames around active links. For example - `\def\tocborder{1 0 0}` causes red frames in TOC (not printed, only visible + `\def\_tocborder{1 0 0}` causes red frames in TOC (not printed, only visible in PDF viewers). \_cod ---------------------------- -\_def\_pdfborder#1{\_ifcsname #1border\_endcsname - attr{/C[\_csname #1border\_endcsname] /Border[0 0 .6]}% +\_def\_pdfborder#1{\_ifcsname _#1border\_endcsname + attr{/C[\_csname _#1border\_endcsname] /Border[0 0 .6]}% \_else attr{/Border[0 0 0]}\_fi } 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 27de1af3760..c6a43bc0aff 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/hyphen-lan.opm @@ -70,7 +70,7 @@ \_next % runs itself in processing state } \_addto\_langlist{ #1(#2)}% - \_sdef{#1lang}{\_csname _#1lang\_endcsname}% unprefixed \<isocode>lang + \_sdef{#1lang\_ea}\_ea{\_csname _#1lang\_endcsname}% unprefixed \<isocode>lang } \_def\_loadpattrs#1 #2 {% \_directlua{ @@ -124,9 +124,9 @@ \_preplang es Spanish \_esPatt 126 22 \_preplang sl Slovenian \_slPatt 128 22 \_preplang fi Finnish \_fiPatt 129 22 -\_preplang hy Hungarian \_huPatt 130 22 +\_preplang hu Hungarian \_huPatt 130 22 \_preplang tr Turkish \_trPatt 131 22 -\_preplang et Estoniak \_etPatt 132 23 +\_preplang et Estonian \_etPatt 132 23 \_preplang eu Basque \_euPatt 133 22 \_preplang ga Irish \_gaPatt 134 23 \_preplang nb Bokmal \_nbPatt 135 22 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 6189dec1c7b..70983fbda58 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm @@ -21,7 +21,7 @@ `\<word>``_<letter><nonletter>` to `\<word> _<letter><nonletter>` at input processor level. The \`\mathsboff` deactivates it. You can ask by \`\_ifmathsb` if this feature is activated or deactivated. - By default, is is activated in the `\everyjob`. + By default, is is activated in the `\everyjob`, see section~\ref[init]. \_cod ----------------------------- \catcode`\_ = 8 \let\sb = _ @@ -32,14 +32,14 @@ \_newifi\_ifmathsb \_mathsbfalse \_def \_mathsbon {% \_directlua{ - callback.register("process_input_buffer", + callback.register_x("process_input_buffer", function (str) return string.gsub(str.." ", "(\_nbb[a-zA-Z]+)_([a-zA-Z]?[^_a-zA-Z])", "\_pcent 1 _\_pcent 2") end) }% \_global\_mathsbtrue } \_def \_mathsboff {% - \_directlua{ callback.register("process_input_buffer", nil) }% + \_directlua{ callback.register_x("process_input_buffer", nil) }% \_global \_mathsbfalse } \_public \mathsboff \mathsbon ; @@ -467,10 +467,14 @@ \_protected\_def\widehat{\_mathaccent"0362 } \_doc ----------------------------- - \`\overrightarrow`, \`\overleftarrow`, \`\overbrace`, \`\underbrace`, \`\skew` macros. + \`\_math`, \`\skew`, + \`\overrightarrow`, \`\overleftarrow`, \`\overbrace`, \`\underbrace` macros. + The last four are redefined when Unicode math is loaded. \_cod ----------------------------- \_def\_math{\_mathsurround0pt } +\_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 \_rightarrowfill\_crcr\_noalign{\_kern-.1em \_nointerlineskip} $\_hfil\_displaystyle{#1}\_hfil$\_crcr}}} @@ -484,8 +488,6 @@ \_protected\_def\_underbrace #1{\_mathop{\_vtop{\_math\_ialign{##\_crcr $\_hfil\_displaystyle{#1}\_hfil$\_crcr\_noalign{\_kern.3em \_nointerlineskip} \_upbracefill\_crcr\_noalign{\_kern.3em}}}}\_limits} -\_protected\_def\_skew #1#2#3{{\_muskip0=#1mu\_divide\_muskip0=by2 \_mkern\_muskip0 - #2{\_mkern-\_muskip0{#3}\_mkern\_muskip0}\_mkern-\_muskip0}{}} \_public \overrightarrow \overleftarrow \overbrace \underbrace \skew ; diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm b/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm index 633b5ebeb85..09d447e3d48 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/math-preload.opm @@ -94,7 +94,7 @@ \_regtfm cmbx 0 cmbx5 5.5 cmbx6 6.5 cmbx7 7.5 cmbx8 8.5 cmbx9 9.5 cmbx10 11.1 cmbx12 * \_regtfm cmti 0 cmti7 7.5 cmti8 8.5 cmti9 9.5 cmti10 11.1 cmti12 * -\_regtfm cmtt 0 cmtt10 11.1 cmtt12 * +\_regtfm cmtt 0 cmtt8 8.5 cmtt9 9.5 cmtt10 11.1 cmtt12 * %% AMS math fonts, optical sizes: @@ -103,8 +103,8 @@ %% fraktur, rsfs, optical sizes: -\_regtfm eufm 0 eufm5 5.5 eufm6 6.5 eufm7 7.5 eufm8 8.5 eufm9 9.5 eufm10 * -\_regtfm eufb 0 eufb5 5.5 eufb6 6.5 eufb7 7.5 eufb8 8.5 eufb9 9.5 eufb10 * +\_regtfm eufm 0 eufm5 6 eufm7 8.5 eufm10 * +\_regtfm eufb 0 eufb5 6 eufb7 8.5 eufb10 * \_regtfm rsfs 0 rsfs5 6 rsfs7 8.5 rsfs10 * %% bf and bi sansserif math alternatives: 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 595a4f2ed35..fc33596bc09 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/more-macros.opm @@ -11,12 +11,12 @@ is read correctly with correct catcode settings. In order to achieve this, we declare \`\optexcatcodes` catcode table - and \`\plaintexcatocdes`. They save the commonly used catcode tables. + and \`\plaintexcatcodes`. They save the commonly used catcode tables. Note that `\catcodetable` is a part of \LuaTeX/ extension. The catcodetable stack is implemented by \OpTeX/ macros. The \`\setctable` `<catcode table>` pushes current catcode table to the stack and activates catcodes from - the `<catcode table>`. The \`\restorectable` returns to the saved catocdes + the `<catcode table>`. The \`\restorectable` returns to the saved catcodes from the catcode table stack. So, the `\opinput` macro can be implemented simply: \_cod ----------------------------- diff --git a/Master/texmf-dist/tex/luatex/optex/base/optex.ini b/Master/texmf-dist/tex/luatex/optex/base/optex.ini index 8e6d9f36d05..e9a8babd910 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.15 Jun 2020} +\def\optexversion{Beta 0.16 Oct.2020} \def\fmtname{OpTeX} % Engine testing: @@ -89,6 +89,7 @@ \_everyjob = {% \_message{This is OpTeX (Olsak's Plain TeX), version <\optexversion>^^J}% \_mathchardef\_fnotestack=\_pdfcolorstackinit page {0 g 0 G}% + \_directlua {callback.register_x = callback.register}% ltluatex.lua rewrites it \_mathsbon % replaces \int_a^b to \int _a^b \_inputref % inputs \jobname.ref if exists } 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 d3a158008e4..c7ecdb75b50 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/plain-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/plain-macros.opm @@ -294,13 +294,14 @@ } \_doc ----------------------------- - The last part of plain \TeX/ macros. + The plain \TeX/ macros \`\hrulefill`, \`\dotfill`, \`\rightarrowfill`, \`\leftarrowfill`, - \`\magnification`, \`\bye`. - Math macros are defined in the `math-macros.opm` file. + \`\downbracefill`, \`\upbracefill`. + The last four are used in non-Unicode variants of `\overrightarrow`, + `\overleftarrow`, `\overbrace` and `\underbrace` macros, see + section~\ref[math-macros]. \_cod ----------------------------- - \_def \_hrulefill {\_leaders\_hrule\_hfill} \_def \_dotfill {\_cleaders\_hbox{$\_math \_mkern1.5mu.\_mkern1.5mu$}\_hfill} \_def \_rightarrowfill {$\_math\_smash-\_mkern-7mu% @@ -310,18 +311,24 @@ \_cleaders\_hbox{$\_mkern-2mu\_smash-\_mkern-2mu$}\_hfill \_mkern-7mu\_smash-$} -\_public \hrulefill \dotfill \rightarrowfill \leftarrowfill ; - -% \downbracefill \upbracefill will be re-defined when Unicode-math is used \_mathchardef \_braceld="37A \_mathchardef \_bracerd="37B \_mathchardef \_bracelu="37C \_mathchardef \_braceru="37D -\_def \downbracefill {$\_math \_setbox0=\_hbox{$\_braceld$}% +\_def \_downbracefill {$\_math \_setbox0=\_hbox{$\_braceld$}% \_braceld \_leaders\_vrule height\_ht0 depth0pt \_hfill \_braceru \_bracelu \_leaders\_vrule height\_ht0 depth0pt \_hfill \_bracerd$} -\_def \upbracefill {$\_math \_setbox0=\_hbox{$\_braceld$}% +\_def \_upbracefill {$\_math \_setbox0=\_hbox{$\_braceld$}% \_bracelu \_leaders\_vrule height\_ht0 depth0pt \_hfill \_bracerd \_braceld \_leaders\_vrule height\_ht0 depth0pt \_hfill \_braceru$} +\_public \hrulefill \dotfill + \rightarrowfill \leftarrowfill \downbracefill \upbracefill ; + + \_doc ----------------------------- + The last part of plain \TeX/ macros: \`\magnification`, \`\bye`. + Note that math macros are defined in the `math-macros.opm` file + (section~\ref[math-macros]). + \_cod ----------------------------- + \_def \_magnification {\_afterassignment \_magA \_count255 } \_def \_magA {\_mag=\_count255 \_truedimen\_hsize \_truedimen\_vsize \_dimen\_footins=8truein diff --git a/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm b/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm index a409a44697c..f3ed071be03 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/prefixed.opm @@ -37,10 +37,10 @@ \_def \_pkglabel{} \_def \_public {\_xargs \_publicA} -\_def \_publicA #1{\_ea\_let \_ea#1\_csname \_pkglabel _\_csstring #1\_endcsname} +\_def \_publicA #1{\_ea\_let \_ea#1\_csname _\_csstring #1\_endcsname} \_def \_private {\_xargs \_privateA} -\_def \_privateA #1{\_ea\_let \_csname \_pkglabel _\_csstring #1\_endcsname =#1} +\_def \_privateA #1{\_ea\_let \_csname _\_csstring #1\_endcsname =#1} \_public \public \private \xargs \ea ; @@ -71,30 +71,40 @@ \_doc ----------------------------- The `\_mathsbon` and `\_mathsboff` are defined in `math-macros.opm` file. - Now, we define the macro \`\_namespace` `{<pkg label>}` for package writers, see - section~\ref[pkg-namespace]. + Now, we define the macros + \`\_namespace` `{<pkg label>}`, \`\_resetnamespace` `{<pkg label>}`, \`\_endnamespace`, + \`\_nspublic` and \`\_nsprivate` + for package writers, see section~\ref[pkg-namespace]. \_cod ----------------------------- +\_def \_pkglabel{} \_def\_namespace #1{% \_ifcsname namesp:#1\_endcsname \_errmessage {The name space "#1" is used already, it cannot be used twice}% \_endinput - \_else - \_ea \_gdef \_csname namesp:#1\_endcsname {}% - \_gdef \_pkglabel{_#1}% - \_directlua{ - callback.register("process_input_buffer", + \_else \_resetnamespace{#1}\_fi +} +\_def\_resetnamespace #1{% + \_ea \_gdef \_csname namesp:#1\_endcsname {}% + \_gdef \_pkglabel{_#1}% + \_directlua{ + callback.register_x("process_input_buffer", function (str) return string.gsub(str, "\_nbb[.]([a-zA-Z])", "\_nbb _#1_\_pcent 1") end ) - }% - \_gdef \_endcode {% - \_ifmathsb \_mathsbon \_else \_mthsboff \_fi - \_gdef \_pkglabel{_#1}% - \_global \_let \_endcode=\_endinput - \_endinput }% - \_fi + }% } +\_def\_endnamespace {% + \_ifmathsb \_mathsbon \_else \_mathsboff \_fi + \_gdef \_pkglabel{}% +} + +\_def \_nspublic {\_xargs \_nspublicA} +\_def \_nspublicA #1{\_ea\_let \_ea#1\_csname \_pkglabel _\_csstring #1\_endcsname} + +\_def \_nsprivate {\_xargs \_nsprivateA} +\_def \_nsprivateA #1{\_ea\_let \_csname \_pkglabel _\_csstring #1\_endcsname =#1} + \_endcode %---------------------------------------------------- @@ -222,14 +232,19 @@ is declared at the beginning of the macro file then all occurrences of The macro writer can write (and backward can read his/her code) simply with `\.foo`, `\.bar` control sequences and `\_<pkg>_foo`, `\_<pkg>_bar` control sequences are processed internally. -The scope of the \^`\_namespace` command ends at the \^`\_endcode` command +The scope of the \^`\_namespace` command ends at the \^`\_endnamespace` command or when another \^`\_namespace` is used. This command checks if the same package label is not declared by the \^`\_namespace` twice. -The \^`\public` macro does `\let\foo = \_<pkg>_foo` when -\^`\_namespace{<pkg>}` is declared. And the \^`\private` macro does reverse +The \^`\_nspublic` macro does `\let\foo = \_<pkg>_foo` when +\^`\_namespace{<pkg>}` is declared. And the \^`\_nsprivate` macro does reverse operation to it. Example: you can define `\def\.macro{...}` and then -set it to the user name space by `\_public \macro;`. +set it to the user name space by `\_nspublic \macro;`. + +Don't load another packages (which are using their own name space) inside your +name space. Do load them before your \^`\_namespace`~`{<pkg>}` is +initialized. Or close your name space by \^`\_endnamespace` and open it again +(after other packages are loaded) by \^`\_resetnamespace`~`{<pkg>}`. If the package writer needs to declare a control sequence by \^`\newif`, then there is an exception of the rule described above. Use diff --git a/Master/texmf-dist/tex/luatex/optex/base/uni-lcuc.opm b/Master/texmf-dist/tex/luatex/optex/base/uni-lcuc.opm index 3ddf2860118..f5cb977f573 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/uni-lcuc.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/uni-lcuc.opm @@ -15931,9 +15931,9 @@ E01EF . All codes in unicode table keep information about pairs lowecase-uppercase letters or single letter. We need to read such information and set appropriate `\lccode` and `\uccode`. The `\catcode` above the code 127 -is not set, i.\,e.\ the `\catocde`=12 for all codes above 127. +is not set, i.\,e.\ the `\catcode`=12 for all codes above 127. -The file `uni-lcuc.opm` does this work. It is not much intereting file, only +The file `uni-lcuc.opm` does this work. It is not much interesting file, only first few lines from 15928 lines in total is shown here. {\everytt={\typosize[8/10]\_let\_printverbline=\_printcodeline \medskip}\ttline=-1 diff --git a/Master/texmf-dist/tex/luatex/optex/base/usebib.opm b/Master/texmf-dist/tex/luatex/optex/base/usebib.opm index b109e384c21..7f772b09d2b 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/usebib.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/usebib.opm @@ -5,23 +5,17 @@ \_doc ----------------------------- Loading the `librarian.tex` macro package. See `texdoc librarian` for more information about it. + + We want to ignore `\errmessage` and we want not to create `\jobname.lbr` + file. \_cod ----------------------------- -\_def\_tmp{} -\_let\_errmessageori=\_errmessage % we needn't \errmessage during \input librarian -\_def\_errmessage#1{\_def\_tmp{error}} -\_let\_newwriteori=\_newwrite % we need not to create \jobname.lbr: -\_def\_newwrite#1{\_csname lb@restoreat\_endcsname \_endinput} +\_def\errmessage#1{} +\_def\newwrite#1{\_csname lb@restoreat\_endcsname \_endinput} \_def\_tmpb{\_catcode`\_=12 \_input librarian \_catcode`\_=11 }\_tmpb -\_let\_errmessage=\_errmessageori -\_let\_newwrite=\_newwriteori -\_ifx\_tmp\_empty\_else - \_def\_usebib/#1 (#2) #3 {% - \_opwarning{eTeX and (pdfTeX or XeTeX or LuaTeX) not detected}% - \_immediate\_write16{\_space\_space - But librarian package needs it. \_noexpand\usebib ignored.}% - } - \_endinput \_fi +\_let\errmessage=\_errmessage +\_let\newwrite=\_newwrite + \_private \BibFile \ReadList \SortList \SortingOrder \NameCount \AbbreviateFirstname \CreateField \RetrieveFieldInFor \RetrieveFieldIn ; diff --git a/Master/texmf-dist/tex/luatex/optex/pkg/qrcode.opm b/Master/texmf-dist/tex/luatex/optex/pkg/qrcode.opm index f757efe7b82..59f3dc0334e 100644 --- a/Master/texmf-dist/tex/luatex/optex/pkg/qrcode.opm +++ b/Master/texmf-dist/tex/luatex/optex/pkg/qrcode.opm @@ -2598,6 +2598,7 @@ \_def\.qrbeginhook{} \_def\.qrendhook{} +\_endnamespace \_endcode This macro file is created for \OpTeX/. It is derived from: |