diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/newpx/newpxtext.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/newpx/newpxtext.sty | 726 |
1 files changed, 525 insertions, 201 deletions
diff --git a/Master/texmf-dist/tex/latex/newpx/newpxtext.sty b/Master/texmf-dist/tex/latex/newpx/newpxtext.sty index 44b00789564..08c4cdf9623 100644 --- a/Master/texmf-dist/tex/latex/newpx/newpxtext.sty +++ b/Master/texmf-dist/tex/latex/newpx/newpxtext.sty @@ -5,154 +5,401 @@ % Changes from original pxfonts.sty by Michael Sharpe, msharpe at ucsd dot edu; % Text and math versions now separate. % Added scaled keyword and osf option; -% Modified the definition of \k to bypass problem with grouping. % Text is now directed to an extension of TeXGyrePagella rather than ppl. +% 1.5 is first version of newpxtext to support both [pdf]latex and unicode latex. -\def\fileversion{1.422} -\def\filedate{2021/05/29} -\ProvidesPackage{newpxtext}[\filedate\space v\fileversion] +\def\fileversion{1.5} +\def\filedate{2021/12/03} +\ProvidesPackage{newpxtext2}[% +\filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for TeXGyrePagellaX] \message{`newpxtext' v\fileversion, \filedate\space Text macros taking advantage of TeXGyre Pagella and its extensions (msharpe)} -\RequirePackage{fontaxes}% so we can have [bold] italic small caps -\let\orig@footnote=\thefootnote -\let\orig@makefnmark=\@makefnmark -\RequirePackage{xkeyval,etoolbox} -\renewcommand*{\rmdefault}{zpltlf} % the default until end of preamble -\def\useosf{\edef\zpl@figurestyle{osf}} -\@onlypreamble\useosf -\def\useproportional{\edef\zpl@figurealign{}} -\@onlypreamble\useproportional +\RequirePackage[T1]{fontenc} +\renewcommand*{\rmdefault}{zplTLF} % the default until end of preamble +\renewcommand*{\familydefault}{\rmdefault} +\RequirePackage{ifxetex,ifluatex,xkeyval,etoolbox,textcomp} +\RequirePackage{xstring,ifthen,scalefnt} % for \textfrac +\IfFileExists{mweights.sty}{\RequirePackage{mweights}}{} +\DeclareEncodingSubset{TS1}{zpl*}{0} -\newif\ifzpl@defaultsups +%KOMA check \newif\ifzpl@KOMA \@ifundefined{KOMAClassName}{}{\zpl@KOMAtrue} \@ifundefined{ver@scrextend.sty}{}{\zpl@KOMAtrue} -\newif\ifzpl@adobesc % we don't use this exc. in fd, but may in future + +% Engine check +\newif\ifzpl@otf +\ifxetex + \zpl@otftrue +\else\ifluatex + \zpl@otftrue +\else % [pdf]LaTeX + \zpl@otffalse +\fi\fi + +%%%%%%%%%%%%%%%%%% +\IfFileExists{xkeyval.sty}{ + \RequirePackage{xkeyval} + }{ + \let\DeclareOptionX\DeclareOption + \let\ExecuteOptionsX\ExecuteOptions + \let\ProcessOptionsX\ProcessOptions +} +%%%%Start Options +\newif\ifzpl@nomath\zpl@nomathfalse % load fontspec with no-math +\newif\ifzpl@lining\zpl@liningtrue +\newif\ifzpl@tabular\zpl@tabulartrue % default is tabular lining figures + +\DeclareOptionX{type1}[true]{% +\@nameuse{if#1}\zpl@otffalse\fi +} +\DeclareOptionX{nofontspec}[true]{% +\@nameuse{if#1}\zpl@otffalse\fi +} +\DeclareOptionX{no-math}[true]{% +\@nameuse{if#1}\zpl@nomathtrue\fi +} + +\def\zpl@defaultfeatures{} +\DeclareOptionX{defaultfeatures}{\def\zpl@defaultfeatures{#1}} + +%Figure style options +\edef\zpl@dfltfigurestyle{lf} +\edef\zpl@dfltfigurealign{t} + +\DeclareOptionX{lining}[true]{% +\@nameuse{zpl@lining#1} +} +\DeclareOptionX{lf}[true]{% +\@nameuse{zpl@lining#1} +} +\DeclareOptionX{oldstyle}[true]{% +\@nameuse{if#1}% + \zpl@liningfalse +\else + \zpl@liningtrue +\fi +} +\DeclareOptionX{osf}[true]{% +\@nameuse{if#1}% + \zpl@liningfalse +\else + \zpl@liningtrue +\fi +} +\DeclareOptionX{tabular}[true]{% +\@nameuse{zpl@tabular#1} +} +\DeclareOptionX{t}[true]{% +\@nameuse{zpl@tabular#1} +} +\DeclareOptionX{proportional}[true]{% +\@nameuse{if#1}% + \zpl@tabularfalse +\else + \zpl@tabulartrue +\fi +} +\DeclareOptionX{p}[true]{% +\@nameuse{if#1}% + \zpl@tabularfalse +\else + \zpl@tabulartrue +\fi +} + +%Scale +\newcommand*{\zpl@scale}{1} % actual scaled command in \zpl@scaled +\DeclareOptionX{scale}{\renewcommand*{\zpl@scale}{#1}} +\DeclareOptionX{scaled}{\renewcommand*{\zpl@scale}{#1}} + +\newif\ifzpl@defaultsups +%\newif\ifzpl@adobesc % we don't use this exc. in fd, but may in future \newif\ifzpl@scosf -\newif\ifzpl@largesc -\newif\ifzpl@helv \zpl@helvtrue % deefault is to load helvetica as sans serif font -%\newif\ifzpl@babel -%\ifdefined\bbl@tempa \zpl@babeltrue\fi -\define@key{zpl}{babel}[true]{\relax}% for backward compatibility -%\csname zpl@babel#1\endcsname} -\define@boolkey{zpl}{defaultsups}[true]{% -\csname zpl@defaultsups#1\endcsname} -\define@boolkey{zpl}{largesc}[true]{% -\csname zpl@largesc#1\endcsname} +\newif\ifzpl@largesc +\newif\ifzpl@helv \zpl@helvtrue % default is to load helvetica as sans serif font \newif\ifzpl@thrm \newif\ifzpl@sl -\define@key{zpl}{helvratio}[0.94]{\def\zpl@helvratio{#1}} -\define@key{zpl}{scaled}[1.0]{\def\zpl@scaled{s*[#1]}% -\def\zpl@scale{#1}} -% + +% Other options +\DeclareOptionX{defaultsups}[true]{% +\@nameuse{zpl@defaultsups#1} +} +\DeclareOptionX{babel}[true]{% +\@nameuse{zpl@babel#1}% for backward compatibility +} +\DeclareOptionX{largesc}[true]{% +\@nameuse{zpl@largesc#1} +} +\DeclareOptionX{nohelv}[true]{% +\@nameuse{if#1}\zpl@helvfalse\fi}% + +\def\zpl@helvratio{.94} +\DeclareOptionX{helvratio}[0.94]{% +\def\zpl@helvratio{#1} +} +\def\zpl@spcmag{1} \def\zpl@spc{.25em} \def\zpl@stretch{.2em} \def\zpl@shrink{.1em} -\define@key{zpl}{spacing}[.25em]{\gdef\zpl@spc{#1}} -\define@key{zpl}{stretch}[.2em]{\gdef\zpl@stretch{#1}} -\define@key{zpl}{shrink}[.1em]{\gdef\zpl@shrink{#1}} -\edef\zpl@dfltfigurestyle{lf} -\DeclareOption{nohelv}{\zpl@helvfalse} -\DeclareOption{lining}{\edef\zpl@figurestyle{lf}} -\DeclareOption{lf}{\edef\zpl@figurestyle{lf}} -\DeclareOption{theoremfont}{\zpl@thrmtrue} -\DeclareOption{trueslanted}{\zpl@sltrue} -\DeclareOption{oldstyle}{\useosf} -\DeclareOption{osf}{\useosf} -\DeclareOption{tabular}{\edef\zpl@figurealign{t}} -\DeclareOption{p}{\useproportional} -\DeclareOption{proportional}{\useproportional} -\DeclareOption{scosf}{\zpl@scosftrue} -\DeclareOption{tighter}{% -\gdef\zpl@spc{.25em}\gdef\zpl@stretch{.125em}\gdef\zpl@shrink{.1em}} -\DeclareOption{looser}{% -\gdef\zpl@spc{.3em}\gdef\zpl@stretch{.2em}\gdef\zpl@shrink{.1em} +\def\zpl@nospc{T} + +\DeclareOptionX{spcfactor}{% +\def\zpl@spcmag{#1}\def\zpl@nospc{F} +} +\DeclareOptionX{spacing}{% +\def\zpl@spc{#1} +} +\DeclareOptionX{stretch}{% +\def\zpl@stretch{#1} +} +\DeclareOptionX{shrink}{% +\def\zpl@shrink{#1} } -\ExecuteOptions{lining,tabular} -\DeclareOption*{% - \begingroup - \edef\x{\endgroup - \noexpand\setkeys{zpl}{\CurrentOption}}% - \x} -%\def\zpl@style{x}% default is lining figures -\setkeys{zpl}{helvratio} % set this first, at least to default -\setkeys{zpl}{scaled} % get at least default -\ProcessOptions* -\def\zpl@spacing{% +\def\zpl@defaultfeatures{} +\newcount\zpl@cnt \zpl@cnt=0 +\newif\ifzpl@zeroslash +\def\zpl@thmlin{X} % default is to not change to lining +\def\zpl@noti{T}\def\zpl@nolo{T} +\DeclareOptionX{defaultfeatures}{\def\zpl@defaultfeatures{#1}} +\DeclareOptionX{oldSS}{\advance\zpl@cnt 32 } +\DeclareOptionX{slashedzero}{\zpl@zeroslashtrue} +\DeclareOptionX{theoremfont}{\zpl@thrmtrue\advance\zpl@cnt 16 } +\DeclareOptionX{thmlining}{\edef\zpl@thmlin{l}} +\DeclareOptionX{trueslanted}{\zpl@sltrue} +\DeclareOptionX{scosf}{\zpl@scosftrue} +\DeclareOptionX{tighter}{% +\gdef\zpl@spc{.25em}\gdef\zpl@stretch{.125em}% +\gdef\zpl@shrink{.1em}\def\zpl@noti{F}} +\DeclareOptionX{looser}{% +\gdef\zpl@spc{.3em}\gdef\zpl@stretch{.2em}% +\gdef\zpl@shrink{.1em}\def\zpl@nolo{F}} + +\ProcessOptionsX\relax + +\def\re@DeclareTextSymbol#1#2#3{% + \let#1=\undefined + \DeclareTextSymbol{#1}{#2}{#3}} +\ifzpl@otf + \ifzpl@nomath + \RequirePackage[no-math]{fontspec} + \else + \RequirePackage{fontspec} + \fi + + \ifxetex\XeTeXtracingfonts=1\fi + \ifluatex % avoid possibly uncorrected "system" fonts + \directlua{fonts.names.set_location_precedence{ + "local", "texmf", "system" }} + \fi + \def\zpl@base{TeXGyrePagellaX} + + \newcommand{\textfrac}[3][]{{%\normalfont% +\mbox{% + \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1] + {{\lfstyle#1}\kern.1em}{}% +\addfontfeatures{RawFeature=+numr}#2\char"2044% numerator +\addfontfeatures{RawFeature=-numr;+dnom;+ss20}\char"2044{}#3% +}}} + +\else % type1 + \RequirePackage{fontaxes} + \fa@naming@exception{figures}{{superior}{proportional}}{sups} + \fa@naming@exception{figures}{{superior}{tabular}}{sups} +% \def\sufigures{\@nomath\sufigures +% \fontfigurestyle{superior}\selectfont} +% \let\sustyle=\sufigures +% \DeclareTextFontCommand{\textsu}{\sufigures} +% \let\textsuperior\textsu + \DeclareRobustCommand{\sustyle}{% + \not@math@alphabet\sustyle\relax + \fontfamily{zplsups}\selectfont} + \let\sufigures=\sustyle + \let\nustyle=\sustyle + \let\nufigures=\sustyle + + \fa@naming@exception{figures}{{inferior}{proportional}}{inf} + \fa@naming@exception{figures}{{inferior}{tabular}}{inf} +% \def\infigures{\@nomath\infigures +% \fontfigurestyle{inferior}\selectfont} +% \let\instyle=\infigures +% \DeclareTextFontCommand{\textinf}{\infigures} +% \let\textinferior\textinf + \DeclareRobustCommand{\instyle}{% + \not@math@alphabet\instyle\relax + \fontfamily{zplsubs}\selectfont} + \let\infigures=\instyle + + \fa@naming@exception{figures}{{denominators}{proportional}}{dnom} + \fa@naming@exception{figures}{{denominators}{tabular}}{dnom} +% \def\defigures{\@nomath\defigures +% \fontfamily{defigures}\selectfont} +% \let\destyle=\defigures +% \DeclareTextFontCommand{\textde}{\defigures} +% \let\textdenominators\textde + \DeclareRobustCommand{\destyle}{% + \not@math@alphabet\destyle\relax + \fontfamily{zpldnom}\selectfont} + \let\defigures=\destyle + + \fa@naming@exception{figures}{{numerators}{proportional}}{numr} + \fa@naming@exception{figures}{{numerators}{tabular}}{numr} +% \def\defigures{\@nomath\nufigures +% \fontfigurestyle{numerators}\selectfont} +% \let\nustyle=\nufigures +% \DeclareTextFontCommand{\textnu}{\nufigures} +% \let\textnumerators\textnu + \DeclareRobustCommand{\nustyle}{% + \not@math@alphabet\nustyle\relax + \fontfamily{zplnumr}\selectfont} + \let\nufigures=\nustyle + +\newcommand{\textfrac}[3][]{% like \textfrac[1]{7}{8} + \mbox{% + \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1] + {\textlf{#1}\kern.1em}{}% + {\sustyle#2}% numerator + \StrRight{#2}{1}[\@digit@]% + % look for 1, 2, 6, 7 + \ifcase\@digit@% 0 + \or%\kern.03em% 1 + \or\kern.04em% 2 + \or%\kern-.01em% 3 + \or%\kern.02em% 4 + \or%\kern.01em% 5 + \or\kern.01em% 6 + \or\kern-.11em% 7 + \or%\kern-.11em% 8 + \or\kern-.02em% 9 + \fi% +% \kern\zpl@foresolidus{\fontencoding{TS1}\selectfont\char"2F}% +% \kern\zpl@aftsolidus% + {\fontencoding{TS1}\selectfont\char"2F}% + \StrLeft{#3}{1}[\@digit@]% + % look for 1, 4, 7 + \ifcase\@digit@% 0 + \or%\kern -.02em% 1 + \or% 2 + \or% 3 + \or\kern -.05em% 4 + \or% 5 + \or\kern-.02em% 6 + \or\kern .01em% 7 + \fi% + {\destyle #3}% denominator [#3] + }%mbox +} % textfrac +\fi + +\let\orig@footnote=\thefootnote +\let\orig@makefnmark=\@makefnmark +\def\bfseries@rm{b} +\def\mdseries@rm{m} +\def\useosf{\zpl@liningfalse} +\@onlypreamble\useosf +\def\useproportional{\zpl@tabularfalse} +\@onlypreamble\useproportional + +\ifzpl@otf + \def\zpl@dflt{} + \ifzpl@zeroslash\edef\zpl@dflt{Numbers = SlashedZero , + }\fi + \if T\zpl@nospc + \if F\zpl@noti\def\zpl@spcmag{{1,.625,1}}\def\zpl@nospc{F}\fi + \if F\zpl@nolo\def\zpl@spcmag{{1.2,1,1}}\def\zpl@nospc{F}\fi + \fi + \if F\zpl@nospc + \edef\zpl@dflt{\zpl@dflt WordSpace = \zpl@spcmag , + } + \fi + \def\zpl@scraw{pcap} + \ifzpl@largesc\def\zpl@scraw{smcp}\fi + + %\zpl@cnt will be 0..2^8-1 + \edef\zpl@lst{} + \ifnum\zpl@cnt>127 \edef\zpl@lst{8}\advance\zpl@cnt -128 \fi + \ifnum\zpl@cnt>63 \edef\zpl@lst{7,\zpl@lst}\advance\zpl@cnt -64 \fi + \ifnum\zpl@cnt>31 \edef\zpl@lst{6,\zpl@lst}\advance\zpl@cnt -32 \fi + \ifnum\zpl@cnt>15 \edef\zpl@lst{5,\zpl@lst}\advance\zpl@cnt -16 \fi + \ifnum\zpl@cnt>7 \edef\zpl@lst{4,\zpl@lst}\advance\zpl@cnt -8 \fi + \ifnum\zpl@cnt>3 \edef\zpl@lst{3,\zpl@lst}\advance\zpl@cnt -4 \fi + \ifnum\zpl@cnt>1 \edef\zpl@lst{2,\zpl@lst}\advance\zpl@cnt -2 \fi + \ifnum\zpl@cnt>0 \edef\zpl@lst{1,\zpl@lst}\fi + \ifthenelse{\not\equal{\zpl@lst}{}} + {\edef\zpl@dflt{\zpl@dflt StylisticSet={\zpl@lst} , + }}{} + + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \zpl@scale , + Extension = .otf , + SmallCapsFeatures={\ifzpl@scosf Numbers = OldStyle , + \fi RawFeature = +\zpl@scraw , + \ifluatex Renderer=Basic\fi} , + \zpl@dflt , + \zpl@defaultfeatures + } + +\else % type1 + \def\zpl@spacing{% \fontdimen2\font=\zpl@spc \fontdimen3\font=\zpl@stretch - \fontdimen4\font=\zpl@shrink -} - -\@tempdima=\zpl@scale\p@\@tempdima=\zpl@helvratio\@tempdima% -\edef\qhv@scale{\strip@pt\@tempdima} + \fontdimen4\font=\zpl@shrink} + \@tempdima=\zpl@scale\p@\@tempdima=\zpl@helvratio\@tempdima% + \edef\qhv@scale{\strip@pt\@tempdima} + \def\zpl@scaled{s*[\zpl@scale]}% used in fd files -\RequirePackage[T1]{fontenc} -\RequirePackage{textcomp} -\def\oldstylenums#1{{\fontencoding{TS1}\selectfont #1}} + %\def\oldstylenums#1{{\fontencoding{TS1}\selectfont #1}} -\DeclareRobustCommand{\sustyle}{% - \not@math@alphabet\sustyle\relax - \fontfamily{zplsups}\selectfont} + %\expandafter\patchcmd\expandafter{\csname scshape \endcsname}{\fontshape}{\fontfamily{zpl\zpl@figurealign osf}\fontshape}{\message{Replaced figure style by osf in sc.}}{\message{Unable to replace figure style by osf in sc.}} -\ifzpl@defaultsups % -\else - \ifzpl@KOMA - %\let\textsuperscript\sustyle - \else % NOT KOMA - \def\f@@tn@te{footnote} - \def\@makefnmark{% - \ifx\@mpfn\f@@tn@te% - \ifx\thefootnote\orig@footnote% - \hbox{\sustyle\hspace*{.05em}\@thefnmark\hspace*{.05em}}% - \else% - \orig@makefnmark% + \DeclareRobustCommand{\lfstyle}{% + \not@math@alphabet\lfstyle\relax + \fontfamily{zplLF}\selectfont % + } + \DeclareRobustCommand{\tlfstyle}{% + \not@math@alphabet\tlfstyle\relax + \fontfamily{zplTLF}\selectfont % + } + \DeclareRobustCommand{\osfstyle}{% + \not@math@alphabet\osfstyle\relax + \fontfamily{zplOsF}\selectfont % + } + \DeclareRobustCommand{\tosfstyle}{% + \not@math@alphabet\tosfstyle\relax + \fontfamily{zplTOsF}\selectfont % + } + \ifzpl@defaultsups % + \else + \ifzpl@KOMA + %\let\textsuperscript\sustyle + \else % NOT KOMA + \def\f@@tn@te{footnote} + \def\@makefnmark{% + \ifx\@mpfn\f@@tn@te% + \ifx\thefootnote\orig@footnote% + \hbox{\sustyle\hspace*{.05em}\@thefnmark\hspace*{.05em}}% + \else% + \orig@makefnmark% + \fi + \else% + \orig@makefnmark% + \fi}% \fi - \else% - \orig@makefnmark% - \fi}% \fi -\fi + \ifzpl@helv\renewcommand*{\sfdefault}{qhv}\fi + \renewcommand*{\ttdefault}{npxtt} + \DeclareRobustCommand\thfamily % new family for theorem font + {\not@math@alphabet\thfamily\relax + \fontfamily\thdefault\selectfont} + \DeclareRobustCommand{\textth}[1]{% + {\thfamily #1}% + } + \let\textthit\textth -\ifzpl@scosf % -\DeclareRobustCommand{\textsc}[1]{% -{\fontfamily{zpl\zpl@figurealign osf}\scshape\selectfont #1}% -}\fi% use OsF in small caps - -\DeclareRobustCommand{\lfstyle}{% - \not@math@alphabet\lfstyle\relax - \fontfamily{zpllf}\selectfont % -}% to get lf -\DeclareRobustCommand{\tlfstyle}{% - \not@math@alphabet\tlfstyle\relax - \fontfamily{zpltlf}\selectfont % -}% to get tlf -\DeclareRobustCommand{\osfstyle}{% - \not@math@alphabet\osfstyle\relax - \fontfamily{zplosf}\selectfont % -}% to get osf -\DeclareRobustCommand{\tosfstyle}{% - \not@math@alphabet\tosfstyle\relax - \fontfamily{zpltosf}\selectfont % -}% to get tosf -\DeclareRobustCommand{\textlf}[1]{% - {\lfstyle #1}% -}% to get lf -\DeclareRobustCommand{\texttlf}[1]{% - {\tlfstyle #1}% -}% to get tlf -\DeclareRobustCommand{\textosf}[1]{% - {\osfstyle #1}% -}% to get osf -\DeclareRobustCommand{\texttosf}[1]{% - {\tosfstyle #1}% -}% to get tosf -\DeclareRobustCommand{\textsu}[1]{% - {\sustyle #1}% -}% to get sup style +\fi % type1 -%\AtEndPreamble{% \ifzpl@thrm %\RequirePackage{amsmath,amsthm} % in case of theoremfont \ifdefined\newtheoremstyle %amsthm and ntheorem, not theorem.sty @@ -170,95 +417,172 @@ \fi% \fi%} -%%%%%%%%%%%%%%%%%%%%%% -% Text Serif (TGPagellaX) % -%%%%%%%%%%%%%%%%%%%%%% - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Text Sans Serif (based on Helvetica) % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -%\renewcommand*{\sfdefault}{npxss} -\ifzpl@helv\renewcommand*{\sfdefault}{qhv}\fi -%\show\qhv@scale -%\show\zpl@helvratio - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Text (Monospaced) Typewriter % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifzpl@otf +% \def\zpl@nft{\if t\zpl@thmtab Monospaced% +% \else Proportional\fi} + \DeclareTextFontCommand{\textsl}{\slshape} + \DeclareTextFontCommand{% + \osfstyle}{\addfontfeatures{Numbers={Proportional,OldStyle}}} + \DeclareTextFontCommand{% + \tosfstyle}{\addfontfeatures{Numbers={Tabular,OldStyle}}} + \DeclareTextFontCommand{% + \tlfstyle}{\addfontfeatures{Numbers={Tabular,Lining}}} + \DeclareTextFontCommand{% + \lfstyle}{\addfontfeatures{Numbers={Proportional,Lining}}} -\renewcommand*{\ttdefault}{npxtt} + \providecommand\sufigures{% + \addfontfeatures{VerticalPosition=Superior}} + \providecommand\infigures{% + \addfontfeatures{VerticalPosition=Inferior}} + \providecommand\nufigures{% + \addfontfeatures{VerticalPosition=Numerator}} + \providecommand\defigures{% + \addfontfeatures{VerticalPosition=Denominator}} + \let\sustyle=\sufigures + \let\nustyle=\nufigures + \let\instyle=\infigures + \let\destyle=\defigures + \ifzpl@defaultsups % + \else + \usepackage{realscripts} + \ifzpl@KOMA + \setkomafont{footnotelabel}{\normalfont} + \else + \renewcommand\footnotemarkfont{\normalfont} + \fi + \fi +% \ifzpl@scosf +% \edef\zpl@fnt{\expandafter\csname zpl\ifzpl@tabular T\fi OsF\endcsname} +% \DeclareRobustCommand{\textsc}[1]{% +% {\zpl@fnt \addfontfeatures{RawFeature=+smcp}#1}}% +% \fi + \renewcommand*{\textcircled}[1]{\hmode@bgroup\ooalign{% + \hfil \raise -.255ex\hbox{{% + \normalfont\addfontfeatures{Numbers={Monospaced, Lining}}% + \scalefont{.8}{\sustyle#1}}}% end hbox + \hfil \crcr \symbol{"25EF}}% + \egroup} +\else % type1 + \renewcommand*{\textcircled}[1]{\hmode@bgroup\ooalign{% + \hfil \raise -.15ex\hbox{{% + \normalfont + {\scalefont{.8}\sustyle#1}}}% end hbox + \hfil \crcr \textbigcircle}% + \egroup} +\fi -\def\re@DeclareTextSymbol#1#2#3{% - \let#1=\undefined - \DeclareTextSymbol{#1}{#2}{#3}} - -\def\re@DeclareMathSymbol#1#2#3#4{% - \let#1=\undefined - \DeclareMathSymbol{#1}{#2}{#3}{#4}} - -%\re@DeclareTextSymbol{\L}{OT1}{138} -%\re@DeclareTextSymbol{\l}{OT1}{170} -\re@DeclareTextSymbol{\textdollar}{OT1}{36} -%\re@DeclareTextSymbol{\textsterling}{OT1}{163} -%\re@DeclareMathSymbol{\mathsterling}{\mathord}{operators}{163} - -\DeclareTextComposite{\r}{OT1}{A}{197} -\DeclareTextComposite{\r}{OT1}{a}{229} - -% ring accent, eg \r{A} -%\re@DeclareTextSymbol{\textcent}{OT1}{162} - -%%% Modification of T1 and LY1 encoding related stuff -%%% - -% ogonek accent -\def\T@n@@nc@d@ng{T1} -\def\T@n@@nc@d@ngM@cr@M@d{% -\DeclareTextCommand{\k}{T1}[1]{{\ooalign{\hidewidth\char12\crcr##1}}}% +% applies to both +\DeclareRobustCommand{\textlf}[1]{% + {\lfstyle #1}% } - -\def\LY@n@@nc@d@ng{LY1} -\def\LY@n@@nc@d@ngM@cr@M@d{% -\DeclareTextCommand{\k}{LY1}[1]{{\ooalign{\hidewidth\char7\crcr##1}}}% +\DeclareRobustCommand{\texttlf}[1]{% + {\tlfstyle #1}% } - -\AtBeginDocument{% -\ifx\encodingdefault\T@n@@nc@d@ng\T@n@@nc@d@ngM@cr@M@d\fi% -\ifx\encodingdefault\LY@n@@nc@d@ng\LY@n@@nc@d@ngM@cr@M@d\fi% +\DeclareRobustCommand{\textosf}[1]{% + {\osfstyle #1}% } - -%\ifzpl@babel -% \renewcommand*{\rmdefault}{zpl\zpl@figurealign% -%\zpl@figurestyle} -% \normalfont -%\else -\DeclareRobustCommand\thfamily % new family for theorem font - {\not@math@alphabet\thfamily\relax - \fontfamily\thdefault\selectfont} -\DeclareRobustCommand{\textth}[1]{% - {\thfamily #1}% +\DeclareRobustCommand{\texttosf}[1]{% + {\tosfstyle #1}% } -\let\textthit\textth - +\DeclareRobustCommand{\textsu}[1]{% + {\sustyle #1}% +} +\DeclareTextFontCommand{\textsu}{\sustyle} + \let\textsuperior\textsu +\DeclareTextFontCommand{\textnu}{\nustyle} + \let\textnumerator\textnu +\DeclareTextFontCommand{\textde}{\destyle} + \let\textdenominator\textde +\DeclareTextFontCommand{\textinf}{\instyle} + \let\textinferior\textinf + \AtEndPreamble{% -\renewcommand*{\rmdefault}{zpl\zpl@figurealign% -\zpl@figurestyle} -\def\zpl@thfigurestyle{\zpl@figurestyle} -\ifx\zpl@figurestyle\zpl@dfltfigurestyle - \def\zpl@thfigurestyle{tlf} -\else - \def\zpl@thfigurestyle{osf} -\fi % there just two possible figure styles for the theorem font -\newcommand*{\thdefault}{zplth-\zpl@thfigurestyle} +\ifzpl@otf + \ifzpl@lining + \def\zpl@figurestyle{Lining} + \else + \def\zpl@figurestyle{OldStyle} + \fi + \ifzpl@tabular + \def\zpl@figurealign{Monospaced} + \else + \def\zpl@figurealign{Proportional} + \fi + \setmainfont + [ Numbers = {\zpl@figurealign,\zpl@figurestyle}, + UprightFont = *-Regular , + ItalicFont = *-Italic , + SlantedFont = *-Slanted , + BoldFont = *-Bold , + BoldItalicFont = *-BoldItalic , + BoldSlantedFont= *-BoldSlanted , + ] {\zpl@base} + \let\zpl@sty\zpl@figurestyle + \if l\zpl@thmlin\def\zpl@sty{Lining}\fi + \newcommand{\thfamily}%{\@nameuse{zpl\zpl@figurestyle}% + {\addfontfeatures{% + Numbers={\zpl@figurealign,\zpl@sty} , + RawFeature=+ss05} + \itshape} % for theorems + \ifzpl@sl\else\let\slshape=\thfamily\fi + + +\else % type1 + \ifzpl@lining + \def\zpl@figurestyle{LF} + \else + \def\zpl@figurestyle{OsF} + \fi + \ifzpl@tabular + \def\zpl@figurealign{T} + \else + \def\zpl@figurealign{} + \fi + + \renewcommand*{\rmdefault}{zpl\zpl@figurealign% + \zpl@figurestyle} + \ifzpl@scosf % + \DeclareRobustCommand{\textsc}[1]{% + {\fontfamily{zpl\zpl@figurealign OsF}\scshape\selectfont #1}% + }\fi% use OsF in small caps + + \def\zpl@thfigurestyle{\zpl@figurestyle} + \ifx\zpl@figurestyle\zpl@dfltfigurestyle + \def\zpl@thfigurestyle{tlf} + \else + \def\zpl@thfigurestyle{osf} + \fi % there just two possible figure styles for the theorem font + \newcommand*{\thdefault}{zplth-\zpl@thfigurestyle} + \normalfont +\fi +} +%both \ifzpl@thrm \theoremstyle{plain} \patchcmd{\th@plain}{\itshape}{\thfamily}{\message{Replaced itshape by thfamily in theorem style plain.}}{\message{Unable to replace itshape by thfamily in theorem style plain.}} \fi -\normalfont} -%\fi + +% Define \oldstylenums, \liningnums ,\tabularnums and \proportionalnums +\ifzpl@otf + \DeclareTextFontCommand{% + \oldstylenums}{\addfontfeatures{Numbers=OldStyle}} + \DeclareTextFontCommand{% + \liningnums}{\addfontfeatures{Numbers=Lining}} + \DeclareTextFontCommand{% + \tabularnums}{\addfontfeatures{Numbers=Tabular}} + \DeclareTextFontCommand{% + \proportionalnums}{\addfontfeatures{Numbers=Proportional}} +\else % type1 + \DeclareTextFontCommand{% + \oldstylenums}{\fontfamily{zpl\zpl@figurealign OsF}\selectfont } + \DeclareTextFontCommand{% + \liningnums}{\fontfamily{zpl\zpl@figurealign LF}\selectfont } + \DeclareTextFontCommand{% + \tabularnums}{\fontfamily{zplT\zpl@figurestyle}\selectfont } + \DeclareTextFontCommand{% + \proportionalnums}{\fontfamily{zpl\zpl@figurestyle}\selectfont } + \re@DeclareTextSymbol{\textdollar}{OT1}{36} +\fi \endinput |