summaryrefslogtreecommitdiff
path: root/language/staves/latex/staves.dtx
blob: d099e154cc20eec162ffe6832b953c5e4f8a718b (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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
%% \CharacterTable
%%  {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
%%   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
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%\iffalse
%
% (c) copyright 2006 Apostolos Syropoulos 
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1.3b of the License, or any later version.
%
% Please report errors or suggestions for improvement to
%
%    Apostolos Syropoulos  (asyropoulos@yahoo.com)
%
%\fi
% \CheckSum{292}
% \iffalse This is a Metacomment
%
%<linearA, >\ProvidesFile{staves.sty}
%
%<linearA, >  [2006/11/06 v1.0 Package `staves.sty']
%
%    \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}
\usepackage{url}
\GetFileInfo{staves.drv}
\begin{document}
   \DocInput{staves.dtx}
\end{document}
%</driver>
%    \end{macrocode}
% \fi
%\StopEventually{}
%\title{The \textsf{staves} package}
%\author{Apostolos Syropoulos\\
%        Xanthi, Greece\\
%        \texttt{asyropoulos@yahoo.com}}
% \date{2006/11/06}
%\maketitle
% \begin{abstract}
% The \textsf{staves} package has been designed to provide an interface to the \textsf{icelandic}
% font, designed by the author of this package. The font contains all ``magical'' staves presented
% on the Web site of the Icelandic Museum of Sorcery and Witchcraft. In addition, the package 
% provides a simple command to typeset Icelandic runes.
%\end{abstract}
%
% \vspace*{20pt}
% \fbox{\begin{minipage}{320pt}
%\textbf{Disclaimer} {\em Sorcery} as a cultural phenomenon is studied by ethnologists. Becuase of
% this, the author believes that his work should be of interest to enthnologists, in particular,
% and people with an interest in (digital) typography, in general. However, the author does not 
% believe that the glyphs of the font do actually have any ``magical'' power. Also, if someone will
% use them to perform any kind of ``magical'' ceremony, the author cannot be hold responsible for 
% any such action and its consequences.
% \end{minipage}}
%\vspace*{20pt}
%\section{Introduction}
%
% The \textsf{staves} package provides a simple interface to the 
% \textsf{icelandic} font designed by this author. The font contain all
% the ``magical'' staves that are described at the Web site of the 
% Icelandic Museum of Sorcery and Witchcraft (see 
% \url{http://www.galdrasyning.is/index.php?option=com_content&task=category&sectionid=5&id=18&Itemid=60} 
% for more details). In addition, the font contains all the Icelandic runes
% as they are presented at the same Web pages (see \url{http://www.galdrasyning.is/index.php?option=com_content&task=view&id=229&Itemid=131} for more details).
% 
% The various staves can be accessed by simple commands that have the following form
% \begin{center}
% \texttt{\char`\\icelandicStave\textit{CCC}}
% \end{center}
% where \texttt{\textit{CCC}} is an uppercase roman numeral. It would be possible to
% give ``real'' names to these glyph access commands, but since these staves do not
% have a name to the best of my language, I opted to use this naming scheme.
%
%\begin{figure}
%\begin{center}
%\begin{tabular}{lc}\hline
% Unicode name                                   & Access character\\ \hline
% \textsc{runic letter ansuz a}                  & a \\
% \textsc{runic letter berkanan beorc rjarkan b} & b \\
% \textsc{runic letter iwaz eoh}                 & c \\
% \textsc{runic letter d}                        & d \\
% \textsc{runic letter e}                        & e \\
% \textsc{runic letter fehu feoh fe f}           & f \\
% \textsc{runic letter gebo gyfu g}              & g \\
% \textsc{runic letter haglaz h}                 & h \\
% \textsc{runic letter isaz is iss i}            & i \\
% \textsc{runic letter thurisaz thurs thorn}     & j \\
% \textsc{runic letter kauna}                    & k \\
% \textsc{runic letter laukaz lagu logr l}       & l \\
% \textsc{runic letter mannaz man m}             & m \\
% \textsc{runic letter naudiz nyd naud n}        & n \\
% \textsc{runic letter othalan ethel o}          & o \\
% \textsc{runic letter pertho peorth p}          & p \\
% \textsc{runic letter ingwaz}                   & q \\
% \textsc{runic letter raido rad reid r}         & r \\
% \textsc{runic letter sigel long-branch-sol s}  & s \\
% \textsc{runic letter tiwaz tir tyr t}          & t \\
% \textsc{runic letter uruz ur u}                & u \\
% \hline
% \end{tabular}
% \end{center}
% \caption{Runic letters supported by the \textsf{staves} package.}\label{unicode}
%\end{figure}
%
% The package defines the command |\runictext|, which typesets its argument using the 
% \textsf{icelandic} font. In Table~\ref{unicode} the reader can see which runic letters
% are supported and to which letters they are associated to.
%
% \section{The Source Code}
% 
% Since we want to have everything in a single file, we will start by announcing the 
% \textsf{icelandic} font to \LaTeX.  
%    \begin{macrocode}
%<*staves>
\DeclareFontSubstitution{U}{icelandic}{m}{n}
\DeclareFontFamily{U}{icelandic}{\hyphenchar\font=-1}
%    \end{macrocode}
% Now, we make sure that all font switching commands will default to the 
% \textsf{icelandic} font:
%    \begin{macrocode} 
\DeclareFontShape{U}{icelandic}{m}{n}{%
   <-> icelandic }{}
\DeclareFontShape{U}{icelandic}{m}{sl}{
   <-> ssub * icelandic/m/n}{}
\DeclareFontShape{U}{icelandic}{m}{it}{
   <-> ssub * icelandic/m/n}{}
\DeclareFontShape{U}{icelandic}{m}{sc}{
   <-> ssub * icelandic/m/n}{}
\DeclareFontShape{U}{icelandic}{bx}{n}{
   <-> ssub * icelandic/m/n}{}
\DeclareFontShape{U}{icelandic}{bx}{sl}{
   <-> ssub * icelandic/m/n}{}
\DeclareFontShape{U}{icelandic}{bx}{it}{
   <-> ssub * icelandic/m/n}{}
\DeclareFontShape{U}{icelandic}{bx}{sc}{
   <-> ssub * icelandic/m/n}{}
%    \end{macrocode}
% Also, we need to define a command that will select the \textsf{icelandic} font:
%    \begin{macrocode}
\def\icelandicFamily{\fontencoding{U}\fontfamily{icelandic}\selectfont}
%    \end{macrocode}
% Next, we define the command that will allow users to typeset icelandic runes:
%    \begin{macrocode}
\newcommand{\runictext}[1]{{\icelandicFamily #1}}
%    \end{macrocode}
% And now we are ready to define the various glyph access commands for the various
% ``magical'' staves.
%    \begin{macrocode}
\def\staveI{{\icelandicFamily\char'0}}
\def\staveII{{\icelandicFamily\char'1}}
\def\staveIII{{\icelandicFamily\char'2}}
\def\staveIV{{\icelandicFamily\char'3}}
\def\staveV{{\icelandicFamily\char'4}}
\def\staveVI{{\icelandicFamily\char'5}}
\def\staveVII{{\icelandicFamily\char'6}}
\def\staveVIII{{\icelandicFamily\char'7}}
\def\staveIX{{\icelandicFamily\char'10}}
\def\staveX{{\icelandicFamily\char'11}}
\def\staveXI{{\icelandicFamily\char'12}}
\def\staveXII{{\icelandicFamily\char'13}}
\def\staveXIII{{\icelandicFamily\char'14}}
\def\staveXIV{{\icelandicFamily\char'15}}
\def\staveXV{{\icelandicFamily\char'16}}
\def\staveXVI{{\icelandicFamily\char'17}}
\def\staveXVII{{\icelandicFamily\char'20}}
\def\staveXVIII{{\icelandicFamily\char'21}}
\def\staveXIX{{\icelandicFamily\char'22}}
\def\staveXX{{\icelandicFamily\char'23}}
\def\staveXXI{{\icelandicFamily\char'24}}
\def\staveXXII{{\icelandicFamily\char'25}}
\def\staveXXIII{{\icelandicFamily\char'26}}
\def\staveXXIV{{\icelandicFamily\char'27}}
\def\staveXXV{{\icelandicFamily\char'30}}
\def\staveXXVI{{\icelandicFamily\char'31}}
\def\staveXXVII{{\icelandicFamily\char'32}}
\def\staveXXVIII{{\icelandicFamily\char'33}}
\def\staveXXIX{{\icelandicFamily\char'34}}
\def\staveXXX{{\icelandicFamily\char'35}}
\def\staveXXXI{{\icelandicFamily\char'36}}
\def\staveXXXII{{\icelandicFamily\char'37}}
\def\staveXXXIII{{\icelandicFamily\char'40}}
\def\staveXXXIV{{\icelandicFamily\char'41}}
\def\staveXXXV{{\icelandicFamily\char'42}}
\def\staveXXXVI{{\icelandicFamily\char'43}}
\def\staveXXXVII{{\icelandicFamily\char'44}}
\def\staveXXXVIII{{\icelandicFamily\char'45}}
\def\staveXXXIX{{\icelandicFamily\char'46}}
\def\staveXL{{\icelandicFamily\char'47}}
\def\staveXLI{{\icelandicFamily\char'50}}
\def\staveXLII{{\icelandicFamily\char'51}}
\def\staveXLIII{{\icelandicFamily\char'52}}
\def\staveXLIV{{\icelandicFamily\char'53}}
\def\staveXLV{{\icelandicFamily\char'54}}
\def\staveXLVI{{\icelandicFamily\char'55}}
\def\staveXLVII{{\icelandicFamily\char'56}}
\def\staveXLVIII{{\icelandicFamily\char'57}}
\def\staveXLIX{{\icelandicFamily\char'60}}
\def\staveL{{\icelandicFamily\char'61}}
\def\staveLI{{\icelandicFamily\char'62}}
\def\staveLII{{\icelandicFamily\char'63}}
\def\staveLIII{{\icelandicFamily\char'64}}
\def\staveLIV{{\icelandicFamily\char'65}}
\def\staveLV{{\icelandicFamily\char'66}}
\def\staveLVI{{\icelandicFamily\char'67}}
\def\staveLVII{{\icelandicFamily\char'70}}
\def\staveLVIII{{\icelandicFamily\char'71}}
\def\staveLIX{{\icelandicFamily\char'72}}
\def\staveLX{{\icelandicFamily\char'73}}
\def\staveLXI{{\icelandicFamily\char'74}}
\def\staveLXII{{\icelandicFamily\char'75}}
\def\staveLXIII{{\icelandicFamily\char'76}}
\def\staveLXIV{{\icelandicFamily\char'77}}
\def\staveLXV{{\icelandicFamily\char'100}}
\def\staveLXVI{{\icelandicFamily\char'101}}
\def\staveLXVII{{\icelandicFamily\char'102}}
\def\staveLXVIII{{\icelandicFamily\char'103}}
%</staves>
%    \end{macrocode}
%
% \Finale
%\section*{Acknowledgements}
% I would like to thank the people of the Icelandic Museum of Sorcery and Witchcraft for their
% encouragement in this project. Also, I would like to thank my Icelandic friends for giving
% me and my son the chance to visit their beautiful country!