summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/europs/europs.dtx
blob: bc0fb439c527ea610fbc54f37b2b1827f28106ef (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
% \iffalse
%<*driver>
\documentclass{ltxdoc}
\begin{document}
\DocInput{europs.dtx}
\end{document}
%</driver>
% \fi
%
% \changes{v1.2}{1999/01/16}{added \\EURofc, updated documentation}
% \changes{v1.1}{1998/11/02}{switched to docstrip, added subsituition rules}
% \changes{v1.0}{1998/10/29}{initial version, not using docstrip}
% 
% \title{\textsf{europs} -- Using Adobe's Euro Currency Symbol Fonts
%   with \LaTeXe}
% \author{J\"orn Clausen\footnote{\texttt{joern@TechFak.Uni-Bielefeld.DE}}}
% \maketitle
%
% \section{The Style File}
% First we introduce ourself and request a reasonable \LaTeX{} version.
%    \begin{macrocode}
%<*style>
\ProvidesPackage{europs}
     [1999/01/16 v1.2 Euro Currency Symbol PostScript]
\NeedsTeXFormat{LaTeX2e}
%    \end{macrocode}
%
% I prefer the \textsf{ifthen} package over using plain\TeX{} commands. This
% is said to be more portable, anyway\dots
%    \begin{macrocode}
\RequirePackage{ifthen}
%    \end{macrocode}
%
% Now we define three macros to access the three font families. The actual
% glyph each macro produces still depends on the current selection of series
% and shape. If the macro |\EURtm| is used inside e.g. |\textbf{}|, the
% macro takes the symbol from EuroSerif Bold.
% \begin{macro}{\EURtm}
% |\EURtm| selects the Euro symbol from the EuroSerif family. The name
% should indicate that this shape can be combined with fonts like Times.
%    \begin{macrocode}
\providecommand{\EURtm}{{\fontencoding{U}\fontfamily{zpeu}\selectfont E}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\EURhv}
% |\EURhv| prints the sans serif version of the Euro symbol. The association
% is that this symbol looks like Helvetica.
%    \begin{macrocode}
\providecommand{\EURhv}{{\fontencoding{U}\fontfamily{zpeus}\selectfont E}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\EURcr}
% |\EURcr| finally is a monospaced version of the Euro symbol. It can be
% combined with Courier and similar typewriter fonts.
%    \begin{macrocode}
\providecommand{\EURcr}{{\fontencoding{U}\fontfamily{zpeut}\selectfont E}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\EUR}
% This macro selects one of the three symbols defined above, depending on
% the current font family. This way, \verb|\EUR| follows all the usual font
% changes one can perform with the \verb|\text..{}| commands.
%    \begin{macrocode}
\providecommand{\EUR}{%
  \ifthenelse{\equal{\f@family}{\rmdefault}}%
  {\EURtm}%
  {\ifthenelse{\equal{\f@family}{\ttdefault}}%
      {\EURcr}%
      {\EURhv}}%
    }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\EURofc}
% Having defined all these different symbols, the truth is, that there
% \emph{should} be only one symbol. It is the one represented by
% EuroSans Regular. So if you want to conform with the rules of the European
% bureaucrats, and break the rules of typesetters and designers, you can use
% |\EURofc| to get the ``official'' Euro symbol, independent of the current
% context.
%    \begin{macrocode}
\providecommand{\EURofc}{{\usefont{U}{zpeus}{m}{n} E}}
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
%</style>
%    \end{macrocode}
%
% \section{The Font Definitions}
% Now we have to provide font definitions to introduce the three families
% to NFSS.
% \subsection{EuroSerif}
% First, the definitions for EuroSerif:
%    \begin{macrocode}
%<*uzpeu>
\ProvidesFile{uzpeu.fd}
     [1999/01/16 v1.2 font definitions for U/zpeu]
\DeclareFontFamily{U}{zpeu}{}
\DeclareFontShape{U}{zpeu}{m}{n}{<->zpeur}{}
\DeclareFontShape{U}{zpeu}{m}{it}{<->zpeuri}{}
\DeclareFontShape{U}{zpeu}{bx}{n}{<->zpeub}{}
\DeclareFontShape{U}{zpeu}{bx}{it}{<->zpeubi}{}
%    \end{macrocode}
% We define some substitution rules that might be useful.
%    \begin{macrocode}
\DeclareFontShape{U}{zpeu}{b}{n}{<->ssub * zpeu/bx/n}{}
\DeclareFontShape{U}{zpeu}{b}{it}{<->ssub * zpeu/bx/it}{}
\DeclareFontShape{U}{zpeu}{m}{sl}{<->ssub * zpeu/m/it}{}
\DeclareFontShape{U}{zpeu}{bx}{sl}{<->ssub * zpeu/bx/it}{}
%</uzpeu>
%    \end{macrocode}
%
% \subsection{EuroSans}
% The definitions for EuroSans are essentially the same:
%    \begin{macrocode}
%<*uzpeus>
\ProvidesFile{uzpeus.fd}
     [1999/01/16 v1.2 font definitions for U/zpeus]
\DeclareFontFamily{U}{zpeus}{}
\DeclareFontShape{U}{zpeus}{m}{n}{<->zpeurs}{}
\DeclareFontShape{U}{zpeus}{m}{it}{<->zpeuris}{}
\DeclareFontShape{U}{zpeus}{bx}{n}{<->zpeubs}{}
\DeclareFontShape{U}{zpeus}{bx}{it}{<->zpeubis}{}
\DeclareFontShape{U}{zpeus}{b}{n}{<->ssub * zpeus/bx/n}{}
\DeclareFontShape{U}{zpeus}{b}{it}{<->ssub * zpeus/bx/it}{}
\DeclareFontShape{U}{zpeus}{m}{sl}{<->ssub * zpeus/m/it}{}
\DeclareFontShape{U}{zpeus}{bx}{sl}{<->ssub * zpeus/bx/it}{}
%</uzpeus>
%    \end{macrocode}
% \subsection{EuroMono}
% And finally the definitions for EuroMono:
%    \begin{macrocode}
%<*uzpeut>
\ProvidesFile{uzpeut.fd}
     [1999/01/16 v1.2 font definitions for U/zpeut]
\DeclareFontFamily{U}{zpeut}{}
\DeclareFontShape{U}{zpeut}{m}{n}{<->zpeurt}{}
\DeclareFontShape{U}{zpeut}{m}{it}{<->zpeurit}{}
\DeclareFontShape{U}{zpeut}{bx}{n}{<->zpeubt}{}
\DeclareFontShape{U}{zpeut}{bx}{it}{<->zpeubit}{}
\DeclareFontShape{U}{zpeut}{b}{n}{<->ssub * zpeut/bx/n}{}
\DeclareFontShape{U}{zpeut}{b}{it}{<->ssub * zpeut/bx/it}{}
\DeclareFontShape{U}{zpeut}{m}{sl}{<->ssub * zpeut/m/it}{}
\DeclareFontShape{U}{zpeut}{bx}{sl}{<->ssub * zpeut/bx/it}{}
%<*zpeut>
%    \end{macrocode}