Debian Codegraph @

texmf-dist/doc/fonts/luwiantype/luwiantype-doc.tex

raw
1 %% Copyright 2025 Jonathan Walls
2 %
3 % This work may be distributed and/or modified under the
4 % conditions of the LaTeX Project Public License, either version 1.3c
5 % of this license or (at your option) any later version.
6 % The latest version of this license is in
7 % https://www.latex-project.org/lppl/lppl-1-3c.txt
8 % and version 1.3c or later is part of all distributions of LaTeX
9 % version 2008 or later.
10 %
11 % This work has the LPPL maintenance status `maintained'.
12 %
13 % The Current Maintainer of this work is Jonathan Walls.
14 %
15 % This work consists of the files luwiantype.sty, luwiantype-doc.tex
16 % and the derived file luwiantype-doc.pdf.
17 %
18 %
19 % Version history:
20 % 1.3 - modified character for half brackets
21 % 1.2 - updated to resolve some minor typos and command formatting
22 % 1.1 - updated to comply with CTAN formatting requirements, adjustments to licensing
23
24 \documentclass[12pt,A4]{article}
25 \usepackage{fontspec}
26 \usepackage{polyglossia}
27 \usepackage[notes,backend=biber]{biblatex-chicago}
28 \usepackage{csquotes}
29
30 \usepackage{expex}
31 \setdefaultlanguage{english}
32 \usepackage{lua-ul, luacolor}
33 \usepackage{hyperref}
34 \setmainfont{Charis SIL}
35 \usepackage{luwiantype}
36 \usepackage{float}
37
38 \title{The LuwianType Package}
39 \author{Jonathan Walls}
40
41 \begin{document}
42 \maketitle
43
44 \section{Introduction}
45
46 This package aims to allow platform-agnostic typing in Luwian hieroglyphs using LaTeX. It is based on the Noto Sans Anatolian Hieroglyphic font by Google, and incorporates functionality from the fontspec, stackengine, and graphicx packages in order to create a system for the aforementioned purpose.
47
48 \section{Setup}
49 The system aims to be maximally user-friendly (to the extent that LaTeX ever is), allowing more-or-less free typing using Latin characters as LaTeX commands which are then converted to hieroglyphic text in the PDF. To begin, in the project folders, one must include:
50 \begin{enumerate}
51 \item The Fonts folder containing the necessary fonts
52 \item The luwiantype.sty file containing the commands necessary for the Unicode conversions.
53 \end{enumerate}
54
55 In the preamble of the main.tex file (or however you name your main project file), one must also include the following line to import the package:\small
56 \begin{verbatim}
57 \usepackage{luwiantype}
58 \end{verbatim}
59 \normalsize\newpage
60 This will incorporate the fontspec package allowing switching to the Unicode font, bring in the LuwianType functionality from the .sty file, and create a
61 \begin{verbatim}
62 \Luwian
63 \end{verbatim}
64 command which will allow easy switching to the cuneiform typing mode. To switch back, simply use the \verb|\Lat| command.
65
66 \section{Usage}
67 \subsection{Basic Hieroglyphic Typing}
68 To use the package, in a given section, you can trigger the cuneiform writing mode by using the \verb|\Luwian| command as listed above. Each character is designated by an uppercase command (to differentiate it from other stock LaTeX commands), and subscripts for sign variants are given in brackets. Typing is made fairly easy by simply turning on caps lock. An example of use is shown below:
69 \begin{verbatim}
70 \Luwian\DEUS\KU\AVIS\PA\PA\SA\Lat
71 \end{verbatim}
72 This displays the hieroglyphic inline text corresponding to:
73 \\
74
75 \noindent(DEUS)ku-AVIS-pa-pa-sa
76
77 \noindent\Luwian\DEUS\KU\AVIS\PA\PA\SA\\\Lat
78
79 Luwian of course is written in boustrophedon pattern, and the graphicx package has been utilized to create a \verb|\boust{}| command which takes arguments and then mirrors the text for R-to-L reading as shown:
80
81 \begin{verbatim}
82 \Luwian\boust{\DEUS\KU\AVIS\PA\PA\SA}\\
83 \end{verbatim}
84 \Luwian\boust{\DEUS\KU\AVIS\PA\PA\SA}\\\Lat
85
86 \newpage Luwian, however, was written not in strict linear fashion, but included columns as well. This, naturally, is much more easily reproduced in physical media than in text, but the stackengine package allows us to approximate the look and feel of real Luwian text, should this be required. For this purpose, we have the \verb|\gstack{{\argi} {\argii} {\etc}}| command which stacks glyphs in a ``glyph stack," with as many glyphs as needed.
87
88 \begin{verbatim}
89 \Luwian\gstack{{\DEUS} {\KU} {\AVIS}}\gstack{{\PA} {\PA} {\SA}}
90 \HUGE\gstack{{ } {\REX}}
91 \end{verbatim}
92 \Luwian\gstack{{\DEUS} {\KU} {\AVIS}}\gstack{{\PA} {\PA} {\SA}}\HUGE\gstack{{ } {\REX}}\Lat\\
93
94 In this example, we can see the two glyph stacks, with each glyph in brackets and separated by a space in the \verb|\gstack| command, shown next to each other, as well as a following stack made up of a single large REX sign and an empty argument. Often, single signs may be written large and take up an entire column, which is best approximated by what is shown above. Here, the font size is changed with \verb|\HUGE|, and a space argument is fed into the glyph stack to help with spacing. This system is very flexible, and able to relatively neatly approximate the look of most Luwian text.\\
95
96 To change between S\'A and S\`A, use the following syntax:
97 \begin{verbatim}
98 \SA[2]
99 \SA[3]
100 %the base SA character can be had with
101 \SA
102 \end{verbatim}
103 Thus \Luwian\SA[2], \SA[3], \SA,\setmainfont{Charis SIL}\normalsize in order.
104
105 Commands which correspond to numbers, i.e., 1, 2, etc., are in the LaTeX code with
106 \begin{verbatim}
107 \ONE
108 \TWO
109 \end{verbatim}
110 as LaTeX does not allow numeric characters in command names. Signs with varying vowels like \textit{wa/i} have both vowels in the command name, unseparated, as in \verb|\WAI|. Those signs which are compound, such as LITUUS+na will be designated without any break between the signs as \verb|\LITUUSNA|, except on the rare occasion where a distinction needs to be made between two signs joined by . or +, in which case the latter is designated \verb|PLUS| in the command name. The signs which do not have a standard reading such as \Luwian\LIII\Lat will be designated by an L (Laroche) and the appropriate Laroche number in roman numerals, as in \verb|\LIII|. The special signs for word divisions, logograms, and personal identifiers are \Luwian\VIRIIA \Lat\verb|\VIRIIA|, \Luwian\LOGS \Lat\verb|\LOGS| ("logogram start"), \Luwian\LOGE \Lat\verb|\LOGE| ("logogram end"), and \Luwian\PERS \Lat\verb|\PERS|.
111
112 \subsection{Formatting Transcriptions}
113 This package also contains a number of commands which are useful for formatting transcriptions of Luwian, which follows conventions that are often tedious to work through. Some of these will create special characters often used in such transcriptions, as in the following table.
114
115
116 \begin{table}[H]
117 \centering
118 \begin{tabular}{cc}
119 \textbf{Command} & \textbf{Effect} \\ \hline
120 \verb|\badeq| (``bad equal") & \badeq\\
121 \verb|\hl| (``half left") & \hl\\
122 \verb|\hr| (``half right") & \hr\\
123 \end{tabular}
124 \end{table}
125
126 Some other commands are included which serve to facilitate formatting, as shown in the following table.
127
128
129 \begin{table}[H]
130 \centering
131 \begin{tabular}{cc}
132 \textbf{Command} & \textbf{Effect} \\ \hline
133 \verb|\tsup{}| & \tsup{M}\\
134 \verb|\tsub{}| & \tsub{2}\\
135 \end{tabular}
136 \end{table}
137
138 \verb|\tsup| and \verb|\tsub| create super- and subscripts, respectively.
139
140 \subsection{Working with expex}
141
142 If one is using the expex package for interlinear translation or example glossing, the easiest thing to do is to define a new glw level as shown in this example:
143 \color{red}
144 \begin{verbatim}
145 \defineglwlevels{luw}
146 \begingl[glwordalign=center,glhangstyle=none, aboveglftskip=0pt,
147 everygla=\normalfont, everyglluw=\Luwian]
148 \end{verbatim}\color{black}
149 \begin{verbatim}
150 \gla REX \textsuperscript{I}t\'a-i-t\'a-sa EGO-wa/i-mi
151 (VIR\textsubscript{2})HEROS (VIR\textsubscript{2})pa-l\'a/\'i-s\`a-ti-[n\'i]-za-sa
152 REX a-wa/i x mi-i-*a//
153 \end{verbatim}\color{red}
154 \begin{verbatim}
155 \glluw {\REX} {\PERS\TA[2]\I\TA[2]\SA} {\EGO\WAI\MI} {\VIR[2]\HEROS}
156 {\VIR[2]\PA\LAI[2]\SA[3]\TI\NI[2]\ZA\SA} {\REX} {\A\WAI} x {\MI\I\A}//
157 \end{verbatim}\color{black}
158 \begin{verbatim}
159 \glb hantawattis Taitas amu\badeq wa\badeq mi hastalis Falistinizzas
160 hantawattis a\badeq wa x ammi//
161 \glc king.nom Taitas I.quot.myself Hero Falistina.nom king.nom and.quot x
162 my.dat//
163 \glft I am King Taitas, Hero, Falistinian king, and I\newline//
164 \endgl
165 \end{verbatim}
166
167 Note the section at the beginning which defines a ``luw" (Luwian) glw level, which needs to be done only once at the beginning of the document, and note also the \verb|evergylluw=\Luwian| specification in the parameters which assigns the entire line to be in Luwian hieroglyphs. You may of course omit one of the transcription levels, in which case you can simply add the specification to the a, b, or c level instead. This code will produce the following output:\\
168
169 \defineglwlevels{luw}
170
171 \begingl[glwordalign=center,glhangstyle=none, aboveglftskip=0pt, everygla=\normalfont, everyglluw=\Luwian]
172 \gla REX \textsuperscript{I}t\'a-i-t\'a-sa EGO-wa/i-mi (VIR\textsubscript{2})HEROS (VIR\textsubscript{2})pa-l\'a/\'i-s\`a-ti-[n\'i]-za-sa REX a-wa/i x mi-i-*a//
173 \glluw {\REX} {\PERS\TA[2]\I\TA[2]\SA} {\EGO\WAI\MI} {\VIR[2]\HEROS} {\VIR[2]\PA\LAI[2]\SA[3]\TI\NI[2]\ZA\SA} {\REX} {\A\WAI} x {\MI\I\A}//
174 \glb hantawattis Taitas amu\badeq wa\badeq mi hastalis Falistinizzas hantawattis a\badeq wa x ammi//
175 \glc king.nom Taitas I.quot.myself Hero Falistina.nom king.nom and.quot x my.dat//
176 \glft I am King Taitas, Hero, Falistinian king, and I\newline//
177 \endgl
178
179 Happy Luwian!
180 \end{document}
181