The upgreek package for L^{A}TEX 2ε

Walter Schmidt^{∗}

(v2.0 – 2003/02/12)

The default CM math fonts used by TEX do not include upright lowercase Greek characters, and most alternative math font sets don’t, either. (There are math fonts providing only an upright Greek alphabet, but that’s a different story.) However, mathematical constants such as π = 3.14 … are sometimes required to be typeset in roman (i.e., upright) style, or one may need upright Greek to designate elementary particles.

As a workaround, the L^{A}TEX package upgreek makes the upright Greek characters from the ‘Euler’ or ‘Adobe Symbol’ typefaces available as math symbols. The lowercase letters are named \upalpha, \upbeta etc., whereas \Updelta, \Upgamma etc. create upper case.

Just like \alpha, \beta etc., these symbols work only in math mode, and their size is properly adjusted, when they are used in superscripts, subscripts or fractions.

At first sight, providing also the uppercase letters seems pointless, since \Delta, \Gamma, etc. are also upright by default. However, it may be useful to have all upright Greek letters available in the same style. Note that the uppercase letters were intentionally not named \upDelta etc., so as not to clash with other existent macro packages.

The typeface is selected through a package option, so you can choose what blends best with the other fonts used in your document:

[Euler] Euler Roman/Bold (default)

[Symbol] Adobe Symbol

[Symbolsmallscale] Adobe Symbol, scaled down to 90% of its natural size. (New feature in version 2.0 !)

Note that \upmu should normally not be used as the prefix for physical units, meaning 10^{−6}. The mu symbol to be used there is to be taken from the text font, and most Latin text fonts do actually include a suitable Greek mu, which can be accessed as \textmu. Most likely – depending on the encoding of your text fonts – you need to load the package textcomp for this purpose. If, however, there is no mu in your text fonts, using \upmu is still better than nothing. See also the gensymb package, which is distributed from the same CTAN directory than upgreek: It provides a command for ‘micro’ that works in both text and math mode and uses either \textmu or \upmu, depending on the available character sets.

∗w-a-schmidt@arcor.de

The package code

1 ⟨∗package⟩

 2 \DeclareOption{Symbol}{\let\uppi=s}
 3 \DeclareOption{Symbolsmallscale}{\let\uppi m}
 4 \DeclareOption{Euler}{\let\uppi=e}
 5 \ExecuteOptions{Euler}
 6 \ProcessOptions\relax
 7 \ifx\uppi e
 8 \PackageInfo{upgreek}{Using Euler Roman for upright Greek}
 9 \DeclareFontFamily{U}{eur}{\skewchar\font'177}
10 \DeclareFontShape{U}{eur}{m}{n}{%
11  <-6> eurm5 <6-8> eurm7 <8-> eurm10}{}
12 \DeclareFontShape{U}{eur}{b}{n}{%
13  <-6> eurb5 <6-8> eurb7 <8-> eurb10}{}
14 \DeclareSymbolFont{ugrf@m}{U}{eur}{m}{n}
15 \SetSymbolFont{ugrf@m}{bold}{U}{eur}{b}{n}
16 \let\uppi\@undefined
17 \DeclareMathSymbol{\upalpha}{\mathord}{ugrf@m}{"0B}
18 \DeclareMathSymbol{\upbeta}{\mathord}{ugrf@m}{"0C}
19 \DeclareMathSymbol{\upgamma}{\mathord}{ugrf@m}{"0D}
20 \DeclareMathSymbol{\updelta}{\mathord}{ugrf@m}{"0E}
21 \DeclareMathSymbol{\upepsilon}{\mathord}{ugrf@m}{"0F}
22 \DeclareMathSymbol{\upzeta}{\mathord}{ugrf@m}{"10}
23 \DeclareMathSymbol{\upeta}{\mathord}{ugrf@m}{"11}
24 \DeclareMathSymbol{\uptheta}{\mathord}{ugrf@m}{"12}
25 \DeclareMathSymbol{\upiota}{\mathord}{ugrf@m}{"13}
26 \DeclareMathSymbol{\upkappa}{\mathord}{ugrf@m}{"14}
27 \DeclareMathSymbol{\uplambda}{\mathord}{ugrf@m}{"15}
28 \DeclareMathSymbol{\upmu}{\mathord}{ugrf@m}{"16}
29 \DeclareMathSymbol{\upnu}{\mathord}{ugrf@m}{"17}
30 \DeclareMathSymbol{\upxi}{\mathord}{ugrf@m}{"18}
31 \DeclareMathSymbol{\uppi}{\mathord}{ugrf@m}{"19}
32 \DeclareMathSymbol{\uprho}{\mathord}{ugrf@m}{"1A}
33 \DeclareMathSymbol{\upsigma}{\mathord}{ugrf@m}{"1B}
34 \DeclareMathSymbol{\uptau}{\mathord}{ugrf@m}{"1C}
35 \DeclareMathSymbol{\upupsilon}{\mathord}{ugrf@m}{"1D}
36 \DeclareMathSymbol{\upphi}{\mathord}{ugrf@m}{"1E}
37 \DeclareMathSymbol{\upchi}{\mathord}{ugrf@m}{"1F}
38 \DeclareMathSymbol{\uppsi}{\mathord}{ugrf@m}{"20}
39 \DeclareMathSymbol{\upomega}{\mathord}{ugrf@m}{"21}
40 \DeclareMathSymbol{\upvarepsilon}{\mathord}{ugrf@m}{"22}
41 \DeclareMathSymbol{\upvartheta}{\mathord}{ugrf@m}{"23}
42 \DeclareMathSymbol{\upvarpi}{\mathord}{ugrf@m}{"24}
43 \let\upvarrho\uprho
44 \let\upvarsigma\upsigma
45 \DeclareMathSymbol{\upvarphi}{\mathord}{ugrf@m}{"27}
46 \DeclareMathSymbol{\Upgamma}{\mathord}{ugrf@m}{"00}
47 \DeclareMathSymbol{\Updelta}{\mathord}{ugrf@m}{"01}
48 \DeclareMathSymbol{\Uptheta}{\mathord}{ugrf@m}{"02}
49 \DeclareMathSymbol{\Uplambda}{\mathord}{ugrf@m}{"03}
50 \DeclareMathSymbol{\Upxi}{\mathord}{ugrf@m}{"04}
51 \DeclareMathSymbol{\Uppi}{\mathord}{ugrf@m}{"05}
52 \DeclareMathSymbol{\Upsigma}{\mathord}{ugrf@m}{"06}

53 \DeclareMathSymbol{\Upupsilon}{\mathord}{ugrf@m}{"07}
54 \DeclareMathSymbol{\Upphi}{\mathord}{ugrf@m}{"08}
55 \DeclareMathSymbol{\Uppsi}{\mathord}{ugrf@m}{"09}
56 \DeclareMathSymbol{\Upomega}{\mathord}{ugrf@m}{"0A}
57 \else
58 \ifx\uppi s
59  \PackageInfo{upgreek}{Using Adobe Symbol for upright Greek}
60  \DeclareSymbolFont{ugrf@m}{U}{psy}{m}{n}
61 \else % m
62  \PackageInfo{upgreek}{Using Adobe Symbol, scaled 900, for upright Greek}
63  \DeclareFontFamily{U}{fsy}{}
64  \DeclareFontShape{U}{fsy}{m}{n}{<->s*[.9]psyr}{}
65  \DeclareSymbolFont{ugrf@m}{U}{fsy}{m}{n}
66 \fi
67 \let\uppi\@undefined
68 \DeclareMathSymbol{\upalpha}{\mathord}{ugrf@m}{`a}
69 \DeclareMathSymbol{\upbeta}{\mathord}{ugrf@m}{`b}
70 \DeclareMathSymbol{\upgamma}{\mathord}{ugrf@m}{`g}
71 \DeclareMathSymbol{\updelta}{\mathord}{ugrf@m}{`d}
72 \DeclareMathSymbol{\upepsilon}{\mathord}{ugrf@m}{`e}
73 \DeclareMathSymbol{\upzeta}{\mathord}{ugrf@m}{`z}
74 \DeclareMathSymbol{\upeta}{\mathord}{ugrf@m}{`h}
75 \DeclareMathSymbol{\uptheta}{\mathord}{ugrf@m}{`q}
76 \DeclareMathSymbol{\upiota}{\mathord}{ugrf@m}{`i}
77 \DeclareMathSymbol{\upkappa}{\mathord}{ugrf@m}{`k}
78 \DeclareMathSymbol{\uplambda}{\mathord}{ugrf@m}{`l}
79 \DeclareMathSymbol{\upmu}{\mathord}{ugrf@m}{`m}
80 \DeclareMathSymbol{\upnu}{\mathord}{ugrf@m}{`n}
81 \DeclareMathSymbol{\upxi}{\mathord}{ugrf@m}{`x}
82 \DeclareMathSymbol{\uppi}{\mathord}{ugrf@m}{`p}
83 \DeclareMathSymbol{\uprho}{\mathord}{ugrf@m}{`r}
84 \DeclareMathSymbol{\upsigma}{\mathord}{ugrf@m}{`s}
85 \DeclareMathSymbol{\uptau}{\mathord}{ugrf@m}{`t}
86 \DeclareMathSymbol{\upupsilon}{\mathord}{ugrf@m}{`u}
87 \DeclareMathSymbol{\upphi}{\mathord}{ugrf@m}{`f}
88 \DeclareMathSymbol{\upchi}{\mathord}{ugrf@m}{`c}
89 \DeclareMathSymbol{\uppsi}{\mathord}{ugrf@m}{`y}
90 \DeclareMathSymbol{\upomega}{\mathord}{ugrf@m}{`w}
91 \let\upvarepsilon\upepsilon
92 \DeclareMathSymbol{\upvartheta}{\mathord}{ugrf@m}{`J}
93 \DeclareMathSymbol{\upvarpi}{\mathord}{ugrf@m}{`v}
94 \let\upvarrho\uprho
95 \let\upvarsigma\upsigma
96 \DeclareMathSymbol{\upvarphi}{\mathord}{ugrf@m}{`j}
97 \DeclareMathSymbol{\Upgamma}{\mathord}{ugrf@m}{`G}
98 \DeclareMathSymbol{\Updelta}{\mathord}{ugrf@m}{`D}
99 \DeclareMathSymbol{\Uptheta}{\mathord}{ugrf@m}{`Q}
100 \DeclareMathSymbol{\Uplambda}{\mathord}{ugrf@m}{`L}
101 \DeclareMathSymbol{\Upxi}{\mathord}{ugrf@m}{`X}
102 \DeclareMathSymbol{\Uppi}{\mathord}{ugrf@m}{`P}
103 \DeclareMathSymbol{\Upsigma}{\mathord}{ugrf@m}{`S}
104 \DeclareMathSymbol{\Upupsilon}{\mathord}{ugrf@m}{`U}
105 \DeclareMathSymbol{\Upphi}{\mathord}{ugrf@m}{`F}
106 \DeclareMathSymbol{\Uppsi}{\mathord}{ugrf@m}{`Y}

107 \DeclareMathSymbol{\Upomega}{\mathord}{ugrf@m}{`W}
108 \fi

109 ⟨/package⟩

The next line of code is only to prevent DocStrip from adding the character table to all modules:

110 \endinput