summaryrefslogtreecommitdiff
path: root/macros/optex/base/fonts-catalog.opm
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-17 03:02:29 +0000
committerNorbert Preining <norbert@preining.info>2023-11-17 03:02:29 +0000
commitd91bb5cad66508ec34d77ea60c0a02c79308edef (patch)
tree69c363099e912a77d55b67d891020bcc1f407d80 /macros/optex/base/fonts-catalog.opm
parente0db3f0709a737e7258fd40a7cbfe9a461ea0756 (diff)
CTAN sync 202311170302
Diffstat (limited to 'macros/optex/base/fonts-catalog.opm')
-rw-r--r--macros/optex/base/fonts-catalog.opm27
1 files changed, 20 insertions, 7 deletions
diff --git a/macros/optex/base/fonts-catalog.opm b/macros/optex/base/fonts-catalog.opm
index 893c731df0..1ea403b9c8 100644
--- a/macros/optex/base/fonts-catalog.opm
+++ b/macros/optex/base/fonts-catalog.opm
@@ -1,13 +1,13 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_undefined {Font catalogue <2023-03-09>} % loaded on demand by \fontfam[catalog]
+\_codedecl \_undefined {Font catalogue <2023-06-04>} % loaded on demand by \fontfam[catalog]
\_tracinglostchars=1 % only to log file
\_initunifonts
\_raggedbottom
\_begingroup
-\_istoksempty\_catalogmathsample \_iftrue \_noloadmath \_fi
+\_istoksempty\_catalogmathsample \_iftrue \_noloadmath \_else \_input{unimath-codes.opm}\_fi
\_global\_font\_ttfixed=[LMMono10-Regular]\_relax
\_fontlet\_smalltt=\_ttfixed at7pt
\_suppressfontnotfounderror=1
@@ -26,6 +26,7 @@
\_def\_faminfo [#1]#2#3#4{%
\_bgroup
+ \_rightskip=0sp plus 1fill
\_lowercase{\_edef\_famname{\_ea\_removespaces #1 {} }}%
\_edef\_act{\_noexpand\_isinlist{,\_cataloglist,}{,\_famname,}}\_act
\_iftrue \def\_cataloglist{}\_fi
@@ -33,12 +34,14 @@
\_iftrue \def\_cataloglist{.}\_fi
\_ifx\_cataloglist\_empty
\_ifx^#4^\_else
- \_bigskip {\_ttfixed\_string\fontfam [#1] -- (#2)\_par}
+ \_the\_catalognextfam
+ {\_ttfixed\_string\fontfam [#1] -- (#2)\_par}\_nobreak
\_input #3.opm
- \_ifexistfam \_nobreak\_medskip \_dosamples #4:{}
+ \_ifexistfam
+ \_nobreak\_medskip \_dosamples #4:{}\_par
\_ifx\_mathfaminfo\_empty
\_else \_istoksempty\_catalogmathsample
- \_iftrue {\_ttfixed \$Default math font\$: \_mathfaminfo \_par}
+ \_iftrue {\_nobreak \_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.\_nl
@@ -60,14 +63,15 @@
}
\_def\_dosamplesB#1{%
\_ifx\_relax#1 \_else
+ \_ifhmode \_nl \_fi
{\_ttfixed \_detokenize\_ea{\_usemodifiers}\_detokenize{#1}\_unskip:}
{\_usemodifiers #1\_ea\_ifx\_the\_font \_nullfont
\_ttfixed ... This font isn't available in your system.%
- \_else \_the\_catalogsample \_fi }\_par
+ \_else \_the\_catalogsample \_fi }%
\_ea \_dosamplesB \_fi
}
-\_def\_wlog#1{\_nobreak\_smallskip
+\_def\_wlog#1{\_smallskip
\_hbox to\_hsize{\_hskip25pt
\_edef\_tmp{#1}\_replstring\_tmp{^^J}{\_endgraf}%
\_smalltt \_noindent \_ea \string \_csname \_currfamily\_endcsname
@@ -88,6 +92,8 @@
\_endgroup
+\_the\_catalognextfam {}
+
\parindent=0pt
\nonum\sec Customization of the catalog
@@ -128,6 +134,11 @@ printed but families listed in the \code{\\catalogexclude} are excluded. For exa
The \code{\\cataogexclude} is empty by default.
+\bigskip The material printed at the beginning of each font family is stored in the
+\code{\\catalognextfam} tokens register. Default value is \code{\\bigskip} but you can
+set (for example) \code{\\catalognextfam={\\vfil\\break}} in order to start
+each font family on a next page.
+
\bigskip The font families printed in the catalogue must be declared by the
\code{\\_faminfo} command in the file \code{fams-ini.opm} (declarations used
as default for \OpTeX/) or in the file \code{fams-local.opm}. The second file
@@ -136,6 +147,8 @@ described in the \code{fams-ini.opm} file.
\_endcode % -------------------------------------
+2023-06-04 line breaking optimized
+2023-06-01 \_catalognextfam introduced, \_nobreak inserted
2023-03-09 \_famsrc introduced
2022-07-11 \_raggedbottom added
2022-02-22 \_ttfixed, \footline set as global, bug fixed