Debian Codegraph @

texmf-dist/source/latex/was/upgreek.dtx

raw
1 %\CheckSum{281}
2 %
3 % \iffalse
4 %
5 % File `upgreek.dtx'.
6 % Copyright (c) 2001--2003 Walter Schmidt
7 %
8 % This program may be distributed and/or modified under the
9 % conditions of the LaTeX Project Public License, either version 1.2
10 % of this license or (at your option) any later version.
11 % The latest version of this license is in
12 % http://www.latex-project.org/lppl.txt
13 % and version 1.2 or later is part of all distributions of LaTeX
14 % version 1999/12/01 or later.
15 %
16 % This program consists of the files upgreek.dtx and upgreek.ins
17 %
18 % \fi
19 %
20 % \iffalse
21 %
22 %<*driver>
23 \ProvidesFile{upgreek.drv}
24 %</driver>
25 %<package>\ProvidesPackage{upgreek}
26 [2003/02/12 v2.0 (WaS)]
27 %<*driver>
28 \documentclass{ltxdoc}
29 \CodelineNumbered
30 \begin{document}
31 \DocInput{upgreek.dtx}
32 \end{document}
33 %</driver>
34 % \fi
35 %
36 % \GetFileInfo{upgreek.drv}
37 % \DeleteShortVerb{\|}
38 % \MakeShortVerb{\+}
39 %
40 % \title{The \textsf{upgreek} package for \LaTeXe}
41 % \author{Walter Schmidt\thanks{{\ttfamily [email protected]}}}
42 % \date{(\fileversion{} -- \filedate)}
43 % \maketitle
44 % \thispagestyle{empty}
45 % \sloppy
46 %
47 % \noindent
48 % The default CM math fonts used by \TeX\ do not include upright
49 % lowercase Greek characters, and many alternative math font sets don't,
50 % either. (There are math fonts providing \emph{only} an upright
51 % Greek alphabet, but that's a different story.)
52 % However, mathematical constants such as $\pi = 3.14\dots$
53 % are sometimes required to be typeset in roman (i.e., upright) style,
54 % or one may need upright Greek to designate elementary particles.
55 %
56 % As a workaround,
57 % the \LaTeX{} package \textsf{upgreek} makes the upright
58 % Greek characters from the `Euler' or `Adobe Symbol' typefaces available
59 % as math symbols. The lowercase letters are named
60 % +\upalpha+, +\upbeta+ etc., whereas +\Updelta+, +\Upgamma+ etc.\ create
61 % upper case.
62 %
63 % Just like +\alpha+, +\beta+ etc., these symbols work only in math
64 % mode, and their size is properly adjusted, when they are used in
65 % superscripts, subscripts or fractions.
66 %
67 % At first sight, providing also the uppercase letters seems pointless,
68 % since +\Delta+, +\Gamma+, etc.\ are also upright by default. However,
69 % it may be useful to have all upright Greek letters available in the
70 % same style. Note that the uppercase letters were intentionally
71 % \emph{not} named +\upDelta+ etc., so as not to clash with other
72 % existent macro packages.
73 %
74 % The typeface is selected using a package option, so you can
75 % choose what blends best with the other fonts used in your document:
76 % \begin{description}
77 % \item[{\mdseries\ttfamily [Euler]}] Euler Roman/Bold (default)
78 % \item[{\mdseries\ttfamily [Symbol]}] Adobe Symbol
79 % \item[{\mdseries\ttfamily [Symbolsmallscale]}] Adobe Symbol, scaled down to 90\% of
80 % its natural size. (New feature in version 2.0\,!)
81 % \end{description}
82 %
83 % Note that +\upmu+ should normally \emph{not} be used as the prefix
84 % for physical units, meaning $10^{-6}$. The mu symbol to be used there
85 % is to be taken from the \emph{text} font, and
86 % most Latin text fonts do actually include a suitable Greek mu,
87 % which can be accessed as +\textmu+.
88 % Most likely -- depending on the encoding of your text fonts -- you
89 % need to load the package \textsf{textcomp} for this purpose.
90 % If, however, there is no mu in your text fonts,
91 % using +\upmu+ is still better than nothing.
92 % See also the \textsf{gensymb} package, which is distributed from the same
93 % CTAN directory than \textsf{upgreek}: It provides a command for `micro'
94 % that works in both text and math mode and uses either +\textmu+ or +\upmu+,
95 % depending on the available character sets.
96 %
97 %
98 % \StopEventually{}
99 %
100 % \section*{The package code}
101 %
102 % \begin{macrocode}
103 %<*package>
104 \DeclareOption{Symbol}{\let\uppi=s}
105 \DeclareOption{Symbolsmallscale}{\let\uppi m}
106 \DeclareOption{Euler}{\let\uppi=e}
107 \ExecuteOptions{Euler}
108 \ProcessOptions\relax
109 \ifx\uppi e
110 \PackageInfo{upgreek}{Using Euler Roman for upright Greek}
111 \DeclareFontFamily{U}{eur}{\skewchar\font'177}
112 \DeclareFontShape{U}{eur}{m}{n}{%
113 <-6> eurm5 <6-8> eurm7 <8-> eurm10}{}
114 \DeclareFontShape{U}{eur}{b}{n}{%
115 <-6> eurb5 <6-8> eurb7 <8-> eurb10}{}
116 \DeclareSymbolFont{ugrf@m}{U}{eur}{m}{n}
117 \SetSymbolFont{ugrf@m}{bold}{U}{eur}{b}{n}
118 \let\uppi\@undefined
119 \DeclareMathSymbol{\upalpha}{\mathord}{ugrf@m}{"0B}
120 \DeclareMathSymbol{\upbeta}{\mathord}{ugrf@m}{"0C}
121 \DeclareMathSymbol{\upgamma}{\mathord}{ugrf@m}{"0D}
122 \DeclareMathSymbol{\updelta}{\mathord}{ugrf@m}{"0E}
123 \DeclareMathSymbol{\upepsilon}{\mathord}{ugrf@m}{"0F}
124 \DeclareMathSymbol{\upzeta}{\mathord}{ugrf@m}{"10}
125 \DeclareMathSymbol{\upeta}{\mathord}{ugrf@m}{"11}
126 \DeclareMathSymbol{\uptheta}{\mathord}{ugrf@m}{"12}
127 \DeclareMathSymbol{\upiota}{\mathord}{ugrf@m}{"13}
128 \DeclareMathSymbol{\upkappa}{\mathord}{ugrf@m}{"14}
129 \DeclareMathSymbol{\uplambda}{\mathord}{ugrf@m}{"15}
130 \DeclareMathSymbol{\upmu}{\mathord}{ugrf@m}{"16}
131 \DeclareMathSymbol{\upnu}{\mathord}{ugrf@m}{"17}
132 \DeclareMathSymbol{\upxi}{\mathord}{ugrf@m}{"18}
133 \DeclareMathSymbol{\uppi}{\mathord}{ugrf@m}{"19}
134 \DeclareMathSymbol{\uprho}{\mathord}{ugrf@m}{"1A}
135 \DeclareMathSymbol{\upsigma}{\mathord}{ugrf@m}{"1B}
136 \DeclareMathSymbol{\uptau}{\mathord}{ugrf@m}{"1C}
137 \DeclareMathSymbol{\upupsilon}{\mathord}{ugrf@m}{"1D}
138 \DeclareMathSymbol{\upphi}{\mathord}{ugrf@m}{"1E}
139 \DeclareMathSymbol{\upchi}{\mathord}{ugrf@m}{"1F}
140 \DeclareMathSymbol{\uppsi}{\mathord}{ugrf@m}{"20}
141 \DeclareMathSymbol{\upomega}{\mathord}{ugrf@m}{"21}
142 \DeclareMathSymbol{\upvarepsilon}{\mathord}{ugrf@m}{"22}
143 \DeclareMathSymbol{\upvartheta}{\mathord}{ugrf@m}{"23}
144 \DeclareMathSymbol{\upvarpi}{\mathord}{ugrf@m}{"24}
145 \let\upvarrho\uprho
146 \let\upvarsigma\upsigma
147 \DeclareMathSymbol{\upvarphi}{\mathord}{ugrf@m}{"27}
148 \DeclareMathSymbol{\Upgamma}{\mathord}{ugrf@m}{"00}
149 \DeclareMathSymbol{\Updelta}{\mathord}{ugrf@m}{"01}
150 \DeclareMathSymbol{\Uptheta}{\mathord}{ugrf@m}{"02}
151 \DeclareMathSymbol{\Uplambda}{\mathord}{ugrf@m}{"03}
152 \DeclareMathSymbol{\Upxi}{\mathord}{ugrf@m}{"04}
153 \DeclareMathSymbol{\Uppi}{\mathord}{ugrf@m}{"05}
154 \DeclareMathSymbol{\Upsigma}{\mathord}{ugrf@m}{"06}
155 \DeclareMathSymbol{\Upupsilon}{\mathord}{ugrf@m}{"07}
156 \DeclareMathSymbol{\Upphi}{\mathord}{ugrf@m}{"08}
157 \DeclareMathSymbol{\Uppsi}{\mathord}{ugrf@m}{"09}
158 \DeclareMathSymbol{\Upomega}{\mathord}{ugrf@m}{"0A}
159 \else
160 \ifx\uppi s
161 \PackageInfo{upgreek}{Using Adobe Symbol for upright Greek}
162 \DeclareSymbolFont{ugrf@m}{U}{psy}{m}{n}
163 \else % m
164 \PackageInfo{upgreek}{Using Adobe Symbol, scaled 900, for upright Greek}
165 \DeclareFontFamily{U}{fsy}{}
166 \DeclareFontShape{U}{fsy}{m}{n}{<->s*[.9]psyr}{}
167 \DeclareSymbolFont{ugrf@m}{U}{fsy}{m}{n}
168 \fi
169 \let\uppi\@undefined
170 \DeclareMathSymbol{\upalpha}{\mathord}{ugrf@m}{`a}
171 \DeclareMathSymbol{\upbeta}{\mathord}{ugrf@m}{`b}
172 \DeclareMathSymbol{\upgamma}{\mathord}{ugrf@m}{`g}
173 \DeclareMathSymbol{\updelta}{\mathord}{ugrf@m}{`d}
174 \DeclareMathSymbol{\upepsilon}{\mathord}{ugrf@m}{`e}
175 \DeclareMathSymbol{\upzeta}{\mathord}{ugrf@m}{`z}
176 \DeclareMathSymbol{\upeta}{\mathord}{ugrf@m}{`h}
177 \DeclareMathSymbol{\uptheta}{\mathord}{ugrf@m}{`q}
178 \DeclareMathSymbol{\upiota}{\mathord}{ugrf@m}{`i}
179 \DeclareMathSymbol{\upkappa}{\mathord}{ugrf@m}{`k}
180 \DeclareMathSymbol{\uplambda}{\mathord}{ugrf@m}{`l}
181 \DeclareMathSymbol{\upmu}{\mathord}{ugrf@m}{`m}
182 \DeclareMathSymbol{\upnu}{\mathord}{ugrf@m}{`n}
183 \DeclareMathSymbol{\upxi}{\mathord}{ugrf@m}{`x}
184 \DeclareMathSymbol{\uppi}{\mathord}{ugrf@m}{`p}
185 \DeclareMathSymbol{\uprho}{\mathord}{ugrf@m}{`r}
186 \DeclareMathSymbol{\upsigma}{\mathord}{ugrf@m}{`s}
187 \DeclareMathSymbol{\uptau}{\mathord}{ugrf@m}{`t}
188 \DeclareMathSymbol{\upupsilon}{\mathord}{ugrf@m}{`u}
189 \DeclareMathSymbol{\upphi}{\mathord}{ugrf@m}{`f}
190 \DeclareMathSymbol{\upchi}{\mathord}{ugrf@m}{`c}
191 \DeclareMathSymbol{\uppsi}{\mathord}{ugrf@m}{`y}
192 \DeclareMathSymbol{\upomega}{\mathord}{ugrf@m}{`w}
193 \let\upvarepsilon\upepsilon
194 \DeclareMathSymbol{\upvartheta}{\mathord}{ugrf@m}{`J}
195 \DeclareMathSymbol{\upvarpi}{\mathord}{ugrf@m}{`v}
196 \let\upvarrho\uprho
197 \let\upvarsigma\upsigma
198 \DeclareMathSymbol{\upvarphi}{\mathord}{ugrf@m}{`j}
199 \DeclareMathSymbol{\Upgamma}{\mathord}{ugrf@m}{`G}
200 \DeclareMathSymbol{\Updelta}{\mathord}{ugrf@m}{`D}
201 \DeclareMathSymbol{\Uptheta}{\mathord}{ugrf@m}{`Q}
202 \DeclareMathSymbol{\Uplambda}{\mathord}{ugrf@m}{`L}
203 \DeclareMathSymbol{\Upxi}{\mathord}{ugrf@m}{`X}
204 \DeclareMathSymbol{\Uppi}{\mathord}{ugrf@m}{`P}
205 \DeclareMathSymbol{\Upsigma}{\mathord}{ugrf@m}{`S}
206 \DeclareMathSymbol{\Upupsilon}{\mathord}{ugrf@m}{`U}
207 \DeclareMathSymbol{\Upphi}{\mathord}{ugrf@m}{`F}
208 \DeclareMathSymbol{\Uppsi}{\mathord}{ugrf@m}{`Y}
209 \DeclareMathSymbol{\Upomega}{\mathord}{ugrf@m}{`W}
210 \fi
211 %</package>
212 % \end{macrocode}
213 %
214 % The next line of code is only to prevent DocStrip from adding the
215 % character table to all modules:
216 % \begin{macrocode}
217 \endinput
218 % \end{macrocode}
219 % \Finale
220 %% \CharacterTable
221 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
222 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
223 %% Digits \0\1\2\3\4\5\6\7\8\9
224 %% Exclamation \! Double quote \" Hash (number) \#
225 %% Dollar \$ Percent \% Ampersand \&
226 %% Acute accent \' Left paren \( Right paren \)
227 %% Asterisk \* Plus \+ Comma \,
228 %% Minus \- Point \. Solidus \/
229 %% Colon \: Semicolon \; Less than \<
230 %% Equals \= Greater than \> Question mark \?
231 %% Commercial at \@ Left bracket \[ Backslash \\
232 %% Right bracket \] Circumflex \^ Underscore \_
233 %% Grave accent \` Left brace \{ Vertical bar \|
234 %% Right brace \} Tilde \~}
235 %%