-
Notifications
You must be signed in to change notification settings - Fork 1
/
unicode-chars.sty
71 lines (71 loc) · 3.66 KB
/
unicode-chars.sty
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
% definition of some characters, for use with
% \usepackage[utf8]{inputenc}
% \usepackage[T1]{fontenc}
% or with LuaTeX
% Author: Christoph Lange <math.semantic.web@gmail.com>
% Some math characters taken from John Wickerson's MathUnicode.sty (http://tex.stackexchange.com/questions/110042/entering-unicode-math-symbols-into-latex-direct-from-keyboard-on-a-mac)
% https://github.com/clange/latex
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{unicode-chars}[2019/10/28]
\RequirePackage{newunicodechar}
\RequirePackage{ifluatex}
\ifluatex\else
\newunicodechar{ }{~}%
\newunicodechar{£}{\pounds}%
\fi
\newunicodechar{¬}{\ensuremath{\neg}}%
\newunicodechar{®}{\textsuperscript{\textregistered}}%
\newunicodechar{¯}{\ensuremath{^-}}%
\newunicodechar{×}{\ensuremath{\times}}%
\ifluatex\else
\newunicodechar{ā}{\=a}%
\newunicodechar{ģ}{\c g}%
\newunicodechar{İ}{\. I}%
\newunicodechar{ņ}{\c n}%
\newunicodechar{ū}{\=u}%
\fi
\newunicodechar{α}{\ensuremath{\alpha}}%
\newunicodechar{λ}{\ensuremath{\lambda}}%
\newunicodechar{←}{\ensuremath{\leftarrow}}%
\newunicodechar{→}{\ensuremath{\rightarrow}}%
% →: \textrightarrow is not available in all fonts, and we need the right arrow in math mode
\newunicodechar{↓}{\ensuremath{\downarrow}}%
\newunicodechar{↔}{\ensuremath{\leftrightarrow}}%
\newunicodechar{↦}{\ensuremath{\mapsto}}%
\newunicodechar{⇀}{\ensuremath{\rightharpoonup}}%
\newunicodechar{⇒}{\ensuremath{\Rightarrow}}%
\newunicodechar{∀}{\ensuremath{\forall}}%
\newunicodechar{∃}{\ensuremath{\exists}}%
\newunicodechar{∈}{\ensuremath{\in}}%
\newunicodechar{∉}{\ensuremath{\not\in}}%
\newunicodechar{∑}{\ensuremath{\sum}}%
\newunicodechar{∘}{\ensuremath{\circ}}%
\newunicodechar{∧}{\ensuremath{\wedge}}%
\newunicodechar{∨}{\ensuremath{\vee}}%
\newunicodechar{∩}{\ensuremath{\cap}}%
\newunicodechar{∪}{\ensuremath{\cup}}%
\newunicodechar{∷}{\ensuremath{::}}%
% ∷: not sure that's a good way to render this symbol
\newunicodechar{≈}{\ensuremath{\approx}}%
\newunicodechar{≠}{\ensuremath{\ne}}%
\newunicodechar{≡}{\ensuremath{\equiv}}%
\newunicodechar{≤}{\ensuremath{\le}}%
\newunicodechar{≥}{\ensuremath{\ge}}%
\newunicodechar{⊆}{\ensuremath{\subseteq}}%
\newunicodechar{⊇}{\ensuremath{\supseteq}}%
\newunicodechar{↝}{\ensuremath{\leadsto}}%
\@ifpackageloaded{MnSymbol}{%
\newunicodechar{⊕}{\ensuremath{\oplus}}%
\newunicodechar{⊖}{\ensuremath{\ominus}}%
}{}
\newunicodechar{⋀}{\ensuremath{\bigwedge}}%
\newunicodechar{⋃}{\ensuremath{\bigcup}}%
\newunicodechar{⋃}{\ensuremath{\bigcup}}%
\newunicodechar{○}{\ensuremath{\ocircle}}%
\@ifpackageloaded{MnSymbol}{%
\newunicodechar{★}{\ensuremath{\filledlargestar}}%
}{}
\newunicodechar{✓}{\ensuremath{\checkmark}}%
\newunicodechar{⟶}{\ensuremath{\longrightarrow}}%
\newunicodechar{⟷}{\ensuremath{\longleftrightarrow}}%
\newunicodechar{⟹}{\ensuremath{\Longrightarrow}}%