summaryrefslogtreecommitdiff
path: root/fonts/trsym/trsym.dtx
blob: b39fd9ef80755c4d35c4e546e4dc4afbade8405d (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
209
210
211
% \iffalse
% trsym.dtx
% Copyright (c) 2000 Jan Holfert
%
% This file is part of the `trsym' program.
%
% This program may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of LaTeX 
% version 1999/12/01 or later.
%
% This program consists of all files listed in manifest.txt.
% \fi
%
% \iffalse
%<*!metafont&!metafont10&!metafont12>
\def\trsymfileversion{1.0}
\def\trsymfiledate{2000/06/25}
%</!metafont&!metafont10&!metafont12>
% \fi
%
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{trsym}
   [\trsymfiledate v\trsymfileversion transformation symbol font]
%</package>
% \fi
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\documentclass{ltxdoc}
\usepackage{trsym}
\begin{document}
   \DocInput{trsym.dtx}
\end{document}
%</driver>
% \fi
%
% \RecordChanges
% \OnlyDescription
%
% \title{\textsf{trsym} package\\ version \trsymfileversion}
% \author{Jan Holfert, \texttt{jan.holfert@gmx.net}}
% \date{\trsymfiledate}
%
% \changes{1.0}{2000/06/25}{Released version 1.0}
%
% \newcommand{\tfh}{\TransformHoriz}
% \newcommand{\itfh}{\InversTransformHoriz}
% \newcommand{\tfv}{\TransformVert}
% \newcommand{\itfv}{\InversTransformVert}
% \newcommand{\bs}{\textbackslash}
%
% \maketitle
%
% \section*{Installation}
% If you see the symbols in section ``Usage'', the files are
% already installed. There is no need to do the installation
% again. Otherwise, do the following:
% \begin{enumerate}
% \item Create a subdirectory \textsf{trsym} in your local source path
%   for \textsf{MetaFont} files. If you use the configuration file for
%   the \textsf{docstrip} utility doing this is obligatory.
% \item Run ``\textsf{latex trsym.ins}''. If you use \textsf{docstrips}'
%   configuration file, everything is copied to its right
%   place. Otherwise, copy \textsf{trsy.mf}, \textsf{trsy10.mf} and
%   \textsf{trsy12.mf} into the subdirectory \textsf{trsym}
%   (e.g. \bs\bs localtexmf\bs fonts\bs source\bs trsym). Copy
%   \textsf{utrsy.fd} and \textsf{trsym.sty} into a subdirectory
%   \textsf{trsym} in your local \LaTeX{} path (e.g. \bs\bs
%   localtexmf\bs tex\bs latex\bs trsym)
% \end{enumerate}
% \section*{Usage}
% Write \textsf{\bs usepackage\{trsym\}} into your \LaTeX{} file's preamble.
% In \textsf{mathmode} use the following commands generating the
% according symbol. The commands in parenthesis are short versions of
% the commands as I used to declare in my documents.\\[1em]
% \begin{displaymath}
%   \begin{array}{lc}
%       \mbox{command} & \mbox{symbol}\\
%       \hline
%       \mbox{\rule{0pt}{1.1em}\textsf{\bs TransformHoriz (\bs tfh)}} & \tfh\\
%       \mbox{\textsf{\bs InversTransformHoriz (\bs itfh)}} & \itfh\\
%       \mbox{\textsf{\bs TransformVert (\bs tfv)}} & \tfv\\
%       \mbox{\textsf{\bs InversTransformVert (\bs itfv)}} & \itfv
%   \end{array}
% \end{displaymath}
%
% \StopEventually
%
%    \begin{macrocode}
%<*package>
\DeclareSymbolFont{transfsymbol}{U}{trsy}{m}{n}

\DeclareMathSymbol{\TransformHoriz}{\mathrel}{transfsymbol}{0}
\DeclareMathSymbol{\InversTransformHoriz}{\mathrel}{transfsymbol}{1}
\DeclareMathSymbol{\TransformVert}{\mathrel}{transfsymbol}{2}
\DeclareMathSymbol{\InversTransformVert}{\mathrel}{transfsymbol}{3}
%</package>

%<*fontdefinition>
\ProvidesFile{utrsy.fd}
   [\trsymfiledate v\trsymfileversion transformation symbol font definitions]
\DeclareFontFamily{U}{trsy}{}
\DeclareFontShape{U}{trsy}{m}{n}{
  <-11> trsy10
  <11-> trsy12
}{}
%</fontdefinition>

%<*metafont>
font_identifier:="TRANSFORMATION";

qqs:=ceiling(qqs#*hppp);
define_pixels(qqw,qqh);

fontdimen 1: 0,0,0,0,0,0,0,qqs#;
let cmchar=\;

cmchar "horizontal transformation symbol";
beginchar(0,1.5qqw#,.75qqh#,0);
  pickup pencircle scaled qqs;
  y1=y2=y3=y4=1/2h;
  20x1=5x2=4w;
  70x3=30x4=21w;
  diam_sharp:=1/5w;
  draw fullcircle scaled diam_sharp shifted z1;
  draw z3--z4;
  pickup pencircle scaled (diam_sharp+qqs);
  drawdot z2;
endchar;

cmchar "horizontal inverse transformation symbol";
beginchar(1,1.5qqw#,.75qqh#,0);
  pickup pencircle scaled qqs;
  y1=y2=y3=y4=1/2h;
  20x1=5x2=4w;
  70x3=30x4=21w;
  diam_sharp:=1/5w;
  draw fullcircle scaled diam_sharp shifted z2;
  draw z3--z4;
  pickup pencircle scaled (diam_sharp+qqs);
  drawdot z1;
endchar;

cmchar "vertical transformation symbol";
beginchar(2,.75qqw#,1.15qqh#,.35qqh#);
  pickup pencircle scaled qqs;
  x1=x2=x3=x4=1/2w;
  5(y1+d)=20(y2+d)=4(h+d);
  70(y3+d)=30(y4+d)=21(h+d);
  diam_sharp:=1/5(h+d);
  draw fullcircle scaled diam_sharp shifted z1;
  draw z3--z4;
  pickup pencircle scaled (diam_sharp+qqs);
  drawdot z2;
endchar;

cmchar "vertical inverse transformation symbol";
beginchar(3,.75qqw#,1.15qqh#,.35qqh#);
  pickup pencircle scaled qqs;
  x1=x2=x3=x4=1/2w;
  5(y1+d)=20(y2+d)=4(h+d);
  70(y3+d)=30(y4+d)=21(h+d);
  diam_sharp:=1/5(h+d);
  draw fullcircle scaled diam_sharp shifted z2;
  draw z3--z4;
  pickup pencircle scaled (diam_sharp+qqs);
  drawdot z1;
endchar;

bye
%</metafont>

%<*metafont10>
inner bye;
if not unknown cmbase:
  errhelp "This font must be generated using the plain base.";
  errmessage "You can't use cmbase for this font!";
  expandafter bye
fi
font_size 10pt#;
mode_setup;
qqs# = .4pt#;
qqh# = 10pt#;
qqw# = 10pt#;
input trsy;
bye.
%</metafont10>

%<*metafont12>
inner bye;
if not unknown cmbase:
  errhelp "This font must be generated using the plain base.";
  errmessage "You can't use cmbase for this font!";
  expandafter bye
fi
font_size 12pt#;
mode_setup;
qqs# = .4pt#;
qqh# = 12pt#;
qqw# = 12pt#;
input trsy;
bye.
%</metafont12>
%    \end{macrocode}