Debian Codegraph @

texmf-dist/source/fonts/helmholtz-ellis-ji-notation/helmholtz-ellis-ji-notation.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (cc) 2020 by Thomas Nicholson
4 %
5 % This work is licensed under the Creative Commons Attribution 4.0 International License.
6 % To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or
7 % send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
8 %
9 %
10 % \fi
11
12 % \iffalse
13 %<package>\NeedsTeXFormat{LaTeX2e}[2005-12-01]
14 %<package>\ProvidesPackage{helmholtz-ellis-ji-notation}[2020-05-19 v1.1]
15
16 %<*driver>
17 \documentclass[a4paper, 10pt]{ltxdoc}
18 \usepackage{helmholtz-ellis-ji-notation}
19 \usepackage{hologo}
20 \usepackage{makecell}
21 \usepackage{microtype}
22 \usepackage[all]{nowidow}
23 \usepackage{longtable}
24 \usepackage{fontspec}
25 \DisableCrossrefs
26 \CodelineIndex
27 \RecordChanges
28 \begin{document}
29 \DocInput{helmholtz-ellis-ji-notation.dtx}
30 \end{document}
31 %</driver>
32 % \fi
33 %
34 % \CheckSum{200}
35 %
36 % \changes{v1.0}{2019-12-09}{Initial version}
37 %
38 % \GetFileInfo{helmholtz-ellis-ji-notation.sty}
39 %
40 % \title{The \textsf{helmholtz-ellis-ji-notation} package\thanks{This document corresponds to \textsf{helmholtz-ellis-ji-notation} v1.1, dated 2020-05-19.}}
41 % \author{Thomas Nicholson \\ \texttt{[email protected]}}
42 %
43 %
44 % \maketitle
45 %
46 % \section{Introduction}
47 % The Helmholtz-Ellis JI Pitch~Notation~(HEJI), devised in the early 2000s by Marc~Sabat and Wolfgang~von~Schweinitz, explicitly notates the raising and lowering of the \textit{untempered} diatonic Pythagorean notes by specific microtonal ratios defined for each prime. It provides visually distinctive ``logos'' distinguishing families of justly tuned intervals that relate to the harmonic series. These take the form of strings of additional accidental symbols based on historical precedents, extending the traditional sharps and flats. Since its 2020 update, HEJI~ver.~2 (``HEJI2'') provides unique microtonal symbols through the 47-limit.
48 %
49 % The \textsf{helmholtz-ellis-ji-notation} package is a simple \hologo{LaTeX} implementation of HEJI2 that allows for in-line typesetting of microtonal accidentals for use within theoretical texts, program notes, symbol legends, etc.
50 %
51 % \section{Compatibility}
52 % Documents must be compiled using the \hologo{XeLaTeX} engine.
53 %
54 % \section{Installation}
55 % Insall the package either through your \hologo{TeX} distribution (TeXLive, MiKTeX) or by manually insalling the |helmholtz-ellis-ji-notation.ins| file (e.g. run |latex helmholtz-ellis-ji-notation.ins| in Command Prompt) and compiling |helmholtz-ellis-ji-notation.dtx| using \hologo{XeLaTeX} to create the latest version of this documentation. Include the package
56 %
57 % \vspace{3mm}
58 % |\usepackage|\oarg{option}|{helmholtz-ellis-ji-notation}|
59 % \vspace{3mm}
60 %
61 % \noindent
62 % in your document preamble. You must also install the |HEJI2Text.otf| font file and verify that it appears in your system's system font directory.
63 %
64 % \newpage
65 % \section{Usage}
66 % The \textsf{helmholtz-ellis-ji-notation} package provides the general \DescribeMacro{heji}|\heji| macro for typesetting microtones. It takes two arguments.
67 %
68 % \vspace{3mm}
69 % |\heji|\marg{note}\marg{string}
70 % \vspace{3mm}
71 %
72 % \noindent
73 % The first argument, \DescribeMacro{note}\marg{note}, corresponds to the desired diatonic pitch name (\textit{e.g.}~A--G, do--ti) and is typeset in the document's default body font. The second argument, \DescribeMacro{string}\marg{string}, corresponds to the appropriate character mapping of the desired accidental (combination) within the |HEJI2Text.otf| file \textbf{or} the appropriate string of \textit{accidental macros} (see table in section~5). For example, the pitch 7/4 above \heji{C}{\nat} may be typeset by writing either |\heji{B}{<e}| or |\heji{B}{\otonalseven\flat}| to produce \heji{B}{\otonalseven\flat}. By default, tones are displayed in note--accidental format. Including the \DescribeMacro{accfirst option}option |accfirst| when loading the package reverses the order of elements to accidental--note format. To print an accidental on its own, use the macro \DescribeMacro{acc}|\acc|\marg{string}.
74 %
75 % The stand-alone macros \DescribeMacro{otonal, utonal}|\otonal| and |\utonal| may be used when describing partials of harmonic and subharmonic series, e.g. |15\otonal\| for 15\otonal\ and |\utonal 7| for \utonal 7. Note the extra backslash when the |\otonal| macro is used. This is required because \hologo{LaTeX} ignores spaces immediately following these macros (which is why a space \textit{is}, confusingly, inserted after |\utonal| in order to \textit{adjoin} it to the following digit). Including a backslash on the tail of |\otonal| \textit{forces} a space after the symbol is printed. If no space is desired (e.g. if the symbol is followed by a period or a comma) then the trailing backslash may, of course, be omitted.
76 %
77 % \section{Accidental macros \& font mappings}
78 %
79 % \setlength{\extrarowheight}{3pt}
80 % \begin{longtable}{ccc}
81 % \textbf{Notation} & \textbf{Accidental macro} & \textbf{Font mapping} \\
82 % \hline
83 % \endfirsthead
84 % \multicolumn{3}{l}{\textbf{Accidental macros \& font mappings} -- \textit{cont'd from previous page}} \\
85 % \textbf{Notation} & \textbf{Accidental macro} & \textbf{Font mapping} \\
86 % \hline
87 % \endhead
88 % \multicolumn{3}{r}{\textit{cont'd on next page}} \\
89 % \endfoot
90 % \endlastfoot
91 % \heji{}{\tempflatflat} & |\tempflatflat| & |A| \\
92 % \heji{}{\tempflat} & |\tempflat| & |a| \\
93 % \heji{}{\tempnat} & |\tempnat| & |j| \\
94 % \heji{}{\tempsharp} & |\tempsharp| & |z| \\
95 % \heji{}{\tempsharpsharp} & |\tempsharpsharp| & |Z| \\
96 % \hline
97 % \heji{}{\flatflat} & |\flatflat| & |E| \\
98 % \heji{}{\flat} & |\flat| & |e| \\
99 % \heji{}{\nat} & |\nat| & |n| \\
100 % \heji{}{\sharp} & |\sharp| & |v| \\
101 % \heji{}{\sharpsharp} & |\sharpsharp| & |V| \\
102 % \hline
103 % \heji{}{\otonalsixtwentyfiveflatflat} & |\otonalsixtwentyfiveflatflat| & |I| \\
104 % \heji{}{\otonalsixtwentyfiveflat} & |\otonalsixtwentyfiveflat| & |K| \\
105 % \heji{}{\otonalsixtwentyfivenat} & |\otonalsixtwentyfivenat| & |M| \\
106 % \heji{}{\otonalsixtwentyfivesharp} & |\otonalsixtwentyfivesharp| & |O| \\
107 % \heji{}{\otonalsixtwentyfivesharpsharp} & |\otonalsixtwentyfivesharpsharp| & |R| \\
108 % \heji{}{\otonalonetwentyfiveflatflat} & |\otonalonetwentyfiveflatflat| & |B| \\
109 % \heji{}{\otonalonetwentyfiveflat} & |\otonalonetwentyfiveflat| & |b| \\
110 % \heji{}{\otonalonetwentyfivenat} & |\otonalonetwentyfivenat| & |k| \\
111 % \heji{}{\otonalonetwentyfivesharp} & |\otonalonetwentyfivesharp| & |s| \\
112 % \heji{}{\otonalonetwentyfivesharpsharp} & |\otonalonetwentyfivesharpsharp| & |S| \\
113 % \heji{}{\otonaltwentyfiveflatflat} & |\otonaltwentyfiveflatflat| & |C| \\
114 % \heji{}{\otonaltwentyfiveflat} & |\otonaltwentyfiveflat| & |c| \\
115 % \heji{}{\otonaltwentyfivenat} & |\otonaltwentyfivenat| & |l| \\
116 % \heji{}{\otonaltwentyfivesharp} & |\otonaltwentyfivesharp| & |t| \\
117 % \heji{}{\otonaltwentyfivesharpsharp} & |\otonaltwentyfivesharpsharp| & |T| \\
118 % \heji{}{\otonalfiveflatflat} & |\otonalfiveflatflat| & |D| \\
119 % \heji{}{\otonalfiveflat} & |\otonalfiveflat| & |d| \\
120 % \heji{}{\otonalfivenat} & |\otonalfivenat| & |m| \\
121 % \heji{}{\otonalfivesharp} & |\otonalfivesharp| & |u| \\
122 % \heji{}{\otonalfivesharpsharp} & |\otonalfivesharpsharp| & |U| \\
123 % \heji{}{\utonalfiveflatflat} & |\utonalfiveflatflat| & |F| \\
124 % \heji{}{\utonalfiveflat} & |\utonalfiveflat| & |f| \\
125 % \heji{}{\utonalfivenat} & |\utonalfivenat| & |o| \\
126 % \heji{}{\utonalfivesharp} & |\utonalfivesharp| & |w| \\
127 % \heji{}{\utonalfivesharpsharp} & |\utonalfivesharpsharp| & |W| \\
128 % \heji{}{\utonaltwentyfiveflatflat} & |\utonaltwentyfiveflatflat| & |G| \\
129 % \heji{}{\utonaltwentyfiveflat} & |\utonaltwentyfiveflat| & |g| \\
130 % \heji{}{\utonaltwentyfivenat} & |\utonaltwentyfivenat| & |p| \\
131 % \heji{}{\utonaltwentyfivesharp} & |\utonaltwentyfivesharp| & |x| \\
132 % \heji{}{\utonaltwentyfivesharpsharp} & |\utonaltwentyfivesharpsharp| & |X| \\
133 % \heji{}{\utonalonetwentyfiveflatflat} & |\utonalonetwentyfiveflatflat| & |H| \\
134 % \heji{}{\utonalonetwentyfiveflat} & |\utonalonetwentyfiveflat| & |h| \\
135 % \heji{}{\utonalonetwentyfivenat} & |\utonalonetwentyfivenat| & |q| \\
136 % \heji{}{\utonalonetwentyfivesharp} & |\utonalonetwentyfivesharp| & |y| \\
137 % \heji{}{\utonalonetwentyfivesharpsharp} & |\utonalonetwentyfivesharpsharp| & |Y| \\
138 % \heji{}{\utonalsixtwentyfiveflatflat} & |\utonalsixtwentyfiveflatflat| & |J| \\
139 % \heji{}{\utonalsixtwentyfiveflat} & |\utonalsixtwentyfiveflat| & |L| \\
140 % \heji{}{\utonalsixtwentyfivenat} & |\utonalsixtwentyfivenat| & |N| \\
141 % \heji{}{\utonalsixtwentyfivesharp} & |\utonalsixtwentyfivesharp| & |P| \\
142 % \heji{}{\utonalsixtwentyfivesharpsharp} & |\utonalsixtwentyfivesharpsharp| & |Q| \\
143 % \hline
144 % \heji{}{\otonalfortynine} & |\otonalfortynine| & |,| \\
145 % \heji{}{\otonalseven} & |\otonalseven| & |<| \\
146 % \heji{}{\utonalseven} & |\utonalseven| & |>| \\
147 % \heji{}{\utonalfortynine} & |\utonalfortynine| & |.| \\
148 % \hline
149 % \heji{}{\otonaleleven} & |\otonaleleven| & |4| \\
150 % \heji{}{\utonaleleven} & |\utonaleleven| & |5| \\
151 % \hline
152 % \heji{}{\otonalthirteen} & |\otonalthirteen| & |0| \\
153 % \heji{}{\utonalthirteen} & |\utonalthirteen| & |9| \\
154 % \hline
155 % \heji{}{\otonalseventeen} & |\otonalseventeen| & |:| \\
156 % \heji{}{\utonalseventeen} & |\utonalseventeen| & |;| \\
157 % \hline
158 % \heji{}{\otonalnineteen} & |\otonalnineteen| & |/| \\
159 % \heji{}{\utonalnineteen} & |\utonalnineteen| & |*| \\
160 % \hline
161 % \heji{}{\otonaltwentythree} & |\otonaltwentythree| & |3| \\
162 % \heji{}{\utonaltwentythree} & |\utonaltwentythree| & |6| \\
163 % \hline
164 % \heji{}{\otonaltwentynine} & |\otonaltwentynine| & |2| \\
165 % \heji{}{\utonaltwentynine} & |\utonaltwentynine| & |7| \\
166 % \hline
167 % \heji{}{\otonalthirtyone} & |\otonalthirtyone| & |1| \\
168 % \heji{}{\utonalthirtyone} & |\utonalthirtyone| & |8| \\
169 % \hline
170 % \heji{}{\otonalthirtyseven} & |\otonalthirtyseven| & |á| \\
171 % \heji{}{\utonalthirtyseven} & |\utonalthirtyseven| & |à| \\
172 % \hline
173 % \heji{}{\otonalfortyone} & |\otonalfortyone| & |+| \\
174 % \heji{}{\utonalfortyone} & |\utonalfortyone| & |-| \\
175 % \hline
176 % \heji{}{\otonalfortythree} & |\otonalfortythree| & |é| \\
177 % \heji{}{\utonalfortythree} & |\utonalfortythree| & |è| \\
178 % \hline
179 % \heji{}{\otonalfortyseven} & |\otonalfortyseven| & |í| \\
180 % \heji{}{\utonalfortyseven} & |\utonalfortyseven| & |ì| \\
181 % \hline
182 % \multicolumn{3}{c}{\textit{stand-alone macros for o- and utonal symbols}} \\
183 % \heji{}{\otonal} & |\otonal| & |ö| \\
184 % \heji{}{\utonal} & |\utonal| & |ü| \\
185 % \heji{}{\Otonal} & |\Otonal| & |Ö| \\
186 % \heji{}{\Utonal} & |\Utonal| & |Ü| \\
187 % \end{longtable}
188 %
189 % \StopEventually{}
190 % \newpage
191 % \section{Implementation}
192 % \begin{macro}{\heji}
193 % The package requires \textsf{fontspec} to access the required font files.
194 % \begin{macrocode}
195 \RequirePackage{fontspec}[2018-07-30 vv2.6h]
196 \newfontfamily{\HEJIfont}{HEJI2Text}
197 \makeatletter
198 \newcommand*{\fsize}{\dimexpr\f@size pt\relax}
199 \makeatother
200 \newcommand*{\tempflatflat}{A}
201 \newcommand*{\tempflat}{a}
202 \newcommand*{\tempnat}{j}
203 \newcommand*{\tempsharp}{z}
204 \newcommand*{\tempsharpsharp}{Z}
205 \newcommand*{\otonalsixtwentyfiveflatflat}{I}
206 \newcommand*{\otonalsixtwentyfiveflat}{K}
207 \newcommand*{\otonalsixtwentyfivenat}{M}
208 \newcommand*{\otonalsixtwentyfivesharp}{O}
209 \newcommand*{\otonalsixtwentyfivesharpsharp}{R}
210 \newcommand*{\otonalonetwentyfiveflatflat}{B}
211 \newcommand*{\otonalonetwentyfiveflat}{b}
212 \newcommand*{\otonalonetwentyfivenat}{k}
213 \newcommand*{\otonalonetwentyfivesharp}{s}
214 \newcommand*{\otonalonetwentyfivesharpsharp}{S}
215 \newcommand*{\otonaltwentyfiveflatflat}{C}
216 \newcommand*{\otonaltwentyfiveflat}{c}
217 \newcommand*{\otonaltwentyfivenat}{l}
218 \newcommand*{\otonaltwentyfivesharp}{t}
219 \newcommand*{\otonaltwentyfivesharpsharp}{T}
220 \newcommand*{\otonalfiveflatflat}{D}
221 \newcommand*{\otonalfiveflat}{d}
222 \newcommand*{\otonalfivenat}{m}
223 \newcommand*{\otonalfivesharp}{u}
224 \newcommand*{\otonalfivesharpsharp}{U}
225 \newcommand*{\flatflat}{E}
226 \renewcommand*{\flat}{e}
227 \newcommand*{\nat}{n}
228 \renewcommand*{\sharp}{v}
229 \newcommand*{\sharpsharp}{V}
230 \newcommand*{\utonalfiveflatflat}{F}
231 \newcommand*{\utonalfiveflat}{f}
232 \newcommand*{\utonalfivenat}{o}
233 \newcommand*{\utonalfivesharp}{w}
234 \newcommand*{\utonalfivesharpsharp}{W}
235 \newcommand*{\utonaltwentyfiveflatflat}{G}
236 \newcommand*{\utonaltwentyfiveflat}{g}
237 \newcommand*{\utonaltwentyfivenat}{p}
238 \newcommand*{\utonaltwentyfivesharp}{x}
239 \newcommand*{\utonaltwentyfivesharpsharp}{X}
240 \newcommand*{\utonalonetwentyfiveflatflat}{H}
241 \newcommand*{\utonalonetwentyfiveflat}{h}
242 \newcommand*{\utonalonetwentyfivenat}{q}
243 \newcommand*{\utonalonetwentyfivesharp}{y}
244 \newcommand*{\utonalonetwentyfivesharpsharp}{Y}
245 \newcommand*{\utonalsixtwentyfiveflatflat}{J}
246 \newcommand*{\utonalsixtwentyfiveflat}{L}
247 \newcommand*{\utonalsixtwentyfivenat}{N}
248 \newcommand*{\utonalsixtwentyfivesharp}{P}
249 \newcommand*{\utonalsixtwentyfivesharpsharp}{Q}
250 \newcommand*{\otonalfortynine}{,}
251 \newcommand*{\otonalseven}{<}
252 \newcommand*{\utonalseven}{>}
253 \newcommand*{\utonalfortynine}{.}
254 \newcommand*{\otonaleleven}{4}
255 \newcommand*{\utonaleleven}{5}
256 \newcommand*{\otonalthirteen}{0}
257 \newcommand*{\utonalthirteen}{9}
258 \newcommand*{\otonalseventeen}{:}
259 \newcommand*{\utonalseventeen}{;}
260 \newcommand*{\otonalnineteen}{/}
261 \newcommand*{\utonalnineteen}{*}
262 \newcommand*{\otonaltwentythree}{3}
263 \newcommand*{\utonaltwentythree}{6}
264 \newcommand*{\otonaltwentynine}{2}
265 \newcommand*{\utonaltwentynine}{7}
266 \newcommand*{\otonalthirtyone}{1}
267 \newcommand*{\utonalthirtyone}{8}
268 \newcommand*{\otonalthirtyseven}{á}
269 \newcommand*{\utonalthirtyseven}{à}
270 \newcommand*{\otonalfortyone}{+}
271 \newcommand*{\utonalfortyone}{-}
272 \newcommand*{\otonalfortythree}{é}
273 \newcommand*{\utonalfortythree}{è}
274 \newcommand*{\otonalfortyseven}{í}
275 \newcommand*{\utonalfortyseven}{ì}
276 \newcommand{\heji}[2]{\mbox{#1\HEJIfont\large #2}}
277 \DeclareOption{accfirst}{
278 \renewcommand{\heji}[2]{\mbox{{\HEJIfont\large #2}#1}}
279 }
280 \newcommand{\acc}[1]{\mbox{\HEJIfont\large #1}}
281 \newcommand*{\otonal}{\mbox{\HEJIfont\large ö}}
282 \newcommand*{\utonal}{\mbox{\HEJIfont\large ü}}
283 \newcommand*{\Otonal}{\mbox{\HEJIfont\large Ö}}
284 \newcommand*{\Utonal}{\mbox{\HEJIfont\large Ü}}
285 \ProcessOptions\relax
286 % \end{macrocode}
287 % \end{macro}
288 % \Finale