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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
%%
\NeedsTeXFormat{LaTeX2e}
\def\fileversion{1.052}
\def\filedate{2022/02/04}
\ProvidesPackage{ETbb}
[\filedate\space v\fileversion. Style file for ETbb.]
\RequirePackage[T1]{fontenc}
\RequirePackage[full]{textcomp}
\RequirePackage{ifetex}
\ifetex\RequirePackage{etoolbox}\fi %etoolbox loads etex.sty
\RequirePackage{xstring,ifthen} % for \textfrac
\RequirePackage{scalefnt}
\IfFileExists{mweights.sty}{\RequirePackage{mweights}}{}
\IfFileExists{fontaxes.sty}{
\RequirePackage{fontaxes}
\DeclareRobustCommand\swshape{\not@math@alphabet\swshape\relax
\fontprimaryshape\itdefault\fontsecondaryshape\swdefault\selectfont}
\fa@naming@exception{shape}{{n}{sw}}{nw}
\fa@naming@exception{shape}{{it}{sw}}{sw}\fa@naming@exception{figures}{{superior}{proportional}}{Sup}
\fa@naming@exception{figures}{{superior}{tabular}}{Sup}
\fa@naming@exception{figures}{{inferior}{proportional}}{Inf}
\fa@naming@exception{figures}{{inferior}{tabular}}{Inf}
\def\supfigures{\@nomath\supfigures
\fontfigurestyle{superior}\selectfont}
\let\sufigures\supfigures
\DeclareTextFontCommand{\textsup}{\supfigures}
\let\textsu\textsup
\let\textsuperior\textsup
\let\nustyle\sufigures
\def\inffigures{\@nomath\inffigures
\fontfigurestyle{inferior}\selectfont}
\let\infigures\inffigures
\DeclareTextFontCommand{\textinf}{\inffigures}
\let\textin\textinf
\let\textinferior\textinf
\fa@naming@exception{figures}{{denominators}{proportional}}{Dnom}
\fa@naming@exception{figures}{{denominators}{tabular}}{Dnom}
\def\denomfigures{\@nomath\denomfigures
\fontfigurestyle{denominators}\selectfont}
\let\defigures\denomfigures
\DeclareTextFontCommand{\textdenom}{\denomfigures}
\let\textde\textdenom
\let\textdenominator\textdenom
\let\destyle\defigures
}{}
\newcommand{\textfrac}[3][]{% like \textfrac[1]{7}{8}
\mbox{%
\ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
{\textlf{#1}\kern.05em}{}%
\textsu{#2}% numerator
\StrRight{#2}{1}[\@digit@]%
% look for 1, 2, 3, 4, 7
\ifcase\@digit@% 0
\or% 1
\or\kern.03em% 2
\or\kern-.02em% 3
\or\kern-.01em% 4
\or\kern.01em% 5
\or\kern.02em% 6
\or\kern-.09em% 7
\fi%
\kern\ETbb@foresolidus\textfractionsolidus\kern\ETbb@aftsolidus%
\StrLeft{#3}{1}[\@digit@]%
% look for 1, 4, 5, 7
\ifcase\@digit@% 0
\or\kern -.02em% 1
\or\kern -.01em% 2
\or\kern -.02em% 3
\or\kern -.08em% 4
\or\kern -.03em% 5
\or\kern -.03em% 6
\or\kern .02em% 7
\fi%
\textde{#3}% denominator [#3]
}%
}
%\newcommand*{\ETbb@First}[2]{\def#2{\StrLeft
\newcommand*{\ETbb@scale}{1}
\RequirePackage{xkeyval}
\DeclareOptionX{scale}{\renewcommand*{\ETbb@scale}{#1}}
\DeclareOptionX{scaled}{\renewcommand*{\ETbb@scale}{#1}}
\let\orig@footnote=\thefootnote
\let\orig@makefnmark=\@makefnmark
%\def\bfseries@rm{b}
%\def\mdseries@rm{m}
\def\useosf{\edef\ETbb@figurestyle{OsF}}
\@onlypreamble\useosf
\def\useproportional{\edef\ETbb@figurealign{}}
\@onlypreamble\useproportional
\def\ETbb@@swashQ{}
\def\ETbb@swashID{0}
\newif\if@ETbb@sharpS
\newif\if@ETbb@sups
\newif\if@ETbb@scosf
\def\ETbb@foresolidus{-.05em}
\def\ETbb@aftsolidus{-.05em}
\def\ETbb@raisefrac{.112em}
\DeclareOptionX{foresolidus}{\gdef\ETbb@foresolidus{#1}}
\DeclareOptionX{aftsolidus}{\gdef\ETbb@aftsolidus{#1}}
\DeclareOptionX{raisefrac}{\gdef\ETbb@raisefrac{#1}}
\DeclareOptionX{altP}{}
\DeclareOptionX{lining}{\edef\ETbb@figurestyle{LF}}
\DeclareOptionX{lf}{\edef\ETbb@figurestyle{LF}}
\DeclareOptionX{oldstyle}{\useosf}
\DeclareOptionX{osf}{\useosf}
\DeclareOptionX{useosf}{\useosf}
\DeclareOptionX{tabular}{\def\ETbb@figurealign{T}}
\DeclareOptionX{t}{\def\ETbb@figurealign{T}}
\DeclareOptionX{proportional}{\useproportional}
\DeclareOptionX{p}{\useproportional}
\DeclareOptionX{sharpS}{\@ETbb@sharpStrue}
\DeclareOptionX{swashQ}{\def\ETbb@@swashQ{-swash}\def\ETbb@swashID{1}}
\DeclareOptionX{mainfont}{
\renewcommand{\familydefault}{\rmdefault}
}
\DeclareOptionX{bold}{\def\bfseries@rm{bold}}
\DeclareOptionX{regular}{\def\mdseries@rm{regular}}
\DeclareOptionX{sups}{\@ETbb@supstrue}
\DeclareOptionX{scosf}{\@ETbb@scosftrue}
\ExecuteOptionsX{lining,tabular,bold,regular,mainfont}
\ProcessOptionsX\relax
\DeclareTextCommand{\textcircled}{TS1}[1]{\hmode@bgroup
\ooalign{%
\hfil \raise .44ex\hbox {\fontencoding{T1}\fontfamily{ETbb-TOsF}\fontseries{m}\fontshape{sc}\selectfont\scalefont{.75}\lowercase{#1}}\hfil \crcr
\hfil{\fontencoding{TS1}\fontseries{m}\char79\relax}\hfil% bigcircle
}%
\egroup}
%\DeclareTextCommand{\textcircled}{TS1}[1]{\hmode@bgroup
% \ooalign{%
% \hfil \raise .44ex\hbox {\fontencoding{T1}\fontseries{m}\fontshape{sc}\fontsize{7.5}{9}\selectfont \lowercase{#1}}\hfil \crcr
% \hfil{\fontencoding{TS1}\fontseries{m}\char79\relax}\hfil% bigcircle
% }%
% \egroup}
\renewcommand*{\rmdefault}{ETbb-TLF}
\DeclareRobustCommand{\lfstyle}{%
\not@math@alphabet\lfstyle\relax
\fontfamily{ETbb-LF}\selectfont %
}% to get lf
\DeclareRobustCommand{\tlfstyle}{%
\not@math@alphabet\tlfstyle\relax
\fontfamily{ETbb-TLF}\selectfont %
}% to get tlf
\DeclareRobustCommand{\osfstyle}{%
\not@math@alphabet\osfstyle\relax
\fontfamily{ETbb-OsF}\selectfont %
}% to get osf
\DeclareRobustCommand{\tosfstyle}{%
\not@math@alphabet\tosfstyle\relax
\fontfamily{ETbb-TOsF}\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
\if@ETbb@scosf %
\DeclareRobustCommand{\textsc}[1]{%
{\fontfamily{ETbb-\ETbb@figurealign OsF}\fontshape{sc}\selectfont #1}%
}\fi
\if@ETbb@sups %
\ifdefined\sufigures
\def\f@@tn@te{footnote}
\def\@makefnmark{%
\ifx\@mpfn\f@@tn@te%
\ifx\thefootnote\orig@footnote%
\hbox{\sufigures\hspace*{.04em}\@thefnmark\hspace*{.04em}}%
\else%
\orig@makefnmark%
\fi
\else%
\orig@makefnmark%
\fi}%
\fi%
\fi
\def\Qswash{Q}
\def\Qnoswash{Q}
\def\altQ{Q}
\AtEndPreamble{\renewcommand*{\rmdefault}{ETbb-\ETbb@figurealign\ETbb@figurestyle}
\normalfont
\def\ETbb@fst#1#2\@nil{#1} % will apply only to expansion of \encodingdefault
\def\ETbb@altQEnc{OT1}
\edef\ETbb@tmpa{\noexpand\ETbb@fst\encodingdefault\noexpand\@nil}%
\edef\ETbb@E{\ETbb@tmpa}
\if O\ETbb@E\def\ETbb@altQEnc{T1}\fi
\ifnum0=\ETbb@swashID
\def\Qswash{{\def\ETbb@@swashQ{-swash}\fontencoding{\ETbb@altQEnc}\selectfont Q}}%
\def\Qnoswash{Q}
\let\altQ=\Qswash%
\else
\def\Qnoswash{{\def\ETbb@@swashQ{}\fontencoding{\ETbb@altQEnc}\selectfont Q}}%
\def\Qswash{Q}
\def\altQ{Q}
\fi}
\AtBeginDocument{%
\setbox0\hbox{\Qswash\Qnoswash\altQ}
} % seems to be required for those glyphs to activate later in document
\endinput
|