%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% tengdoc.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\language\english
\documentstyle[tengtex]{article}
\title{\TengTeX: \TeX\ Spells for Eldarin Text\\
User's Manual\\ Version 1.00%
\thanks{Inspiration has been drawn from the package Arab\TeX\ by Klaus
  Lagally. I give thanks to Dirk Thierbach for his comments and to
  Michael Urban for adapting the spell sheet for the revised version
  of his fount.}}
%
\author{Ivan A Derzhanski} \date{22 September 1994}

\newcommand\book[1]{{\sl#1}\/}
\newcommand\word[1]{{\it#1}\/}
\newcommand\que[1]{{\tt #1} & \quetta{#1}}
\newcommand\queng[1]{{\tt#1} \quetta{#1}}
\newcommand\sintable{%
\begin{tabular}{*{6}{|cc|}}\hline
\que {bh} &{\tt c}, \que k &{\tt ch}, \que {kh} &\que d &\que {dh} &\que f \\
\que g & \que {gh} & \que h & \que {hw} &&& \que j \\
\que l & \que {lh} &&& \que m & \que {mh} & \que {mm} \\
\que n & \que {nn} & \que N &&& \que p & \que {ph} \\
\que r & \que {rh} &&& \que s & \que {ss} & \que {sh}\\
\que t & \que {th} & \que v & \que w & \que z & \que {zh} \\\hline
\end{tabular}}
\newcommand\qsdth[4]{Diphthongs with~{\tt #1} as second element are
  written as #2 bearing the tehta for the first element (\queng{#3} `#4')}

\begin{document}

\maketitle

\section{Introduction}

This document describes the use of \TengTeX\ ({\tt
  tengtex.tex}\,/\,{\tt tengtex.sty}) for the \TeX\,/\,\LaTeX\ 
typesetting of text in Eldarin languages in F\"eanorian tengwar, using
either the fount {\tt teng10} by Julian~C Bradfield or the revised
fount {\tt tengwar} by Michael~P Urban (or any combination of the
two).
%
\begin{quote}
  Perhaps it is worth reminding that the name \word{\TeX} is derived
  from the Greek word \word{tekhn\=e} `art', which (along with the
  Latin \word{tex\=o} `weave', \word{textum} `web, fabric, texture',
  \word{textus} `text') goes back to the Proto-Indo-European root
  *\word{te\'k\b s-} `create, frame, carve', no doubt from a Lemberin
  cognate of the Proto-Eldarin base {\sc tek-} `write', whence also
  \quenya Quenya \quetta{teke} `writes', \sindarin Sindarin
  \quetta{teitho} `write!'.
\end{quote}
%
The input of \TengTeX\ is essentially an {\sc ascii}sation of the
R\'omen\'orean spelling adopted by J~R~R Tolkien and described in
Section~{\sc i} of Appendix~E to \book{The~Lord of the Rings}. (One
difference is that capital letters are used for increasing the total
number of~letters available for the input, instead of singling out
sentence-initial words and proper names, a device which has no
counterpart in the F\"eanorian script; another is that no accent marks
are used, because of the unfortunate limitations of~{\sc ascii}.) Its
output strives to~follow the orthographic conventions of the Third
Age, discussed in Section~{\sc ii} of the same Appendix and
illustrated in the few surviving samples of Eldarin text in tengwar%
\footnote{One of these sources, Aragorn's letter to Master Samwise, is
  in fact an early Fourth Age document, but it can be taken as
  representative of Third Age Sindarin writing, since it was during
  the Third Age that the author received his Elvish education.---Some
  archaic (pre-Third\_Age) conventions, in particular regarding
  Quenya, are also supported.}%
; on those occasions on which the sources disagree, the evidence from
the corpus takes precedence over the description in the Appendix. In
its current version \TengTeX\ is intended for processing text in
Quenya, Sindarin and their close relatives, and it also provides some
support for Westron and the Black Speech, but not for any other
languages, although it may work by~accident for some post-Third\_Age
Mannish tongues (such as Irish in Sindarin mode).

\TengTeX\ is not copyrighted, but its use is protected by an oath, the
text of~which (in~English and~Quenya) is to be found in the file~{\tt
  vanda.tex} in this distribution.

\section{Generalia}

To activate \TengTeX, load it by \verb!\input tengtex! into a \TeX\ 
source file or include the option {\tt tengtex} into the document
header of a \LaTeX\ document.

The~fount used is selected by the spells \verb!\jcb! (J~Bradfield's
{\tt teng10}) and \verb!\mpu! (M~Urban's {\tt tengwar}). There is no
default fount, so you have to specify one or the other before the
first occasion on~which Eldarin text is typeset, or else be asked
about~it interactively. (In the latter case \TengTeX\ won't let you go
until you choose a fount.)

Three major modes are available: Quenya, Classical Sindarin and
Beleriandic Sindarin. The appropriate mode is selected by the spells
\verb!\quenya!, \verb!\sindarin! and~\verb!\beleriand!. There are also
some options within each of the modes.

The typesetting of text in tengwar, particularly of longer passages,
is done by the environment {\tt elvish}. For the inclusion of short
quotations in tengwar into text written in other scripts the macro
\verb!\quetta! is also available.%
\footnote{All the macro does is send its parameter to the environment
  for processing; it thus uses more of \TeX's memory, but it is
  shorter to type.}
%
An~Elvish environment, but not an Elvish quotation, may consist of
two or more paragraphs separated by blank lines.

In an Elvish environment or quotation continuous strings of letters
(in the \TeX\ sense) are recognised as words and written in tengwar in
the output, following the orthographic conventions of the mode (and
ignoring letters to~which a value is not assigned); continuous strings
of digits are recognised as numbers, and are inverted in the output.%
\footnote{Numbers are not explicitly marked as such with a dot or line
  above them, since the digits in our founts are already sufficiently
  distinct from tengwar, in any case more so than a dot would be from
  an overdot tehta.}
%
Numbers may form part of words.
%
\begin{quote}
\quenya\queng{\lightvocalise Sauron ataltane 3019sse.}

[Quenya] `Sauron fell in 3019.'
\end{quote}
%
Any other characters (such as punctuation marks), blank space and
\TeX, \LaTeX\ or~\TengTeX\ parameterless commands are let~through
unchanged, and it is your respons\-ibility to ensure that their
visible output, if any, makes sense in the chosen fount (for~example,
a hyphen, `{\tt -}', yields a tengwa number 11 in J~Bradfield's fount
and a dash in M~Urban's). Empty pairs of curly brackets can be used to
break ligatures, as they make \TengTeX\ think that the word ends there
and a new one begins.

\section{Quenya}\quenya

\subsection{Vowels}

In Quenya mode you have the option of choosing between heavy (default)
and light vocalisation, using the words \verb!\heavyvocalise! and
\verb!\lightvocalise! for~switching back and~forth.

Short vowels are written as tehtar over the preceding consonant or
(when syllable-initial) over a short carrier. When light vocalisation
(a glimpse of which is to be seen in \book{J~R~R Tolkien, Life
  and~Legend (Catalogue of the Bodleian Library Exhibition, Oxford,
  1992)}, Plate~218) is selected, the tehta for~{\tt a} is not
written, but all tengwar standing for syllable-final consonants
receive a subscript~dot tehta, ({\tt falmar} `waves' is set as
\quetta{\lightvocalise falmar} if vocalised lightly and
\quetta{falmar} if vocalised heavily).

Long vowels can be either doubled in the input, and then the tehta is
also doubled (\queng{yeen} `year', \queng{mool} `slave, thrall',
\queng{uur} `fire'; note that this only works with {\tt e}, {\tt o}
and {\tt u}), or capitalised, and then the single tehta is written
over a long carrier (\queng{yAr} `blood').

\qsdth i{yanta}{oire} {everlasting age}. \qsdth u{\'ure}{leuke}{snake}.

\subsection{Consonants}

The following consonants and consonant clusters are available:

\medskip

\begin{tabular}{*{5}{|cc|}}\hline
{\tt c}, \que k & \que f & \que G & \que h & \que {hl} \\
\que {hr} & \que {ht} & \que {hw} & \que H & \que l \\
\que {lb} & \que {ld} & \que m & \que {mb} & \que {mp} \\
\que n & {\tt nc}, \que {nk} & \que {nd} & \que {ng} & \que {ngw} \\
{\tt nq}, \que {nqu} & \que {nt} &&& \que N & \que {Nw} \\
\que p & {\tt q}, \que {qu} &&& \que r & \que {rd} \\
\que s & \que {ss} &&& \que S & \que t \\
\que v & \que w & \que x & \que y & \que z \\\hline
\end{tabular}
\medskip\\\lightvocalise
%
Double consonants are written with an under\-bar tehta
(\queng{quetta}%
\footnote{The examples in this section are vocalised lightly.}
%
`word', \queng{tyelle} `grade'). The only exception is {\tt ss}, which
is written as esse (\queng{Gassa} `hole, opening, mouth').
%
\begin{itemize}
\item[\vbox{\hbox{{\tt G}, {\tt H}, {\tt S},}\hbox{{\tt N}, {\tt
        Nw}}}] yield tengwar which had lost their original phonetic
  values by the Third Age. They are meant for writers concerned with
  etymology (\queng{Galda} `tree', \queng{HOn} `heart', \queng{Noola}
  `wise, learned', \queng{Sinde} `grey').%
  \footnote{The first notation is suggested by the fact that
    Proto-Eldarin \word{g}, preserved in Sindarin, became zero in
    Quenya, presumably going through a stage where it was an
    approximant, such as might have been denoted by anna. The
    remaining four tengwar are pronounced as the ones input by the
    corresponding lowercase Roman letters.}
\item[\tt q]may be used without the following {\tt u}, so {\tt qetta}
  also yields \quetta{quetta}.
\item[\tt r]is written as r\'omen when followed by a vowel or by {\tt
    y} (\queng{rOmen} `east', \queng{hrIve} `winter', \queng{kirya}
  `ship') and as \'ore elsewhere (\queng{kirkar} `sickles').
\item[\tt R]is always written as \'ore (\queng{ORe} `heart, inner mind').
\item[\tt s]is written as an underhook tehta when following another
  consonant (\queng{otso} `seven', \queng{aksa} `ravine',
  \queng{norsa} `giant').
\item[\tt y]is written as an under-di\ae resis tehta when following
  another consonant (\queng{Nwalya} `torment').
\end{itemize}
%
When silme and~esse bear a tehta for a following vowel, their nuquerna
shapes are automatically substituted (\queng{silme} `starlight',
\queng{esse} `name').

\subsection{Galadriel's lament in~L\'orien}\heavyvocalise

(From \book{The Road Goes Ever On}.)

\medskip\begin{elvish}
ai! laurie lantar lassi sUrinen,
yeeni UnOtime ve rAmar aldaron!.
yEni ve linte yuldar avAnier
mI oromardi lisse,miruvOreva,
andUne pella, vardo tellumar
nu luini yassen tintilar i eleni
Omaryo airetAri,lIrinen.

sI man i yulma nin enquantuva?.

an sI tintalle varda oiolosseo
ve fanyar mAryat elentAri ortane,
ar ilye tier undulAve lumbule;
ar sindanOriello caita mornie
i falmalinnar imbe met, ar hIsie
untUpa calaciryo mIri oiale.
sI vanwa nA, rOmello vanwa, valimar!.

namArie! nai hiruvalye valimar.
nai elye hiruva. namArie!.
\end{elvish}

\section{Sindarin}\sindarin

\subsection{Vowels}

Short vowels are written as tehtar over the following consonant or
(when none follows) over a short carrier. By default {\tt o} is
written as a curl open to the right and~{\tt u} as a curl open to the
left, but their r\^oles can be swapped by specifying~\verb!\oleft!
(Black Speech \queng{\oleft\vaswestron uruk} `great soldier-orc,
Uruk-hai') and restored by specifying~\verb!\oright!.

Long vowels can be either doubled in the input, and then the tehta is
also doubled (\queng{eel} `star', \queng{too} `thither', \queng{uur}
`fire'; note that this only works with {\tt e}, {\tt o} and {\tt u}),
or capitalised, and then the single tehta is written over a long
carrier (\queng{Ar} `king, chieftain', \queng{gwI} `net, web',
\queng{rhYn} `hound of chase', Black Speech \queng{shaRkU} `old man').
No distinction is made between long and overlong vowels.

\qsdth e{yanta}{oer}{sea}. \qsdth i{anna}{uir}{eternity}.
\qsdth u{\'ure}{naug}{dwarf}.

\subsection{Consonants}

In either of the two Sindarin modes you have the option of choosing
whether the calmat\'ema or the quesset\'ema is to be used for velar
consonants (and, in the latter case, whether the calmat\'ema is to be
used for palatal consonants) and whether the \'oretyelle or the
n\'umetyelle is to be used for single nasal consonants. The selection
of the Classical Sindarin mode automatically allocates the velars in
the quesset\'ema, though \verb!\vaswestron! makes {\tt c} available
for calma (English \queng{\vaswestron cek} `cheque') and
\verb!\vincalma!  transfers the rest of the velars into the
calmat\'ema. Also, the the nasal consonants are allocated in the
n\'umetyelle, though this setting can be altered by specifying
\verb!\ninOre!. The following consonants and consonant clusters are
available in the default setting:

\medskip

\sintable
\medskip\\
%
Double consonants are written with an under\-bar tehta (\queng{tellen}
`footprint'). The only exceptions are {\tt ss}, which is written as
esse, and {\tt mm} and {\tt nn}, which are written as malta and
n\'umen with or without an overbar or overtilde tehta.
%
\begin{itemize}
\item[\tt bh]is provided for the sake of completeness, as an
  alternative to {\tt v}.
\item[\tt f]is written as formen in initial and medial position
  (\queng{farn} `enough', \queng{tofn} `deep') and as ampa in final
  position (\queng{tif} `flute').
\item[\vbox{\hbox{{\tt gh}, {\tt j},}\hbox{{\tt sh}, {\tt z}, {\tt
        zh}}}] are provided in order to make possible the typesetting
  of text in Westron (\queng{zIr} `wise') or the Black Speech
  (\queng{ghAsh} `fire').
\item[\tt H]is always written as hyarmen, without forming a digraph
  with a preceding consonant letter.
\item[\tt i]is written as yanta when it appears as a glide in initial
  position (\queng{iAr} `blood').
\item[\tt m]is written as an overbar or overtilde tehta when preceding
  a labial consonant (\queng{hamp} `garment', \queng{ammarth} `doom,
  fate').
\item[\tt n]is written as an overbar or overtilde tehta when preceding
  a dental or velar consonant (\queng{rhink} `sudden move',
  \queng{lhann} `wide').
\item[\tt ph]is written as formen in initial and final position
  (\queng{alph} `swan') and as formen with an underbar tehta in medial
  position (\queng{ephel} `outer fence').
\item[\tt r]is written as \'ore when it occurs word-finally
  (\queng{bar} `home') and as r\'omen elsewhere (\queng{rAd} `path,
  track', \queng{arth} `region, realm'). It is, however, always
  written as r\'omen if {\tt n} is \'ore.
\item[\tt R]is written as \'ore if {\tt n} is n\'umen, and as r\'omen
  otherwise.
\item[\tt w]is written as a squiggle tehta when following another
  consonant other than~{\tt h} (\queng{gwelw} `air'). A tengwa can
  bear no more than one consonant superscript tehta, however, so {\tt
    w} following a consonant preceded by a homorganic nasal is written
  separately as a wilya (\queng{angwedh} `chain', \queng{glentweth}
  `thinness'), unless the etymology suggests a different spelling (as
  in the case of \verb!thurin{}gwethil! \quetta{thurin{}gwethil}
  `secret shadow woman').
\end{itemize}
%
When silme and esse bear a tehta for a preceding vowel (which is,
in~fact, always the case with esse), their nuquerna shapes are
automatically substituted (\queng{kost} `quarrel', \queng{bess}
`woman').

\subsection{The King's letter to Samwise Gamgee}

(From \book{Sauron Defeated}.)

\medskip\begin{elvish}
  elessar telcontar; aragorn arathornion edhelHarn, aran gondor ar
  hIr i mbair annui, anglennatha i varanduiniant erin dolothen ethuil,
  egor ben genediad drannail erin gwirith edwen. ar e anIra ennas
  suilannad mhellyn In phain; edregol e anIra tIrad i cheRdir
  peRHael (i sennui pant{}hael estathar aen) condir i drann, ar
  meril bess dIn, ar elanor, meril, glorfinniel, ar eirien sellath
  dIn; ar iorHael, gelir, cordof, ar baravorn, ionnath dIn.

  a pherHael ar am meril suilad uin aran o minas tirith nelchaenen
  uin echuir.
\end{elvish}

\subsection{The Ring inscription}\oleft \vaswestron

(From \book{The Lord of the Rings}.)

\medskip
\quetta{ash nazg duRbatuluuk,} \quetta{ash nazg gimbatul,}

\quetta{ash nazg thrakatuluuk,} \quetta{agh buRzumishi krimpatul}

\section{Beleriandic}\beleriand

\subsection{Vowels}

Short vowels are written as tengwar. Long vowels, written double (if
they could be doubled in the Classical Sindarin mode) or represented
as capitals in the input, are written as the corresponding tengwar
with an~andaith (\queng{eel} `star', \queng{too} `thither',
\queng{uur} `fire'; \queng{Ar} `king, chieftain', \queng{gwI} `net,
web', \queng{rhYn} `hound of chase').

Diphthongs with {\tt e} as second element are written in~full
(\queng{oer} `sea'). Diphthongs with {\tt i} as second element are
written as the tengwa for the first element bearing a di\ae resis
tehta (\queng{uir} `eternity').  Diphthongs with {\tt u} as second
element are written the tengwa for the first element bearing a
squiggle tehta (\queng{naug} `dwarf').

\subsection{Consonants}

The selection of the Beleriandic mode automatically allocates the
velars in the calmat\'ema and the single nasal consonants in the
\'oretyelle, though this setting can be altered by specifying
\verb!\vinquesse! or \verb!\vincalma! for the former and/or
\verb!\ninnUmen! for the latter. The following consonants and
consonant clusters are available in the default setting:

\medskip

\sintable
\medskip\\
%
The glide {\tt i} in initial position is written as a long carrier
(\queng{iAr} `blood'). The remaining input conventions are the same as
in the Classical Sindarin mode.

Since there are no vowel tehtar in this mode, silme and esse always
appear in their upright (not nuquerna) shapes.

\subsection{The hymn of the Rivendell elves}

(From \book{The Road Goes Ever On}.)

\medskip\begin{elvish}
a elbereth! gilthoniel!
silivren penna mIriel,
o menel aglar elenath!

na,chaered palan,dIriel
o galadhremmin ennorath;
fanuilos, le linnathon,
nef aear, sI nef aearon!
\end{elvish}

\subsection{The inscription on the Moria Gate}

(From \book{The Lord of the Rings}. Observe the spelling
\verb!mel{}lon! \quetta{mel{}lon} instead of \queng{mellon}.)

\medskip\begin{elvish}
ennyn durin aran moria; pedo mel{}lon a minno.

im narvi hain echant; celebrimbor o eregion teithant i thIw hin.
\end{elvish}

\end{document}