% KP-fonts in plain TeX
%%%%%%%%%%%%%%%%%%%%%%%
% Petr Olsak, May 2016

% Use "pdftex kpfonts-plain" or "pdfcsplain kpfonts-plain" to create the PDF.
% Process it three times because of Table of contents generation.
% Or download the PDF from 
% http://petr.olsak.net/ftp/olsak/bulletin/kpfonts-plain.pdf

\parindent=24pt
\input opmac
\input t1code
\input kp-fonts

\hyperlinks\Blue\Blue

\def\printsec#1{\par \norempenalty-400 \bigskip
  {\secfont \noindent 
  \hbox to\parindent{\dotocnum{\thetocnum}\hfil}#1\nbpar}\insertmark{#1}%
  \nobreak \remskip\medskipamount \firstnoindent
}
\def\printsecc#1{\par \norempenalty-200 \bigskip
  {\seccfont \noindent 
  \hbox to\parindent{\dotocnum{\thetocnum}\hfil}#1\nbpar}%
  \nobreak \remskip\medskipamount \firstnoindent
}
\def\printbib{\hangindent=\iindent
   \ifx\citelinkA\empty \noindent\hskip\iindent \llap{[\the\bibnum]\quad}%
   \else \noindent \fi
}

\def\KPfonts{{\em kpfonts}}

\def\bfshape{\sans\fam \let\tenit=\tenbi \boldmath \bf}
\def\author#1\par{\centerline{\typosize[14.4/]\bfshape#1\unskip}\bigskip} 
\activettchar"

\tit KP-fonts in plain \TeX{}

\author Petr Ol\char178\char225k

The very large font family \KPfonts{} \cite[kp-fonts] (by Christophe
Caignaert) is known in \LaTeX{} world because there is the NFSS support for
these fonts. There are many independent variations and features supported by
the \KPfonts{}. This font family can be loaded in plain \TeX{} using
"\input kp-fonts". Macros from \csplain{}~\cite[csplain] are used in this
case. This article describes the main concept of the macros from \csplain{}
which gives fonts support for plain \TeX{} users. A new feature of these
macros (font modifiers) is implemented in \csplain{} from May 2016.

The section \ref[kpfonts] in this article includes a documentation of 
\KPfonts{} if the family is loaded using "\input kp-fonts". This gives an
illustration of power of \csplain{} font support. Finally, section \ref[ffmac]
includes a basic notes for macro programmers.

Note that all features of \csplain{} macros described here can be used in
all common plain \TeX{} formats: generated by "etex.src" or Knuth's original
plain \TeX{} format or \csplain{}. There is no substantial differences
between them. Of course, \csplain{} preloads a basic set of macros (for
resizing) in its format but if this isn't done then the little set of macros
is read (from \csplain{} package) automatically and additionally.

\nonum\notoc\sec Contents

\maketoc

\sec Font families in \csplain{} macros

\secc Basics

The main principle of font macros in \csplain{} is to keep the plain \TeX{}
philosophy. This means:

\begitems
* use straightforward macros,
* font-files (where a font family is loaded) use directly "\font" primitive,
* leave core font macros for users "\rm", "\bf", and "\it" almost unchanged.
\enditems

User can select a font family by "\input font-file". The ``font-file'' loads
typically four fonts of one family for usage in "\rm", "\bf", "\it" and
"\bi" macros. But the font-file can give more possibilities using ``font
modifiers'' (see bellow).

The fonts in a font family can be selected by "\rm", "\bf", "\it" and "\bi"
macros. These macros are defined similarly like in plain TeX:

\begtt
\def\rm{\fam0\tenrm}       % in plain TeX: \def\rm{\fam\z@\tenrm}
\def\bf{\fam\bffam \tenbf} % in plain TeX: \def\bf{\fam\bffam\tenbf}
\def\it{\fam\itfam \tenit} % in plain TeX: \def\it{\fam\itfam\tenit}
\def\bi{\fam\bifam \tenbi} % in plain TeX: undefined
\endtt

The macros above use native font selectors "\tenrm", "\tenbf", "\tenit" and
"\tenbi" declared by "\font" primitive in the font-file. Once these four
selectors are declared, they can be resized to arbitrary size. For example:

\begtt
\def\sizespec{at12pt}\resizeall
\endtt
%
resizes the font selectors "\tenrm", "\tenbf", "\tenit" and "\tenbi" to 12\,pt
with the same fonts (or with their appropriate optical modifications if they
are available and "\dgsize" is set). The name "\ten.." is here only for
historical reasons and it has nothing to do with real font size selected. For
more information about resizing see the
article \cite[tb-csplain] and comments in the file "csfontsm.tex" where this
feature is implemented. 

User can use
macros "\rm", "\bf", "\it", "\bi"\fnote
  {Note that {\tt\string\tentt} is resized too, so {\tt\string\tt} macro can
   be used in selected size too. And more font selectors can be resized when
   macro programmer registers a font selector for resizing using
   {\tt\string\regfont}.}
in a selected size. A more comfortable user environment
for resizing with macros "\typosize", "\typoscale" and "\thefontsize" is
prepared in OPmac macro package \cite[opmac] which is a part of \csplain{} macros too.
The OPmac macros for font resizing set all size-dependent internal parameters and 
sizes for math typesetting too.
See section 2 in the OPmac documentation~\cite[opmac-doc].

Summary: the meaning of "\tenrm", "\tenbf", "\tenit" and "\tenbi" selectors
depends on context: on a font family chosen by "\input font-file" and on
selected size.

Users of NFSS from \LaTeX{} may ask: why there isn't a possibility of
independent selectors for ``weight'' and ``shape''? The answer is: We need
not it and we want to keep the plain \TeX{} simplicity. For example OPmac
provides the "\em" macro for emphasizing. It works like "\rm->\it"
"\it->\rm", "\bf->\bi", "\bi->\bf" and it adds the necessary italic
corrections. User can define analogous simple macro if it is needed.


\label[fontfam]\secc Prepared font files

The font-files ready to use are packed to the \csplain{} package. You can
select one line from the following list:

\begtt
\input lmfonts      % Latin Moder fonts

\input ctimes       % Times font family
\input chelvet      % Helvetica font family
\input cavantga     % AvantGarde font family
\input cbookman     % Bookman font family
\input cncent       % NewCenturySchlbk font family
\input cpalatin     % Palatino font family

\input cs-termes    % TeX Gyre Termes
\input cs-adventor  % TeX Gyre Adventor
\input cs-bonum     % TeX Gyre Bonum
\input cs-heros     % TeX Grye Heros
\input cs-pagella   % TeX Gyre Pagella
\input cs-schola    % TeX Gyre Schola
\input cs-cursor    % TeX Gyre Cursor

\input cs-antt      % Antykwa Torunska
\input cs-polta     % Antykwa Poltawskiego

\input cs-charter   % Charter
\input cs-bera      % Bera
\input cs-arev      % ArevSans
\input cs-libertine % Linux Libertine

\input kp-fonts     % KPfonts
\endtt

You need not to remember these font-file names. If you are using OPmac
macros then the macro "\fontfam[Family Name]" is ready to use. It does
the necessary "\input". If you give an unknown family name or give simply
"[?]" as a parameter then the list of possibilities is printed to the terminal
and to the log file in the form:

\begtt
\fontfam: unknown font family [?] (8t). Choose:
=== Fonts derived from Computer Modern ===
 [LM fonts]  {\rm \it \bf \bi ; mod:\caps \sans \ttset \slant \nbold \ttprop \t
tlight \ttcond \quotset \upital \dunhill ; +AMS} (8t 8z U)
=== Adobe 35 fonts ===
 [Times]  {\rm \it \bf \bi \tt ; mod:\caps ; +TX} (8t 8z)
 [Helvetica]  {\rm \it \bf \bi \tt ; mod:\caps \cond ; +TX} (8t 8z)
 [Avantgarde]  {\rm \it \bf \bi \tt ; mod:\caps ; +TX} (8t 8z)
 [Bookman]  {\rm \it \bf \bi \tt ; mod:\caps ; +TX} (8t 8z)
 [Palatino]  {\rm \it \bf \bi \tt ; mod:\caps ; +TX} (8t 8z)
 [New Century]  {\rm \it \bf \bi \tt; mod:\caps  ; +TX} (8t 8z)
=== TeXGyre project, fonts derived from Adobe 35 ===
 [TG Termes]  {\rm \it \bf \bi ; mod:\caps ; +TX} (8t 8z U)
 [TG Heros]  {\rm \it \bf \bi ; mod:\caps \cond ; +TX} (8t 8z U)
 [TG Adventor]  {\rm \it \bf \bi ; mod:\caps ; +TX} (8t 8z U)
 [TG Bonum]  {\rm \it \bf \bi ; mod:\caps ; +TX} (8t 8z U)
 [TG Pagella]  {\rm \it \bf \bi ; mod:\caps ; +TX} (8t 8z U)
 [TG Schola]  {\rm \it \bf \bi ; mod:\caps ; +TX} (8t 8z U)
 [TG Cursor]  {\rm \it \bf \bi ; mod:\caps ; +TX} (8t 8z U)
=== Polish fonts ===
 [Antykwa Torunska]  {\rm \it \bf \bi ; mod:\caps \cond \wlight ; +TX} (8t 8z)
 [Antykwa Poltawskiego]  {\rm \it \bf \bi ; mod:\caps \wlight ; +TX} (8t 8z U)
=== Miscelaneous ===
 [Charter]  {\rm \it \bf \bi ; +TX} (8t 8z)
 [Arev Sans]  {\rm \it \bf \bi ; +TX} (8t)
 [Bera]  {\rm \it \bf \bi ; mod:\sans ; +TX} (8t)
 -- [Linux Libertine] (U sU) -- unavailable in 8t enc.
 [KP fonts]  {\rm \it \bf \bi ; mod:\caps \bcaps \slant \sans \ttset \wlight \b
ext \noflig \oldn \olds \oldsv ; ... 22 modifiers in total; +KP} (8t 7t)
 [Catalog]  {; print catalogue} ()
\endtt

See OPmac documentation \cite[opmac-doc] for more information about this.
User can create own font-files and register them to the "\fontfam" listing.

\secc Font modifiers

You can use ``modifiers'' of the basic variants of family "\rm", "\bf",
"\it", and "\bi". If modifiers are supported then they are listed in the
"\fontfam" listing. For example "TG Heros" family supports two modifiers
"\cond" and "\caps" which means ``condensed'' and ``caps\&small caps''. 
The modifiers can be independently combined but they must be immediately 
followed by "\rm", "\bf", "\it", "\bi", "\one" or "\fam" control sequences. 

If the modifiers are followed by "\rm", "\bf", "\it", or "\bi" then a
modification of given basics family variant is selected as a single font. If
they are followed by "\one" then a modification of currently selected variant
is used. If they are followed by "\fam" then it works like "\one" but
moreover, the basic font selectors "\tenrm", "\tenbf", "\tenit" and "\tenbi"
are reloaded using given modifiers, so all family selected by macros "\rm",
"\bf", "\it" and "\bi" works with given modification. Example:

\begtt
\input cs-heros
{\cond\rm       ... Normal condensed.}
{\caps\cond\it  ... Caps \& small-caps plus condensed italics.}
{\caps\fam      ... Caps \& small-caps, now all basic macros
                    \rm, \bf, \it, \bi keeps this modification.}
\endtt

All font selectors and their modifiers do setting locally inside TeX group.
The modifiers keep their data in the \TeX{} memory (locally) and they can be
applied afterwards: 

\begtt
{\cond\fam \rm Here is {\it condensed} font family. 
 \caps\fam \rm Here is {\it Caps \& small-caps} family which is {\it condensed}.}
\endtt

This means that "\modifier\something" keeps previously selected
modifications and only adds a new one.

You can combine fonts from more families. The main principle says: 
load the main family last. You can
use "\ffletfont\newselector = {mod+var}{size}" for keeping font selectors from
previous loading. Example:

\begtt
\input cs-heros 
\ffletfont \titlefont = {\cond\bf}{at14pt} % Heros condensed for titles
\input cs-termes % Termes at 10 pt for normal text
\endtt

If you are using XeTeX or LuaTeX then the U (unicode) encoding is used and
OTF fonts are loaded. You can use "\useff{text}" in such case. This works like
another font modifier and does modification of font-features. Use 
"otfinfo -f file.otf" to inspect the font features of used font. Example:

\begtt
\useff{+onum;+salt}\bf  ... use Bold variant with oldstyle digits and
                            stylistic alternatives
\useff{+onum;+salt}\fam ... use given features for whole family.
\endtt

\secc Font encodings

The list printed by "\fontfam" macro shows (in parentheses) what encodings
are supported by each font family. The used abbreviations means:

\begtt
8t ... 8bit T1 encoding stated in Cork
8z ... 8bit XL2 encoding derived from ISO-8859-2, used in Czech and Slovak TeX
7t ... 7bit encoding declared by Knuth in cmr10 font
U  ... Unicode, this means that fonts are loaded in OTF format
\endtt

\csplain{} format with pdf\TeX{} starts in "8z" encoding by default but this can be
changed to "8t" encoding using "\input t1code". If Xe\TeX{} or LuaTeX is
used then "U" encoding is assumed. If encoding is not set by rules mentioned
right before (i.e. non-\csplain{} with pdf\TeX) then "8t" is set. The
default setting can be changed by "\def\fotenc{enc}" before 
"\input font-file". The switching to more various encodings inside document
isn't supported. User can prepare such simply macros if it is needed.

The "7c" encoding (companion encoding to "8t" with more additional characters)
is provided by "exchars.tex" macro file from \csplain. See this macro
file for more details. The macro file "exchars.tex" is used in
"kp-fonts.tex", thus all additional characters are simply accessible. For
example user write "\euro" and it prints \euro{} when \KPfonts{} are selected (or
when "8z" encoding is used because "8z" encoding includes~\euro{} directly).

\csplain{} format with pdf\TeX{} provides UTF-8 input encoding unsing
enc\TeX{} extension of pdf\TeX{}. This is documented in \cite[csplain-doc].
So, user can use accented letters and more characters directly. User can
write {\ttset\rm \euro} and it prints \euro{} in \csplain{} when \KPfonts{}
are selected. Non-\csplain{} formats with
pdf\TeX{} don't provide UTF-8 input unless user creates something for this. 
But languages with ISO-8859-1
characters set (Spanish, French, German, \dots) can use their accented
letters encoded in ISO-8859-1 because this encoding is a subset of "8t" font
encoding. Xe\TeX{} and Lua\TeX{} provides UTF-8 input as native input.


\secc Math fonts

The "\fontfam" macro lists the abbreviation of math fonts collection used
together with selected text font family. See the letters after ``plus sign'' in
the output of "\fontfam[?]" in the section~\ref[fontfam].

\begtt
AMS ... AMSTeX font collection: Computer Modern plus a set of others
TX .... TX fonts, they are superset of AMS and designed for Times family
KP .... KP math fonts collection, designed for kpfonts 
\endtt

Note that most of text font families are combined with TX fonts by default.
The italic and roman variants from selected text font family 
is used for variables and for math texts like
sin, lim, max. Other symbols are used from TX fonts collection.
If you are using Unicoded \TeX{} engine (Xe\TeX{} or Lua\TeX) then you can
load Unicode Math font, but this is not provided as default. See the "uni-math.tex"
file for more information.

Two math font macro-selectors are provided: "\normalmath" and "\boldmath".
If a math modifiers are available (this is the case of KP math collection
fonts only) then these math modifiers can be used before "\normalmath" or
"\boldmath". These selectors sets the fonts for whole formula inside math
mode. On the other hand, you can use individual math switchers which selects
a math alphabet inside math mode: "\cal" for simple calliraphic, "\script"
for more calligraphic, "\frak" for fraktur and "\bbchar" for double strokes.
Of course, "\rm" and "\it" select normal or italics. But "\bf" and "\bi"
select {\em sans serif} bold and bold-italic, because it is more
conventional to use sans serifed bold in math formulas (for vectors or
matrices, for example).

\csplain{} package inclues macros for math font collections in the
following files

\begtt
ams-math.tex ... AMS fonts
tx-math.tex  ... TX fonts
ntx-math.tex ... NTX fonts
kp-math.tex  ... KP fonts
uni-math.tex ... Unicode Math font declared in the \unimathfont macro
\endtt
%
These files provide simple loading of math fonts collections including
scaling of the whole collection to desired sizes. Basic features are
documented in these files directly.

A different math font collection can be combined with text font
family than default. It can be done by "\let\loadmathfonts=\relax" before "\input font-file". 
This suppresses the loading of math font family. Then "\input foo-math" can
be used directly.

You can copy and rename a "foo-math.tex" file and you can do various
modifications or set a complete new math fonts collection.

\label[kpfonts]\sec The \KPfonts{} manual for plain \TeX{}

Use "\input kp-fonts". There are twelve modifiers of text fonts of
\KPfonts{} family:

\begtt
\caps ..... Caps & small caps
\bcaps .... Bigger small-caps
\slant .... Slanted
\sans ..... Sans serif
\ttset .... TypeWriter set
\wlight ... Weight Light
\bext ..... Bold extended
\noflig ... no f ligatures
\oldn ..... Old style numbers
\olds ..... Old style all
\oldsv .... Very old style
\kpreset .. Returns all modifications to default values
\endtt

And there are next ten math modifiers of KP math fonts collections: 

\begtt
\lightmath .... Light version of math
\widermath .... More amount of spaces between characters
\bfnmath ...... Normal \bf in math (bf sans is default)
\sansmath ..... Sans serif math
\uprightmath .. Capital letters are upright
\bbcharss ..... Blackboard characters sans serif
\greekup ...... Lowercase Greek upright
\partialup .... Upright partial derivations symbol
\narowiints ... Multiplied integrals narrower
\kpmathreset .. Returns to the default setting
\endtt

\secc Text fonts

The "\fontfam[Catalog]" prints basic modifications of \KPfonts:

\medskip

[KP fonts]

\def\fontfamsample{ABCDabcd Qsty fi fl 
   \char225\char233\char237\char243\char250\char252\char183{ }% 
   \char176\char186\char163{ }%
   \char193\char201\char205\char211\char218\char220\char151{ }%
   \char144\char154\char130{ }0123456789}

\def\pp #1#2{\par \noindent 
   {\tt \tmp\string#2 }%
   {#1#2\fontfamsample}}
\def\p #1#2{\ifx.#2\edef\tmp{\ifx\relax#1\relax\else\string#1\fi}%
   \else\def\tmp{#2}\fi
   \pp {#1}\rm \pp {#1}\bf \pp{#1}\it \pp{#1}\bi}

\p {}.
\p \caps.
\p \bcaps.
\p \slant.
\p \sans.
\p \ttset.
\p \wlight.
\p \bext.
\p \noflig.
\p \oldn.
\p \olds.
\p \oldsv.

\medskip

Of course, you can combine more modifiers independently if this gives a
sense:

\medskip
\p {\sans\caps}{\string\sans\string\caps}
\p {\sans\caps\oldn}{\string\sans\string\caps\string\oldn}
\p {\ttset\oldsv}{\string\ttset\string\oldsv}
\medskip

If the combination of modifiers gives no sense or it is not implemented in
\KPfonts{} (for example the combination "\sans\wlight" isn't implemented) 
then font is not changed and the warning in the form

\begtt
FONT warning: KPfonts - subfam="ss" wlight="l" bcaps="", noflig="", old="", bex
t="" of variant="mn" in encoding="8t" (jkpsslmn8t) unavailable
\endtt
%
is printed on the terminal and in the log file.

Because there are ``weight light'' variants, users can use an extended set of
macro selectors: "\lr", "\rm", "\mr", "\bf" and "\li", "\it", "\mi", "\bi",
which are defined by:

\begtt
\def\lr{\wlight\rm} \def\li{\wlight\it} \def\mr{\wlight\bf} \def\mi{\wlight\bi}
\endtt

\secc Quiz

The ``quiz'' published in \cite[kpfonts-story] can be done in plain
\TeX{} too:

\def\quiz#1{{#1\one A.Queer} says: 
   make 29 {\bem active} characters is definitely nasty!} 

% \bem: \rm -> \bf,  \it -> \bi
\def\bem{\expandafter\ifx\the\font\tenrm \tenbf
   \else \expandafter\ifx\the\font\tenit \tenbi \fi\fi}

\begitems \style n
* {\wlight\oldsv\fam\it \quiz{\rm\caps\olds}}
* {\oldn\fam \quiz\bcaps}
* {\olds\fam \it \quiz\caps}
* {\wlight\noflig\fam \it \quiz{\rm\caps}}
* {\wlight\olds\fam \quiz\caps}
* {\quiz\caps}
* {\noflig\fam \quiz\caps}
* {\wlight\fam \quiz\caps}
* {\it \quiz{\rm\bcaps}}
* {\wlight\noflig\fam \it \quiz\bcaps}
\enditems

How this ``quiz'' is prepared (using "\begitems" from OPmac):

\begtt
\def\quiz#1{{#1\one A.Queer} says: 
   make 29 {\bem active} characters is definitely nasty!} 
% \bem: \rm -> \bf,  \it -> \bi
\def\bem{\expandafter\ifx\the\font\tenrm \tenbf
   \else \expandafter\ifx\the\font\tenit \tenbi \fi\fi}

\begitems \style n
* {\wlight\oldsv\fam\it \quiz{\rm\caps\olds}}
* {\oldn\fam \quiz\bcaps}
* {\olds\fam \it \quiz\caps}
* {\wlight\noflig\fam \it \quiz{\rm\caps}}
* {\wlight\olds\fam \quiz\caps}
* {\quiz\caps}
* {\noflig\fam \quiz\caps}
* {\wlight\fam \quiz\caps}
* {\it \quiz{\rm\bcaps}}
* {\wlight\noflig\fam \it \quiz\bcaps}
\enditems
\endtt

\secc Companion set of fonts

The characters from "7c" encoding is accessible via control sequences listed
in "exchars.tex" file. It means they begin by "\ex" prefix. Only "\euro" can
be used without this prefix:

\begtt
{The price is 29~\euro. \bf The price is 29~\euro.
 \it The price is 29~\euro. \ttset\one The price is 29~\euro.}
\endtt
%
Gives: {The price is 29~\euro. \bf The price is 29~\euro.
\it The price is 29~\euro. \ttset\one The price is 29~\euro.}

\secc Math fonts

The math modifiers must be followed  by "\normalmath" or "\boldmath"
collection selectors. These modifiers and selectors does nothing in text
fonts and vice versa: text modifiers does nothing in math typesetting.

\postdisplaypenalty=10000
\def\mathsample{\par
\nobreak \medskip \hrule\nobreak\bigskip
First some large operators both in text:
$\iiint\limits_{\cal Q} f(x,y,z)\,dx\,dy\,dz$ and 
$\prod_{\gamma\in\Gamma_{\!\bar C}} \partial(\widetilde X_\gamma)$;
and also on display:
$$
\eqalignno{
   \iiiint_{\rm Q} f(w,x,y,z)\,dw\,dx\,dy\,dz &\le
   \oint\nolimits_{\partial Q} 
   f' \left(\max\left\{ {\|w\|\over |w^2+x^2|}; {\|z\|\over |y^2+x^2|}' 
      {\|w\oplus z\|\over \|x\oplus y\|}\right\}\right) \cr
   &\precapprox
   \biguplus_{{\bbchar Q} \Subset \bar{\rm Q}} \left[ f^* \left(
      {\left\lmoustache{\bbchar Q}(t)\right\rmoustache \over \sqrt{1-t^2}} 
      \right) \right]_{t=\alpha}^{t=\theta} & (1)
}
$$

For $x$ in the open interval $\mathopen]-1\mathclose[$ the infinite sum in
Equation~(2) is convergent; however, this does not hold throughout the closed
interval $[-1,1]$.
$$
  (1-x)^{-k} = 1 + \sum_{j=1}^\infty (-1)^j {k \atopwithdelims\{\} j} x^j
  \quad \hbox{for $k\in{\bbchar N}; k\ne 0$.} \eqno (2)
$$
\par\nobreak\medskip\hrule\medskip
}

As an example we give the same sample from the article \cite[kpfonts-story].
Fist, "\normalmath" without modifiers:

\mathsample

Now, we declare "\lightmath\narrowiints\normalmath" and "\wlight\fam":

{\lightmath\narrowiints\normalmath \wlight\fam \mathsample}

Third example declares "\greekup\normalmath":

{\greekup\normalmath \mathsample}

Next sample si lighter by "\lighmath\partialup\normalmath" and "\wlight\fam":

{\lightmath\partialup\normalmath \wlight\fam \mathsample}

The example with sans serif math can be achieved by "\sansmath\normalmath":

{\sansmath\normalmath \mathsample}

The following sample uses "\widermath\uprightmath\normalmath":

{\widermath\uprightmath\normalmath \normalmath \mathsample}

The last example combines sans serif with narrow multiple integrals and
upright caps and Greek by
"\sansmath\uprightmath\narrowiints\greekup\partialup\normalmath" with
"\sans\fam":

{\sansmath\uprightmath\narrowiints\greekup\partialup\normalmath \sans\fam \mathsample}

\filbreak

\label[ffmac]\sec Notes for macro writers and developers of font-files

The font-files include "ff-mac.tex" from \csplain{} package where basic
macros for declaration of independent font modifiers are prepared.
Macro programmers can get inspiration in the "cs-heros.tex" font-file where
two independent font modifiers are declared ("\caps" and "\cond") and where
the macros from the "ff-mac.tex" are documented in detail.

If you are using Unicode fonts in Xe\TeX{} or Lua\TeX{} then you can 
get more inspiration in the file "cs-liberation.tex". Use
{\tt\string"...\string"} notation for font names (i.\,e.\ no "{...}") because
it works for both engines: Xe\TeX{} and Lua\TeX.

Note, that all features of \KPfonts{} are implemented in two
files "kp-fonts.tex" and "kp-math.tex" with 320 lines of code in total. On
the other hand, the \KPfonts{} macro support for \LaTeX{} is implemented in the
"kpfonts.sty" with 1680 lines of code plus next 195 "*.fd" files, which gives 
15~thousands lines in total.


\sec References

\bib [kp-fonts] \url{http://www.ctan.org/pkg/kpfonts}
\bib [csplain] \url{http://www.ctan.org/pkg/csplain}
\bib [tb-csplain] \url{http://petr.olsak.net/ftp/olsak/bulletin/tb106olsak-opmac.pdf}
\bib [opmac] \url{http://petr.olsak.net/opmac-e.html}
\bib [opmac-doc] \url{http://petr.olsak.net/ftp/olsak/opmac/opmac-u-en.pdf}
\bib [csplain-doc] \url{http://petr.olsak.net/csplain-e.html}
\bib [kpfonts-story] \url{http://www.tug.org/TUGboat/tb31-3/tb99caignaert.pdf}

\bye
