1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
% !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{LOB.Ensisheim}
\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
}%
}
\specset{
character set/.code={
\csedef{spec@charset}{#1}%
\caselower[q]{\spec@charset}%
\csedef{spec@code}{\thestring}%
\csedef{spec@csvfile}{unicode-alphabets.\spec@code.csv}%
},
font url/.store in=\spec@font@url,
}
\newcommand\specimen[1]{%
\specset{#1}%
\chapter*{\spec@charset}
\addcontentsline{toc}{chapter}{\spec@charset}
Using the font \spec@showfont{\csuse{alph@font@\spec@code}} from \url{\spec@font@url}.
\begingroup
\def\mytablerow{\texttt{\csvcoli} & \csuse{\csuse{spec@code}}{\csvcoli} & \ifbool{alph@\spec@code @has@entities}{\csvcolii & \csvcoliii}{\csvcolii}}
\ifbool{alph@\spec@code @has@entities}{%
\def\spec@columns{r @{ } c @{ } l @{ } X}%
}{%
\def\spec@columns{r @{ } c @{ } X}%
}%
\expanded{\unexpanded{\begin{xltabular}{\linewidth}}{\spec@columns}}
\toprule
Code & & \ifbool{alph@\spec@code @has@entities}{&}{} \hfill \spec@charset\\
Point & Glyph & \ifbool{alph@\spec@code @has@entities}{ Entity Name &}{} 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/,
}
\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/,
}
\catcode`\_=8
\endgroup
\end{document}
|