texlive[66497] branches/branch2022.final/Master/texmf-dist: optex
commits+karl at tug.org
commits+karl at tug.org
Thu Mar 9 22:13:04 CET 2023
Revision: 66497
http://tug.org/svn/texlive?view=revision&revision=66497
Author: karl
Date: 2023-03-09 22:13:04 +0100 (Thu, 09 Mar 2023)
Log Message:
-----------
optex (9mar23) (branch)
Modified Paths:
--------------
branches/branch2022.final/Master/texmf-dist/doc/optex/base/README
branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-doc.pdf
branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-doc.tex
branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-userdoc.tex
branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-erewhon.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-heros.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-xcharter.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/fams-ini.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-catalog.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-resize.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-select.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/graphics.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/hi-syntax.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/hisyntax-c.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/lists.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/optex.ini
branches/branch2022.final/Master/texmf-dist/tex/optex/base/parameters.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/pkg/tikz.opm
Added Paths:
-----------
branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-cabin.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-fira.opm
branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-inconsolata.opm
Modified: branches/branch2022.final/Master/texmf-dist/doc/optex/base/README
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/optex/base/README 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/doc/optex/base/README 2023-03-09 21:13:04 UTC (rev 66497)
@@ -22,7 +22,11 @@
History:
-<1.10> Feb 2022:
+<1.11> Mar 2023:
+ \fontfamsub: the substitution of missing families introduced.
+ New font family files created.
+ Minor bugs fixed.
+<1.10> Feb 2023:
key-values improved: \iskv, \kvx, \nokvx introduced.
unimath-codes: control sequences are macros, no \chardef.
\bp, \expr: optional syntax for setting the number of digits after decimal point.
Modified: branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-doc.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-doc.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-doc.tex 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-doc.tex 2023-03-09 21:13:04 UTC (rev 66497)
@@ -21,7 +21,7 @@
\tit Format Based on Plain \TeX/ and OPmac\fnotemark1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hfill Version 1.10
+\hfill Version 1.11
\centerline{\it Petr Olšák, 2020, 2021, 2022, 2023}
Modified: branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-userdoc.tex
===================================================================
--- branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-userdoc.tex 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/doc/optex/base/optex-userdoc.tex 2023-03-09 21:13:04 UTC (rev 66497)
@@ -1062,7 +1062,7 @@
codes. Automatic syntax highlighting is possible, for example
`\begtt` \^`\hisyntax{C}` activates colors for C programs. Or
`\verbinput` \^`\hisyntax{HTML} (-) file.html` can be used for HTML or XML codes.
-\OpTeX/ implements C, Python, \TeX/, HTML and XML syntax highlighting.
+\OpTeX/ implements C, Lua, 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 there are comment lines prefixed
@@ -1459,6 +1459,7 @@
current directory. Example: \^`\picdir={img/}` supposes that image files are
in `img` subdirectory. Note: the directory name must end by `/` in
the \^`\picdir` declaration.
+More parameters can be inclued using the \^`\picparams` token list.
Inkscape\fnote
{A powerful and free Wysiwyg editor for creating vector graphics.}
Added: branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-cabin.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-cabin.opm (rev 0)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-cabin.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -0,0 +1,43 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [Cabin] \Cabin {Inspired by Gill's typefaces + touch of a modernism}
+ {\caps \cond \medium \semibold} {\rm \bf \it \bi} {FiraMath}
+ {[Cabin-Regular]}
+ {\_def\_fontnamegen{[Cabin\_condV-\_currV\_condV]:\_capsV\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+Modifiers:^^J
+ \caps ...... caps & small caps (unavailable in condensed variants)^^J
+ \cond ...... condensed variants^^J
+ \medium .... medium weight (only \rm, \it)^^J
+ \semibold .. semibold weight (only \bf, \bi)^^J
+}}
+
+\_moddef \resetmod {\_fsetV caps={},cond={} \_fvars Regular Bold Italic BoldItalic }
+\_moddef \caps {\_fsetV caps=+smcp;\_ffonum; }
+\_moddef \nocaps {\_fsetV caps={} }
+\_moddef \cond {\_fsetV cond=Condensed }
+\_moddef \nocond {\_fsetV cond={} }
+\_moddef \medium {\_fvars Medium Bold MediumItalic BoldItalic }
+\_moddef \semibold {\_fvars Regular SemiBold Italic SemiBoldItalic }
+
+\_initfontfamily % new font family must be initialized
+
+\_ifmathloading
+ \_loadmath {[FiraMath-Regular]}
+ \_addUmathfont \_xits {[XITSMath-Regular]}{} {[XITSMath-Bold]}{} {}
+ \_addto\_frak{\_fam\_xits}\_addto\_cal{\_fam\_xits} \_public \frak \cal ;
+ % \bf, \bi from FiraMath:
+ \_let\_bsansvariables=\_bfvariables
+ \_let\_bsansGreek=\_bfGreek
+ \_let\_bsansgreek=\_bfgreek
+ \_let\_bsansdigits=\_bfdigits
+ \_let\_bisansvariables=\_bivariables
+ \_let\_bisansgreek=\_bigreek
+ % \_resetmathchars <fam-number> <list of \Umathchardef csnames> ;
+ \_mathchars \_xits {\bigtriangleup \bigblacktriangleup \blacktriangle
+ \vartriangle \smallblacktriangleright} % ... etc. you can add more
+\_fi
+
+\_endcode
+
Property changes on: branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-cabin.opm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-erewhon.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-erewhon.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-erewhon.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -3,7 +3,7 @@
\_famdecl [Erewhon] \Erewhon {Derived from Heuristica with slanted variants}
{\caps} {\rm \bf \it \bi \sl \bs} {Erewhon}
{[Erewhon-Regular]}
- {\_def\_fontnamegen {[Erewhon-\_currV]:\_capsV\_fontfeatures}}
+ {\_def\_fontnamegen {[Erewhon-\_currV]:script=latn;\_capsV\_fontfeatures}}
\_wlog{\_detokenize{%
Modifiers:^^J
Added: branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-fira.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-fira.opm (rev 0)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-fira.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -0,0 +1,55 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [Fira] \Fira {FiraSans and FiraMono with FiraMath}
+ {\sans \mono \caps \allsc \nocaps \thin \light \book \medium}
+ {\rm \bf \it \bi}
+ {FiraMath}
+ {[FiraSans-Regular]}
+ {\_def \_fontnamegen {[Fira\_subV-\_currV]:\_capsV\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+Modifiers (subfamilies):^^J
+ \mono ...... Monospaced variants [Mono]^^J
+Modifiers (face weight):^^J
+ \thin ...... \rm, \it = Thin, \bf, \bi = Regular (Sans)^^J
+ \light ..... \rm, \it = Light, \bf, \bi = Medium (Sans)^^J
+ \book ...... \rm, \it = Book, \bf, \bi = SemiBold (Sans)^^J
+ \medium .... \rm, \it = Medium, \bf, \bi = ExtraBold/Bold (Sans, Mono)^^J
+Modifiers (small caps):^^J
+ \caps ...... Caps and small caps (Sans)^^J
+ \allsc ..... Small caps only (Sans)^^J
+ \nocaps .... No small caps^^J
+}}
+
+\_moddef \resetmod {\_fsetV sub=Sans,caps={} \_fvars Regular Bold Italic BoldItalic }
+\_moddef \mono {\_fsetV sub=Mono,caps={} \_fvars Regular Bold Oblique BoldOblique }
+\_moddef \caps {\_fsetV caps=+smcp;\_ffonum; }
+\_moddef \allsc {\_fsetV caps=+smcp;+c2sc;\_ffonum; }
+\_moddef \nocaps {\_fsetV caps={} }
+
+\_moddef \thin {\_onlyif sub=Sans: {\_fvars Thin Regular ThinItalic Italic }}
+\_moddef \light {\_onlyif sub=Sans: {\_fvars Light Medium LightItalic MediumItalic }}
+\_moddef \book {\_onlyif sub=Sans: {\_fvars Book SemiBold BookItalic SemiBoldItalic }}
+\_moddef \medium {\_onlyif sub=Sans: {\_fvars Medium ExtraBold MediumItalic ExtraBoldItalic }%
+ \_onlyif sub=Mono: {\_fvars Medium Bold MediumOblique BoldOblique }}
+
+\_initfontfamily % new font family must be initialized
+
+\_ifmathloading
+ \_loadmath {[FiraMath-Regular]}
+ \_addUmathfont \_xits {[XITSMath-Regular]}{} {[XITSMath-Bold]}{} {}
+ \_addto\_frak{\_fam\_xits}\_addto\_cal{\_fam\_xits} \_public \frak \cal ;
+ % \bf, \bi from FiraMath:
+ \_let\_bsansvariables=\_bfvariables
+ \_let\_bsansGreek=\_bfGreek
+ \_let\_bsansgreek=\_bfgreek
+ \_let\_bsansdigits=\_bfdigits
+ \_let\_bisansvariables=\_bivariables
+ \_let\_bisansgreek=\_bigreek
+ % \_resetmathchars <fam-number> <list of \Umathchardef csnames> ;
+ \_mathchars \_xits {\bigtriangleup \bigblacktriangleup \blacktriangle
+ \vartriangle \smallblacktriangleright
+ \unicodevdots \unicodeadots \unicodeddots} % ... etc. you can add more
+\_fi
+
+\_endcode
Property changes on: branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-fira.opm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-heros.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-heros.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-heros.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -32,7 +32,8 @@
\_let\_bisansgreek=\_bigreek
% \_resetmathchars <fam-number> <list of \Umathchardef csnames> ;
\_mathchars \_xits {\bigtriangleup \bigblacktriangleup \blacktriangle
- \vartriangle \smallblacktriangleright} % ... etc. you can add more
+ \vartriangle \smallblacktriangleright
+ \unicodevdots \unicodeadots \unicodeddots} % ... etc. you can add more
\_fi
\_endcode
Added: branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-inconsolata.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-inconsolata.opm (rev 0)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-inconsolata.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -0,0 +1,18 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [Inconsolata] \Inconsolata {Inconsolata monospaced fonts}
+ {\narrow} {\rm \bf} {}
+ {[Inconsolatazi4-Regular.otf]}
+ {\_def \_fontnamegen {[Inconsolata\_subV-\_currV]:\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+Modifiers:^^J
+ \narrow ...... Narrow variants^^J
+}}
+
+\_moddef \resetmod {\_fsetV sub=zi4 \_fvars Regular Bold . . }
+\_moddef \narrow {\_fsetV sub=N \_fvars Regular Bold . . }
+
+\_initfontfamily % new font family must be initialized
+
+\_endcode
Property changes on: branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-inconsolata.opm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-xcharter.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-xcharter.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/f-xcharter.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -1,7 +1,7 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
\_famdecl [XCharter] \XCharter {An extension of Bitstream Charter}
- {\caps \slant} {\rm \bf \it \bi} {}
+ {\caps \slant} {\rm \bf \it \bi} {XCharter}
{[XCharter-Roman]}
{\_def\_fontnamegen {[XCharter-\_currV]:script=latn;\_capsV\_fontfeatures}}
@@ -17,6 +17,9 @@
\_initfontfamily % new font family must be initialized
+\loadmath{[XCharter-Math]}
+\loadboldmath{[XCharter-Math-Bold]} \to {[XCharter-Math]}
+
\_endcode
See the file `f-heros.opm` for information about principles of such
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/fams-ini.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/fams-ini.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/fams-ini.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -7,6 +7,7 @@
\_faminfo [Catalogue] {Catalogue of all registered font families} {fonts-catalog} {}
\_famalias [Catalog]
+\_famsrc {TeXlive}
\_famtext {Computer Modern like family:}
\_famfrom {GUST}
@@ -132,6 +133,12 @@
{ -,\onum: {\rm\bf\it\bi} }
\_famalias [Caslon]
+\_famfrom {Pablo Impallari, Igino Marini}
+\_faminfo [Cabin] {Inspired by Gill's typefaces + touch of a modernism} {f-cabin}
+ { -,\caps: {\rm\bf\it\bi} \medium: {\rm\it} \semibold: {\bf\bi}
+ \cond: {\rm\bf\it\bi} \cond\medium: {\rm\it} \cond\semibold: {\bf\bi}
+ }
+
\_famfrom {Adobe, Paul D. Hunt}
\_faminfo [Source Pro] {Adobe SourceSerifPro, SourceSansPro, SourceCodePro} {f-sourcepro}
{ \elight,\light,-,\bolder: {\rm\it} -,\bolder: {\bf\bi}
@@ -192,10 +199,12 @@
-,\medium,\semibold: {\bf\bi} }
\_famfrom {CTU in Prague, Roman Cernohous}
+\_famsrc {non free font, used in CTU Style, see \url{https://www.cvut.cz/en/ctu-logo}}
\_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]
+\_famsrc {TeXlive}
\_famfrom {Bitstream, Andrey V. Panov, Michael Sharpe}
\_faminfo [XCharter] {An extension of Bitstream Charter} {f-xcharter}
{ -,\slant,\caps,\caps\slant: {\rm\bf\it\bi} }
@@ -204,6 +213,16 @@
\_faminfo [GFSBodoni] {Based on Bodoni with greek letters} {f-gfsbodoni}
{ -: {\rm\bf\it\bi} \caps: {\rm} }
+\_famfrom {bBox Type GmbH, Carrois Corporate GbR, Edenspiekermann AG}
+\_faminfo [Fira] {Humanist sans-serif, originally designed for Firefox OS} {f-fira}
+ { \thin,\light,\book,-,\medium,\mono,\mono\medium,%
+ \thin\caps,\light\caps,\book\caps,\caps,\medium\caps,%
+ \thin\allsc,\light\allsc,\book\allsc,\allsc,\medium\allsc: {\rm\bf\it\bi} }
+
+\_famfrom {Raph Levien}
+\_faminfo [Inconsolata] {A monospaced font for code listing} {f-inconsolata}
+ { -,\narrow: {\rm\bf} }
+
\_endcode
Once you have prepared a font family file with the name `f-<famname>.opm` and
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-catalog.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-catalog.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-catalog.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_undefined {Font catalogue <2022-07-11>} % loaded on demand by \fontfam[catalog]
+\_codedecl \_undefined {Font catalogue <2023-03-09>} % loaded on demand by \fontfam[catalog]
\_tracinglostchars=1 % only to log file
\_initunifonts
@@ -41,7 +41,9 @@
\_iftrue {\_ttfixed \$Default math font\$: \_mathfaminfo \_par}
\_else Default math font (\_mathfaminfo): \_the\_catalogmathsample \_par
\_fi\_fi
- \_else {\_qquad\_ttfixed ... family skipped, fonts not found in your system.}
+ \_else {\_qquad\_ttfixed ... family skipped, fonts not found in your system.\_nl
+ \_null\_qquad ... where is the family from:\_nl
+ \_null\_qquad\_qquad\_the\_famsrc}
\_fi\_fi\_fi
\_egroup
}
@@ -134,6 +136,7 @@
\_endcode % -------------------------------------
+2023-03-09 \_famsrc introduced
2022-07-11 \_raggedbottom added
2022-02-22 \_ttfixed, \footline set as global, bug fixed
2020-02-26 released
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-resize.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-resize.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-resize.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -186,8 +186,8 @@
% or
\font \<font switch> = {<font name>:<font features>} <size spec>
\endtt
-where <font file name> is name of the OpenType font file without extension
-(extensions `.otf` or `.ttf` are assumed). The braces in the syntax
+where <font file name> is name of the OpenType font file with the extension
+`.otf` or `.ttf` or without it. The braces in the syntax
are optional, use them when the <font file name> or <font name> includes spaces.
The original syntax for `tfm` files is also available. Example:
\begtt
@@ -206,14 +206,32 @@
primitive. And \^`\fontfam` does (among other things) \^`\initunifonts`
too. You need not to specify \^`\initunifonts` if \^`\fontfam` or \^`\ufont` is used.
+When \^`\initunifonts` is declared then the `\font` primitive is ready to read
+Type1 fonts too. If you have `file.afm` and `file.pfb` then you can
+declare `\font\f=file.afm` and use `\f`. It means that you needn't to create
+`tfm` files nor `vf` files, you can use Type1 fonts directly.
+They behave as Unicode fonts if the `afm` metrics are implemented correctly
+(with correct names of all included glyphs). But we must to say that Type1
+font format is old technology, the loading of Type1 fonts is not optimized.
+Use OpenType fonts (`otf` of `ttf`) if it is possible.
+
+Let's sum it up. Suppose that \^`\initunifonts` was used.
+The `\font` primitive is able to load OpenType
+fonts (`otf` or `ttf`), Type1 fonts (`afm` and `pfb`) or classical `tfm` fonts.
+We strongly recommend to prefer OpenType format over Type1 format
+over `tfm` format. The last one desn't support Unicode. If there is nothing
+else left and you must to use `tfm`, then you must to implement re-encoding from
+Unicode to the `tfm` encoding at macro level, see the
+\ulink[http://petr.olsak.net/optex/optex-tricks.html\#nonunicode]{\OpTeX/ trick 0018}
+for example.
+
+
+\secc[setfontsize] The `\setfontsize` macro
+
It seems that you must decide about final size of the font before it is
loaded by the `\font` primitive. It is not exactly true; \OpTeX/ offers
powerful possibility to resize the font already loaded on demand.
-See the example at the end of next subsection.
-
-\secc[setfontsize] 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`)
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-select.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-select.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/fonts-select.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \fontfam {Fonts selection system <2022-12-01>} % preloaded in format
+\_codedecl \fontfam {Fonts selection system <2023-03-09>} % preloaded in format
\_doc -----------------------------
The main principle of the Font Selection System is: run one or more
@@ -130,7 +130,9 @@
\_initunifonts \_unichars \_uniaccents
\_unless\_ifcsname _f:\_csstring#2:main.fam\_endcsname
\_isfont{#7}\_iffalse
- \_opwarning{Family [#1] skipped, font "#7" not found}\_ea\_ea\_ea\_endinput \_else
+ \_opwarning{Family [#1] skipped, font "#7" not found}\_endinput
+ \_lowercase{\_ifcsname _fams:#1\_endcsname}\_famsubstitute \_fi
+ \_else
\_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
@@ -138,7 +140,7 @@
\_protected\_edef#2{\_def\_noexpand\_currfamily{\_csstring #2}\_unexpanded{#8\_resetfam}}%
\_ea \_let \_csname _f:\_currfamily:main.fam\_endcsname =#2%
\_fi
- \_else \_csname _f:\_csstring#2:main.fam\_endcsname \_rm \_ea \_endinput \_fi
+ \_else \_csname _f:\_csstring#2:main.fam\_endcsname \_rm \_endinput \_empty\_fi
}
\_def\_initfontfamily{%
\_csname _f:\_currfamily:main.fam\_endcsname \_rm
@@ -308,18 +310,21 @@
\_cod -----------------------------
\_protected\_def \_fontfam [#1]{%
- \_lowercase{\_edef\_famname{\_ea\_removespaces #1 {} }}%
+ \_lowercase{\_edef\_famname{\_ea\_removespaces \_expanded{#1} {} }}%
\_isfile {f-\_famname.opm}\_iftrue \_opinput {f-\_famname.opm}%
\_else
\_tryloadfamslocal
\_edef\_famfile{\_trycs{_famf:\_famname}{}}%
- \_ifx\_famfile\_empty \_listfamnames
+ \_ifx\_famfile\_empty
+ \_ifcsname _fams:\_famname \_endcsname \_famsubstitute
+ \_else \_listfamnames
+ \_fi
\_else \_opinput {\_famfile.opm}%
- \_fi\_fi
+ \_fi\_empty\_fi
}
\_def\_tryloadfamslocal{%
\_isfile {fams-local.opm}\_iftrue
- \_opinput {fams-local.opm}\_famfrom={}%
+ \_opinput {fams-local.opm}\_famfrom={}\_famsrc={}%
\_fi
\_let \_tryloadfamslocal=\_relax % need not to load fams-local.opm twice
}
@@ -341,6 +346,27 @@
\_public \fontfam ;
\_doc -----------------------------
+ \`\fontfamsub` `[<Family>][<byFamily>]` declares automatic substitution of
+ <Family> by <byFamily> which is done when <Family> is not installed. I.e.
+ if there is no `f-<family>.opm` file or there is no regular font of the
+ family installed.
+ \`\_famsubstitute` is internal macro used in \^`\fontfam` and \^`\_famdecl` macros.
+ It consumes the rest of the macro, runs \^`\nospacefuturelet` in order to
+ do `\endpinput` to the current `f-file` and runs \^`\fontfam` again.
+ The table of such substutitions are saved in the macros `\_fams:<family>`.
+ \_cod -----------------------------
+
+\_def \_fontfamsub [#1]#2[#3]{\_lowercase{\_sxdef{_fams:#1}{#3}}}
+
+\_def\_famsubstitute #1\_empty\_fi{\_fi\_fi\_fi
+ \_wterm {FONT: Family [\_famname] not found, substituted by [\_cs{_fams:\_famname}]}%
+ \_nospacefuturelet\_tmp\_famsubstituteA % we want to \endinput current f-file
+}
+\_def\_famsubstituteA{\_fontfam[\_cs{_fams:\_famname}]}
+
+\_public \fontfamsub ;
+
+ \_doc -----------------------------
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
@@ -360,6 +386,9 @@
\`\_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.
+ \nl
+ \`\_famsrc` declares the source, where is the font family from (used in `fams-ini.opm`
+ and if the font isn't found when the fonts catalog is printed).
\_cod -----------------------------
\_def\_famtext #1{}
@@ -372,10 +401,10 @@
\_lowercase{\_edef\_tmpa{\_ea\_removespaces #1 {} }}%
\_sdef{_famf:\_tmpa\_ea}\_ea{\_famfile}%
}
-\_newtoks\_famfrom
+\_newtoks\_famfrom \_newtoks\_famsrc
\_input fams-ini.opm
\_let\_famfile=\_undefined
-\_famfrom={}
+\_famfrom={} \_famsrc={}
\_doc -----------------------------
When the \^`\fontfam``[catalog]` is used then the file
@@ -899,6 +928,7 @@
\endinput
+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
2022-02-22 Font Selection System reimplemented, \fontsel introduced
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/graphics.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/graphics.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/graphics.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -7,9 +7,6 @@
or new syntax `\inspic{<filename>}`. So, we need to define
two auxiliary macros \`\_inspicA` and \`\_inspicB`.
- You can include more `\pdfximage` parameters (like `page<number>`)
- in the \`\_picparams` macro.
-
All `\inspic` macros are surrounded in `\hbox` in order user can
write `\moveright\inspic ...` or something similar.
\_cod -----------------------------
@@ -19,11 +16,9 @@
\_def\_inspicB #1{%
\_pdfximage \_ifdim\_picwidth=\_zo \_else width\_picwidth\_fi
\_ifdim\_picheight=\_zo \_else height\_picheight\_fi
- \_picparams {\_the\_picdir#1}%
+ \_the\_picparams {\_the\_picdir#1}%
\_pdfrefximage\_pdflastximage\_egroup}
-\_def\_picparams{}
-
\_public \inspic ;
\_doc -----------------------------
@@ -48,7 +43,7 @@
\_newtoks\_inkdefs \_inkdefs={%
\_def\makeatletter#1\makeatother{}%
\_def\includegraphics[#1]#2{\_inkscanpage#1,page=,\_fin \_inspic{\_the\_tmptoks}\_hss}%
- \_def\_inkscanpage#1page=#2,#3\_fin{\_ifx,#2,\_else\_def\_picparams{page#2}\_fi}%
+ \_def\_inkscanpage#1page=#2,#3\_fin{\_ifx,#2,\_else\_picparams{page#2}\_fi}%
\_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}%
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/hi-syntax.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/hi-syntax.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/hi-syntax.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -144,7 +144,7 @@
\printdoc hisyntax-c.opm
-\OpTeX/ provides `hisyntax-{c,python,tex,html}.opm` files.
+\OpTeX/ provides `hisyntax-{c,lua,python,tex,html}.opm` files.
You can take inspiration from these files and declare more languages.
Users can re-declare default colors by \^`\hicolors``={<list of color declarations>}`.
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/hisyntax-c.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/hisyntax-c.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/hisyntax-c.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_hisyntaxc {Syntax highlighting for C sources <2020-04-03>}
+\_codedecl \_hisyntaxc {Syntax highlighting for C sources <2023-03-02>}
\_newtoks \_hisyntaxc \_newtoks \_hicolorsc
@@ -25,10 +25,15 @@
\_ea \_foreach \_tmpa
\_do {\_replthis{#1}{\n\o#1\n}}
\_foreach % keywords
- {auto}{break}{case}{char}{continue}{default}{do}{double}%
- {else}{entry}{enum}{extern}{float}{for}{goto}{if}{int}{long}{register}%
- {return}{short}{sizeof}{static}{struct}{switch}{typedef}{union}%
- {unsigned}{void}{while}
+ {alignas}{alignof}{auto}{bool}{break}{case}{char}{const}%
+ {constexpr}{continue}{default}{do}{double}{else}{enum}{extern}%
+ {false}{float}{for}{goto}{if}{inline}{int}{long}{nullptr}%
+ {register}{restrict}{return}{short}{signed}{sizeof}{static}%
+ {static_assert}{struct}{switch}{thread_local}{true}{typedef}%
+ {typeof}{typeof_unqual}{union}{unsigned}{void}{volatile}{while}%
+ {_Alignas}{_Alignof}{_Atomic}{_BitInt}{_Bool}{_Complex}%
+ {_Decimal128}{_Decimal32}{_Decimal64}{_Generic}{_Imaginary}%
+ {_Noreturn}{_Static_assert}{_Thread_local}
\_do {\_replthis{\n#1\n}{\z K{#1}}}
\_replthis{.}{\n.\n} % numbers
\_foreach 0123456789
@@ -64,3 +69,8 @@
See `hi-sytax.opm` for more information about `\hicolor`, `\replfromto` and
`\replthis` macros.
+
+\endinput
+
+2023-03-02: more C keywords added
+2020-04-03: released
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/lists.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/lists.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/lists.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -1,25 +1,21 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \begitems {Lists: begitems, enditems <2021-03-10>} % preloaded in format
+\_codedecl \begitems {Lists: begitems, enditems <2022-02-25>} % preloaded in format
\_doc -----------------------------
\`\_aboveliskip` is used above the list of items,\nl
- \`\_belowliskip` is used below the list of items and\nl
- \`\_interliskip` is used between items.\nl
- \`\_listskipA` is used as `\listskipamount` at level 1 of items.\nl
- \`\_listskipB` is used as `\listskipamount` at other levels.\nl
- \`\_setlistskip` sets the skip dependent on the current level of items
+ \`\_belowliskip` is used below the list of items,\nl
+ \`\_setlistskip` sets the skip dependent on the current level of items,\nl
+ \`\_listskipab` is \^`\ilistskipamount` or \^`\olistskipamount`.
\_cod -----------------------------
-\_def\_aboveliskip {\_removelastskip \_penalty-100 \_vskip\_listskipamount}
-\_def\_belowliskip {\_penalty-200 \_vskip\_listskipamount}
-\_def\_interliskip {}
-\_def\_listskipA {\_medskipamount}
-\_def\_listskipB {0pt plus.5\_smallskipamount}
+\_def\_aboveliskip {\_removelastskip \_penalty-100 \_vskip\_listskipab}
+\_def\_belowliskip {\_penalty-200 \_vskip\_listskipab}
+\_newskip\_listskipab
\_def\_setlistskip {%
- \_ifnum \_ilevel = 1 \_listskipamount = \_listskipA \_relax
- \_else \_listskipamount = \_listskipB \_relax
+ \_ifnum \_ilevel = 1 \_listskipab = \_olistskipamount \_relax
+ \_else \_listskipab = \_ilistskipamount \_relax
\_fi}
\_doc -----------------------------
@@ -54,7 +50,7 @@
}
\_def\_enditems{\_par\_belowliskip\_egroup \_isnextchar\_par{}{\_noindent}}
-\_def\_startitem{\_par \_ifnum\_itemnum>0 \_interliskip \_fi
+\_def\_startitem{\_par \_ifnum\_itemnum>0 \_vskip\_itemskipamount \_fi
\_advance\_itemnum by1
\_the\_everyitem \_noindent\_llap{\_the\_printitem}\_ignorespaces
}
@@ -61,10 +57,12 @@
\_public \begitems \enditems \itemnum ;
\_doc ----------------------------
- \`\novspaces` sets \^`\listskipamount` to 0pt.
+ \`\novspaces` sets \^`\_listskipab` and \^`\itemskipamount` to 0pt.
+ Moreover, it deactivates \^`\_setlistskip` (for inner lists).
\_cod ----------------------------
-\_def\_novspaces {\_removelastskip \_listskipamount=0pt \_relax}
+\_def\_novspaces {\_removelastskip
+ \_listskipab=\_zoskip \_itemskipamount=\_zoskip \_let\_setlistskip=\_relax}
\_public \novspaces ;
\_doc -----------------------------
@@ -123,6 +121,7 @@
\_endcode % -------------------------------------
+2022-02-25 \olistskipamount, \ilistskipamount, \itemskipamount introduced
2021-03-10 \_ifmmode*\_else\_ea\_startitem\_fi added to * defintition
2020-04-21 \isnextchar\par added to \enditems
2020-03-18 introduced
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/optex.ini
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/optex.ini 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/optex.ini 2023-03-09 21:13:04 UTC (rev 66497)
@@ -21,7 +21,7 @@
% OpTeX version
-\def\optexversion{1.10 Feb 2023}
+\def\optexversion{1.11 Mar 2023}
\def\fmtname{OpTeX}
\let\fmtversion=\optexversion
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/base/parameters.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/base/parameters.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/base/parameters.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -197,12 +197,16 @@
parameters locally in the group where \^`\inspic` is used in order to not
influence the dimensions of other images. But there exist many
situations you need to put the same dimensions to more images,
- so you can set this parameter only once before more \^`\inspic` macros.
+ so you can set this parameter only once before more \^`\inspic` macros.\nl
+ More parameters accepted by `\pdfximage` primitive can be set in the
+ \`\picparams` tokens list. For example `\picparams={page3}`
+ selects page 3 from included PDF file.
\_cod -----------------------------
\_newdimen\_picwidth \_picwidth=0pt \_let\picw=\_picwidth
\_newdimen\_picheight \_picheight=0pt
-\_public \picwidth \picheight ;
+\_newtoks\_picparams
+\_public \picwidth \picheight \picparams ;
\_doc -----------------------------
\`\kvdict` is dictionary name when \~`\readkv`, \~`\kvx`, \~`\kv`, and \~`\iskv` are
@@ -310,17 +314,26 @@
\nl
The \`\ilevel` keeps the value of the current nesting level of the items list.
\nl
- The \`\listskipamount` gives vertical skip above and below the items list
- if `\ilevel=1`.
+ The \`\olistskipamount` is vertical skip above and below the items list
+ if `\ilevel=1`.\nl
+ The \`\ilistskipamount` is vertical skip above and below the items list
+ if `\ilevel>1`.\nl
+ The \`\itemskipamount` is vertical skip between list items, but not above the firts
+ and below the last.
\_cod -----------------------------
-\_newtoks\_defaultitem \_defaultitem={$\_bullet$\_enspace}
+\_newtoks\_defaultitem \_defaultitem={$\_bullet$\_enspace}
\_newtoks\_everyitem
\_newtoks\_everylist
-\_newskip \_listskipamount \_listskipamount=\_medskipamount
\_newcount \_ilevel
-\_public \defaultitem \everyitem \everylist \listskipamount \ilevel ;
+\_newskip\_olistskipamount \_olistskipamount=\_medskipamount
+\_newskip\_ilistskipamount \_ilistskipamount=0pt plus.5\_smallskipamount
+\_newskip\_itemskipamount \_itemskipamount=0pt
+\_public \defaultitem \everyitem \everylist \ilevel
+ \olistskipamount \ilistskipamount \itemskipamount ;
+\_let \listskipamount = \_olistskipamount % for backward compatibility
+
\_doc -----------------------------
The \^`\tit` macro includes `\vglue`\`\titskip` above the title of the document.
\_cod -----------------------------
Modified: branches/branch2022.final/Master/texmf-dist/tex/optex/pkg/tikz.opm
===================================================================
--- branches/branch2022.final/Master/texmf-dist/tex/optex/pkg/tikz.opm 2023-03-09 21:12:13 UTC (rev 66496)
+++ branches/branch2022.final/Master/texmf-dist/tex/optex/pkg/tikz.opm 2023-03-09 21:13:04 UTC (rev 66497)
@@ -1,6 +1,6 @@
% This is macro package used by OpTeX, see http://petr.olsak.net/optex
-\_codedecl \tikzpicture {TikZ for OpTeX <2022-02-18>}
+\_codedecl \tikzpicture {TikZ for OpTeX <2023-03-04>}
\_namespace{pgf}
\_catcode`\@=11
\_let\_optexforeach=\foreach
@@ -155,11 +155,17 @@
\_let\.foreach=\pgffor at foreach % \_pgf_foreach is \pgffor at foreach
\_let\foreach=\_optexforeach % \foreach is OpTeX's \foreach
+\_let\.usetikzlibrary=\usetikzlibrary
+\_def\usetikzlibrary#1{\_let\foreach=\.foreach
+ \.usetikzlibrary{#1}\let\foreach=\_optexforeach
+}
+
% don't worry about reseting catcodes - we are at the end of \opinput'ed file
\_endnamespace
\_endcode
History:
+2023-03-04 \_tikz_foreach used during \usetikzlibrary (bug fix).
2022-03-18 Tikz's \foreach only in its environment.
2022-03-05 resources management re-implemented.
2021-07-15 released
More information about the tex-live-commits
mailing list.