summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/unicode-math/unimath-symbols.ltx
blob: 451fd687ca549c25b6334defdeab1de0da57238e (plain)
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219

%%%%%%%%%%%%%%%%%%%%%%%
% SYMBOLS DEFINED BY UNICODE-MATH
%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}
\makeatletter

\usepackage{booktabs,shortvrb,geometry,varwidth,textcomp,longtable,hyperref}

\geometry{margin=3cm}
\hypersetup{colorlinks,linkcolor=black}

\def\cmd#1{\texttt{\textbackslash\expandafter\@gobble\string#1}}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Numbers={Lowercase,Monospaced}]{TeX Gyre Pagella}
\usepackage{unicode-math}
\setmathfont{XITS Math}

\newcounter{lm}
\setcounter{lm}{-1}
\setmathfont[version=lm,SizeFeatures={
    {Size=-10, Colour=999999},
    {Size=10-, Colour=CC6666}}]{lmmath-regular.otf}

\newcounter{xits}
\setcounter{xits}{-1}
\setmathfont[version=xits,SizeFeatures={
    {Size=-10, Colour=999999},
    {Size=10-, Colour=CCCC66}}]{xits-math.otf}

\newcounter{lucida}
\setcounter{lucida}{-1}
\setmathfont[version=lucida,SizeFeatures={
    {Size=-10, Colour=999999},
    {Size=10-, Colour=66CC66}}]{Lucida Math}
 
\newcounter{lucibold}
\setcounter{lucibold}{-1}
\setmathfont[version=lucibold,SizeFeatures={
    {Size=-10, Colour=999999},
    {Size=10-, Colour=66CC66}}]{Lucida Math Demibold}

\newcounter{cambria}
\setcounter{cambria}{-1}
\setmathfont[version=cambria,SizeFeatures={
    {Size=-10, Colour=999999},
    {Size=10-, Colour=66CCCC}}]{Cambria Math}

\newcounter{asana}
\setcounter{asana}{-1}
\setmathfont[version=asana,SizeFeatures={
    {Size=-10, Colour=999999},
    {Size=10-, Colour=6666CC}}]{Asana-Math.otf}

\newcounter{euler}
\setcounter{euler}{-1}
\setmathfont[version=euler,SizeFeatures={
    {Size=-10, Colour=999999},
    {Size=10-, Colour=CC66CC}}]{Neo Euler}
    
\ExplSyntaxOn
\fontspec_set_fontface:NNnn \lm \x {} {lmmath-regular.otf}
\fontspec_set_fontface:NNnn \xits \x {} {xits-math.otf}
\fontspec_set_fontface:NNnn \lucida \x {} {Lucida~ Math}
\fontspec_set_fontface:NNnn \lucibold \x {} {Lucida~ Math~ Demibold}
\fontspec_set_fontface:NNnn \cambria \x {} {Cambria~ Math}
\fontspec_set_fontface:NNnn \asana \x {} {Asana-Math.otf}
\fontspec_set_fontface:NNnn \euler \x {} {Neo~ Euler}
\ExplSyntaxOff

\def\TABLE{%
\setlength\LTleft{-2cm}
\par\noindent
\begin{longtable}[l]{@{}lcccccccll@{}}
  \toprule
  \textsc{usv} & M & X & C & L & D & A & E & Macro & Description \\
  \midrule \endhead
  \input unicode-math-table.tex\relax\\
  \bottomrule
\end{longtable}
}
\def\USV#1{\footnotesize\scshape\MakeLowercase{\@gobble#1}}
\def\CMD#1{\footnotesize\cmd#1}
\def\DESC#1{%
  \begin{varwidth}[t]{6cm}
    \raggedright\linespread{0.6}\scriptsize #1%
  \end{varwidth}
}

\newcommand\SHOW[1]{%
\def\UnicodeMathSymbol##1##2##3##4{%
  \def\1{#1}\def\2{##3}%
  \ifx\1\2%
    \def\tempa{%
      \USV{##1} &
      \SYMB{##2}{lm}{##1} &
      \SYMB{##2}{xits}{##1} &
      \SYMB{##2}{cambria}{##1} &
      \SYMB{##2}{lucida}{##1} &
      \SYMB{##2}{lucibold}{##1} &
      \SYMB{##2}{asana}{##1} &
      \SYMB{##2}{euler}{##1} &
      \CMD{##2} &
      \DESC{##4} \\%
    }%
    \expandafter\tempa
  \fi
}%
\TABLE
}
\def\SYMB#1#2#3{%
  \expandafter\iffontchar\csname#2\endcsname #3\relax
    \refstepcounter{#2}%
    \mathversion{#2}%
    $\displaystyle#1$%
  \fi
}

\begin{document}
\MakeShortVerb\|
\title{Every symbol defined by \textsf{unicode-math}}
\author{Will Robertson\\\texttt{wspr81@gmail.com}}
\maketitle

This document uses the file \texttt{unicode-math-table.tex}
to print every symbol defined by the \textsf{unicode-math}
package.
Use this document to find the command name or the Unicode glyph slot for a symbol that you wish to use.
Seven fonts are shown: (with approximate symbol counts)
\begin{itemize}
\item[M] \mathversion{lm} $\mathup{Latin\ Modern\ Math}$ (\ref{count:lm})
\item[X] \mathversion{xits} $\mathup{XITS\ Math}$ (\ref{count:xits})
\item[C] \mathversion{cambria} $\mathup{Cambria\ Math}$ (\ref{count:cambria})
\item[L] \mathversion{lucida} $\mathup{Lucida\ Math}$ (\ref{count:lucida})
\item[D] \mathversion{lucibold} $\mathup{Lucida\ Math\ Demibold}$ (\ref{count:lucibold})
\item[A] \mathversion{asana} $\mathup{Asana\ Math}$ (\ref{count:asana})
\item[E] \mathversion{euler} $\mathup{Neo\ Euler}$ (\ref{count:euler})
\end{itemize}

\tableofcontents

\clearpage
\section{Opening symbols, \cmd\mathopen}
\begingroup
\let\sqrtold\sqrt
\def\sqrt{\sqrtold{}}
\SHOW\mathopen
\endgroup

\clearpage
\section{Closing symbols, \cmd\mathclose}
\SHOW\mathclose

\clearpage
\section{Fence symbols, \cmd\mathfence}
\SHOW\mathfence

\section{Punctuation symbols, \cmd\mathpunct}
\SHOW\mathpunct

\clearpage
\section{Accents, \cmd\mathaccent}

Note that accents will only be properly placed if used with an OpenType font with the necessary information.

\begingroup
\def\SYMB#1#2#3{%
  \expandafter\iffontchar\csname#2\endcsname #3\relax
    \refstepcounter{#2}%
    \mathversion{#2}%
    $\displaystyle#1 x$%
  \fi
}
\SHOW\mathaccent
\endgroup

\clearpage
\section{Big operators, \cmd\mathop}

Of the operators shown below, a subset need to be flagged by \textsf{unicode-math} for \cmd\nolimits\ adjustments.
The limits behaviour as specified by \textsf{unicode-math} are shown with grey subscripts and superscripts.
\begingroup
\def\SYMB#1#2#3{%
  \expandafter\iffontchar\csname#2\endcsname #3\relax
    \stepcounter{#2}%
    \mathversion{#2}%
    $\displaystyle#1_0^1$%
  \fi
}
\SHOW\mathop
\endgroup

\clearpage
\section{Binary relations, \cmd\mathbin}
\SHOW\mathbin

\clearpage
\section{Ordinary symbols, \cmd\mathord}
\SHOW\mathord

\clearpage
\section{Relation symbols, \cmd\mathrel}
\SHOW\mathrel

\clearpage
\section{Alphabetical symbols, \cmd\mathalpha}
\SHOW\mathalpha

\refstepcounter{lm}\label{count:lm}
\refstepcounter{xits}\label{count:xits}
\refstepcounter{cambria}\label{count:cambria}
\refstepcounter{lucida}\label{count:lucida}
\refstepcounter{lucibold}\label{count:lucibold}
\refstepcounter{asana}\label{count:asana}
\refstepcounter{euler}\label{count:euler}

\end{document}