texlive[67208] Master/texmf-dist: optex (25may23)
commits+karl at tug.org
commits+karl at tug.org
Thu May 25 00:26:14 CEST 2023
Revision: 67208
http://tug.org/svn/texlive?view=revision&revision=67208
Author: karl
Date: 2023-05-25 00:26:14 +0200 (Thu, 25 May 2023)
Log Message:
-----------
optex (25may23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/optex/base/README
trunk/Master/texmf-dist/doc/optex/base/optex-doc.pdf
trunk/Master/texmf-dist/doc/optex/base/optex-doc.tex
trunk/Master/texmf-dist/doc/optex/base/optex-math.tex
trunk/Master/texmf-dist/tex/optex/base/bib-iso690.opm
trunk/Master/texmf-dist/tex/optex/base/bib-simple.opm
trunk/Master/texmf-dist/tex/optex/base/f-lmfonts.opm
trunk/Master/texmf-dist/tex/optex/base/fams-ini.opm
trunk/Master/texmf-dist/tex/optex/base/fnotes.opm
trunk/Master/texmf-dist/tex/optex/base/fonts-select.opm
trunk/Master/texmf-dist/tex/optex/base/graphics.opm
trunk/Master/texmf-dist/tex/optex/base/hyperlinks.opm
trunk/Master/texmf-dist/tex/optex/base/keyval.opm
trunk/Master/texmf-dist/tex/optex/base/lang-data.opm
trunk/Master/texmf-dist/tex/optex/base/lang-decl.opm
trunk/Master/texmf-dist/tex/optex/base/makeindex.opm
trunk/Master/texmf-dist/tex/optex/base/maketoc.opm
trunk/Master/texmf-dist/tex/optex/base/margins.opm
trunk/Master/texmf-dist/tex/optex/base/math-macros.opm
trunk/Master/texmf-dist/tex/optex/base/optex.ini
trunk/Master/texmf-dist/tex/optex/base/output.opm
trunk/Master/texmf-dist/tex/optex/base/parameters.opm
trunk/Master/texmf-dist/tex/optex/base/prefixed.opm
trunk/Master/texmf-dist/tex/optex/base/references.opm
trunk/Master/texmf-dist/tex/optex/base/sections.opm
trunk/Master/texmf-dist/tex/optex/base/table.opm
trunk/Master/texmf-dist/tex/optex/demo/op-biblist.bib
trunk/Master/texmf-dist/tex/optex/pkg/math.opm
Added Paths:
-----------
trunk/Master/texmf-dist/tex/optex/base/f-besley.opm
trunk/Master/texmf-dist/tex/optex/base/f-bodonimoda.opm
trunk/Master/texmf-dist/tex/optex/base/f-draftingmono.opm
trunk/Master/texmf-dist/tex/optex/base/f-heuristica.opm
trunk/Master/texmf-dist/tex/optex/base/f-jost.opm
Modified: trunk/Master/texmf-dist/doc/optex/base/README
===================================================================
--- trunk/Master/texmf-dist/doc/optex/base/README 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/doc/optex/base/README 2023-05-24 22:26:14 UTC (rev 67208)
@@ -22,6 +22,12 @@
History:
+<1.12> May 2023:
+ Support for right-to-left (Hebrew) typesseting introduced.
+ More features in math.opm style.
+ \_createbibmark in bib-styles introduced.
+ Heuristica and more font-files added.
+ Minor more improvements and bug fixes.
<1.11> Mar 2023:
\fontfamsub: the substitution of missing families introduced.
New font family files created.
Modified: trunk/Master/texmf-dist/doc/optex/base/optex-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/optex/base/optex-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/optex/base/optex-doc.tex 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/doc/optex/base/optex-doc.tex 2023-05-24 22:26:14 UTC (rev 67208)
@@ -21,7 +21,7 @@
\tit Format Based on Plain \TeX/ and OPmac\fnotemark1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hfill Version 1.11
+\hfill Version 1.12
\centerline{\it Petr Olšák, 2020, 2021, 2022, 2023}
Modified: trunk/Master/texmf-dist/doc/optex/base/optex-math.tex
===================================================================
--- trunk/Master/texmf-dist/doc/optex/base/optex-math.tex 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/doc/optex/base/optex-math.tex 2023-05-24 22:26:14 UTC (rev 67208)
@@ -532,7 +532,9 @@
The sequence of increasing delimiters can be printed by the following
macros:
$$
- `(` \to (,\quad \x`\big``(` \to \big(,\quad \x`\Big``(` \to \Big(,\quad
+ `(` \to (,\quad \x`\big``(` \to \big(,\quad
+ \x`\bbig``(` \to \bbig(\fnote{Provided only in \OpTeX/.}, \quad
+ \x`\Big``(` \to \Big(,\quad
\x`\bigg``(` \to \bigg(, \quad \x`\Bigg``(` \to \Bigg(.
$$
The `\Bigg<delim>` is not the maximal size of the bracket. Try
@@ -544,10 +546,12 @@
for opening bracket and Close atom for closing bracket more often.
Then we can use macros
\x`\bigl``<delim>`,
+\x`\bbigl``<delim>`,
\x`\Bigl``<delim>`,
\x`\biggl``<delim>`,
\x`\Biggl``<delim>` for creating Open atoms and
\x`\bigr``<delim>`,
+\x`\bbigr``<delim>`,
\x`\Bigr``<delim>`,
\x`\biggr``<delim>`,
\x`\Biggr``<delim>` for creating Close atoms. Unfortunately, the source is not
@@ -555,10 +559,12 @@
traditions say that we have to distinguish brackets by the size in math
mode if they are in equal types:
$$
- `\Bigl( f\bigl( 2(x+y) + z\bigr) \Bigr)'` \quad \hbox{gives }
- \Bigl(f\bigl(2(x+y)+z\bigr)\Bigr)'.
+ `\bbigl( f\bigl( 2(x+y) + z\bigr) \bbigr)'` \quad \hbox{gives }
+ \bbigl(f\bigl(2(x+y)+z\bigr)\bbigr)'.
$$
+The `math.opm` package from \OpTeX/ provides doing this more comfortable.
+
\secc Horizontally scalable objects: math accents
Arbitrary wide formula can be covered by \ii math/accent,accent {\em scalable math accent}.
Modified: trunk/Master/texmf-dist/tex/optex/base/bib-iso690.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/bib-iso690.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/bib-iso690.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_undefined {BIB style (iso690) <2022-05-10>} % loaded on demand by \usebib
+\_codedecl \_undefined {BIB style (iso690) <2023-04-22>} % loaded on demand by \usebib
\_ifx\_optexbibstyle\_undefined \_errmessage
{This file can be read by: \_string\usebib/? (iso690) bibfiles command only}
@@ -48,7 +48,6 @@
\_def\_commonname{%
\_ifnum\_NameCount=1
\_firstauthorformat
- \_ifx\_dobibmark\_undefined \_edef\_dobibmark{\_Lastname}\_fi
\_else
\_ifnum0\_namecount=\_NameCount
\_ifx\_maybeetal\_empty \_bibconjunctionand\_else , \_fi
@@ -57,10 +56,15 @@
\_fi
}
\_def\_authorname{%
+ \_ifx\_authlist\_undefined \_edef\_authlist{\_Lastname,\_Firstname,\_Von,\_Junior}%
+ \_else \_edef\_authlist{\_authlist;\_Lastname,\_Firstname,\_Von,\_Junior}\_fi
\_ifnum\_NameCount>0\_namecount\_relax\_else \_commonname \_fi
\_ifnum\_NameCount=0\_namecount\_relax \_maybeetal \_fi
}
-\_let\_editorname=\_authorname
+\_def\_editorname{%
+ \_ifnum\_NameCount>0\_namecount\_relax\_else \_commonname \_fi
+ \_ifnum\_NameCount=0\_namecount\_relax \_maybeetal \_fi
+}
\_def\_prepareauedoptions#1{%
\_def\_mabyetal{}\_csname lb at abbreviatefalse\_endcsname
@@ -89,15 +93,31 @@
\_let\_upper=\upper
\_doc -----------------------------
- Preparing bib-mark (used when `\nonumcitations` is set).
+ Preparing bib-mark (used when \^`\nonumcitations`).
+ The \`\_setbibmark` is run at the end of each record.
+ The \`\_authlist` includes `Lastname,Firstname,Von,Junior`
+ of all authors separated by semicolon (no semicolon at the end of the
+ list). If `bibmark` isn't declared explicitly then we create it by the
+ \`\_createbibmark``<year>;<authors-list>;,;,;,;\_fin` macro.
+ It outputs first Lastname (and adds \"et al." if the second author in the
+ <authors-list> is non-empty). Then comma and <year> is appended.
+ A user can redefine the `\_createbibark` macro in the `\bibtexhook`
+ tokens list, if another bibmark format is needed.
+ The macro `\_createbibmark` must be expandable. See also
+ \ulink[http://petr.olsak.net/optex/optex-tricks.html\#bibmark]{\OpTeX/ trick~0104}.
\_cod -----------------------------
\_def\_setbibmark{%
- \_ifx\_dobibmark\_undefined \_def\_dobibmark{}\_fi
+ \_ifx\_authlist\_undefined \_def\_authlist{,;}\_fi
\_RetrieveFieldIn{bibmark}\_tmp
- \_ifx\_tmp\_empty \_RetrieveFieldIn{year}\_tmp \_edef\_tmp{\_dobibmark, \_tmp}\_fi
+ \_ifx\_tmp\_empty
+ \_RetrieveFieldIn{year}\_tmp
+ \_edef\_tmp{\_ea\_createbibmark\_expanded{\_tmp;\_authlist};,;,;,;\_fin}\_fi
\_bibmark=\_ea{\_tmp}%
}
+\_def\_createbibmark #1;#2,#3;#4,#5\_fin{% #1=year #2=LastName #3=FirstName #4=nextAuthor
+ #2\_ifx^#4^\_else \_Mtext{bib.etal}\_fi, #1%
+}
\_doc -----------------------------
Setting phrases.
@@ -300,7 +320,7 @@
\_bprintb [url] {\_preurl\_url{##1}. }{}%
}
\_slet{_print:booklet}{_print:generic}
-\_slet{_print:incolleciton}{_print:generic}
+\_slet{_print:incollection}{_print:generic}
\_slet{_print:manual}{_print:generic}
\_slet{_print:proceedings}{_print:generic}
\_slet{_print:techreport}{_print:generic}
@@ -778,7 +798,7 @@
The reason for this entry is to give to you the possibility to set the format of
entry by your own decision. The most of data are concentrated in the ednote field.
-\secccc The `@BOOKLET`, `@INCOLLECION`, `@MANUAL`, `@PROCEEDINGS`, `@TECHREPORT`, `@UNPUBLISHED` entries
+\secccc The `@BOOKLET`, `@INCOLLECTION`, `@MANUAL`, `@PROCEEDINGS`, `@TECHREPORT`, `@UNPUBLISHED` entries
These entries are equivalent to `@MICS` entry because we need to save the
simplicity. They are implemented only for (almost) backward compatibility
@@ -908,6 +928,8 @@
\_endinput
+2023-04-22 ... incollection: typo corrected
+2023-03-25 ... \_createbibmark introduced
2022-05-10 ... \. -> \:, collision with \oldaccents fixed.
2022-02-04 ... \_langinput used in \_setlang
2021-04-07 ... \biboptions toks declaration moved, bug fixed.
Modified: trunk/Master/texmf-dist/tex/optex/base/bib-simple.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/bib-simple.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/bib-simple.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_undefined {BIB style (simple) <2022-10-10>} % loaded on demand by \usebib
+\_codedecl \_undefined {BIB style (simple) <2023-04-22>} % loaded on demand by \usebib
\_ifx\_optexbibstyle\_undefined \_errmessage
{This file can be read by: \_string\usebib/? (simple) bibfiles command only}
@@ -17,23 +17,29 @@
% Formatting of Author/Editor lists:
\_def\_authorname{%
+ \_addauthlist
\_ifnum\_NameCount>1
\_ifnum0\_namecount=\_NameCount \_mtext{bib.and}\_else , \_fi
- \_else
- \_ifx\_dobibmark\_undefined \_edef\_dobibmark{\_Lastname}\_fi
\_fi
\_bprintc\_Firstname{* }\_bprintc\_Von{* }\_Lastname\_bprintc\_Junior{, *}%
}
+\_def\_addauthlist{%
+ \_edef\_authlist{\_ifx\_authlist\_undefined \_else \_authlist;\_fi
+ \_Lastname,\_Firstname,\_Von,\_Junior}%
+}
\_let\_editorname=\_authorname
% Preparing bib-mark (used when \nonumcitations is set):
-\_def\_setbibmark{%
- \_ifx\_dobibmark\_undefined \_def\_dobibmark{}\_fi
+\_def\_setbibmark{%
+ \_ifx\_authlist\_undefined \_def\_authlist{,;}\_fi
\_RetrieveFieldIn{bibmark}\_tmp
- \_ifx\_tmp\_empty \_RetrieveFieldIn{year}\_tmp \_edef\_tmp{\_dobibmark, \_tmp}\_fi
+ \_ifx\_tmp\_empty
+ \_RetrieveFieldIn{year}\_tmp
+ \_edef\_tmp{\_ea\_createbibmark\_expanded{\_tmp;\_authlist;,;,;,;}\_fin}\_fi
\_bibmark=\_ea{\_tmp}%
}
+\_def\_createbibmark#1;#2,#3\_fin{#2, #1}
\_def\_preurl{\_hfil\_break}
\_def\_Inclause{In:~}
@@ -80,6 +86,7 @@
\_bprinta [!author] {*.\ }{\_bibwarning}%
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}%
\_Inclause
+ \_let\_addauthlist\_relax % no read authorlist again
\_bprinta [!editor] {*,~eds.\ }{}%
\_bprintb [booktitle] {{\_em##1}\:\ }{\_bibwarning}%
\_bprinta [address] {*: }{\_bibwarning}%
@@ -92,11 +99,12 @@
}
\_slet{_print:inproceedings}{_print:inbook}
-\_sdef{_print:incolection}{%
+\_sdef{_print:incollection}{%
\_bprinta [!author] {*.\ }{\_bibwarning}%
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}%
\_bprinta [crossreff] {In~\_cite[*]. }{%
\_bprinta [booktitle] {*. }{\_bibwarning}%
+ \_let\_addauthlist\_relax
\_bprinta [!editor] {*,~eds.\ }{\_bibwarning}%
\_bprinta [edition] {*\_mtext{bib.edition}\ }{\_bibwarning}%
\_bprinta [address] {*: }{\_bibwarning}%
Added: trunk/Master/texmf-dist/tex/optex/base/f-besley.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/f-besley.opm (rev 0)
+++ trunk/Master/texmf-dist/tex/optex/base/f-besley.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -0,0 +1,46 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [Besley] \Besley {Besley* antique slab serif}
+ {\caps \allsc \nocaps \cond \narrow}
+ {\rm \bf \it \bi \mf \mi \ef \ei \kf \ki} {Schola}
+ {[Besley-Regular]}
+ {\_def\_fontnamegen {[Besley\_subV-\_currV]:script=latn;\_capsV\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+Modifiers (width):^^J
+ \cond ....... Condensed variants^^J
+ \narrow ..... Narrow variants^^J
+Modifiers (small caps):^^J
+ \caps ....... Caps and small caps^^J
+ \allsc ...... Small caps only^^J
+ \nocaps ..... No small caps^^J
+Extended variants:^^J
+ \mf, \mi .... Medium, MediumItalic^^J
+ \ef, \ei .... ExtraBold, ExtraBoldItalic^^J
+ \kf, \ki .... Black, BlackItalic^^J
+}}
+
+\_moddef \resetmod {\_fsetV sub={},caps={} \_fvars Regular Bold Italic BoldItalic }
+\_moddef \cond {\_fsetV sub=Condensed }
+\_moddef \narrow {\_fsetV sub=Narrow }
+\_moddef \caps {\_fsetV caps=+smcp;\_ffonum; }
+\_moddef \allsc {\_fsetV caps=+smcp;+c2sc;\_ffonum; }
+\_moddef \nocaps {\_fsetV caps={} }
+
+\_moddef \medium {\_fvars Medium ExtraBold MediumItalic ExtraBoldItalic }
+\_moddef \black {\_fvars Black . BlackItalic . }
+\_private \medium ;
+\_private \black ;
+
+\_famvardef \mf {\_medium \_rm}
+\_famvardef \mi {\_medium \_it}
+\_famvardef \ef {\_medium \_bf}
+\_famvardef \ei {\_medium \_bi}
+\_famvardef \kf {\_black \_rm}
+\_famvardef \ki {\_black \_it}
+
+\_initfontfamily
+
+\loadmath{[texgyreschola-math]}
+
+\_endcode
Property changes on: trunk/Master/texmf-dist/tex/optex/base/f-besley.opm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/optex/base/f-bodonimoda.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/f-bodonimoda.opm (rev 0)
+++ trunk/Master/texmf-dist/tex/optex/base/f-bodonimoda.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -0,0 +1,43 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [BodoniModa] \BodoniModa {No-compromises Bodoni for the digital age}
+ {\caps \allsc \nocaps}
+ {\rm \bf \it \bi \mf \mi \ef \ei \kf \ki} {}
+ {[BodoniModa11pt-Regular]}
+ {\_def\_fontnamegen {[\_optname{bm}pt-\_currV]:script=latn;\_capsV\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+Modifiers (small caps):^^J
+ \caps ....... Caps and small caps^^J
+ \allsc ...... Small caps only^^J
+ \nocaps ..... No small caps^^J
+Extended variants:^^J
+ \mf, \mi .... Medium, MediumItalic^^J
+ \ef, \ei .... ExtraBold, ExtraBoldItalic^^J
+ \kf, \ki .... Black, FatfaceItalic^^J
+}}
+
+\_regoptsizes bm BodoniModa?
+ 06 <8.5 11 <13.5 16 <20 24 <30 36 <42 48 <60 72 <84 96 <*
+
+\_moddef \resetmod {\_fsetV caps={} \_fvars Regular Bold Italic BoldItalic }
+
+\_moddef \caps {\_fsetV caps=+smcp;\_ffonum; }
+\_moddef \allsc {\_fsetV caps=+smcp;+c2sc;\_ffonum; }
+\_moddef \nocaps {\_fsetV caps={} }
+
+\_moddef \medium {\_fvars Medium ExtraBold MediumItalic ExtraBoldItalic }
+\_moddef \black {\_fvars Black . FatfaceItalic . }
+\_private \medium ;
+\_private \black ;
+
+\_famvardef \mf {\_medium \_rm}
+\_famvardef \mi {\_medium \_it}
+\_famvardef \ef {\_medium \_bf}
+\_famvardef \ei {\_medium \_bi}
+\_famvardef \kf {\_black \_rm}
+\_famvardef \ki {\_black \_it}
+
+\_initfontfamily
+
+\_endcode
Property changes on: trunk/Master/texmf-dist/tex/optex/base/f-bodonimoda.opm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/optex/base/f-draftingmono.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/f-draftingmono.opm (rev 0)
+++ trunk/Master/texmf-dist/tex/optex/base/f-draftingmono.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -0,0 +1,30 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [DraftingMono] \DraftingMono {Drafting* Mono monospaced}
+ {\caps \allsc \nocaps \thin \light \medium} {\rm \bf \it \bi} {}
+ {[DraftingMono-Regular]}
+ {\_def\_fontnamegen {[DraftingMono-\_currV]:script=latn;\_capsV\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+Modifiers (weight)^^J
+ \thin ..... \rm, \it: Thin, \bf, \bi: Light^^J
+ \light .... \rm, \it: Light, \bf, \bi: Medium^^J
+ \medium ... \rm, \it: Medium, \bf, \bi: Bold^^J
+Modifiers: (small caps)^^J
+ \caps ..... Caps and small caps^^J
+ \allsc .... Small caps only^^J
+ \nocaps ... No small caps^^J
+}}
+
+\_moddef \resetmod {\_fsetV caps={} \_fvars Regular Bold Italic BoldItalic }
+\_moddef \caps {\_fsetV caps=+smcp; }
+\_moddef \allsc {\_fsetV caps=+smcp;+c2sc; }
+\_moddef \nocaps {\_fsetV caps={} }
+
+\_moddef \thin {\_fvars Thin Light ThinItalic LightItalic }
+\_moddef \light {\_fvars Light Medium LightItalic MediumItalic }
+\_moddef \medium {\_fvars Medium Bold MediumItalic BoldItalic }
+
+\_initfontfamily
+
+\_endcode
Property changes on: trunk/Master/texmf-dist/tex/optex/base/f-draftingmono.opm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/optex/base/f-heuristica.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/f-heuristica.opm (rev 0)
+++ trunk/Master/texmf-dist/tex/optex/base/f-heuristica.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -0,0 +1,21 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [Heuristica] \Heuristica {Extends the Utopia font}
+ {} {\rm \bf \it \bi} {}
+ {[Heuristica-Regular]}
+ {\_def\_fontnamegen {[Heuristica-\_currV]:\_capsV\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+No modifiers.^^J
+% \caps ...... caps & small caps^^J
+}}
+
+\_moddef \resetmod {\_fsetV caps={} \_fvars regular bold italic bolditalic }
+
+\_initfontfamily % new font family must be initialized
+
+\_endcode
+
+See the file `f-heros.opm` for information about principles of such
+font-macro-files.
+
Property changes on: trunk/Master/texmf-dist/tex/optex/base/f-heuristica.opm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/optex/base/f-jost.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/f-jost.opm (rev 0)
+++ trunk/Master/texmf-dist/tex/optex/base/f-jost.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -0,0 +1,32 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [Jost] \Jost {Jost* geometric sans-serif}
+ {\hairline \thin \light \medium}
+ {\rm \bf \it \bi \kf \ki} {}
+ {[Jost-400-Book]}
+ {\_def\_fontnamegen {[Jost-\_currV]:script=latn;\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+Modifiers (weight):^^J
+ \hairline ... \rm, \it: Hairline, \bf, \bi: Book^^J
+ \thin ....... \rm, \it: Thin, \bf, \bi: Medium^^J
+ \light ...... \rm, \it: Light, \bf, \bi: SemiBold^^J
+ \medium ..... \rm, \it: Medium, \bf, \bi: Hevy^^J
+Extended Variants:^^J
+ \kf, \ki .... Black, BlackItalic^^J
+}}
+
+\_moddef \resetmod {\_fvars 400-Book 700-Bold 400-BookItalic 700-BoldItalic }
+\_moddef \hairline {\_fvars 100-Hairline 400-Book 100-HairlineItalic 400-BookItalic }
+\_moddef \thin {\_fvars 200-Thin 500-Medium 200-ThinItalic 500-MediumItalic }
+\_moddef \light {\_fvars 300-Light 600-Semi 300-LightItalic 600-SemiItalic }
+\_moddef \medium {\_fvars 500-Medium 800-Hevy 500-MediumItalic 800-HevyItalic }
+\_moddef \black {\_fvars 900-Black . 900-BlackItalic . }
+\_private \black ;
+
+\_famvardef \kf {\_black\_rm}
+\_famvardef \ki {\_black\_it}
+
+\_initfontfamily
+
+\_endcode
Property changes on: trunk/Master/texmf-dist/tex/optex/base/f-jost.opm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/optex/base/f-lmfonts.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/f-lmfonts.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/f-lmfonts.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_famdecl [Latin Modern] \LMfonts {TeX Gyre fonts based on Coputer Modern}
+\_famdecl [Latin Modern] \LMfonts {TeX Gyre fonts based on Computer Modern}
{\roman \sans \quotset \ttset \ttprop \ttlight \ttcond \upital
\dunhill submods:\caps \slant \nbold \bolder} {\rm \bf \it \bi \tt} {LM}
{[lmroman10-regular]}
Modified: trunk/Master/texmf-dist/tex/optex/base/fams-ini.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/fams-ini.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/fams-ini.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -7,11 +7,11 @@
\_faminfo [Catalogue] {Catalogue of all registered font families} {fonts-catalog} {}
\_famalias [Catalog]
-\_famsrc {TeXlive}
+\_famsrc {CTAN}
\_famtext {Computer Modern like family:}
\_famfrom {GUST}
-\_faminfo [Latin Modern] {TeX Gyre fonts based on Coputer Modern} {f-lmfonts}
+\_faminfo [Latin Modern] {TeX Gyre fonts based on Computer Modern} {f-lmfonts}
{ -,\nbold,\sans,\sans\nbold,\slant,\ttset,\ttset\slant,\ttset\caps,%
\ttprop,\ttprop\bolder,\quotset: {\rm\bf\it\bi}
\caps: {\rm\it}
@@ -48,6 +48,31 @@
{ -,\caps: {\rm\bf\it\bi} }
\_famalias [Courier]
+\_famsrc {https://indestructibletype.com/}
+\_famtext {Typefaces from indestructible type*}
+
+\_famfrom {Owen Earl, indestructible type*}
+\_faminfo [Besley*] {Antique slab serif, inspired by Robert Besley's Clarendon} {f-besley}
+ { -,\narrow,\cond: {\rm\mf\bf\ef\kf\it\mi\bi\ei\ki}
+ \caps,\narrow\caps,\cond\caps: {\rm\mf\bf\ef\kf\it\mi\bi\ei\ki}
+ \allsc,\narrow\allsc,\cond\allsc: {\rm\mf\bf\ef\kf\it\mi\bi\ei\ki} }
+\_famalias [Besley]
+
+\_faminfo [Bodoni*] {No-compromises Bodoni for the digital age} {f-bodonimoda}
+ { -,\caps,\allsc: {\rm\mf\bf\ef\kf\it\mi\bi\ei\ki} }
+\_famalias [Bodoni] \_famalias [BodoniModa]
+
+\_faminfo [Drafting* Mono] {Monospaced typeface family with small caps} {f-draftingmono}
+ { \thin,\light,-,\medium: {\rm\bf\it\bi}
+ \thin\caps,\light\caps,\caps,\medium\caps: {\rm\bf\it\bi}
+ \thin\allsc,\light\allsc,\allsc,\medium\allsc: {\rm\bf\it\bi} }
+\_famalias [DraftingMono]
+
+\_faminfo [Jost*] {A modern geometric sans-serif} {f-jost}
+ { \hairline,\thin,\light,-,\medium: {\rm\bf\it\bi} -: {\kf\ki} }
+\_famalias [Jost]
+
+\_famsrc {CTAN}
\_famtext {Other fonts:}
\_famfrom{Antonis Tsolomitis}
@@ -114,6 +139,10 @@
{ -,\caps: {\rm\bf\it\bi} }
\_famalias [Baskervald ADF] \_famalias [ADFBaskerville]
+\_famfrom {Andrey V. Panov}
+\_faminfo [Heuristica] {Extends the Utopia font} {f-heuristica}
+ { -: {\rm\bf\it\bi} }
+
\_faminfo [Erewhon] {Derived from Heuristica with slanted variants} {f-erewhon}
{ -: {\rm\bf\it\bi\sl\bs} \caps: {\rm\bf\it\bi} }
@@ -144,8 +173,8 @@
{ \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}
+ \sans\elight\caps,\sans\light\caps,\sans\caps,\sans\bolder\caps: {\rm}
+ \sans\caps,\sans\bolder\caps: {\bf}
\mono\elight,\mono\light,\mono,\mono\medium,\mono\bolder: {\rm\it} \mono,\mono\bolder: {\bf\bi}
}
\_famalias [AdobeSource] \_famalias [AdobeSourcePro]
@@ -204,7 +233,7 @@
{ -,\light,\book, \caps, \caps\book: {\rm\bf\it\bi} -:{\stencil} }
\_famalias [CTU Technika]
-\_famsrc {TeXlive}
+\_famsrc {CTAN}
\_famfrom {Bitstream, Andrey V. Panov, Michael Sharpe}
\_faminfo [XCharter] {An extension of Bitstream Charter} {f-xcharter}
{ -,\slant,\caps,\caps\slant: {\rm\bf\it\bi} }
Modified: trunk/Master/texmf-dist/tex/optex/base/fnotes.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/fnotes.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/fnotes.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \fnote {Footnotes, marginal notes OpTeX <2020-05-26>} % preloaded in format
+\_codedecl \fnote {Footnotes, marginal notes OpTeX <2023-04-15>} % preloaded in format
\_doc -----------------------------
\`\_gfnotenum` is a counter which counts footnotes globally in the whole document.\nl
@@ -45,7 +45,7 @@
(from text to footnote and backward).
\_cod -----------------------------
-\_def \_printfnotemark {$^{\_fnotenum}$} % default footnote mark
+\_def \_printfnotemark {\_quitvmode\_hbox{$^{\_fnotenum}$}} % default footnote mark
\_def \_printfnotemarkA {\_printfnotemark} % footnote marks used in text
\_def \_printfnotemarkB {\_printfnotemark} % footnote marks used in front of footnotes
@@ -188,5 +188,6 @@
\_endcode % -------------------------------------
+2023-04-15 \fnote in math mode allowed
2020-05-26 \mnote up<dimen> implemented
2020-03-20 released
Modified: trunk/Master/texmf-dist/tex/optex/base/fonts-select.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/fonts-select.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/fonts-select.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \fontfam {Fonts selection system <2023-03-09>} % preloaded in format
+\_codedecl \fontfam {Fonts selection system <2023-04-22>} % preloaded in format
\_doc -----------------------------
The main principle of the Font Selection System is: run one or more
@@ -458,12 +458,15 @@
\_doc -----------------------------
\`\setletterspace` is based on the
- special font features provided by `luaotfload` package.
+ special font features provided by `luaotfload` package.\nl
The \`\setwordspace` recalculates the `\fontdimen2,3,4`
of the font using the \`\setwsp` macro which is used by the
\^`\_fontselA` macro. It activates a dummy font feature `+Ws` too in
order the font is reloded by the `\font` primitive (with independent
`\fontdimen` registers).
+ If the \^`\setwordspace` is used again to the same font then we need to
+ reset `\fondimen` registers first. It is done by `\_sws:<fontname>`
+ macro which keeps the original values of the `\fontdimen`s.\nl
\`\setfontcolor` is kept here only for backward compatibility but not
recommended. Use real color switches and the \^`\transparency` instead.
\_cod -----------------------------
@@ -481,7 +484,11 @@
}
\_def\_setwsp #1{}
\_def\_setwspA #1{\_ifx/#1\_ea\_setwspB \_else\_afterfi{\_setwspC#1}\_fi}
-\_def\_setwspB #1/#2/#3/#4{\_fontdimen2#4=#1\_fontdimen2#4%
+\_def\_setwspB #1/#2/#3/#4{%
+ \_csname _sws:\_fontname#4\_endcsname \_relax
+ \_ea\_xdef \_csname _sws:\_fontname#4\_endcsname
+ {\_foreach 234\_do{\_fontdimen##1#4=\_the\_fontdimen##1#4}}%
+ \_fontdimen2#4=#1\_fontdimen2#4%
\_fontdimen3#4=#2\_fontdimen3#4\_fontdimen4#4=#3\_fontdimen4#4}
\_def\_setwspC #1/{\_setwspB #1/#1/#1/}
@@ -928,6 +935,7 @@
\endinput
+2023-04-22 \setwordspace: \fontdimens reset, bug fixed.
2023-03-09 \_famsrc, \fontfamsub introduced
2022-12-01 \faminfo saves f-<filename> to the format only when needed
2022-11-08 \protected: \fontdef, \famvardef, \fontfam
Modified: trunk/Master/texmf-dist/tex/optex/base/graphics.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/graphics.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/graphics.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \inspic {Graphics <2022-11-05>} % preloaded in format
+\_codedecl \inspic {Graphics <2023-03-16>} % preloaded in format
\_doc -----------------------------
\`\inspic` accepts old syntax `\inspic <filename><space>`
@@ -59,6 +59,11 @@
\_def\rotatebox#1#2{\_pdfrotate{#1}#2}%
\_def\lineheight#1{}%
\_def\setlength#1#2{}%
+ \_def\transparent#1{\_transparency\_exprA[0]{(1-#1)*255} }%
+ % Inkscape may generate \textbf{\textit{\textsc{TEXT}}}
+ \_def\textbf#1{\_begingroup\_let\_it\_bi\_bf #1\_endgroup}%
+ \_def\textit#1{\_begingroup\_it #1\_endgroup}%
+ \_def\textsl#1{\_begingroup\_trycs{slant}{}\_it #1\_endgroup}%
}
\_public \inkinspic ;
@@ -442,6 +447,7 @@
\_endinput
+2023-16-03: more \_inkdefs macros
2022-11-05 \_doshadow: renduntant \_expr from \_expr{\_bp{...}} removed
2022-10-18 \_puttextA defined \long, bug fixed
2022-03-05: \_addextgstate, \pageresources, \addpageresources added
Modified: trunk/Master/texmf-dist/tex/optex/base/hyperlinks.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/hyperlinks.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/hyperlinks.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -136,7 +136,7 @@
\_replstring\_tmpb{[||]}{{gb|}}%
\_replstring\_tmpb{ }{{ }}%
\_replstring\_tmpb{://}{{://}}%
- \_ea\_ulink \_ea[\_ea{\_tmpa}] {\_urlfont \_ea\_urlA\_tmpb\_fin}%
+ \_ea\_ulink \_ea[\_ea{\_tmpa}] {\_urlfont \_textdirection=0 \_ea\_urlA\_tmpb\_fin}%
}}
\_def\_urlA#1{\_ifx\_fin#1\_else \_urlC{}{#1}\_fi}
\_def\_urlB#1{\_ifx\_fin#1\_else \_urlC{\_urlxskip}{#1}\_fi}
Modified: trunk/Master/texmf-dist/tex/optex/base/keyval.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/keyval.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/keyval.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \readkv {Key-value dictionaries <2023-01-14>} % preloaded in format
+\_codedecl \readkv {Key-value dictionaries <2023-03-11>} % preloaded in format
\_doc ----------------------------
{\bf Implementation.}\nl
@@ -27,7 +27,7 @@
\_trycs{_kvx:\_the\_kvdict:#1}%
{\_trycs{_nokvx:\_the\_kvdict}{\_ea\_ignoreit}{#1}\_ea\_ignoreit}{#2}}
\_def\_kvx#1#2{\_sdef{_kvx:\_the\_kvdict:#1}##1{#2}}
-\_def\_nokvx#1{\_sdef{_nokvx:\_the\_kvdict}##1\_ea\_ignoreit\_fi##2{\_fi#1}}
+\_def\_nokvx#1{\_sdef{_nokvx:\_the\_kvdict}##1\_ea\_ignoreit##2{#1}}
\_def\_kv#1{\_trycs{\_kvcs#1}{\_kvunknown}}
\_def\_iskv#1#2{#2\_else\_ea\_unless\_fi \_ifcsname\_kvcs#1\_endcsname}
\_def\_kvcs{_kv:\_the\_kvdict:}
@@ -125,6 +125,8 @@
\_endinput
+
+2023-03-11 \nokvx: \fi bug (due to \afterfi in \trycs) fixed.
2023-01-13 \kvx parameter added, \nokvx introduced.
2023-01-07 \kvdict, \kvx, \iskv added.
2020-12-21 Released
Modified: trunk/Master/texmf-dist/tex/optex/base/lang-data.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/lang-data.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/lang-data.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -157,6 +157,13 @@
\_sdef{_mt:today:pt}{\_the\_day~de \_mtext{m\_the\_month}~ de \_the\_year}
% todo
+\_langdata et {Estonian} % ------------------------------------------------
+\_langw et Peatükk Tabel Joonis Teema
+\_monthw et jaanuar veebruar märts aprill mai juuni
+ juuli august september oktoober november detsember
+\_sdef{_mt:today:et}{\_the\day.~\_mtext{m\_the\_month} \_the\_year}
+\_quotationmarks{„“„“}
+
\_endcode
2022-10-11: \postexhyphenchar setting added to cs and sk languages
Modified: trunk/Master/texmf-dist/tex/optex/base/lang-decl.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/lang-decl.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/lang-decl.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -146,6 +146,8 @@
\_preplang tk Turkmen tk tk 22
\_preplang hsb Uppersorbian hsb hsb 22
+\_preplang he Hebrew he {} 00
+
\_doc -----------------------------
\`\_preplangmore` `<lang-id><space>{<text>}` declares more activities
of the language switch. The <text> is processed whenever
Modified: trunk/Master/texmf-dist/tex/optex/base/makeindex.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/makeindex.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/makeindex.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \makeindex {Makeindex and sorting <2022-06-28>} % preloaded in format
+\_codedecl \makeindex {Makeindex and sorting <2023-03-12>} % preloaded in format
\_doc -----------------------------
\^`\makeindex` implements sorting algorithm at \TeX/ macro-language level.
@@ -410,24 +410,42 @@
The \^`\everyii` tokens register is applied before `\noindent`. User can
declare something special here.
- The \`\_newiiletter``{<letter>}` macro is empty by default. It is invoked if first
- letter of index entries is changed. You can declare a design between
+ The \`\_newiiletter``{<letter>}{<word>}` macro is empty by default. It is invoked
+ if first letter of index entry is changed. You can declare a design between
index entries here. You can try, for example:
\begtt
\def\_newiiletter#1#2{%
- \bigskip \hbox{\setfontsize{at15pt}\bf\uppercase{#1}}\medskip}
+ \bigskip \hbox{\setfontsize{at15pt}\bf #1}\nobreak\medskip}
\endtt
+ \`\_definefirstii` `<word>&` macro defines \`\_firstii` which is used as the
+ <letter> parameter of the macro \^`\_newiiletter` and for testing if the
+ \"first letter" of the index entry was changed.
+ The `\uppercase` of the real first letter is used by default here.
+ You can re-implement \^`\_definefirstii` if you want. For example,
+ you want to ignore accents above letters for index sub-headers:
+ \begtt
+ \def\_definefirstii#1#2&{%
+ \uppercase{\bgroup \iicodes \uppercase{\egroup\def\_firstii{#1}}}}
+ \def\iicodes{}
+ \def\setiicodes #1#2,{\_ifx^#1^\_else
+ \foreach #2\do{\_addto\iicodes{\uccode`##1=`#1}}
+ \_ea\setiicodes \_fi
+ }
+ \setiicodes AÀÂÄÁ,ĆČ,DĎ,EÈÉËÊĚ,IÍÏÎ,LĹĽ,OÖÓÔ,RŔ,ŚŠ,TŤ,UÙÛÜÚŮŰ,YÝŸ,{},
+ \endtt
\_cod -----------------------------
-\_def\_printii #1#2&{%
- \_ismacro\_lastii{#1}\_iffalse \_newiiletter{#1}{#2}\_def\_lastii{#1}\_fi
- \_gdef\_currii{#1#2}\_the\_everyii\_noindent
- \_hskip-\_iindent \_ignorespaces\_printiiA#1#2//}
+\_def\_printii #1&{\_definefirstii #1&%
+ \_ifx\_firstii\_lastii\_else
+ \_ea\_newiiletter\_ea{\_firstii}{#1}\_let\_lastii=\_firstii\_fi
+ \_gdef\_currii{#1}\_the\_everyii\_noindent
+ \_hskip-\_iindent \_ignorespaces\_printiiA#1//}
\_def\_printiiA #1/{\_if^#1^\_let\_previi=\_currii \_else
\_ea\_scanprevii\_previi/&\_edef\_tmpb{\_detokenize{#1}}%
\_ifx\_tmpa\_tmpb \_iiemdash \_else#1 \_gdef\_previi{}\_fi
\_ea\_printiiA\_fi
}
+\_def\_definefirstii #1#2&{\_uppercase{\_def\_firstii{#1}}}
\_def\_iiemdash{\_kern.1em---\_space}
\_def\_lastii{}
\_def\_newiiletter#1#2{}
@@ -549,6 +567,7 @@
\_endcode % -------------------------------------
+2023-03-12 \_definefirstii introduced
2022-06-28 \_reversewords for French sorting introduced
2022-06-28 \_sortingdatalatin covers more languages
2022-06-28 \_xcompoundchars introduced, comments upgraded (German sorting mentioned)
Modified: trunk/Master/texmf-dist/tex/optex/base/maketoc.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/maketoc.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/maketoc.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -59,7 +59,7 @@
\_bgroup
\_leftskip=\_iindent \_rightskip=2\_iindent
\_ifischap \_advance\_leftskip by \_iindent \_fi
- \_def\_pgn{\_ilink[pg:#6]}%
+ \_def\_pgn##1{\_ilink[pg:#6]{\_numprint{##1}}}%
\_the\_everytocline
\_ifcsname _tocl:#1\_endcsname
\_cs{_tocl:#1}{#3}{\_scantextokens{#5}}{#7}\_par
@@ -92,7 +92,7 @@
\_cod ----------------------------------
\_def\_llaptoclink#1{\_noindent
- \_llap{\_ilink[toc:\_the\_tocrefnum]{\_enspace#1\_kern.4em}\_kern.1em}}
+ \_llap{\_ilink[toc:\_the\_tocrefnum]{\_enspace\_numprint{#1}\_kern.4em}\_kern.1em}}
\_def\_tocdotfill{\_nobreak\_leaders\_hbox to.8em{\_hss.\_hss}\_hskip 1em plus1fill\_relax}
\_def\_nofirst #1{\_ifnum \_lastpenalty=11333 \_else #1\_fi}
\_def\_tocpar{\_nobreak \_hskip-2\_iindent\_null \_par}
Modified: trunk/Master/texmf-dist/tex/optex/base/margins.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/margins.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/margins.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \margins {Macros for margins setting <2021-03-15>} % preloaded in format
+\_codedecl \margins {Macros for margins setting <2023-05-01>} % preloaded in format
\_doc ----------------------------
\`\margins``/<pg> <fmt> (<left>,<right>,<top>,<bot>)<unit>`
@@ -36,9 +36,11 @@
\_fi\_fi
\_if 1#1\_shiftoffset=0pt \_def\_prepoffsets{}\_else \_if 2#1% double-page layout
\_shiftoffset = \_dimexpr \_pgwidth -\_hsize -2\_hoffset \_relax
- \_def\_prepoffsets{\_ifodd\_pageno \_else \_advance\_hoffset \_shiftoffset \_fi}%
+ \_def\_prepoffsets{\_ifodd\_pageno \_else \_advance\_hoffset \_shiftoffset \_fi
+ \_setpagerightoffset}%
\_else \_opwarning{use \_string\_margins/1 or \_string\_margins/2}%
\_fi\_fi\_fi
+ \_setpagerightoffset
}
\_def\_setpagedimens{\_isnextchar({\_setpagedimensB}{\_setpagedimensA}}
\_def\_setpagedimensA#1 {\_ifcsname _pgs:#1\_endcsname
@@ -74,7 +76,43 @@
\_public \magscale ;
+ \_doc -----------------------------
+ When left-to-right direction of typesetting is selected (default) then
+ \"main vertical line" of the page has `\hoffset` distance from the left
+ paper border and all lines at the page start here and run to the right side
+ (exceptions can be done by `\moveleft` or `\moveright`, of course). When we
+ have set right-to-left direction (using `\textdir TRT`, for example), then
+ the \"main vertical line" cannot be at the same position because lines run to the left,
+ i.e.\ they would be off paper. This is reason why the setting `\pagedir TRT` shifts the
+ \"main vertical line" to an alternative position: it has `\pagerightoffset+1in` distance from the
+ {\em right} paper border and thus right-to-left lines are visible on the
+ paper. We have to set `\pagerightoffset` properly for such cases. This is
+ done in the macro \`\_setpagerightoffset`.
+ It must be called whenever `\hoffset` is changed.
+ \_cod -----------------------------
+
+\_def\_setpagerightoffset{%
+ \_pagerightoffset=\_dimexpr\_pdfpagewidth-\_xhsize-\_hoffset-1in\_relax
+}
+\_setpagerightoffset % setting default value from default values
+
+ \_doc -----------------------------
+ Page numbers and numbers of (sub)sections have to be printed in
+ left-to-right mode even though the document mode is right-to-left.
+ We print these numbers via \`\_numprint``{<number>}` in \OpTeX/ macros.
+ The `\_numprint` is `\_useit` by default (i.e.\ do nothing special)
+ because we have left-to-right mode as default. But a user can define
+ \begtt
+ \_def\_numprint#1{{\textdir TLT #1}}
+ \endtt
+ if the document is set to right-to-left mode.
+ \_cod -----------------------------
+
+\_let\_numprint=\_useit
+
\_endcode % -----------------------------------------
+2023-05-01 \_numprint for page numbers, section numbers introduced
+2023-04-29 \_setpagerightoffset for TRT typesetting introduced again
2021-03-15 \_setxhsize added
2020-03-14 released
Modified: trunk/Master/texmf-dist/tex/optex/base/math-macros.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/math-macros.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/math-macros.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,9 +1,9 @@
-%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \sin {Math macros plus mathchardefs <2021-08-02>} % preloaded in format
+\_codedecl \sin {Math macros plus mathchardefs <2023-05-24>} % preloaded in format
\_doc -----------------------------
- The category code of the character `_` remains as the letter (11) and the mathocode
+ The category code of the character `_` remains as the letter (11) and the mathcode
of it is `"8000`.
It means that it is an active character in math mode. It is defined as the subscript prefix.
@@ -36,7 +36,10 @@
\_directlua{
callback.add_to_callback("process_input_buffer",
function (str)
- return string.gsub(str.." ", "(\_nbb[a-zA-Z]+)_([a-zA-Z]?[^_a-zA-Z])", "\_pcent 1 _\_pcent 2")
+ local num
+ str, num = string.gsub(str.." ", \_gsubrule)
+ if num>0 then str = string.gsub(str, \_gsubrule) end % \phi_i\rho_j -> \phi _i\rho _j
+ return str
end, "_mathsb") }%
\_global\_mathsbtrue
}
@@ -44,6 +47,8 @@
\_directlua{ callback.remove_from_callback("process_input_buffer", "_mathsb") }%
\_global \_mathsbfalse
}
+\_edef\_gsubrule{"(\_nbb[a-zA-Z]+)_([a-zA-Z]?[^_a-zA-Z])", "\_pcent 1 _\_pcent 2"}
+
\_public \mathsboff \mathsbon ;
\_doc -----------------------------
@@ -367,25 +372,42 @@
\_private \prime ;
\_doc -----------------------------
- \`\big`, \`\Big`, \`\bigg`, \`\Bigg`, \`\bigl`, \`\bigm`, \`\bigr`, \`\Bigl`, \`\Bigm`,
+ \`\big`, \`\bbig`, \`\Big`, \`\bigg`, \`\Bigg`,
+ \`\bigl`, \`\bigm`, \`\bigr`, \`\bbigl`, \`\bbigm`, \`\bbigr`, \`\Bigl`, \`\Bigm`,
\`\Bigr`, \`\biggl`, \`\biggm`, \`\biggr`, \`\Biggl`, \`\Biggm`, \`\Biggr`
are based on the \`\_scalebig` macro because we need the dependency on
the various sizes of the fonts.
+ The \`\_scalebigcoef``<num>` returns relevant coefficient for these
+ macros. Multiply this coefficient by two and you get the strut
+ height+depth in em units.\nl
+ The \^`\big`, \^`\Big`, \^`\bigg`, \^`\Bigg` macros keep the strut height+depth
+ from plain \TeX/ and \^`\bbig` is a new macro in \OpTeX/. It generates the size
+ 1.44\,em beween \^`\big` and \^`\Big` which is
+ accessible in most of Unicode math fonts (but not in classical `cmex10`).
\_cod -----------------------------
%{\catcode`\^^Z=\active \gdef^^Z{\not=}} % ^^Z is like \ne in math %obsolete
-\_def\_scalebig#1#2{{\_left#1\_vbox to#2\_fontdimen6\_textfont1{}%
- \_kern-\_nulldelimiterspace\_right.}}
-\_protected\_def\_big#1{\_scalebig{#1}{.85}}
-\_protected\_def\_Big#1{\_scalebig{#1}{1.15}}
-\_protected\_def\_bigg#1{\_scalebig{#1}{1.45}}
-\_protected\_def\_Bigg#1{\_scalebig{#1}{1.75}}
-\_public \big \Big \bigg \Bigg ;
+\_def\_scalebig#1#2{{\_left#1%
+ \_raise\_Umathaxis\_textstyle\_vbox to\_scalebigcoef{#2}\_fontdimen6\_textfont1{}%
+ \_kern-\_nulldelimiterspace\_right.}}
+\_def\_scalebigcoef#1{\_ifcase #1 0\_or
+% \big (1.2) \bbig (1.44) \Big (1.8) \bigg (2.4) \Bigg (3.0)
+ .6\_or .72\_or .9\_or 1.2\_or 1.5\_else 0\_fi
+}
+\_protected\_def\_big #1{\_scalebig{#1}1}
+\_protected\_def\_bbig#1{\_scalebig{#1}2}
+\_protected\_def\_Big #1{\_scalebig{#1}3}
+\_protected\_def\_bigg#1{\_scalebig{#1}4}
+\_protected\_def\_Bigg#1{\_scalebig{#1}5}
+\_public \big \bbig \Big \bigg \Bigg ;
\_protected\_def\_bigl{\_mathopen\_big}
\_protected\_def\_bigm{\_mathrel\_big}
\_protected\_def\_bigr{\_mathclose\_big}
+\_protected\_def\_bbigl{\_mathopen\_bbig}
+\_protected\_def\_bbigm{\_mathrel\_bbig}
+\_protected\_def\_bbigr{\_mathclose\_bbig}
\_protected\_def\_Bigl{\_mathopen\_Big}
\_protected\_def\_Bigm{\_mathrel\_Big}
\_protected\_def\_Bigr{\_mathclose\_Big}
@@ -395,7 +417,8 @@
\_protected\_def\_Biggl{\_mathopen\_Bigg}
\_protected\_def\_Biggm{\_mathrel\_Bigg}
\_protected\_def\_Biggr{\_mathclose\_Bigg}
-\_public \bigl \bigm \bigr \Bigl \Bigm \Bigr \biggl \biggm \biggr \Biggl \Biggm \Biggr ;
+\_public \bigl \bigm \bigr \bbigl \bbigm \bbigr
+ \Bigl \Bigm \Bigr \biggl \biggm \biggr \Biggl \Biggm \Biggr ;
\_doc -----------------------------
Math relations defined by the \`\jointrel` plain \TeX/ macro:
@@ -1046,6 +1069,23 @@
\_public \cramped ;
\_doc -----------------------------
+ \`\setmathstyle` saves current math style
+ (including its cramped/normal subversion) and \`\usemathstyle`
+ restores the saved math style. These macros are based on the \LuaTeX/'s
+ `\mathstyle` primitive, i.e.\ they don't work in generalized fractions.\nl
+ Usage: `\def\mathclap #1{{\setmathstyle \hbox to0pt{\hss$\usemathstyle#1$\hss}}}`.
+ \_cod
+
+\_newcount\_mstylenum
+\_def\_setmathstyle{\_mstylenum=\_mathstyle\_relax}
+\_def\_usemathstyle{\_ifcase\_mstylenum
+ \_displaystyle\_or \_crampeddisplaystyle\_or \_textstyle\_or \_crampedtextstyle\_or
+ \_scriptstyle\_or \_crampedscriptstyle\_or \_scriptscriptstyle\_or \_crampedscriptscriptstyle
+ \_fi
+}
+\_public \setmathstyle \usemathstyle ;
+
+ \_doc -----------------------------
The \`\mathbox``{<text>}` macro is copied from OPmac trick 078.
It behaves like `\hbox{<text>}` but the `<text>` is scaled to a smaller
size if it is used in scriptstyle or scriptscript style.\nl
@@ -1067,6 +1107,10 @@
\_endcode %---------------------------------------------------
+2023-05-24 \matsbon: "local num" added
+2023-05-22 \mathsbon: \alpha_i\beta_j -> \alpha _i\beta _j (bug fixed)
+2023-04-15 \bbig introduced
+2023-03-12 \setmathstyle, \usemathstyle introduced
2021-08-02 ssty fontfeatures rewritten
2021-04-25 \triangleright: typo fixed
2021-03-22 \(l)eqalignno: \hbox instead \llap, \rlap (\par error suppressed)
Modified: trunk/Master/texmf-dist/tex/optex/base/optex.ini
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/optex.ini 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/optex.ini 2023-05-24 22:26:14 UTC (rev 67208)
@@ -21,7 +21,7 @@
% OpTeX version
-\def\optexversion{1.11 Mar 2023}
+\def\optexversion{1.12 May 2023}
\def\fmtname{OpTeX}
\let\fmtversion=\optexversion
Modified: trunk/Master/texmf-dist/tex/optex/base/output.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/output.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/output.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,17 +1,13 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \nopagenumbers {Output routine <2022-10-20>} % preloaded in format
+\_codedecl \nopagenumbers {Output routine <2023-04-28>} % preloaded in format
\_doc -----------------------------
- \`\_optexoutput` is the default output routine. You can create another...\nl
- The \^`\_preshipout``<destination box number><box specification>` used
- here behaves similarly like `\setbox` but it does not only copy the box
- contents but adds the color literals depending on used attributes.
- It is defined using lua code, see section~\ref[lua].
+ \`\_optexoutput` is the default output routine. You can create another
\_cod -----------------------------
\_output={\_optexoutput}
-\_def \_optexoutput{\_begoutput \_preshipout0\_completepage \_shipout\_box0 \_endoutput}
+\_def \_optexoutput{\_begoutput \_optexshipout\_completepage \_endoutput}
\_doc -----------------------------
Default \`\_begoutput` and \`\_endoutput` is defined.
@@ -37,6 +33,16 @@
\_def \_prepoffsets {}
\_doc -----------------------------
+ The \`\_optexshipout` does similar work like the `\_shipout` primitive.
+ The color literals are added to the `\box0` using
+ the \^`\_preshipout``<destination box number><box specification>` pseudo-primitive.
+ It is defined using lua code, see section~\ref[lua].
+ Finally the `\_shipout` primitive is used.
+ \_cod -----------------------------
+
+\_def \_optexshipout #1{\_setbox0=#1\_preshipout0\_box0 \_shipout\_box0 }
+
+ \_doc -----------------------------
The `\hsize` value can be changed at various places in the document but
we need to have a constant value \`\_xhsize` in the output routine
(for headlines and footlines, for instance). This value is set
@@ -48,7 +54,7 @@
`\hsize` value is eventually changed by the user in this environment.
\_cod -----------------------------
-\_newdimen \_xhsize
+\_newdimen \_xhsize \_xhsize=\_hsize
\_def\_setxhsize {\_global\_xhsize=\_hsize \_global\_let\_setxhsize=\_relax}
\_doc -----------------------------
@@ -258,6 +264,7 @@
\_endinput
+2022-04-28 \_optexshipout introduced
2022-10-22 \_normalbaselines added to \makehead/foot/line
2022-03-07 \_resetattrs instead \_resetcolor
2021-07-16 output routine supports colors via attributes
Modified: trunk/Master/texmf-dist/tex/optex/base/parameters.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/parameters.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/parameters.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -493,7 +493,7 @@
\_cod -----------------------------
\_newtoks\_headline \_headline={}
-\_newtoks\_footline \_footline={\_hss\_rmfixed \_folio \_hss}
+\_newtoks\_footline \_footline={\_hss\_rmfixed \_numprint\_folio \_hss}
\_public \headline \footline ;
\_doc -----------------------------
Modified: trunk/Master/texmf-dist/tex/optex/base/prefixed.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/prefixed.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/prefixed.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -383,7 +383,8 @@
the \^`\load` macro is used.
The `math.opm` is a good example of how an external macro file for \OpTeX/
-can look like.
+can look like. Another good and short example is
+\ulink[https://tex.stackexchange.com/questions/684406\#684406]{here}.
\endinput
Modified: trunk/Master/texmf-dist/tex/optex/base/references.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/references.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/references.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -94,8 +94,8 @@
but the optional `@` in the `<given-text>` is replaced by the `<implicit-text>` first.
\_cod -----------------------------
-\_def\_reftext #1#2{\_isatin #2@\_iffalse #2\_else\_reftextA{#1}#2\_fin \_fi}
-\_def\_reftextA #1#2@#3\_fin {#2#1#3}
+\_def\_reftext #1#2{\_isatin #2@\_iffalse \_numprint{#2}\_else\_reftextA{#1}#2\_fin \_fi}
+\_def\_reftextA #1#2@#3\_fin {#2\_numprint{#1}#3}
\_def\_isatin #1@#2\_iffalse {\_ifx\_fin#2\_fin}
\_doc -----------------------------
Modified: trunk/Master/texmf-dist/tex/optex/base/sections.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/sections.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/sections.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \chap {Titles, chapters, sections, subsections <2022-10-19>} % preloaded in format
+\_codedecl \chap {Titles, chapters, sections, subsections <2023-05-02>} % preloaded in format
\_doc ---------------------------
We are using scaled fonts for titles
@@ -212,7 +212,7 @@
\_cod ----------------------------
\_def \_printrefnum [#1@#2]{\_leavevmode % we must be in horizontal mode
- \_ifnonum \_else #1\_therefnum #2\_fi
+ \_ifnonum \_else #1\_numprint\_therefnum #2\_fi
\_wlabel \_therefnum % references, if `\label[<label>]` is declared
\_ifnotoc \_else \_incr \_tocrefnum
\_dest[toc:\_the\_tocrefnum]%
@@ -423,7 +423,7 @@
\_optdef\_eqmark []{\_trylabel \_ineqmark}
\_def\_ineqmark{\_incr\_dnum
\_ifinner\_else\_eqno \_fi
- \_wlabel\_thednum \_hbox{\_thednum}%
+ \_wlabel\_thednum \_hbox{\_numprint\_thednum}%
}
\_public \eqmark ;
@@ -467,12 +467,13 @@
\_def \_printnumberedpar #1#2{\_par
\_noindent\_wlabel #1%
- {\_bf #2 #1\_istoksempty\_opt\_iffalse \_space \_the\_opt \_fi.}\_space
+ {\_bf #2 \_numprint{#1}\_istoksempty\_opt\_iffalse \_space \_the\_opt \_fi.}\_space
\_ignorespaces
}
\_endcode % -------------------------------------
+2023-05-02 \_numprint used
2022-10-19 More robust \caption (two opened groups, \_printcaption introduced)
2022-08-02 Penalties in \_printsec, \_printsecc changed
2022-07-11 \_printchap: \_prevdepth=0pt added, see issue 100
Modified: trunk/Master/texmf-dist/tex/optex/base/table.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/base/table.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/base/table.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \table {Basic macros for OpTeX <2022-12-26>} % preloaded in format
+\_codedecl \table {Basic macros for OpTeX <2023-05-19>} % preloaded in format
\_doc -----------------------------
The result of the \`\table``{<declaration>}{<data>}` macro is inserted into
@@ -270,13 +270,17 @@
\_def\_tableparB{%
\_baselineskip=\_normalbaselineskip \_lineskiplimit=\_zo \_noindent
- \_raise\_ht\_tstrutbox\_null \_hskip\_zo \_relax
+ \_unless\_ifx\_tabstrutA\_empty \_raise\_ht\_tstrutbox\_null \_fi
+ \_hskip\_zo \_relax
}
\_def\_tableparC{%
\_unsskip
- \_ifvmode\_vskip\_dp\_tstrutbox \_else\_lower\_dp\_tstrutbox\_null\_fi
+ \_unless\_ifx\_tabstrutA\_empty
+ \_ifvmode\_vskip\_dp\_tstrutbox \_else\_lower\_dp\_tstrutbox\_null\_fi
+ \_fi
}
+
\_doc -----------------------------
Users put optional spaces around the table item typically, i.e.\ they write
`& text &` instead `&text&`. The left space is ignored by the internal \TeX/ algorithm but
@@ -587,6 +591,7 @@
\_endinput
+2023-05-19 \_tableparB,C: no strut when \tskip is processed (bug fixed).
2022-12-26 \tabdeclare: use {##} in order to allow a\over b in table items
2022-05-03 \_let\_tablereplstring\_relax removed and {...} encloses whole \_tableB body
2022-05-02 \_tablereplstrings put in group: bug fix \table in \halign
Modified: trunk/Master/texmf-dist/tex/optex/demo/op-biblist.bib
===================================================================
--- trunk/Master/texmf-dist/tex/optex/demo/op-biblist.bib 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/demo/op-biblist.bib 2023-05-24 22:26:14 UTC (rev 67208)
@@ -43,7 +43,7 @@
publisher = "Konvoj",
year = 2001,
isbn = "80-7302-007-6",
- url = "http://math.feld.cvut.cz/olsak/tbn.html",
+ url = "http://petr.olsak.net/tbn.html",
option = "urlalso",
}
@BOOK{ tst,
@@ -53,7 +53,7 @@
address = "Brno",
publisher = "Konvoj",
year = 2000,
- url = "http://math.feld.cvut.cz/olsak/tst.html",
+ url = "http://petr.olsak.net/tst.html",
isbn = "80-85615-91-6",
}
@BOOK{ tpp,
@@ -65,7 +65,7 @@
isbn = "978-80-901950-1-1",
option = "titlepost:{\TeX{} -- CSplain -- OPmac}",
howpublished = "online",
- url = "http://math.feld.cvut.cz/olsak/tpp.html",
+ url = "http://petr.olsak.net/tpp.html",
}
@BOOK{texbook,
author = "Donald Ervin Knuth",
Modified: trunk/Master/texmf-dist/tex/optex/pkg/math.opm
===================================================================
--- trunk/Master/texmf-dist/tex/optex/pkg/math.opm 2023-05-24 22:24:40 UTC (rev 67207)
+++ trunk/Master/texmf-dist/tex/optex/pkg/math.opm 2023-05-24 22:26:14 UTC (rev 67208)
@@ -3,7 +3,7 @@
% This file can serve as an template for other package files
% See end of the file for more information
-\_def\_math_version {0.08, 2023-01-28}
+\_def\_math_version {0.11, 2023-04-15}
\_codedecl \replacemissingchars {Doing math more comfortably <\_math_version>}
\_namespace{math}
@@ -22,6 +22,8 @@
\_kvx {vert} {\.smartvert}% sets | as math active, to do better |x| or ||x||
\_kvx {dots} {\.smartdots}% \dots behaves like \ldots or \cdots
\_kvx {bfserif} {\.bfserif}% \bf, \bi select fonts with serifs
+ \_kvx {mstyle} {\.mstyle{##1}}% sets mstyle=TeX or ISO or french or upright
+ \_kvx {bstyle} {\.bstyle{##1}}% sets bstyle=TeX or ISO or upright or OpTeX
\_kvx {rmchars} {\.rmchars{##1}}% does \.rmchars{<list>}
\_kvx {vargreek} {\.vargreek{##1}}% does \.vargreek{<list>}
\_kvx {text} {\.dotext{##1}}% does \.dotext{<list>}
@@ -33,11 +35,12 @@
\_nspublic \mathset ;
\_doc
- \`\bigp`, \`\Bigp`, \`\biggp`, \`\Biggp`, \`\autop`, \`\normalp` are inspired from
+ \`\bigp`, \`\bbigp`, \`\Bigp`, \`\biggp`, \`\Biggp`, \`\autop`, \`\normalp` are inspired from
\tricklink[bigp]{0094}
\_cod
\_def\.bigp #1{\.fparam{#1}\_bigl\_bigr}
+\_def\.bbigp #1{\.fparam{#1}\_bbigl\_bbigr}
\_def\.Bigp #1{\.fparam{#1}\_Bigl\_Bigr}
\_def\.biggp#1{\.fparam{#1}\_biggl\_biggr}
\_def\.Biggp#1{\.fparam{#1}\_Biggl\_Biggr}
@@ -64,7 +67,7 @@
\.bigleft\.lparen{#1}\.bigright\.rparen
\_ifx\.bigright\_right \_egroup\_fi
}
-\_nspublic \bigp \Bigp \biggp \Biggp \autop \normalp ;
+\_nspublic \bigp \bbigp \Bigp \biggp \Biggp \autop \normalp ;
\_doc
We need macro \`\.ensurebalanced``<open-b><close-b><macro>` for balancing nested parentheses from
@@ -236,12 +239,60 @@
\`\bfserif` re-defines internal \OpTeX/ \O`\_mabf` and \O`\_mabi` macros.
\_cod
-\_def\bfserif{%
+\_def\.bfserif{%
\_protected\_def\_mabf {\_inmath{\_bfvariables\_bfgreek\_bfGreek\_bfdigits}}%
\_protected\_def\_mabi {\_inmath{\_bivariables\_bigreek\_bfGreek\_bfdigits}}%
}
+\_nspublic \bfserif ;
+
\_doc
+ The options `mstyle`, resp. `bstyle` run \`\.mstyle`, resp. \`\.bstyle`
+ and these macros set required shapes of math variables. This can be done
+ only when Unicode-math is loaded already. This is a reason why
+ \`\.unionly``{<code>}{<text>}` is used: it runs <code> only when
+ Unicode-math is loaded, otherwise it prints a warning.
+ \_cod
+
+\_def\.mstyle #1{\.unionly{\_lowercase{\_cs{_math_mstyle_#1}}}{mstyle}}
+\_def\.bstyle #1{\.unionly{\_lowercase{\_cs{_math_bstyle_#1}}}{bstyle}}
+
+\_def\.mstyle_tex {%
+ \_protected\_def\_mit {\_itvariables \_rmdigits \_itgreek \_rmGreek}\_mit
+}
+\_def\.mstyle_iso {%
+ \_protected\_def\_mit {\_itvariables \_rmdigits \_itgreek \_itGreek}\_mit
+}
+\_def\.mstyle_french {%
+ \_protected\_def\_mit {\_umathrange{A-Z}71\_ncharrmA \_umathrange{a-z}71\_ncharita
+ \_rmdigits \_rmgreek \_rmGreek}%
+ \_mit
+}
+\_def\.mstyle_upright {%
+ \_protected\_def\_mit {\_rmvariables \_rmdigits \_rmgreek \_rmGreek}\_mit
+}
+\_def\.bstyle_tex {%
+ \_protected\_def\_mabf {\_inmath{\_bfvariables\_bigreek\_bfGreek\_bfdigits}}%
+ \_protected\_def\_mabi {\_inmath{\_bivariables\_bigreek\_bfGreek\_bidigits}}%
+}
+\_def\.bstyle_optex {%
+ \_protected\_def\_mabf {\_inmath{\_bsansvariables \_bsansgreek \_bsansGreek \_bsansdigits}}%
+ \_protected\_def\_mabi {\_inmath{\_bisansvariables \_bisansgreek \_bsansGreek \_bsansdigits}}%
+}
+\_def\.bstyle_iso {%
+ \_protected\_def\_mabf {\_inmath{\_bivariables\_bigreek\_biGreek\_bfdigits}}%
+ \_protected\_def\_mabi {\_inmath{\_bivariables\_bigreek\_bfGreek\_bidigits}}%
+}
+\_def\.bstyle_upright {%
+ \_protected\_def\_mabf {\_inmath{\_bfvariables\_bfgreek\_bfGreek\_bfdigits}}%
+ \_protected\_def\_mabi {\_inmath{\_bivariables\_bigreek\_biGreek\_bidigits}}%
+}
+\_def\.unionly #1#2{\_ifx\_rmvariables\_undefined
+ \_opwarning{pkg:math: Unicode-math must be loaded first, \_string#2 ignored}%
+ \_else \_afterfi{#1}\_fi
+}
+
+ \_doc
\`\rmchars``{<list>}` is implemented using \O`\foreach`. The list is
expanded first because we want to expand control sequences like `\alpha`
to a real character $\_rmgreek \alpha$.\nl
@@ -374,6 +425,17 @@
\_nspublic \scriptspaces ;
+ \_doc
+ \`\mathclap``{<formula>}`, \`\mathrlap``{<formula>}`, and \`\mathllap``{<formula>}`
+ are based on the \OpTeX/ macros \O`\setmathstyle` and \O`\usemathstyle`.
+ \_cod
+
+\_def\.mathclap#1{{\_setmathstyle \_hbox to0pt{\_hss$\_usemathstyle#1$\_hss}}}
+\_def\.mathrlap#1{{{}\_setmathstyle \_rlap{$\_usemathstyle#1$}}}
+\_def\.mathllap#1{{{}\_setmathstyle \_llap{$\_usemathstyle#1$}}}
+
+\_nspublic \mathclap \mathrlap \mathllap ;
+
\_endnamespace
\_endcode
@@ -385,7 +447,7 @@
The following macros are defined in this package:
\begitems
-* \~`\bigp`, \~`\Bigp`, \~`\biggp`, \~`\Biggp`, \~`\autop`, \~`\normalp`
+* \~`\bigp`, \~`\bbigp`, \~`\Bigp`, \~`\biggp`, \~`\Biggp`, \~`\autop`, \~`\normalp`
gives better controlling of sizes of parentheses.
* \~`\smartdots` declares `\dots` macro more intelligent.
\~`\smartvert` declares \"`|`" for better spacing.
@@ -405,7 +467,7 @@
for printing them from additional math font.
\enditems
-Six options are provided by the `math` package. You can set them by
+Eight options are provided by the `math` package. You can set them by
\^`\mathset``{<options>}` after `\load[math]`, for example
`\mathset{dots, vert, vargreek={\epsilon,\rho}}`. The options are:
\begitems
@@ -412,6 +474,7 @@
* `dots` sets more inteligent `\dots`, the same as \~`\smartdots`.
* `vert` sets more inteligent `|`, the same as \~`\smartvert`.
* `bfserif` sets bold-serif, bold-italic-serif, the same as \~`\bfserif`.
+* `mstyle=<style>`, `bstyle=<style>` are math styles explained in section~\ref[mstyle].
* `rmchars={<list>}` sets `\rm` for selected characters, the same as \~`\rmchars`,
see section~\ref[rmchars].
* `vargreek={<list>}` sets variants for Greek letetters, the same as \~`\vargreek`,
@@ -433,7 +496,7 @@
using a single prefix before functional symbol, i.e. `$\bigp f(x(y+z))$`.
This should be print the same as previous example with \O`\bigl`, \O`\bigr`.
-The prefixes \^`\bigp` (big pair), \^`\Bigp` (Big pair),
+The prefixes \^`\bigp` (big pair), \^`\bbigp` (bbig pair), \^`\Bigp` (Big pair),
\^`\biggp` (bigg pair) and \^`\Biggp` (Bigg pair) are provided,
they can be used before a functional symbol. The scaled parentheses
surrounding the functional parameter can be (...) or [...] or `\{`...`\}` or
@@ -450,7 +513,7 @@
\begtt
$$
\displaylines{
- \Biggp F (1+\biggp g (1+\Bigp f(1+\bigp f(1+f(x))))) \cr
+ \biggp F (1+\Bigp g (1+\bbigp f(1+\bigp f(1+f(x))))) \cr
f(x(y+z)),\quad \bigp f(x(y+z)),\quad \autop f (a\over b)\cr
\Bigp f(a\over b+c),\quad \Bigp f(x^2\over2),\quad \Bigp.(a\over b)
}
@@ -459,7 +522,7 @@
gives:
$$
\displaylines{
- \Biggp F (1+\biggp g (1+\Bigp f(1+\bigp f(1+f(x))))) \cr
+ \biggp F (1+\Bigp g (1+\bbigp f(1+\bigp f(1+f(x))))) \cr
f(x(y+z)),\quad \bigp f(x(y+z)),\quad \autop f (a\over b)\cr
\Bigp f(a\over b+c),\quad \Bigp f(x^2\over2),\quad \Bigp.(a\over b)
}
@@ -637,14 +700,22 @@
$$
It looks better, doesn't it?
-\sec `\bf` and `\bi` can do shapes with serifs
+\sec[mstyle] `\bf` and `\bi` shapes, math styles
\OpTeX/ sets `\bf` and `\bi` math selectors as sans serif, because this
follows the old traditional math typesetting of vectors and matrices.
But Knuth's \TeX/ has another default behavior:`\bf` and `\bi` select serifed
-shaped. So, many people consider it as a standard. You can declare \^`\bfserif` if
+shapes. So, many people consider it as a standard. You can declare \^`\bfserif` if
you want serifed `\bf` and `\bi` math letters.
+Moreover, this package provides `mstyle=<style>` and `bstyle=<style>` options.
+The `mstyle` option can be `TeX`, `ISO`, `french` or `upright` and `bstyle`
+option can be `TeX`, `OpTeX`, `ISO`, `upright`. The `mstyle` and `bstyle`
+options set the upright/italic versions of math Latin/Greek variables in the same
+manner as `math-style` and `bold-style` options (from \LaTeX's
+`unicode-math`) do it. The `bstyle=OpTeX` sets sans serif bold variables,
+which is default in \OpTeX.
+
\sec[rmchars] Selected upright letters and variants for Greek letters
Some mathematicians claim that the letters $e$, $i$ and $\pi$ in meaning
@@ -744,8 +815,19 @@
by previous steps are replaced.
-\sec[pkgtemplate] General recommendation for writing packages
+\sec Miscelaneous commands
+I created various commands at the requests of users. They asked me to create
+commands similar to ones from \LaTeX/ packages.
+
+\^`\mathclap``{<formula>}` creates `{\hbox to0pt{\hss $<formula>$\hss}}` and
+respects the math style.\nl
+\^`\mathrlap``{<formula>}` and \^`\mathllap``{<formula>}` is \O`\rlap` and
+\O`\llap` analogue of \^`\mathclap`.
+
+
+\sec[pkgtemplate] General recommendation for writing \OpTeX/ packages
+
This section has nothing common with the subject of this package but this package
can serve as inspiration for another package writers. It should be a template
for another `<pkg>.opm` files. We emphasize several principles here.
@@ -849,6 +931,9 @@
\endinput
+0.11 2023-04-15: \bbigp introduced.
+0.10 2023-03-12: \mathclap etc. introduced.
+0.09 2023-03-11: mstyle, bstyle options introduced.
0.08 2023-01-28: \eqsystem introduced, \eqfil added.
0.07 2023-01-23: \sgn etc. defined as \protected\def.
2023-01-15: \replacemissingchars: bug fixed
More information about the tex-live-commits
mailing list.