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 | |
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')
-rw-r--r-- | Master/texmf-dist/tex/csplain/base/csfontsm.tex | 31 | ||||
-rw-r--r-- | Master/texmf-dist/tex/csplain/base/csplain.ini | 5 | ||||
-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 | ||||
-rw-r--r-- | Master/texmf-dist/tex/csplain/opmac/opmac.tex | 75 |
5 files changed, 158 insertions, 155 deletions
diff --git a/Master/texmf-dist/tex/csplain/base/csfontsm.tex b/Master/texmf-dist/tex/csplain/base/csfontsm.tex index a8d78de7f40..840912f1903 100644 --- a/Master/texmf-dist/tex/csplain/base/csfontsm.tex +++ b/Master/texmf-dist/tex/csplain/base/csfontsm.tex @@ -20,11 +20,24 @@ % The \regfont adds a new `registered' font-selector to the \resizeall macro % The font-loading macros can register their fonts by \regfont. -\def\sizespec{} % by default: fonts are loaded in their implicit sizes +% You can use: \letfont \titlefont = \tenbf at15pt + +\def\letfont#1#2{\ifx#2=\expandafter\letfont\expandafter#1\else + \expandafter\font\expandafter#1\expandafter + \rfontskipat\fontname#2 \relax\space \fi} + + % XeTeX expands \fontname to "name with spaces": +\def\rfontskipat#1{\ifx#1"\expandafter\rfskipatX + \else\expandafter\rfskipatN\expandafter#1\fi} +\def\rfskipatX #1" #2\relax{"\whichtfm{#1}"} +\def\rfskipatN #1 #2\relax{\whichtfm{#1}} + +\def\whichtfm#1{#1} % User can redefine it in order to select proper + % dessign size of the font, see ams-math.tex for + % example. +\def\resizefont#1{\letfont#1#1\sizespec} -\def\resizefont #1{\expandafter - \font\expandafter#1\expandafter\resizefontskipat\fontname#1 \relax} -\def\resizefontskipat#1 #2\relax{#1 \sizespec\relax} +\ifx\resizeall\undefined \else \endinput \fi \font\tenbi=csbxti10 % it may be usable to have % the quartet \rm \it \bf \bi preloaded @@ -34,15 +47,9 @@ \resizeall \resizefont#1}} \def\resizeall{} +\regfont\tenrm \regfont\tenit \regfont\tenbf \regfont\tenbi \regfont\tentt -\regfont\tenrm \regfont\tenit \regfont\tenbf \regfont\tenbi -\regfont\tentt - -% You can use: \letfont \titlefont = \tenbf at15pt - -\def\letfont #1{% - \def\tmp##1 {\let\tmp\sizespec \def\sizespec{##1}\resizefont#1\let\sizespec\tmp}% - \afterassignment\tmp \let#1} +\def\sizespec{} % by default: fonts are loaded in their implicit sizes \endinput %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/csplain/base/csplain.ini b/Master/texmf-dist/tex/csplain/base/csplain.ini index b8648e5af3e..0616351b125 100644 --- a/Master/texmf-dist/tex/csplain/base/csplain.ini +++ b/Master/texmf-dist/tex/csplain/base/csplain.ini @@ -7,7 +7,7 @@ \input hyphen.lan % czech / slovak hyphenation pattern (may be others too) \input plaina4 % \hsize and \vsize for A4 \everyjob=\expandafter{\the\everyjob - \message{The format: csplain <Jan. 2013>.} + \message{The format: csplain <Sep. 2013>.} \message{The cs-fonts are preloaded and A4 size implicitly defined.}} \ifx\xprncode\undefined \else %% The encTeX is detected \count255=128 % All codes > 128 are printable: @@ -188,6 +188,9 @@ file extcode.tex renamed to il2code.tex (suggested by Jan Kasprzak) * csplain.ini: PDF output initialized if \jobname=pdf* * chars-8z: \crq 155->96 +** 11 ** <Sep. 2013> +* \letfont in csfontsm.tex reimplemented (XeTeX's \fontname with spaces) +* ams-math.tex and tx-math.tex use \letfont. COPYRIGHT ========= 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) diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac.tex b/Master/texmf-dist/tex/csplain/opmac/opmac.tex index bea5cdb51e7..d7ada7a3d28 100644 --- a/Master/texmf-dist/tex/csplain/opmac/opmac.tex +++ b/Master/texmf-dist/tex/csplain/opmac/opmac.tex @@ -5,7 +5,7 @@ %% The history of versions is at the end of this file, after \endpinput \ifx\OPmacversion\undefined \else \endinput \fi -\def\OPmacversion{Sep. 2013} +\def\OPmacversion{Oct. 2013} \immediate\write16{This is OPmac (Olsak's Plain macros), version <\OPmacversion>} @@ -29,11 +29,9 @@ \def\sdef#1{\expandafter\def\csname#1\endcsname} \def\sxdef#1{\expandafter\xdef\csname#1\endcsname} -\def\adef#1{\lccode`\~=`#1\catcode`#1=13 - \afterassignment\lccodetiezero - \lowercase{\def~}% +\def\adef#1{\catcode`#1=13 + \bgroup \lccode`\~=`#1\lowercase{\egroup\def~}% } -\def\lccodetiezero{\lccode`\~=0 } \def\isdefined #1#2{\expandafter\ifx \csname#1\endcsname \relax \csname iffalse\expandafter\endcsname @@ -122,23 +120,22 @@ \opwarning{csplain version <Nov. 2012> or later is recommended} % macros from csplain, file csfontsm.tex: \font\tenbi=csbxti10 \def\bi{\tenbi} - \def\sizespec{} - \def\resizefont #1{\expandafter - \font\expandafter#1\expandafter\resizefontskipat\fontname#1 \relax} - \def\regfont#1{\expandafter\def\expandafter\resizeall\expandafter{% - \resizeall \resizefont#1}} + \def\letfont#1#2{\ifx#2=\expandafter\letfont\expandafter#1\else + \expandafter\font\expandafter#1\expandafter\rfontskipat\fontname#2 \relax\space \fi} + \def\rfontskipat#1{\ifx#1"\expandafter\rfskipatX\else\expandafter\rfskipatN\expandafter#1\fi} + \def\rfskipatX #1" #2\relax{"\whichtfm{#1}"} \def\rfskipatN #1 #2\relax{\whichtfm{#1}} + \def\sizespec{} \def\whichtfm#1{#1} + \def\resizefont#1{\letfont#1#1\sizespec} + \def\regfont#1{\expandafter\def\expandafter\resizeall\expandafter{\resizeall \resizefont#1}} \def\resizeall{} \regfont\tenrm \regfont\tenit \regfont\tenbf \regfont\tenbi \regfont\tentt \fi -\ifx\normalmath\undefined \input ams-math \fi % ams-math.tex is in csplain package -\ifx\whichtfm\undefined \else - \def\resizefontskipat#1 #2\relax{\whichtfm{#1} \sizespec\relax} -\fi - \newdimen\ptunit \ptunit=1pt \newdimen\fontdim \fontdim=10pt +\ifx\normalmath\undefined \input ams-math \fi % ams-math.tex is in csplain package + {\lccode`\?=`\p \lccode`\!=`\t \lowercase{\gdef\ignorept#1?!{#1}}} \def\typosize[#1/#2]{\fontsizex[#1]\setbaselineskip[#2]\ignorespaces} @@ -153,7 +150,7 @@ \fi } \def\textfontsize[#1]{\if$#1$\else - \fontdim=#1\ptunit + \fontdim=#1\ptunit \ifx\fontdimB\undefined \edef\fontdimB{\the\fontdim}\fi \let\dgsize=\fontdim \edef\sizespec{at\the\fontdim}% \resizeall \rm \let\dgsize=\undefined @@ -161,7 +158,8 @@ } \def\setbaselineskip[#1]{\if$#1$\else \tmpdim=#1\ptunit - \baselineskip=\tmpdim \relax + \baselineskip=\tmpdim \relax + \ifx\baselineskipB\undefined \edef\baselineskipB{\the\baselineskip}\fi \bigskipamount=\tmpdim plus.33333\tmpdim minus.33333\tmpdim \medskipamount=.5\tmpdim plus.16666\tmpdim minus.16666\tmpdim \smallskipamount=.25\tmpdim plus.08333\tmpdim minus.08333\tmpdim @@ -173,11 +171,11 @@ } \def\withoutunit#1#2{\expandafter#1\expandafter[\expandafter\ignorept\the#2]} -\def\fontscalex[#1]{\if$#1$\else - \tmpdim=#1pt \divide\tmpdim by1000 +\def\fontscalex[#1]{\if$#1$\else \ifnum#1=1000 \else + \tmpdim=3277sp \tmpdim=#1\tmpdim \divide\tmpdim by50 \tmpdim=\expandafter\ignorept\the\tmpdim \fontdim \withoutunit\fontsizex\tmpdim - \fi + \fi\fi } \def\textfontscale[#1]{\if$#1$\else \tmpdim=#1pt \divide\tmpdim by1000 @@ -185,11 +183,11 @@ \withoutunit\textfontsize\tmpdim \fi } -\def\scalebaselineskip[#1]{\if$#1$\else - \tmpdim=#1pt \divide\tmpdim by1000 +\def\scalebaselineskip[#1]{\if$#1$\else \ifnum#1=1000 \else + \tmpdim=3277sp \tmpdim=#1\tmpdim \divide\tmpdim by50 \tmpdim=\expandafter\ignorept\the\tmpdim \baselineskip \withoutunit\setbaselineskip\tmpdim - \fi + \fi\fi } \def\thefontsize[#1]{% \expandafter\let \expandafter\thefont \the\font @@ -203,6 +201,10 @@ } \def\magstep#1{\ifcase#1 1000\or1200\or1440\or1728\or2074\or2488\fi\space} +\def\typobase{\ifx\baselineskipB\undefined \def\baselineskipB{12pt}\fi + \ifx\fontdimB\undefined \def\fontdimB{10pt}\fi + \baselineskip=\baselineskipB\relax \fontdim=\fontdimB\relax +} \def\em {\expandafter\ifx \the\font \tenit \additcorr \rm \else \expandafter\ifx \the\font \tenbf \bi\aftergroup\afteritcorr\else \expandafter\ifx \the\font \tenbi \additcorr \bf \else @@ -308,10 +310,10 @@ \titfont \noindent #1\unskip\par}% \nobreak\bigskip } -\def\titfont{\typoscale[\magstep4/\magstep4]\bf} -\def\chapfont{\typoscale[\magstep3/\magstep3]\bfshape} -\def\secfont{\typoscale[\magstep2/\magstep2]\bfshape} -\def\seccfont{\typoscale[\magstep1/\magstep2]\bfshape} +\def\titfont{\typobase\typoscale[\magstep4/\magstep4]\bf} +\def\chapfont{\typobase\typoscale[\magstep3/\magstep3]\bfshape} +\def\secfont{\typobase\typoscale[\magstep2/\magstep2]\bfshape} +\def\seccfont{\typobase\typoscale[\magstep1/\magstep2]\bfshape} \def\bfshape{\let\tenit=\tenbi \boldmath \bf} \newcount\chapnum \newcount\secnum \newcount\seccnum \newcount\nonumnum @@ -949,7 +951,7 @@ } \def\pdfborder#1{\if^#1^\else \isdefined{#1border}\iftrue - \if^\csname#1border\endcsname^\else attr{/C[\csname#1border\endcsname] /Border[0 0 1]}% + \if^\csname#1border\endcsname^\else attr{/C[\csname#1border\endcsname] /Border[0 0 .6]}% \fi\fi\fi } @@ -1080,11 +1082,11 @@ \ifx\savedttchar\undefined\else \catcode\savedttchar=\savedttcharc \fi \chardef\savedttchar=`#1% \chardef\savedttcharc=\catcode`#1% - \lccode`\~=`#1 - \lowercase {\def~}{\leavevmode\hbox\bgroup\setverb\adef{ }{ }% + \bgroup\lccode`\~=`#1% + \lowercase {\egroup\def~}{\leavevmode\hbox\bgroup\setverb\adef{ }{ }% \intthook\tt\readverb}% - \lowercase{\def\readverb ##1~}{##1\egroup}% - \lccode`\~=0 \catcode\savedttchar=13 + \bgroup\lccode`\~=`#1\lowercase{\egroup\def\readverb ##1~}{##1\egroup}% + \catcode`#1=13 } \def\verbinput (#1) #2 {\par \def\tmpa{#2}% @@ -1289,7 +1291,7 @@ \iflocfnum \leavevmode\openref\wref\Xfnote{}% \isdefined{fn:\the\fnotenum}\iftrue \else\opwarning{unknown \noexpand\fnote mark. TeX me again}\fi\fi - \fnmarkx{\typoscale[800/800]\vfootnote\fnmarkx{#1}}% + \fnmarkx{\typobase\typoscale[800/800]\vfootnote\fnmarkx{#1}}% } \def\fnotemark#1{{\advance\fnotenum by#1\relax \isdefined{fn:\the\fnotenum}\iftrue\thefnote @@ -1510,7 +1512,7 @@ \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \def\doprotect#1{\let#1=\relax} -\addto\begoutput{\def\nl{ }} +\addto\begoutput{\def\nl{ }\def\fnote##1{}\def\fnotemark##1{}} \def\prepage{\destheight=25pt \dest[pg:\the\pageno]} {\catcode`\@=11 @@ -1649,6 +1651,11 @@ Sep. 2013 \label: the ``duplicated label'' test added \addprotect\exfont (for exchars.tex cooperating) \ulink improved and added to opmac-u \postboxcclv: {\advancepageno} corrected +Oct. 2013 /Border .6 + better \adef + \typobase introduced + \typoscale[20000/] ``too large dimension'' ... solved + \activettchar reimplemented %%%%%%%%%%%%%% End of opmac.tex |