File Coverage

blib/lib/LaTeX/ToUnicode/Tables.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 14 100.0


line stmt bran cond sub pod time code
1             package LaTeX::ToUnicode::Tables;
2             BEGIN {
3 1     1   47 $LaTeX::ToUnicode::Tables::VERSION = '0.05';
4             }
5 1     1   9 use strict;
  1         2  
  1         40  
6 1     1   7 use warnings;
  1         3  
  1         47  
7             #ABSTRACT: Character tables for LaTeX::ToUnicode
8              
9 1     1   7 use utf8;
  1         2  
  1         7  
10              
11              
12             our %COMMANDS = (
13             'LaTeX' => 'LaTeX',
14             'TeX' => 'TEX',
15             '-' => '', # hypenation
16             '/' => '', # italic correction
17             'log' => 'log',
18             );
19              
20              
21             our @SPECIALS = ( qw( $ % & _ { } ), '#' );
22              
23              
24             our %SYMBOLS = ( # Table 3.2 in Lamport
25             'aa' => 'å',
26             'AA' => 'Å',
27             'ae' => 'æ',
28             'AE' => 'Æ',
29             'dh' => 'ð',
30             'DH' => 'Ð',
31             'dj' => 'đ',
32             'DJ' => 'Ð',
33             'i' => chr(0x131), # small dotless i
34             'l' => 'ł',
35             'L' => 'Ł',
36             'ng' => 'ŋ',
37             'NG' => 'Ŋ',
38             'oe' => 'œ',
39             'OE' => 'Œ',
40             'o' => 'ø',
41             'O' => 'Ø',
42             'ss' => 'ß',
43             'SS' => 'SS',
44             'th' => 'þ',
45             'TH' => 'Þ',
46             'TM' => chr(0x2122),
47             );
48              
49              
50             our %ACCENTS = (
51             "\"" => {
52             A => "\304",
53             E => "\313",
54             H => "\x{1e26}",
55             I => "\317",
56             O => "\326",
57             U => "\334",
58             W => "\x{1e84}",
59             X => "\x{1e8c}",
60             Y => "\x{178}",
61             "\\I" => "\317",
62             "\\i" => "\357",
63             a => "\344",
64             e => "\353",
65             h => "\x{1e27}",
66             i => "\357",
67             o => "\366",
68             t => "\x{1e97}",
69             u => "\374",
70             w => "\x{1e85}",
71             x => "\x{1e8d}",
72             y => "\377"
73             },
74             "'" => {
75             A => "\301",
76             AE => "\x{1fc}",
77             C => "\x{106}",
78             E => "\311",
79             G => "\x{1f4}",
80             I => "\315",
81             K => "\x{1e30}",
82             L => "\x{139}",
83             M => "\x{1e3e}",
84             N => "\x{143}",
85             O => "\323",
86             P => "\x{1e54}",
87             R => "\x{154}",
88             S => "\x{15a}",
89             U => "\332",
90             W => "\x{1e82}",
91             Y => "\335",
92             Z => "\x{179}",
93             "\\I" => "\315",
94             "\\i" => "\355",
95             a => "\341",
96             ae => "\x{1fd}",
97             c => "\x{107}",
98             e => "\351",
99             g => "\x{1f5}",
100             i => "\355",
101             k => "\x{1e31}",
102             l => "\x{13a}",
103             m => "\x{1e3f}",
104             n => "\x{144}",
105             o => "\363",
106             p => "\x{1e55}",
107             r => "\x{155}",
108             s => "\x{15b}",
109             u => "\372",
110             w => "\x{1e83}",
111             y => "\375",
112             z => "\x{17a}"
113             },
114             "." => {
115             A => "\x{226}",
116             B => "\x{1e02}",
117             C => "\x{10a}",
118             D => "\x{1e0a}",
119             E => "\x{116}",
120             F => "\x{1e1e}",
121             G => "\x{120}",
122             H => "\x{1e22}",
123             I => "\x{130}",
124             M => "\x{1e40}",
125             N => "\x{1e44}",
126             O => "\x{22e}",
127             P => "\x{1e56}",
128             R => "\x{1e58}",
129             S => "\x{1e60}",
130             T => "\x{1e6a}",
131             W => "\x{1e86}",
132             X => "\x{1e8a}",
133             Y => "\x{1e8e}",
134             Z => "\x{17b}",
135             "\\I" => "\x{130}",
136             a => "\x{227}",
137             b => "\x{1e03}",
138             c => "\x{10b}",
139             d => "\x{1e0b}",
140             e => "\x{117}",
141             f => "\x{1e1f}",
142             g => "\x{121}",
143             h => "\x{1e23}",
144             m => "\x{1e41}",
145             n => "\x{1e45}",
146             o => "\x{22f}",
147             p => "\x{1e57}",
148             r => "\x{1e59}",
149             s => "\x{1e61}",
150             t => "\x{1e6b}",
151             w => "\x{1e87}",
152             x => "\x{1e8b}",
153             y => "\x{1e8f}",
154             z => "\x{17c}"
155             },
156             '=' => {
157             A => "\x{100}",
158             AE => "\x{1e2}",
159             E => "\x{112}",
160             G => "\x{1e20}",
161             I => "\x{12a}",
162             O => "\x{14c}",
163             U => "\x{16a}",
164             Y => "\x{232}",
165             "\\I" => "\x{12a}",
166             "\\i" => "\x{12b}",
167             a => "\x{101}",
168             ae => "\x{1e3}",
169             e => "\x{113}",
170             g => "\x{1e21}",
171             i => "\x{12b}",
172             o => "\x{14d}",
173             u => "\x{16b}",
174             y => "\x{233}"
175             },
176             H => {
177             O => "\x{150}",
178             U => "\x{170}",
179             o => "\x{151}",
180             u => "\x{171}"
181             },
182             "^" => {
183             A => "\302",
184             C => "\x{108}",
185             E => "\312",
186             G => "\x{11c}",
187             H => "\x{124}",
188             I => "\316",
189             J => "\x{134}",
190             O => "\324",
191             S => "\x{15c}",
192             U => "\333",
193             W => "\x{174}",
194             Y => "\x{176}",
195             Z => "\x{1e90}",
196             "\\I" => "\316",
197             "\\i" => "\356",
198             a => "\342",
199             c => "\x{109}",
200             e => "\352",
201             g => "\x{11d}",
202             h => "\x{125}",
203             i => "\356",
204             j => "\x{135}",
205             o => "\364",
206             s => "\x{15d}",
207             u => "\373",
208             w => "\x{175}",
209             y => "\x{177}",
210             z => "\x{1e91}"
211             },
212             "`" => {
213             A => "\300",
214             E => "\310",
215             I => "\314",
216             N => "\x{1f8}",
217             O => "\322",
218             U => "\331",
219             W => "\x{1e80}",
220             Y => "\x{1ef2}",
221             "\\I" => "\314",
222             "\\i" => "\354",
223             a => "\340",
224             e => "\350",
225             i => "\354",
226             n => "\x{1f9}",
227             o => "\362",
228             u => "\371",
229             w => "\x{1e81}",
230             y => "\x{1ef3}"
231             },
232             c => {
233             C => "\307",
234             D => "\x{1e10}",
235             E => "\x{228}",
236             G => "\x{122}",
237             H => "\x{1e28}",
238             K => "\x{136}",
239             L => "\x{13b}",
240             N => "\x{145}",
241             R => "\x{156}",
242             S => "\x{15e}",
243             T => "\x{162}",
244             c => "\347",
245             d => "\x{1e11}",
246             e => "\x{229}",
247             g => "\x{123}",
248             h => "\x{1e29}",
249             k => "\x{137}",
250             l => "\x{13c}",
251             n => "\x{146}",
252             r => "\x{157}",
253             s => "\x{15f}",
254             t => "\x{163}"
255             },
256             d => {
257             A => "\x{1ea0}",
258             B => "\x{1e04}",
259             D => "\x{1e0c}",
260             E => "\x{1eb8}",
261             H => "\x{1e24}",
262             I => "\x{1eca}",
263             K => "\x{1e32}",
264             L => "\x{1e36}",
265             M => "\x{1e42}",
266             N => "\x{1e46}",
267             O => "\x{1ecc}",
268             R => "\x{1e5a}",
269             S => "\x{1e62}",
270             T => "\x{1e6c}",
271             U => "\x{1ee4}",
272             V => "\x{1e7e}",
273             W => "\x{1e88}",
274             Y => "\x{1ef4}",
275             Z => "\x{1e92}",
276             "\\I" => "\x{1eca}",
277             "\\i" => "\x{1ecb}",
278             a => "\x{1ea1}",
279             b => "\x{1e05}",
280             d => "\x{1e0d}",
281             e => "\x{1eb9}",
282             h => "\x{1e25}",
283             i => "\x{1ecb}",
284             k => "\x{1e33}",
285             l => "\x{1e37}",
286             m => "\x{1e43}",
287             n => "\x{1e47}",
288             o => "\x{1ecd}",
289             r => "\x{1e5b}",
290             s => "\x{1e63}",
291             t => "\x{1e6d}",
292             u => "\x{1ee5}",
293             v => "\x{1e7f}",
294             w => "\x{1e89}",
295             y => "\x{1ef5}",
296             z => "\x{1e93}"
297             },
298             h => {
299             A => "\x{1ea2}",
300             E => "\x{1eba}",
301             I => "\x{1ec8}",
302             O => "\x{1ece}",
303             U => "\x{1ee6}",
304             Y => "\x{1ef6}",
305             "\\I" => "\x{1ec8}",
306             "\\i" => "\x{1ec9}",
307             a => "\x{1ea3}",
308             e => "\x{1ebb}",
309             i => "\x{1ec9}",
310             o => "\x{1ecf}",
311             u => "\x{1ee7}",
312             y => "\x{1ef7}"
313             },
314             k => {
315             A => "\x{104}",
316             E => "\x{118}",
317             I => "\x{12e}",
318             O => "\x{1ea}",
319             U => "\x{172}",
320             "\\I" => "\x{12e}",
321             "\\i" => "\x{12f}",
322             a => "\x{105}",
323             e => "\x{119}",
324             i => "\x{12f}",
325             o => "\x{1eb}",
326             u => "\x{173}"
327             },
328             r => {
329             A => "\305",
330             U => "\x{16e}",
331             a => "\345",
332             u => "\x{16f}",
333             w => "\x{1e98}",
334             y => "\x{1e99}"
335             },
336             u => {
337             A => "\x{102}",
338             E => "\x{114}",
339             G => "\x{11e}",
340             I => "\x{12c}",
341             O => "\x{14e}",
342             U => "\x{16c}",
343             "\\I" => "\x{12c}",
344             "\\i" => "\x{12d}",
345             a => "\x{103}",
346             e => "\x{115}",
347             g => "\x{11f}",
348             i => "\x{12d}",
349             o => "\x{14f}",
350             u => "\x{16d}"
351             },
352             v => {
353             A => "\x{1cd}",
354             C => "\x{10c}",
355             D => "\x{10e}",
356             DZ => "\x{1c4}",
357             E => "\x{11a}",
358             G => "\x{1e6}",
359             H => "\x{21e}",
360             I => "\x{1cf}",
361             K => "\x{1e8}",
362             L => "\x{13d}",
363             N => "\x{147}",
364             O => "\x{1d1}",
365             R => "\x{158}",
366             S => "\x{160}",
367             T => "\x{164}",
368             U => "\x{1d3}",
369             Z => "\x{17d}",
370             "\\I" => "\x{1cf}",
371             "\\i" => "\x{1d0}",
372             a => "\x{1ce}",
373             c => "\x{10d}",
374             d => "\x{10f}",
375             dz => "\x{1c6}",
376             e => "\x{11b}",
377             g => "\x{1e7}",
378             h => "\x{21f}",
379             i => "\x{1d0}",
380             j => "\x{1f0}",
381             k => "\x{1e9}",
382             l => "\x{13e}",
383             n => "\x{148}",
384             o => "\x{1d2}",
385             r => "\x{159}",
386             s => "\x{161}",
387             t => "\x{165}",
388             u => "\x{1d4}",
389             z => "\x{17e}"
390             },
391             "~" => {
392             A => "\303",
393             E => "\x{1ebc}",
394             I => "\x{128}",
395             N => "\321",
396             O => "\325",
397             U => "\x{168}",
398             V => "\x{1e7c}",
399             Y => "\x{1ef8}",
400             "\\I" => "\x{128}",
401             "\\i" => "\x{129}",
402             a => "\343",
403             e => "\x{1ebd}",
404             i => "\x{129}",
405             n => "\361",
406             o => "\365",
407             u => "\x{169}",
408             v => "\x{1e7d}",
409             y => "\x{1ef9}"
410             }
411             );
412              
413              
414             our %GERMAN = ( # for package `german'/`ngerman'
415             '"a' => 'ä',
416             '"A' => 'Ä',
417             '"e' => 'ë',
418             '"E' => 'Ë',
419             '"i' => 'ï',
420             '"I' => 'Ï',
421             '"o' => 'ö',
422             '"O' => 'Ö',
423             '"u' => 'ü',
424             '"U' => 'Ü',
425             '"s' => 'ß',
426             '"S' => 'SS',
427             '"z' => 'ß',
428             '"Z' => 'SZ',
429             '"ck' => 'ck', # old spelling: ck -> k-k
430             '"ff' => 'ff', # old spelling: ff -> ff-f
431             '"`' => '„',
432             "\"'" => '“',
433             '"<' => '«',
434             '">' => '»',
435             '"-' => "\x{AD}", # soft hyphen
436             '""' => "\x{200B}", # zero width space
437             '"~' => "\x{2011}", # non-breaking hyphen
438             '"=' => '-',
439             '\glq' => '‚', # left german single quote
440             '\grq' => '‘', # right german single quote
441             '\flqq' => '«',
442             '\frqq' => '»',
443             '\dq' => '"',
444             );
445              
446              
447             our @MARKUPS = ( qw( em tt small sl bf sc rm it cal ) );
448              
449             1;
450              
451             __END__