summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/arev/arevmath.sty
blob: bf90722349795257bc5c13ff98c94461baff1e28 (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
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
% arevmath.sty
% Part of the Arev Sans package by Stephen Hartke

\def\fileversion{0.1}%
\def\filedate{2006/02/19}%
\NeedsTeXFormat{LaTeX2e}%
\ProvidesPackage{arevmath}%
[\filedate\space\fileversion\space Arev Sans Math package]%
\RequirePackage{amssymb}
\RequirePackage{ams-mdbch}
\RequirePackage{ifthen}

% The defaults for which variant letters to use
% The "@" in the variable names prevents the variables from being accessed outside of this file.
\newcommand{\var@a}{true}
\newcommand{\var@i}{true}
\newcommand{\var@I}{true}
\newcommand{\var@f}{true}
\newcommand{\var@l}{true}
\newcommand{\var@u}{true}
\newcommand{\var@v}{true}
\newcommand{\var@w}{true}
\newcommand{\var@x}{true}
\newcommand{\var@Gamma}{true}
\newcommand{\var@Xi}{true}
\newcommand{\var@Pi}{true}
\newcommand{\var@Sigma}{true}
\newcommand{\var@Phi}{true}

\DeclareOption{origletters}{
\renewcommand{\var@a}{false}
\renewcommand{\var@i}{false}
\renewcommand{\var@I}{false}
\renewcommand{\var@f}{false}
\renewcommand{\var@l}{false}
\renewcommand{\var@u}{false}
\renewcommand{\var@v}{false}
\renewcommand{\var@w}{false}
\renewcommand{\var@x}{false}
\renewcommand{\var@Gamma}{false}
\renewcommand{\var@Xi}{false}
\renewcommand{\var@Pi}{false}
\renewcommand{\var@Sigma}{false}
\renewcommand{\var@Phi}{false}
}
\DeclareOption{vara}{\renewcommand{\var@a}{true}}
\DeclareOption{vari}{\renewcommand{\var@i}{true}}
\DeclareOption{varI}{\renewcommand{\var@I}{true}} % no varIota option!
\DeclareOption{varf}{\renewcommand{\var@f}{true}}
\DeclareOption{oldf}{\renewcommand{\old@f}{true}}
\DeclareOption{varl}{\renewcommand{\var@l}{true}}
\DeclareOption{varu}{\renewcommand{\var@u}{true}}
\DeclareOption{varv}{\renewcommand{\var@v}{true}}
\DeclareOption{varw}{\renewcommand{\var@w}{true}}
\DeclareOption{varGamma}{\renewcommand{\var@Gamma}{true}}
\DeclareOption{varXi}{\renewcommand{\var@Xi}{true}}
\DeclareOption{varPi}{\renewcommand{\var@Pi}{true}}
\DeclareOption{varSigma}{\renewcommand{\var@Sigma}{true}}
\DeclareOption{varPhi}{\renewcommand{\var@Phi}{true}}
\DeclareOption*{\message{Error: option not recognized.}\MessageBreak}
\ProcessOptions


% See the file fntguide.pdf, "LaTeX2e font selection" by the LaTeX3 Project Team
% for documentation on how to setup math fonts.

% The normal math version is predefined.
%\DeclareMathVersion{normal}

% These are the predefined symbol alphabets.
\SetSymbolFont{operators}    {normal}{OT1}{zavm}{m}{n}
\SetSymbolFont{letters}      {normal}{OML}{zavm}{m}{it}
\SetSymbolFont{symbols}      {normal}{OMS}{zavm}{m}{n}
\SetSymbolFont{largesymbols} {normal}{OMX}{mdbch}{m}{n}

% These are the predefined math alphabets.
%\SetMathAlphabet{\mathnormal}{normal}{OML}{zavm}{m}{it}
%\SetMathAlphabet{\mathit}    {normal}{OML}{zavm}{m}{it}
%\SetMathAlphabet{\mathrm}    {normal}{OT1}{zavm}{m}{n}
%\SetMathAlphabet{\mathsf}    {normal}{OML}{zavm}{m}{it}
\SetMathAlphabet{\mathbf}    {normal}{OT1}{zavm}{b}{n}
\SetMathAlphabet{\mathtt}    {normal}{T1} {fvm} {m}{n}

% Change this predefined math alphabet for bold, too.
\DeclareMathAlphabet{\mathcal}       {OMS}{cmsy}{m}{n} % Computer Modern calligraphy

% Using DeclareSymbolFontAlphabet instead of SetMathAlphabet makes better use of TeX's limited number (16) of math groups.
\DeclareSymbolFontAlphabet{\mathnormal}{letters}
\DeclareSymbolFontAlphabet{\mathit}    {letters}
\DeclareSymbolFontAlphabet{\mathrm}    {operators}
\DeclareSymbolFontAlphabet{\mathsf}    {letters}


% These math alphabets need to be declared. Since defaults are set, SetMathAlphabet is not needed.
\DeclareMathAlphabet{\mathscr}       {U}  {rsfs}{m}{n} % Ralph Smith Formal Script
\DeclareMathAlphabet{\mathbm}        {OML}{zavm}{b}{it}
%\DeclareMathAlphabet{\mathbold}      {OML}{zavm}{b}{it}

% Use Fourier for blackboard bold since it's sans serif.
% fourier-bb doesn't have a .fd font definition file in the fourier package.
\DeclareFontFamily{U}{futm}{}
\DeclareFontShape{U}{futm}{m}{n}{
  <-> s * [1.04] fourier-bb
  }{}
\DeclareMathAlphabet{\mathbb}        {U}  {futm}{m}{n} % Fourier-GUTenberg blackboard bold


% The bold math version is predefined.
%\DeclareMathVersion{bold}

% These are the predefined symbol alphabets.
\SetSymbolFont{operators}    {bold}  {OT1}{zavm}{b}{n}
\SetSymbolFont{letters}      {bold}  {OML}{zavm}{b}{it}
\SetSymbolFont{symbols}      {bold}  {OMS}{zavm}{b}{n}
\SetSymbolFont{largesymbols} {bold}  {OMX}{mdbch}{b}{n}

% These are the only alphabets that change.
\SetMathAlphabet{\mathbf}    {bold}  {OT1}{zavm}{b}{n}
\SetMathAlphabet{\mathtt}    {bold}  {T1} {fvm} {b}{n}


% From the Math Design Bitstream Charter fonts:
\DeclareMathAccent{\widetilde}{\mathord}{largesymbols}{"65}
\DeclareMathAccent{\widehat}{\mathord}{largesymbols}{"62}
\DeclareMathAccent{\widetriangle}{\mathord}{largesymbols}{"E6}
\DeclareMathAccent{\wideparen}{\mathord}{largesymbols}{"F3}


%% -------------------------------------------------------------------
%% Double left and right bracket
%% -------------------------------------------------------------------

%\MD@def\DeclareMathDelimiter{\llbracket}{\mathopen} {largesymbols}{"B9}{largesymbols}{"83}
%\MD@def\DeclareMathDelimiter{\rrbracket}{\mathclose}{largesymbols}{"BA}{largesymbols}{"8D}

%% -------------------------------------------------------------------
%% Wavy vertical lines
%% -------------------------------------------------------------------

%\MD@def\DeclareMathDelimiter{\lwave}{\mathopen} {largesymbols}{"D0}{largesymbols}{"D0}
%\MD@def\DeclareMathDelimiter{\rwave}{\mathclose}{largesymbols}{"D0}{largesymbols}{"D0}

%\MD@def\DeclareMathDelimiter{\levaw}{\mathopen} {largesymbols}{"D1}{largesymbols}{"D1}
%\MD@def\DeclareMathDelimiter{\revaw}{\mathclose}{largesymbols}{"D1}{largesymbols}{"D1}

%\def\leftwave{\left\lwave}
%\def\rightwave{\right\rwave}
%\def\leftevaw{\left\levaw}
%\def\rightevaw{\right\revaw}


% Set the default sizes larger than normal since we only have one optical size.
\def\defaultscriptratio{.76}
\def\defaultscriptscriptratio{.6}
\DeclareMathSizes{5}    {5}    {5}    {5}
\DeclareMathSizes{6}    {6}    {5}    {5}
\DeclareMathSizes{7}    {7}    {5}    {5}
\DeclareMathSizes{8}    {8}    {6}    {5}
\DeclareMathSizes{9}    {9}    {7}    {5}
\DeclareMathSizes{10}   {10}   {7.6}  {6}
\DeclareMathSizes{10.95}{10.95}{8}    {6}
\DeclareMathSizes{12}   {12}   {9}    {7}
\DeclareMathSizes{14.4} {14.4} {10}   {8}
\DeclareMathSizes{17.28}{17.28}{12}   {10}
\DeclareMathSizes{20.74}{20.74}{14.4} {12}
\DeclareMathSizes{24.88}{24.88}{20.74}{14.4}

% upright Greek? Not italicize var and orig capital Greek?
% over and under braces and square roots from mdbch are screwed up.
% accents?
% fix undefined small caps in text


% for extra symbols and nonstandard alternate glyphs
\DeclareSymbolFont{extraup}          {U}{zavm}{m}{n}
\DeclareSymbolFont{extraitalic}      {U}{zavm}{m}{it}

\input{arevsymbols} % contains the macro names and positions from the glyph lists

% We'll do extra symbols from OT1 separately
\DeclareMathSymbol{\varGamma}  {\mathord}  {operators}  {0}
\DeclareMathSymbol{\varXi}     {\mathord}  {operators}  {4}
\DeclareMathSymbol{\varPi}     {\mathord}  {operators}  {5}
\DeclareMathSymbol{\varSigma}  {\mathord}  {operators}  {6}
\DeclareMathSymbol{\varPhi}    {\mathord}  {operators}  {8}

\ifthenelse{\equal{\var@a}  {true}}{}{\DeclareMathSymbol{a}{\mathalpha}{extraitalic}{139}}
\ifthenelse{\equal{\var@i}  {true}}{}{\DeclareMathSymbol{i}{\mathalpha}{extraitalic}{140}
                                      \DeclareMathSymbol{\imath}{\mathalpha}{extraitalic}{111}}
\ifthenelse{\equal{\var@I}  {true}}{}{\DeclareMathSymbol{I}{\mathalpha}{extraitalic}{138}}
\ifthenelse{\equal{\var@f}  {true}}{}{\DeclareMathSymbol{f}{\mathalpha}{extraitalic}{154}}
\ifthenelse{\equal{\var@l}  {true}}{}{\DeclareMathSymbol{l}{\mathalpha}{extraitalic}{141}}
\ifthenelse{\equal{\var@u}  {true}}{}{\DeclareMathSymbol{u}{\mathalpha}{extraitalic}{142}}
\ifthenelse{\equal{\var@v}  {true}}{}{\DeclareMathSymbol{v}{\mathalpha}{extraitalic}{143}}
\ifthenelse{\equal{\var@w}  {true}}{}{\DeclareMathSymbol{w}{\mathalpha}{extraitalic}{144}}
\ifthenelse{\equal{\var@x}  {true}}{}{\DeclareMathSymbol{x}{\mathalpha}{extraitalic}{145}}
\ifthenelse{\equal{\var@Gamma} {true}}{}{\DeclareMathSymbol{\varGamma}{\mathord}{extraup}{93}}
\ifthenelse{\equal{\var@Xi} {true}}{}{\DeclareMathSymbol{\varXi}{\mathord}{extraup}{94}}
\ifthenelse{\equal{\var@Pi} {true}}{}{\DeclareMathSymbol{\varPi}{\mathord}{extraup}{95}}
\ifthenelse{\equal{\var@Sigma} {true}}{}{\DeclareMathSymbol{\varSigma}{\mathord}{extraup}{96}}
\ifthenelse{\equal{\var@Phi}{true}}{}{\DeclareMathSymbol{\varPhi}{\mathord}{extraup}{97}}

% a few symbols that have multiple declarations
\DeclareMathSymbol{\varnothing}{\mathord}{extraup}{34} % emptyset
\DeclareMathSymbol{\origIota}{\mathord}{extraitalic}{30} % same as \origI
\DeclareMathSymbol{\varIota}{\mathord}{extraitalic}{138} % same as \varI

\endinput