%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% File: mxd4tex.tex
% Date: November 5, 2001
% Author: Oliver Corff
% (c) 2001 Ulaanbaatar, Macau, Shenyang, Berlin
%
% A package for providing the Xewtee Dorboljin
% script to LaTeX-users.
%
% NB: This package requires LaTeX2e!
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt,a4paper]{article}
\usepackage{mxd}
\newcommand{\g}{$\gamma$}
\newcommand{\XD}{X\"awt\"a\"a D\"orb\"oljin}
\begin{document}
\title{{\mxd\textbf{\Huge\sA}} \\
	\vspace{.75cm}
	\sf \XD, or \\
	The Mongolian Horizontal Square Alphabet\\
 for \LaTeXe,\\
 	Release \mxdVersion}
\author{Oliver Corff}
\date{November.~5th, 2001}
%\markboth{\sf \XD\ for \LaTeX }{\sf \XD\ for LaTeX }
\pagestyle{myheadings}
\maketitle
\thispagestyle{myheadings}

\begin{abstract}The Mongolian \XD, or Horizontal Square Alphabet
	was created in the 17th century. It is closely modelled after
	Tibetan and was intended to revive the ideas behind the Phagsba
	script. The script is rarely used today and can be mainly found
	in religious inscriptions.

	This software is still in its alpha state and released as a
	preview.
\end{abstract}

\tableofcontents

\section{Introduction}
{\sf \XD\ for \LaTeX} is a package providing the \XD\
script for \LaTeX\ users.
The \XD\ script was developed in 1686 by the famous
Mongolian monk and scholar Zanabazar. Modelled after
the Tibetan script, the \XD\ script combines
the phonemic repertoire of Mongolian, Sanskrit, and Tibetan.
The script is not in wide use today; its
usage is basically limited to religious texts, inscriptions on
temples, etc.

The logical construction of the script is two-dimensional, not
linear. Basic consonants are combined with vowels and final consonants
in a way similar to Tibetan; in fact, most of the letter shapes
as well as the arrangement of the alphabet was heavily influenced
by Tibetan.

The basic consonant fills the major area of the symbol; if no
vowel sign is added, the basic vowel {\em a} is assumed; if a
vowel is added, then it is either placed on top of the character
(in case of {\em i, \"a, o, \"o}) or in the lower third of the
character box (in the cases of {\em \"u, u}). Long vowels are
marked by a protruding tip of the right-side beam.


\section{How to use the \XD\ package}
This section describes which commands are needed for invoking the
characters, and how special symbols are entered.

\subsection{Declarations and Commands}
In order to use the \XD\ script, the preamble of your document
must contain the declaration \verb"\usepackage{mxd}". This
is the only necessary step. The  command \verb"\mxd" switches
to the \XD\ character set and text input commands.

\subsection{Input Method}
Within a group declared by \verb"\mxd", entering most
of the basic characters is straightforward. Initial consonants
are entered as such. Vowels are entered by
using lowercase letters for back vowels and uppercase letters
for front vowels: {\em o \"o u \"u} are entered as {\tt o O u U}.

The following example shows how the words {\em xamu\g\ s\"adgil-t\"u}
written in \XD\ {\mxd kamug sedgiltU} translate into a
sequence of transliteration and input characters:
\verb|xamug sedgiltU|.

In order to show the construction of the \XD\ characters (for
writing text books, etc.) one blind or dummy character {\mxd `}
was created which does not appear in the original alphabet.

The symbols used for
spelling Sanskrit and Tibetan are accessed by control sequences
in the form of \verb"\sXX" where \verb"\s" stands for \XD\
and {\tt XX} has to be replaced by a one-, two- or three-letter
combination found in the encoding table.

\subsection{Script Styles}
The following sequence shows how the \XD\ alphabet is arranged
as shown in Mongolian block prints of the 17th century:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{verbatim}
{\mxd \Large \noindent%
\sA. namo\sg{}uruma no\$aya. 'a'a-'i'i-'e'e-'U\\
'U-'u'u-'o'o-'O'O-'a'a.~gakanga. zacanya. da\\
tana.bapama. yaralawa. shasa{}ha\sks{}.T\sth\sdd\sdh\sdn.\\
Xq@. \sg{}).j\sjh\sds. \sD\sDH. \sB\sBH. \sri\sri-\sli\sli-.}
\end{verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
There is a total of four script styles available: a normal and a
boldface variant which are accompanied by a {\em wood block} script
style which introduces tiny irregularities in lengths and angles.


\subsubsection{{\em Normal} Script Example}

The normal script is selected by default when switching to \XD. No
additional font command is necessary.

{\mxd \Large \noindent%
\sA. namo\sg{}uruma no\$aya. 'a'a-'i'i-'e'e-'U\\
'U-'u'u-'o'o-'O'O-'a'a.~gakanga. zacanya. da\\
tana.bapama. yaralawa. shasa{}ha\sks{}.T\sth\sdd\sdh\sdn.\\
Xq@. \sg{}).j\sjh\sds. \sD\sDH. \sB\sBH. \sri\sri-\sli\sli-.}



\subsubsection{{\em Bold} Script Example}

{\em Bold} script is selected via \verb|\bfseries|:

{\mxd \bfseries \Large \noindent%
\sA. namo\sg{}uruma no\$aya. 'a'a-'i'i-'e'e-'U\\
'U-'u'u-'o'o-'O'O-'a'a. gakanga. zacanya. da\\
tana.bapama. yaralawa. shasa|ha\sks{}.T\sth\sdd\sdh\sdn.\\
Xq@. \sg{}).j\sjh\sds. \sD\sDH. \sB\sBH. \sri\sri-\sli\sli-.}


\subsubsection{{\em Wood} Script Example}

The {\em Wood} scripts simulate the small irregularities of old
block prints; in \LaTeXe\ terms, they are considered as an 
\verb|\itshape|, hence {\em Wood} script is selected via
\verb|\itshape|:

{\mxd \Large \itshape \noindent%
\sA. namo\sg{}uruma no\$aya. 'a'a-'i'i-'e'e-'U\\
'U-'u'u-'o'o-'O'O-'a'a. gakanga. zacanya. da\\
tana.bapama. yaralawa. shasa|ha\sks{}.T\sth\sdd\sdh\sdn.\\
Xq@. \sg{}).j\sjh\sds. \sD\sDH. \sB\sBH. \sri\sri-\sli\sli-.}


\subsubsection{{\em Wood Bold} Script Example}

{\em Wood Bold} script is selected via \verb|\bfseries\itshape|:

{\mxd \bfseries \itshape \Large \noindent%
\sA. namo\sg{}uruma no\$aya. 'a'a-'i'i-'e'e-'U\\
'U-'u'u-'o'o-'O'O-'a'a. gakanga. zacanya. da\\
tana.bapama. yaralawa. shasa|ha\sks{}.T\sth\sdd\sdh\sdn.\\
Xq@. \sg{}).j\sjh\sds. \sD\sDH. \sB\sBH. \sri\sri-\sli\sli-.}

\section{LMX Encoding}

The characters in the \XD\ package are arranged according to the
LMX encoding (Local Mongolian Xewtee) as shown in table~\ref{table}.
Please note that some the code positions used for Sanskrit
transliterations have been defined, but a glyph is not yet
provided.

\begin{figure}
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
& 00 & 01 & 02 & 03 & 04 & 05 & 06 & 07 \\ \hline
0 & {\large \mxd \ }  &
	{\large \mxd '}  &
		{\large \mxd g}  &
			{\large \mxd \$}  &
				{\large \mxd \sri}  &
					{\large \mxd \sDH}  &
						{\large \mxd \ssk}  &
							{\large \mxd \ }  \\ 

 & \footnotesize (000) &
	\footnotesize (016:\verb|'|) &
		\footnotesize (032:\verb|g|) &
			\footnotesize (048:\verb|\$|) &
				\footnotesize (064:\verb|\sri|) &
					\footnotesize (080:\verb|\sDH|) &
						\footnotesize (096:\verb|ssk|) &
							\footnotesize (112) \\ \hline

1 & {\large \mxd `}  &
	{\large \mxd `-}  &
		{\large \mxd k}  &
			{\large \mxd s}  &
				{\large \mxd \sri-}  &
					{\large \mxd \sB}  &
						{\large \mxd \srk}  &
							{\large \mxd \ }  \\

 & \footnotesize (001:\verb|`|) &
	\footnotesize (017:\verb|`-|) &
		\footnotesize (033:\verb|k|) &
			\footnotesize (049:\verb|s|) &
				\footnotesize (065:\verb|\sri-|) &
					\footnotesize (081:\verb|\sB|) &
						\footnotesize (097:\verb|\srk|) &
							\footnotesize (113) \\ \hline

2 & {\large \mxd \sA}  &
	{\large \mxd `i}  &
		{\large \mxd x}  &
			{\large \mxd h}  &
				{\large \mxd \sli}  &
					{\large \mxd \sBH}  &
						{\large \mxd Z}  &
							{\large \mxd \ }  \\

 & \footnotesize (002:\verb|\sA|) &
	\footnotesize (018:\verb|`i|) &
		\footnotesize (034:\verb|x|) &
			\footnotesize (050:\verb|h|) &
				\footnotesize (066:\verb|\sli|) &
					\footnotesize (082:\verb|\sBH|) &
						\footnotesize (098:\verb|Z|) &
							\footnotesize (114) \\ \hline

3 & {\large \mxd .}  &
	{\large \mxd `i-}  &
		{\large \mxd z}  &
			{\large \mxd \sks}  &
				{\large \mxd \sli-}  &
					{\large \mxd \sds}  &
						{\large \mxd C}  &
							{\large \mxd \ }  \\

  & \footnotesize (003:\verb|.|) &
	\footnotesize (019:\verb|`i-|) &
		\footnotesize (035:\verb|z|) &
			\footnotesize (051:\verb|\sks|) &
				\footnotesize (067:\verb|\sli-|) &
					\footnotesize (083:\verb|\sds|) &
						\footnotesize (099:\verb|C|) &
							\footnotesize (115) \\ \hline

4 & {\large \mxd .. }  &
	{\large \mxd `e}  &
		{\large \mxd c}  &
			{\large \mxd `G}  &
				{\large \mxd `0}  &
					{\large \mxd \sky}  &
						{\large \mxd J}  &
							{\large \mxd \ }  \\

 & \footnotesize (004:\verb|..|) &
	\footnotesize (020:\verb|`e|) &
		\footnotesize (036:\verb|c|) &
			\footnotesize (052:\verb|`G|) &
				\footnotesize (068:\verb|`0|) &
					\footnotesize (084:\verb|\sky|) &
						\footnotesize (100:\verb|J|) &
							\footnotesize (116) \\ \hline

5 & {\large \mxd \sO }  &
	{\large \mxd `e-}  &
		{\large \mxd =}  &
			{\large \mxd `K}  &
				{\large \mxd `H}  &
					{\large \mxd \skr}  &
						{\large \mxd X}  &
							{\large \mxd \ }  \\

 & \footnotesize (005:\verb|\sO|) &
	\footnotesize (021:\verb|`e-|) &
		\footnotesize (037:\verb|=|) &
			\footnotesize (053:\verb|`K|) &
				\footnotesize (069:\verb|`H|) &
					\footnotesize (085:\verb|\skr|) &
						\footnotesize (101:\verb|X|) &
							\footnotesize (117) \\ \hline

6 & {\large \mxd \ }  &
	{\large \mxd `U}  &
		{\large \mxd d}  &
			{\large \mxd `*}  &
				{\large \mxd \sg}  &
					{\large \mxd \skl}  &
						{\large \mxd q}  &
							{\large \mxd \ }  \\

 & \footnotesize (006) &
	\footnotesize (022:\verb|`U|) &
		\footnotesize (038:\verb|d|) &
			\footnotesize (054:\verb|`*|) &
				\footnotesize (070:\verb|\sg|) &
					\footnotesize (086:\verb|\skl|) &
						\footnotesize (102:\verb|q|) &
							\footnotesize (118) \\ \hline

7 & {\large \mxd \ }  &
	{\large \mxd `U-}  &
		{\large \mxd t}  &
			{\large \mxd `D}  &
				{\large \mxd \sgh}  &
					{\large \mxd \skm}  &
						{\large \mxd @}  &
							{\large \mxd \ }  \\

 & \footnotesize (007) &
	\footnotesize (023:\verb|`U-|) &
		\footnotesize (039:\verb|t|) &
			\footnotesize (055:\verb|`D|) &
				\footnotesize (071:\verb|\sgh|) &
					\footnotesize (087:\verb|\skm|) &
						\footnotesize (103:\verb|@|) &
							\footnotesize (119) \\ \hline

8 & {\large \mxd \ }  &
	{\large \mxd `u}  &
		{\large \mxd n}  &
			{\large \mxd `N}  &
				{\large \mxd j}  &
					{\large \mxd \skk}  &
						{\large \mxd \ }  &
							{\large \mxd \ }  \\

 & \footnotesize (008) &
	\footnotesize (024:\verb|`u|) &
		\footnotesize (040:\verb|n|) &
			\footnotesize (056:\verb|`N|) &
				\footnotesize (072:\verb|j|) &
					\footnotesize (088:\verb|\skk|) &
						\footnotesize (104) &
							\footnotesize (120) \\ \hline

9 & {\large \mxd \ }  &
	{\large \mxd `u-}  &
		{\large \mxd b}  &
			{\large \mxd `B}  &
				{\large \mxd \sjh}  &
					{\large \mxd \snk}  &
						{\large \mxd \ }  &
							{\large \mxd  \ }  \\

 & \footnotesize (009) &
	\footnotesize (025:\verb|`u-|) &
		\footnotesize (041:\verb|b|) &
			\footnotesize (057:\verb|`B|) &
				\footnotesize (073:\verb|\sjh|) &
					\footnotesize (089:\verb|\snk|) &
						\footnotesize (105) &
							\footnotesize (121) \\ \hline

A & {\large \mxd \ }  &
	{\large \mxd `o}  &
		{\large \mxd p}  &
			{\large \mxd `M}  &
				{\large \mxd T}  &
					{\large \mxd \snc}  &
						{\large \mxd \ }  &
							{\large \mxd \ }  \\

 & \footnotesize (010) &
	\footnotesize (026:\verb|`o|) &
		\footnotesize (042:\verb|p|) &
			\footnotesize (058:\verb|`M|) &
				\footnotesize (074:\verb|T|) &
					\footnotesize (090:\verb|\snc|) &
						\footnotesize (106) &
							\footnotesize (122) \\ \hline

B & {\large \mxd \ }  &
	{\large \mxd `o-}  &
		{\large \mxd m}  &
			{\large \mxd `R}  &
				{\large \mxd \sth}  &
					{\large \mxd \snt}  &
						{\large \mxd \ }  &
							{\large \mxd \ }  \\

 & \footnotesize (011) &
	\footnotesize (027:\verb|`o-|) &
		\footnotesize (043:\verb|m|) &
			\footnotesize (059:\verb|`R|) &
				\footnotesize (075:\verb|\sth|) &
					\footnotesize (091:\verb|\snt|) &
						\footnotesize (107) &
							\footnotesize (123) \\ \hline

C & {\large \mxd \ }  &
	{\large \mxd `O}  &
		{\large \mxd y}  &
			{\large \mxd `L}  &
				{\large \mxd \sdd}  &
					{\large \mxd \snd}  &
						{\large \mxd \ }  &
							{\large \mxd \ }  \\

 & \footnotesize (012) &
	\footnotesize (028:\verb|`O|) &
		\footnotesize (044:\verb|y|) &
			\footnotesize (060:\verb|`L|) &
				\footnotesize (076:\verb|\sdd|) &
					\footnotesize (092:\verb|\snd|) &
						\footnotesize (108) &
							\footnotesize (124) \\ \hline

D & {\large \mxd \ }  &
	{\large \mxd `O-}  &
		{\large \mxd r}  &
			{\large \mxd `Q}  &
				{\large \mxd \sdh}  &
					{\large \mxd P}  &
						{\large \mxd \ }  &
							{\large \mxd \ }  \\

 & \footnotesize (013) &
	\footnotesize (029:\verb|`O-|) &
		\footnotesize (045:\verb|r|) &
			\footnotesize (061:\verb|`Q|) &
				\footnotesize (077:\verb|\sdh|) &
					\footnotesize (093:\verb|P|) &
						\footnotesize (109) &
							\footnotesize (125) \\ \hline

E & {\large \mxd \ }  &
	{\large \mxd `W}  &
		{\large \mxd w}  &
			{\large \mxd `S}  &
				{\large \mxd \sdn}  &
					{\large \mxd \slk}  &
						{\large \mxd \ }  &
							{\large \mxd \ }  \\

 & \footnotesize (014) &
	\footnotesize (030:\verb|`W|) &
		\footnotesize (046:\verb|w|) &
			\footnotesize (062:\verb|`S|) &
				\footnotesize (078:\verb|\sdn|) &
					\footnotesize (094:\verb|\slk|) &
						\footnotesize (110) &
							\footnotesize (126) \\ \hline

F & {\large \mxd \ }  &
	{\large \mxd `I}  &
		{\large \mxd l}  &
			{\large \mxd `-a}  &
				{\large \mxd \sD}  &
					{\large \mxd \sSk}  &
						{\large \mxd \ }  &
							{\large \mxd \ }  \\

 & \footnotesize (015) &
	\footnotesize (031:\verb|`I|) &
		\footnotesize (047:\verb|l|) &
			\footnotesize (063:\verb|`-a|) &
				\footnotesize (079:\verb|\sD|) &
					\footnotesize (095:\verb|\sSk|) &
						\footnotesize (111) &
							\footnotesize (127) \\ \hline

\end{tabular}
\end{center}
\caption{\XD\ Character Input Table\label{table}}
\end{figure}

\section{Desiderata}
The package in its present stage is not complete.
Some of the letter shapes still need a bit of refinement, and
some of the rarer letters are currently not yet available.
Furthermore, the unification process of Tibetan, Soyombo and \XD\
hasn't begun yet---please be aware the the LMX encoding used here is
not frozen yet.

The input method works but is a bit clumsy to use; an input preprocessor
translating properly spelled Mongolian into the \XD\ equivalent
waits to be developed and implemented. This will happen in a similar
manner as has been done in the Tibetan package by the same author.

Comments and suggestions are highly appreciated and should be
directed to the author of these lines at \verb"corff@zedat.fu-berlin.de".

\end{document}
% vim:tabstop=4
% vim:shiftwidth=4
