-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbkindle_unicode.sty
107 lines (90 loc) · 3.7 KB
/
dbkindle_unicode.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
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
% Greek letters in Unicode
\usepackage[noenc]{tipa}
\usepackage{textcomp}
%small letters
%% \renewcommand\textalpha{\ensuremath{\alpha}}
%% \renewcommand\textbeta{\ensuremath{\beta}}
%% \renewcommand\textgamma{\ensuremath{\gamma}}
%% \renewcommand\textdelta{\ensuremath{\delta}}
%% \renewcommand\textpi{\ensuremath{\pi}}
%% %capital letters
%% \renewcommand\textAlpha{\ensuremath{\Alpha}}
%% \renewcommand\textBeta{\ensuremath{\Beta}}
%% \renewcommand\textGamma{\ensuremath{\Gamma}}
%% \renewcommand\textDelta{\ensuremath{\Delta}}
%% \renewcommand\textPi{\ensuremath{\Pi}}
\usepackage{textgreek}
% MikTeX has older version of the textgreek so the fixes are needed
\DeclareTextGreekSymbol{omicron}{o}
\DeclareTextGreekSymbol{Omicron}{O}
\DeclareTextGreekSymbol{varsigma}{c}
\DeclareUnicodeCharacter{0393}{\textGamma}
% weird ``house'' character
\DeclareInputText{127}{}
% Unicode characters not covered by utf8x
\DeclareUnicodeCharacter{8213}{\textemdash}
\DeclareUnicodeCharacter{8209}{-} % FIXME non-breaking hyphen :)
%\DeclareUnicodeCharacter{8230}{\dots} % elipsis
% Fractions
%\DeclareUnicodeCharacter{8531}{${1\over 3}$}
%\DeclareUnicodeCharacter{8532}{${2\over 3}$}
%% \@ifundefined{slantfrac}{%
%% \def\slantfrac#1#2{${#1\over#2}$}%
%% }
\@ifundefined{slantfrac}{%
\usepackage{xfrac}
\def\slantfrac#1#2{\sfrac{#1}{#2}}%
}
\DeclareUnicodeCharacter{8531}{\slantfrac{1}{3}}
\DeclareUnicodeCharacter{8532}{\slantfrac{2}{3}}
\DeclareUnicodeCharacter{8533}{\slantfrac{1}{5}}
\DeclareUnicodeCharacter{8534}{\slantfrac{2}{5}}
\DeclareUnicodeCharacter{8535}{\slantfrac{3}{5}}
\DeclareUnicodeCharacter{8536}{\slantfrac{4}{5}}
\DeclareUnicodeCharacter{8537}{\slantfrac{1}{6}}
\DeclareUnicodeCharacter{8538}{\slantfrac{5}{6}}
\DeclareUnicodeCharacter{8539}{\slantfrac{1}{8}}
\DeclareUnicodeCharacter{8540}{\slantfrac{3}{8}}
\DeclareUnicodeCharacter{8541}{\slantfrac{5}{8}}
\DeclareUnicodeCharacter{8542}{\slantfrac{7}{8}}
% Wrong OCR, has to be U+2220
\DeclareUnicodeCharacter{64430}{$\angle$}
% FIX these two (combining aphostrophes - used to show accents) in params.xml
\DeclareUnicodeCharacter{768}{\`{}}
\DeclareUnicodeCharacter{769}{\'{}}
% Phonetic alphabet
\DeclareUnicodeCharacter{240}{{\tipaencoding D}}
\DeclareUnicodeCharacter{254}{{\tipaencoding \th}}
\DeclareUnicodeCharacter{331}{{\tipaencoding N}}
\DeclareUnicodeCharacter{222}{{\tipaencoding \th}}
\DeclareUnicodeCharacter{518}{\textroundcap{E}}
% Old Russian letters
\let\saveCYRYAT\CYRYAT % save old definition to prevent recursion
\renewcommand\CYRYAT{{\fontencoding{OT2}\selectfont\saveCYRYAT}}
\let\saveCYRFITA\CYRFITA
\renewcommand\CYRFITA{{\fontencoding{OT2}\selectfont\saveCYRFITA}}
\let\saveCYRIZH\CYRIZH
\renewcommand\CYRIZH{{\fontencoding{OT2}\selectfont\saveCYRIZH}}
\let\savecyryat\cyryat
\renewcommand\cyryat{{\fontencoding{OT2}\selectfont\savecyryat}}
\let\savecyrfita\cyrfita
\renewcommand\cyrfita{{\fontencoding{OT2}\selectfont\savecyrfita}}
\let\savecyrizh\cyrizh
\renewcommand\cyrizh{{\fontencoding{OT2}\selectfont\savecyrizh}}
% Some control characters
\DeclareUnicodeCharacter{150}{}
\DeclareUnicodeCharacter{151}{}
\DeclareUnicodeCharacter{152}{}
\DeclareUnicodeCharacter{153}{}
\DeclareUnicodeCharacter{154}{}
\DeclareUnicodeCharacter{155}{}
\DeclareUnicodeCharacter{61623}{}
\DeclareUnicodeCharacter{61547}{}
\DeclareUnicodeCharacter{697}{\'{}}
\DeclareUnicodeCharacter{8239}{\,{}}
\DeclareUnicodeCharacter{8199}{ }
\DeclareUnicodeCharacter{8202}{ }
% General method to process any printable UNICODE symbols - use as last resort if nothing else works -
% the special font (Libertine) is used
%\usepackage{libertine}
%\DeclareUnicodeCharacter{FFFD}{\libertineGlyph{uniFFFD}}