diff options
Diffstat (limited to 'macros/luatex/optex/fonts-catalog.opm')
-rw-r--r-- | macros/luatex/optex/fonts-catalog.opm | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/macros/luatex/optex/fonts-catalog.opm b/macros/luatex/optex/fonts-catalog.opm index f771fe92eb..f9cd2af6df 100644 --- a/macros/luatex/optex/fonts-catalog.opm +++ b/macros/luatex/optex/fonts-catalog.opm @@ -3,8 +3,9 @@ \_initunifonts \_begingroup -\_noloadmath +\_istoksempty\_catalogmathsample \_iftrue \_noloadmath \_fi \_let\_ttfixed=\_tentt +\_fontlet\_smalltt=\_tentt at7pt \_suppressfontnotfounderror=1 \_lowercase\_ea{\_ea\_def\_ea\_cataloglist\_ea{\_the\_catalogonly}} @@ -28,9 +29,14 @@ \_iftrue \def\_cataloglist{.}\_fi \_ifx\_cataloglist\_empty \_ifx^#4^\_else - \_bigskip {\_qquad\_ttfixed\_string\fontfam [#1] -- (#2)\_par} - \_fontfam[#1] + \_bigskip {\_ttfixed\_string\fontfam [#1] -- (#2)\_par} + \_input #3.opm \_ifexistfam \_nobreak\_medskip \_dosamples #4:{} + \_ifx\_mathfaminfo\_empty + \_else \_istoksempty\_catalogmathsample + \_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.} \_fi\_fi\_fi \_egroup @@ -55,6 +61,14 @@ \_ea \_dosamplesB \_fi } +\_def\_wlog#1{\_nobreak\_smallskip + \_hbox to\_hsize{\_hskip25pt + \_edef\_tmp{#1}\_replstring\_tmp{^^J}{\_par}% + \_smalltt \_noindent \_ea \string \_mainfamcommand + \_vtop{\leftskip=1em \_baselineskip=9pt \_tmp \_par}\_hss + } +} + \_def\0#1{\_ifnum#1<10 0\_fi\_the#1} \_footline={\_hfil\_ttfixed\_the\_pageno\_hfil} \_headline={\_ttfixed Font Catalogue generated by \_OpTeX/ \_hfill \_the\_year-\0\_month-\0\_day} @@ -62,7 +76,8 @@ \_ttfixed \_input fams-ini.opm -\_isfile {fams-user.opm}\_iftrue \_input fams-user.opm \_fi + +\_isfile {fams-local.opm}\_iftrue \_input fams-local.opm \_fi \_endgroup @@ -77,7 +92,20 @@ You can redeclare the printed sample of each font by: \catalogsample={Hello world!} \endtt -before \code{\\fontfam[catalog]} command is used. +before \code{\\fontfam[catalog]} command is used. You can specify +\code{\\catalogmathsample} if you want to show default math fonts too, for example + +\begtt +\catalogmathsample={Gamma function is defined as + $$ + \Gamma(z) = \int_0^\infty x^{z-1} e^{-x}{\rm d}x, \quad \Re(z)>0. + $$} +\endtt +% +The \code{\\catalogmathsample} is empty by default, so math fonts are not loaded, +only the family of default math font is listed. + +\bigskip You can restrict the families to be printed in catalogue by: \begtt @@ -95,7 +123,7 @@ The \code{\\cataogexclude} is empty by default. \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-user.opm}. The second file +as default for \OpTeX/) or in the file \code{fams-local.opm}. The second file does not exist by default but user can create it. The syntax rules are described in the \code{fams-ini.opm} file. |