blob: 2720ce731183894c279e77fbbf7da3454fd6631c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
\NeedsTeXFormat{LaTeX2e}
% Based on Young Ryu's pxfonts.sty, v.1.1.1
%
% 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 a small modification of TeXGyrePagella rather than ppl.
\def\fileversion{1.01}
\def\filedate{2013/05/25}
\ProvidesPackage{newpxtext}[\filedate\space v\fileversion]
\message{`newpxtext' v\fileversion, \filedate\space Text macros based on pxfonts (msharpe)}
%\RequirePackage{fontaxes}% so we can have [bold] italic small caps
\let\orig@footnote=\thefootnote
\let\orig@makefnmark=\@makefnmark
\RequirePackage{xkeyval}
\define@key{zpl}{scaled}[1.0]{\def\zpl@scaled{s*[#1]}%
\@tempdima=#1\p@\@tempdima=.93\@tempdima%
\def\zpl@helvscaled{s*[\strip@pt\@tempdima]}}
\DeclareOption*{%
\begingroup
\edef\x{\endgroup
\noexpand\setkeys{zpl}{\CurrentOption}}%
\x}
\def\zpl@style{x}% default is lining figures
\DeclareOption{osf}{\def\zpl@style{j}}% oldstyle figures
\DeclareOption{oldstyle}{\def\zpl@style{j}}% oldstyle figures
\ProcessOptions*
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\DeclareRobustCommand{\sustyle}{%
\not@math@alphabet\sustyle\relax
\fontfamily{zpl1}\selectfont}
\def\@makefnmark{\ifx \thefootnote\orig@footnote \hbox{\sustyle\hspace*{.04em}\@thefnmark}\else\orig@makefnmark\fi}
%%%%%%%%%%%%%%%%%%%%%%
% Text Serif (TGPagellaX) %
%%%%%%%%%%%%%%%%%%%%%%
\renewcommand*{\rmdefault}{zpl\zpl@style}
\def\useosf{\renewcommand*{\rmdefault}{zplj}}
\@onlypreamble\useosf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Text Sans Serif (based on Helvetica) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand*{\sfdefault}{npxss}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Text (Monospaced) Typewriter %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand*{\ttdefault}{npxtt}
\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}
\re@DeclareMathSymbol{\mathcent}{\mathord}{operators}{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}}}%
}
\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}}}%
}
\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%
}
\endinput
|