% !TEX TS-program = lualatex
\documentclass{article}

\usepackage[english]{babel}
\usepackage[
	backend=biber,
	urldate=long,
	date=long,
]{biblatex}
\addbibresource{unicode-alphabets.bib}

\usepackage{showexpl}
\usepackage{float}
\usepackage{moreverb}
\usepackage{csvsimple}
\usepackage{enumitem}
\usepackage{xltabular}
\usepackage{booktabs}
\usepackage[
	hidelinks,
]{hyperref}

\title{Unicode Alphabets for \LaTeX}
\author{Mikkel Eide Eriksen\\\href{mailto:mikkel.eriksen@gmail.com}{mikkel.eriksen@gmail.com}}

\usepackage{fontspec}
\newfontfamily\mufifont{Palemonas MUFI}

\usepackage[
	MUFI,
	fonts={
		MUFI=\mufifont,
	},
]{unicode-alphabets}

\begin{document}

\maketitle

\section{Preface}

While Unicode supports the vast majority of use cases, there are certain specialized niches which require characters and glyphs not (yet) represented in the standard.

Thus the Private Use Area (PUA) at code points \texttt{E000}--\texttt{F8FF}, which enables third parties to define arbitrary character sets.

This package allows configuring a number of macros to enter characters from the PUA by name or code point.

\section{Setup}

The package is configured in the following manner:

\begin{verbatim}
\usepackage[options]{unicode-alphabets}
\end{verbatim}

Where \verb|options| must be one or more of the following character sets. See references for further detail on each, as well as usable fonts.

\begin{description}[labelindent=1cm, leftmargin=*, rightmargin=\leftmargin]

\item[AGL] Adobe Glyph List\cite{AGL}.
% \item[CSUR] - https://www.evertype.com/standards/csur/
\item[CYFI] Early Cyrillic glyphs\cite{CYFI}.
% DANIA ???
\item[LINCUA] Shortcut for enabling the character sets CYFI, MUFI, and TITUS\cite{LINCUA}.
\item[MUFI] The Medieval Unicode Font Initiative\cite{MUFI}.
\item[SIL] SIL International\cite{SIL}.
\item[TITUS] Thesaurus Indogermanischer Text- und Sprachmaterialien\cite{TITUS}.
\item[UCSUR] Under-ConScript Unicode Registry\cite{UCSUR}.
\item[UNZ] Normung von Sonderzeichen\cite{UNZ}.

\end{description}

There is no default, since future versions of this package may supply more character sets that are incompatible with the above.

Additionally, one may configure different fonts for each character set, as in the following example:

\begin{figure}[H]
\centering
\begin{verbatimtab}
\usepackage[
	MUFI,
	TITUS,
	fonts={
		MUFI=\mufifont,
		TITUS=\titusfont,
	},
]{unicode-alphabets}
\end{verbatimtab}
\caption{Example setup}
\end{figure}

If no fonts are configured, the document font will be used (note that this may give undesirable results, as few fonts support multiple character sets\footnote{I believe Andreas Stötzner's \emph{Andron Mega} does, albeit I haven't tried it as it is somewhat expensive.}).

Finally, the \verb|MUFI| and \verb|UNZ| character sets have defined entity names, which result in the creation of macros for each character (see \verb|msignflour| in the following example). These can be suppressed with the \verb|disableentitymacros| option.

\section{Usage}

Each set defines a macro in the following manner. Let's use \verb|MUFI| as an example.

By default, a macro with the lower-case name of the character set is defined: \verb|\mufi{}|. It can then be used to display characters from the given set (the below uses the \emph{Palemonas MUFI} font available from the MUFI project):

\begin{figure}[H]
\centering
\begin{LTXexample}[varwidth=true]
\mufi{FLOURISHED SMALL LETTER M SIGN}\\
\msignflour{}
\mufi{msignflour}
\mufi{F2F3}
\end{LTXexample}
\caption{Example usage}
\end{figure}

Additionally, starred versions of each macro are defined, which suppress using the configured font, falling back to the document font.

\printbibliography

\end{document}
