summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/unicode-alphabets/specimen.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/unicode-alphabets/specimen.tex')
-rw-r--r--Master/texmf-dist/doc/latex/unicode-alphabets/specimen.tex133
1 files changed, 133 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/unicode-alphabets/specimen.tex b/Master/texmf-dist/doc/latex/unicode-alphabets/specimen.tex
new file mode 100644
index 00000000000..4912283f5c9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/unicode-alphabets/specimen.tex
@@ -0,0 +1,133 @@
+% !TEX TS-program = lualatex
+\documentclass{book}
+\usepackage[
+ a4paper,
+ margin=1in,
+ landscape
+]{geometry}
+
+\usepackage{csvsimple}
+\usepackage{xltabular}
+\usepackage{booktabs}
+\usepackage{pgfkeys}
+\usepackage{stringstrings}
+\usepackage[
+ hidelinks,
+]{hyperref}
+
+\include{csvsimple.tmp.patch}
+
+\title{Unicode Alphabets for \LaTeX\\\bigskip\large Specimen}
+\author{Mikkel Eide Eriksen}
+
+\usepackage{fontspec}
+\newfontfamily\mufifont{Palemonas MUFI}
+\newfontfamily\silfont{Doulos SIL}
+\newfontfamily\titusfont{TITUS Cyberbit Basic}
+\newfontfamily\unzfont{LUC.EnsisheimU1A}
+
+\usepackage[
+% CYFI,
+ MUFI,
+ SIL,
+ TITUS,
+ UNZ,
+% disable entity macros,
+ fonts={
+% CYFI=\titusfont,
+ MUFI=\mufifont,
+ SIL=\silfont,
+ TITUS=\titusfont,
+ UNZ=\unzfont,
+ },
+]{unicode-alphabets}
+
+\makeatletter
+\newcommand\specset[1]{\pgfkeys{/specimen/.cd,#1}}
+
+\newcommand\spec@showfont[1]{%
+ {%
+ #1%
+ \edef\currentfontname{\f@family}\currentfontname
+ }%
+}
+
+\newif\ifspec@has@entity
+\specset{
+ character set/.code={
+ \csedef{spec@charset}{#1}%
+ \caselower[q]{\spec@charset}%
+ \csedef{spec@code}{\thestring}%
+ \csedef{spec@csvfile}{unicode-alphabets.\spec@code.csv}%
+ \csedef{spec@font}{\csname\spec@code font\endcsname}%
+ },
+ font url/.store in=\spec@font@url,
+ has entity/.is if=spec@has@entity,
+}
+
+\newcommand\specimen[1]{%
+ \specset{has entity=false,#1}%
+ \chapter*{\spec@charset}
+ \addcontentsline{toc}{chapter}{\spec@charset}
+
+ Using the font \spec@showfont{\spec@font} from \url{\spec@font@url}.
+
+ \begingroup
+ \def\mytablerow{\texttt{\csvcoli} & \csuse{\csuse{spec@code}}{\csvcoli} & \ifspec@has@entity\csvcolii &\fi \csvcoliii}
+ \ifspec@has@entity
+ \def\spec@columns{r @{ } c @{ } l @{ } X}
+ \else
+ \def\spec@columns{r @{ } c @{ } X}
+ \fi
+ \expanded{\unexpanded{\begin{xltabular}{\linewidth}}{\spec@columns}}
+ \toprule
+ & Code & \ifspec@has@entity&\fi \hfill \spec@charset\\
+ Glyph & Point & \ifspec@has@entity Entity Name &\fi Unicode Name\\
+ \midrule
+ \endhead
+ \bottomrule
+ \endfoot
+ \csvloop{
+ file={\spec@csvfile},
+ late after line=\\,
+ head to column names prefix=spec@,
+ command=\mytablerow,
+ }
+ \end{xltabular}
+ \endgroup
+}
+
+\makeatother
+
+\begin{document}
+
+\maketitle
+\tableofcontents
+
+\specimen{
+ character set=MUFI,
+ font url=http://mufi.info/,
+ has entity=true,
+}
+
+\specimen{
+ character set=SIL,
+ font url=https://software.sil.org/charis/download/,
+}
+
+\specimen{
+ character set=TITUS,
+ font url=http://titus.fkidg1.uni-frankfurt.de/unicode/tituut.asp,
+}
+
+\begingroup
+\catcode`\_=12 % unz entities have underscores
+\specimen{
+ character set=UNZ,
+ font url=http://www.ligafaktur.de/,
+ has entity=true,
+}
+\catcode`\_=8
+\endgroup
+
+\end{document} \ No newline at end of file