diff options
author | Karl Berry <karl@freefriends.org> | 2013-10-03 22:27:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-10-03 22:27:53 +0000 |
commit | 85e6281fb1b094bd9068faaca640cf986462beaa (patch) | |
tree | 97ee4c2809eb8c695f3614e815f7f71ada23e924 /Master/texmf-dist/tex/csplain/fonts | |
parent | 09e1426c4043fd06c9166f620948c26696ce908a (diff) |
csplain (3oct13)
git-svn-id: svn://tug.org/texlive/trunk@31825 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/csplain/fonts')
-rw-r--r-- | Master/texmf-dist/tex/csplain/fonts/ams-math.tex | 65 | ||||
-rw-r--r-- | Master/texmf-dist/tex/csplain/fonts/tx-math.tex | 137 |
2 files changed, 94 insertions, 108 deletions
diff --git a/Master/texmf-dist/tex/csplain/fonts/ams-math.tex b/Master/texmf-dist/tex/csplain/fonts/ams-math.tex index a8338ed7e0e..e62c192d70a 100644 --- a/Master/texmf-dist/tex/csplain/fonts/ams-math.tex +++ b/Master/texmf-dist/tex/csplain/fonts/ams-math.tex @@ -47,8 +47,8 @@ \loadmathfamily 7 eufm % fractur \loadmathfamily 8 bfsans % sans serif bold \loadmathfamily 9 bisans % sans serif bold slanted (for vectors) - \chardef\rmfam 10 \setmathfamily \rmfam \tenrm - \chardef\itfam 11 \setmathfamily \itfam \tenit + \setmathfamily 10 \tenrm + \setmathfamily 11 \tenit \setmathdimens } \def\boldmath{% @@ -62,8 +62,8 @@ \loadmathfamily 7 eufb % fractur bold \loadmathfamily 8 bbfsans % sans serif extra bold \loadmathfamily 9 bbisans % sans serif extra bold slanted (for vectors) - \chardef\rmfam 10 \setmathfamily \rmfam \tenrm - \chardef\itfam 11 \setmathfamily \itfam \tenit + \setmathfamily 10 \tenrm + \setmathfamily 11 \tenit \setmathdimens } \count18=11 % families declared by \newfam are 12, 13, ... @@ -76,8 +76,9 @@ \def\script{\fam6 } % more extensive script than \cal \chardef\bffam 8 % sans serif bold \chardef\bifam 9 % sans serif bold slanted -\chardef\slfam 10 % similar to slanted font from plainTeX -\chardef\ttfam 11 % \tt in math is unusable +\chardef\rmfam 10 % for \rm (can differ from CM Roman) +\chardef\itfam 11 % normal italic +\let\slfam=\itfam \let\ttfam=\rmfam % for raw similarity with plainTeX % \regtfm formal-name 0 tfm[1] p[1] tfm[2] p[2] ... tfm[n] * % @@ -147,42 +148,29 @@ % User can re-register these tfm's mentioned above after \input ams-math.tex % if he/she want to load other fonts than these defaults. -% The new size of font produced by csplain \resizefont macro would be -% derived using \regtmf data. In order to do this you can re-define this -% csplain macro (see csfontsm.tex file): -% \def\resizefontskipat#1 #2\relax{\whichtfm{#1} \sizespec\relax} -% but now there is a different usage of the \resizefont: -% \def\dgsize{17pt}\def\sizespec{at\dgsize}\resizefont\tenrm - -\def\corrmsizes{} % see tx-math for the example of \corrmsizes +\def\corrmsizes{\ptmunit=1\ptunit\relax} % see tx-math for an example of \corrmsizes %% macros: +\ifx\rfontskipat\undefined \input csfontsm \fi + +\def\loadmathfamily #1 #2 {\chardef\tmp#1\corrmsizes + \let\dgsize=\sizemtext \font\mF=\whichtfm{#2} at\dgsize \textfont#1=\mF + \let\dgsize=\sizemscript \font\mF=\whichtfm{#2} at\dgsize \scriptfont#1=\mF + \let\dgsize=\sizemsscript \font\mF=\whichtfm{#2} at\dgsize \scriptscriptfont#1=\mF + \let\dgsize=\undefined +} +\def\setmathfamily #1 #2{\let\mF=#2\chardef\tmp#1\corrmsizes + \let\dgsize=\sizemtext \letfont#2=#2 at\dgsize \textfont#1=#2% + \let\dgsize=\sizemscript \letfont#2=#2 at\dgsize \scriptfont#1=#2% + \let\dgsize=\sizemsscript \letfont#2=#2 at\dgsize \scriptscriptfont#1=#2% + \let\dgsize=\undefined \let#2=\mF +} \def\itvariables{\def\rm{\fam\rmfam \tenrm}% \mathcodechanges A:0-9\mathcodechanges B:A-Z\mathcodechanges B:a-z} \def\mitvariables{\def\rm{\fam0\tenrm}% \mathcodechanges 0:0-9\mathcodechanges 1:A-Z\mathcodechanges 1:a-z} -\def\loadmathfamily #1 #2 {\chardef\tmp#1\relax\corrmsizes - \let\dgsize=\sizemtext - \font\mF=\whichtfm{#2} at\dgsize \textfont#1=\mF - \let\dgsize=\sizemscript - \font\mF=\whichtfm{#2} at \dgsize \scriptfont#1=\mF - \let\dgsize=\sizemsscript - \font\mF=\whichtfm{#2} at\dgsize \scriptscriptfont#1=\mF - \ptmunit=1pt \let\dgsize=\undefined -} -\def\setmathfamily #1#2{\let\mF=#2% - \let\dgsize=\sizemtext - \font#2= \specfontname\mF \space at\sizemtext \textfont#1=#2% - \let\dgsize=\sizemscript - \font#2= \specfontname\mF \space at\sizemscript \scriptfont#1=#2% - \let\dgsize=\sizemsscript - \font#2= \specfontname\mF \space at\sizemsscript \scriptscriptfont#1=#2% - \let\dgsize=\undefined \let#2=\mF -} -\def\specfontname #1{\expandafter \ignoreatpt \fontname #1 \relax} -\def\ignoreatpt #1 #2\relax{\whichtfm{#1}} \def\mathcodechanges#1:#2-#3{\chardef\tmp=\count0 \chardef\tmpa=\count1 \count0=`#2 \count1=\count0 \advance\count1 by"7#100 \loop \mathcode\count0=\count1 @@ -219,9 +207,9 @@ \def\sizemtext{#1\ptmunit}\def\sizemscript{#2\ptmunit}% \def\sizemsscript{#3\ptmunit}% } -\ifx\ptmunit\undefined \csname newdimen\endcsname\ptmunit\fi \ptmunit=1pt % used in \corrmsizes - -\setmathsizes[10/7/5] +\ifx\ptuint\undefined \def\ptunit{pt}\fi +\ifx\ptmunit\undefined \csname newdimen\endcsname\ptmunit\fi \ptmunit=1\ptunit +\ifx\sizemtext\undefined \setmathsizes[10/7/5]\fi \ifx\tenbi\undefined \font\tenbi=ptmbi8z \relax \fi \normalmath % load families, normal shape @@ -515,3 +503,6 @@ Aug. 2013: \newdimen\ptmunit only once Aug. 2013: \tmp -> \mF (the sequence is printed in overfull messages) \mF tuned in \setmathfamily \corrmsizes without parameter +Sep. 2013: \letfont plus \corrmsizes used in \setmathfamily + \ptmunit depends on \ptunit now + \setmathfamily <num><space><font-selector> ... (<space> added) diff --git a/Master/texmf-dist/tex/csplain/fonts/tx-math.tex b/Master/texmf-dist/tex/csplain/fonts/tx-math.tex index adbf868bec0..1a562f8e6d4 100644 --- a/Master/texmf-dist/tex/csplain/fonts/tx-math.tex +++ b/Master/texmf-dist/tex/csplain/fonts/tx-math.tex @@ -34,104 +34,95 @@ % default. \def\normalmath{% - \loadmathfamily 0 {\txr} % TX Roman - \loadmathfamily 1 {\txmi} % TX Math Italic - \loadmathfamily 2 txsy % TX Standard symbols - \loadmathfamily 3 txex % TX extra symbols - \loadmathfamily 4 txsya % TX symbols from AMSTeX - \loadmathfamily 5 txsyb % TX symbols from AMSTeX - \loadmathfamily 6 txsyc % symbols from TX fonts - \loadmathfamily 7 txexa % TX new extra symbols - \loadmathfamily 8 txmia % fraktur, upright greek - \loadmathfamily 9 rsfs10 % script - \loadmathfamily 10 {\bfsans} % sans serif bold - \loadmathfamily 11 {\bisans} % sans serif bold slanted (for vectors) - \chardef\rmfam 12 \setmathfamily \rmfam \tenrm - \chardef\itfam 13 \setmathfamily \itfam \tenit + \loadmathfamily 0 txr % TX Roman + \loadmathfamily 1 txmi % TX Math Italic + \loadmathfamily 2 txsy % TX Standard symbols + \loadmathfamily 3 txex % TX extra symbols + \loadmathfamily 4 txsya % TX symbols from AMSTeX + \loadmathfamily 5 txsyb % TX symbols from AMSTeX + \loadmathfamily 6 txsyc % symbols from TX fonts + \loadmathfamily 7 txexa % TX new extra symbols + \loadmathfamily 8 txmia % fraktur, upright greek + \loadmathfamily 9 rsfs10 % script + \loadmathfamily 10 phvb8z % sans serif bold + \loadmathfamily 11 phvbo8z % sans serif bold slanted (for vectors) + \setmathfamily 12 \tenrm + \setmathfamily 13 \tenit \setmathdimens } \def\boldmath{% - \loadmathfamily 0 {\txb} % TX Roman - \loadmathfamily 1 {\txbmi} % TX Math Italic - \loadmathfamily 2 txbsy % TX Standard symbols - \loadmathfamily 3 txbex % TX extra symbols - \loadmathfamily 4 txbsya % TX symbols from AMSTeX - \loadmathfamily 5 txbsyb % TX symbols from AMSTeX - \loadmathfamily 6 txbsyc % symbols from TX fonts - \loadmathfamily 7 txbexa % TX new extra symbols - \loadmathfamily 8 txbmia % fraktur, upright greek - \loadmathfamily 9 rsfs10 % \bf script is unavailable - \loadmathfamily 10 {\bbfsans} % sans serif bold - \loadmathfamily 11 {\bbisans} % sans serif bold slanted (for vectors) - \chardef\rmfam 12 \setmathfamily \rmfam \tenbf - \chardef\itfam 13 \setmathfamily \itfam \tenbi + \loadmathfamily 0 txb % TX Roman + \loadmathfamily 1 txbmi % TX Math Italic + \loadmathfamily 2 txbsy % TX Standard symbols + \loadmathfamily 3 txbex % TX extra symbols + \loadmathfamily 4 txbsya % TX symbols from AMSTeX + \loadmathfamily 5 txbsyb % TX symbols from AMSTeX + \loadmathfamily 6 txbsyc % symbols from TX fonts + \loadmathfamily 7 txbexa % TX new extra symbols + \loadmathfamily 8 txbmia % fraktur, upright greek + \loadmathfamily 9 rsfs10 % \bf script is unavailable + \loadmathfamily 10 phvb8z % sans serif bold + \loadmathfamily 11 phvbo8z % sans serif bold slanted (for vectors) + \setmathfamily 12 \tenbf + \setmathfamily 13 \tenbi \setmathdimens } \count18=13 % families declared by \newfam are 14, 15 only \let\normalTXmath=\normalmath \let\boldTXmath=\boldmath -\chardef\bffam 10 % sans serif bold -\chardef\bifam 11 % sans serif bold slanted -\def\bi{\tenbi \fam\bifam} % in csplain is done \def\bi{\tenbi} only -\def\bbchar{\fam5 } % double stroked letters -\def\frak{\fam8 } % fraktur -\def\script{\fam9 } % more extensive script than \cal -\chardef\slfam 10 % similar to slanted font from plainTeX -\chardef\ttfam 13 % \tt in math is unusable - -% Macro engineer can define the \fam0, \fam1, \bffam and \bifam fonts -% by his opinion. For example: \def\txr{cs-anttr} \def\txmi{mi-anttri} -% in cs-antt.tex file. The following vaules are only defaults: - -\def\txxdef#1#2{\ifx#1\undefined\def#1{#2}\fi} - -\txxdef\txr{txr}\txxdef\txmi{txmi} % \fam0, \fam1 normal -\txxdef\txb{txb}\txxdef\txbmi{txbmi} % \fam0, \fam1 bold -\ifx\bisans\undefined % user can define his own \bfsans, \bisans - \def\bfsans{phvb8z}\def\bisans{phvbo8z} % \bffam, \bifam normal - \def\bbfsans{phvb8z}\def\bbisans{phvbo8z} % \bffam, \bifam bold - \def\corrmsizes{\ifnum\tmp=10 \ptmunit=.83pt \fi % wee need to correct - \ifnum\tmp=11 \ptmunit=.83pt \fi} % the sizes o phvb8t and -\fi % phvbo8t fonts -\ifx\corrmsizes\undefined \def\corrmsizes{}\fi +\def\bi{\tenbi \fam\bifam} % in csplain is done \def\bi{\tenbi} only +\def\bbchar{\fam5 } % double stroked letters +\def\frak{\fam8 } % fraktur +\def\script{\fam9 } % more extensive script than \cal +\chardef\bffam 10 % sans serif bold +\chardef\bifam 11 % sans serif bold slanted +\chardef\rmfam 12 % for \rm (can differ from CM Roman) +\chardef\itfam 13 % normal italic +\let\slfam=\itfam \let\ttfam=\rmfam % for raw similarity with plainTeX + +\def\corrmsizes{\ptmunit=1\ptunit\relax + \ifnum\tmp=10 \ptmunit=.83\ptmunit \fi % wee need to correct + \ifnum\tmp=11 \ptmunit=.83\ptmunit \fi} % the sizes o phvb(o)8t % User can use \corrmsizes if he/she loads new family. The following example % loads ZapfChancery as \fam 15 with fonts scaled by 1.32 as compared with % others fonts in math formula: % \def\zapf {\fam 15 } -% \addto\corrmsizes {\ifnum\tmp=15 \ptmunit=1.32pt \fi} +% \addto\corrmsizes {\ifnum\tmp=15 \ptmunit=1.32\ptmunit \fi} % \addto\normalmath {\loadmathfamily 15 pzcmi8z } \normalmath % \addto\boldmath {\loadmathfamily 15 pzcmi8z } % macros: +\ifx\rfontskipat\undefined \input csfontsm \fi + +\def\loadmathfamily #1 #2 {\chardef\tmp#1\corrmsizes + \let\dgsize=\sizemtext \font\mF=\whichtfm{#2} at\dgsize \textfont#1=\mF + \let\dgsize=\sizemscript \font\mF=\whichtfm{#2} at\dgsize \scriptfont#1=\mF + \let\dgsize=\sizemsscript \font\mF=\whichtfm{#2} at\dgsize \scriptscriptfont#1=\mF + \let\dgsize=\undefined +} +\def\setmathfamily #1 #2{\let\mF=#2\chardef\tmp#1\corrmsizes + \let\dgsize=\sizemtext \letfont#2=#2 at\dgsize \textfont#1=#2% + \let\dgsize=\sizemscript \letfont#2=#2 at\dgsize \scriptfont#1=#2% + \let\dgsize=\sizemsscript \letfont#2=#2 at\dgsize \scriptscriptfont#1=#2% + \let\dgsize=\undefined \let#2=\mF +} \def\itvariables{\def\rm{\fam\rmfam \tenrm}% \mathcodechanges C:0-9\mathcodechanges D:A-Z\mathcodechanges D:a-z} \def\mitvariables{\def\rm{\fam0\tenrm}% \mathcodechanges 0:0-9\mathcodechanges 1:A-Z\mathcodechanges 1:a-z} -\def\loadmathfamily #1 #2 {\chardef\tmp#1\relax\corrmsizes - \font\mF = #2 at\sizemtext \textfont#1=\mF - \font\mF = #2 at\sizemscript \scriptfont#1=\mF - \font\mF = #2 at\sizemsscript \scriptscriptfont#1=\mF - \ptmunit=1pt -} -\def\setmathfamily #1#2{\let\mF=#2% - \font#2= \specfontname \mF\space at\sizemtext \textfont#1=#2% - \font#2= \specfontname \mF\space at\sizemscript \scriptfont#1=#2% - \font#2= \specfontname \mF\space at\sizemsscript \scriptscriptfont#1=#2% - \let#2=\mF -} -\def\specfontname #1{\expandafter \ignoreatpt \fontname #1 \relax} -\def\ignoreatpt #1 #2\relax{#1} \def\mathcodechanges#1:#2-#3{\chardef\tmp=\count0 \chardef\tmpa=\count1 \count0=`#2 \count1=\count0 \advance\count1 by"7#100 \loop \mathcode\count0=\count1 \ifnum\count0<`#3 \advance\count0 by1 \advance\count1 by1 \repeat \count0=\tmp \count1=\tmpa } +\ifx\whichtfm\undefined \def\whichtfm#1{#1}\fi + \def\setmathdimens{% PlainTeX sets these dimens for 10pt size only: \delimitershortfall=0.5\fontdimen6\textfont3 \nulldelimiterspace=0.12\fontdimen6\textfont3 @@ -141,17 +132,17 @@ \skewchar\textfont2=48 \skewchar\scriptfont2=48 \skewchar\scriptscriptfont2=48 } - \def\setmathsizes[#1/#2/#3]{% \def\sizemtext{#1\ptmunit}\def\sizemscript{#2\ptmunit}% \def\sizemsscript{#3\ptmunit}% } -\ifx\ptmunit\undefined \csname newdimen\endcsname\ptmunit\fi \ptmunit=1pt -\setmathsizes[10/7/5] +\ifx\ptuint\undefined \def\ptunit{pt}\fi +\ifx\ptmunit\undefined \csname newdimen\endcsname\ptmunit\fi \ptmunit=1\ptunit +\ifx\sizemtext\undefined \setmathsizes[10/7/5]\fi \ifx\tenbi\undefined \font\tenbi=ptmbi8z \relax \fi \normalmath % load families, normal shape -\itvariables % \rm in math and avriables in math by current text font +\itvariables % \rm in math and variables in math by current text font %% \mathchardef declarations @@ -726,3 +717,7 @@ Aug. 2013: \newdimen\ptmunit only once Aug. 2013: \tmp -> \mF (the sequence is printed in overfull messages) \mF tuned in \setmathfamily \corrmsizes without parameter +Sep. 2013: \letfont plus \corrmsizes used in \setmathfamily + \whichtfm used in \loadmathfamily (the same as in ams-math.tex) + \ptmunit depends on \ptunit now + \setmathfamily <num><space><font-selector> ... (<space> added) |