summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/csplain/fonts/cs-heros.tex')
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-heros.tex103
1 files changed, 69 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
index c2f9b698dc6..81beeafc408 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
@@ -64,35 +64,32 @@
For users
=========
-There are four basic font selectors: \rm, \bf, \it, \bi. They are ready
+There are four basic font variant selectors: \rm, \bf, \it, \bi. They are ready
to print text in Heros (like Helvetica) variants after \input cs-heros.
You can use "modifiers" of these basic variants: \cond, \caps. They can be
independently combined but must be immediately followed by \rm, \bf, \it,
-\bi or \fam. Examples:
+\bi, \one or \fam. If basic variant selector is used then given variant
+combined by modifiers is selected. If selectors are followed by \one, the
+currently selected variant is combined by modifier(s). If \fam is used then it
+works like \one but all four variant selectors are modified by the
+modifier(s).
-\cond\rm ... Normal condensed.
-\caps\cond\it ... Caps & small-caps plus condensed italics.
-\caps\fam ... Caps & small-caps, now all basic selectors.
- \rm, \bf, \it, \bi keeps this modification.
+Examples:
-All font selectors and their modifiers do setting locally inside TeX group.
+{\cond\rm text} ... Normal condensed.
+{\caps\cond\it text} ... Caps & small-caps plus condensed italics.
+{\cond\one text} ... Condensed modification of active variant.
+{\caps\fam text \bf text} ... Caps & small-caps, now all basic selectors
+ \rm, \bf, \it, \bi keeps this modification.
-Note, that \modifier\fam keeps the currently selected basic variant. This
-variant is modified by \modifier\fam and all consecutive basic variant
-selectors are modified too. So, you can select all font features
-independently to others.
-
-{\it Italics \caps\fam caps italics, \bf caps bold \it caps italic.}
-
-but \modifier\rm (or \modifier\bf etc.) sets only one individual font.
-
-{\it Italic \caps\rm caps \bf normal bold}
+All font selectors and their modifiers do setting data locally inside TeX
+group.
The TX math fonts are loaded together with this text family. If you need not
-load special fonts then you can set \let\loadmathfonts=\relax before \input
-cs-heros. Of course, you can input any different math font collection, for
-example \input ntx-math.
+load special fonts then you can set \let\loadmathfonts=\relax before
+\input cs-heros. Of course, you can input any different math font collection,
+for example \input ntx-math.
You can combine fonts from more families. Load the main family last. You can
use \ffletfont\newselector = {mod+var}{size} for keeping variants from
@@ -111,6 +108,8 @@ otfinfo -f file.otf to inspect the font features of used font. Example:
stylistic alternatives
\useff{+onum;+salt}\fam ... use given features for whole family.
+See the document kpfonts-plain.pdf for more information.
+
For font-file developers
========================
@@ -118,7 +117,7 @@ For font-file developers
Use \ifx\ffdecl\undefined \input ff-mac \fi first. The ff-mac.tex macro file
provides:
-\sizespec .. is empty or it keeps the special size specification of the font.
+\sizespec .. is empty or it keeps the size specification of the font.
\ffdecl .... prints font message and checks the font encoding.
\ffvars .... declares four basic variants (values for \ffvarV)
\setfmV, \setfm ... macros used in font modifiers
@@ -128,14 +127,15 @@ provides:
fonts are used.
\ffalias ... register alias of a font name.
\regsizes .. register optical sizes.
+\tryprotected ... makes the macro defined as "robust".
You must declare four basic variants \tenrm, \tembf, \tenit and \tenbi
-using \font primitive. These four basic variants work immediately after
-font-file is read because \rm, \bf, \it and \bi expands to \tenrm, \tenbf,
-\tenit and \tenbi.
+using \font primitive in your font-file. These four basic variants work
+immediately after font-file is read because \rm, \bf, \it and \bi expands
+to \tenrm, \tenbf, \tenit and \tenbi.
You can declare more cases for various font encondings. User can define font
-encoding by \def\fontenc{something}. Note, that ff-mac.tex keeps the \fotenc
+encoding by \def\fotenc{something}. Note, that ff-mac.tex keeps the \fotenc
macro unchanged, but if it is not defined then it does:
- \def\fotenc{8z} if CSplain is used without \input t1code nor \input ucode
@@ -170,10 +170,10 @@ variant is needed. The \ffvarV macro is used in \ffnamegen. See below.
If you need to implement font modifier (say \modfoo), then define
-\def\modfoo{\ffsetV{foo}{text}\ffsetX} \def\nomodfoo{\ffsetV{foo}{}\ffsetX}
+\def\modfoo{\ffsetV{foo}{text}\ffsetX}
-The \modfoo activate modifier and \nomodfoo deactivate it. The macro
-\ffsetV{foo}{text} define \fooV as text. So, you can use \fooV in \ffnamegen.
+The macro \ffsetV{foo}{text} define \fooV macro as text. So, you can use
+\fooV in \ffnamegen.
Next, define default value for \fooV by \def\fooV{}.
@@ -235,12 +235,12 @@ If the \ffoptV is used in \ffnamegen then you must register optical
sizes for all variants and modified variants into internal data structure.
The \regsizes macro does this. Code from cs-polta.tex looks like this:
-\regsizes {} {0 =6 7 =8 9 =10 11 =12 14 =17}
-\regsizes {\wli} {0 =6 7 =8 9 =10 11 =12 14 =17}
-\regsizes {\caps} {0 =6 7 =8 9 =10 11 =12 14 =17}
-\regsizes {\wli\caps} {0 =6 7 =8 9 =10 11 =12 14 =17}
+\regsizes {} {0 =6 7 =8 9 =10 11 =12 14 =17}
+\regsizes {\wlight} {0 =6 7 =8 9 =10 11 =12 14 =17}
+\regsizes {\caps} {0 =6 7 =8 9 =10 11 =12 14 =17}
+\regsizes {\wlight\caps} {0 =6 7 =8 9 =10 11 =12 14 =17}
-There are two independent modifiers \wli and \caps, so there are four
+There are two independent modifiers \wlight and \caps, so there are four
possible modifications. These modifications are included in the first
parameter. The second "data" parameter includes couples
"bondary =optsize boundary =optsize" etc. If the desired size is 11.5pt (for
@@ -251,4 +251,39 @@ The \regsizes is implemented by \regtfm macro, see the ams-math.tex file.
You cannot combine \ffalias together with \regsizes.
-----------------------------------------
+
+\tryprotected \def\foo
+----------------------
+
+The macro \foo is defined as \protected\def it the \protected
+primitive is available. Else it is defined normally but if \addprotect from
+OPmac is available then \addprotect\foo is used. Only if \protected
+rimitive isn't available and \addprotect from Opmac isn't available, the
+\foo macro is leaved unprotected which brings potential problem when such
+macro is used by user in a \write parameter (typically section names when
+table of contents is generated).
+
+Note that the macros \rm, \bf, \it and \bi need not to be
+\protected (and they are not protected). If user put these macro to a
+parameter of "\write" then nothig critical happens. They are expanded but
+only first level of expansion is done, because they includes only
+unexpandable primitive \fam, a constant and a font selector declared by
+\font.
+
+Do not set font modifiers as protected!. The last macro used in each font
+modifer (\ffsetX) must be expanded during \wite exapnsion. It changes to
+the internal macro \ffsetY depending on the control sequence wich is
+followed. The \ffsetV and \ffvars macros are protected in ff-mac.tex. For
+example, suppose that yu define a modifier:
+
+\def\modfoo{\ffvars{A}{B}{C}{D}\ffsetV{foo}{text}\ffsetX}
+
+and a user writes \modfoo\it in a \write parameter. The the macro is
+expanded to
+
+\ffvars{A}{B}{C}{D}\ffsetV{foo}\ffsetY2
+
+in \write file. After the data are read from file again, they do exactly
+what we need. But if the \modfoo is protected, then \modfoo\it is expanded
+into \write file like \modfoo\fam\itfam\tenit and this is bad.
+