Decode/Data.pm

filter: Statementstmt 100% 38 / 38 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 43 / 43 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Decode.pm ↑ Summary
1 package LaTeX::Decode::Data;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use base qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =encoding utf8
7  
8 =head1 NAME
9  
10 LaTeX::Decode::Data - Data to decode from LaTeX to Unicode
11  
12 =head1 VERSION
13  
14 Version 0.04
15  
16 =cut
17  
18 3 our @EXPORT = qw[ %ACCENTS %WORDMACROS %DIACRITICS %WORDMACROSEXTRA %DIACRITICSEXTRA %PUNCTUATION %NEGATEDSYMBOLS %SUPERSCRIPTS %SYMBOLS %CMDSUPERSCRIPTS %DINGS %GREEK $ACCENTS_RE $DIAC_RE_BASE $DIAC_RE_EXTRA $NEG_SYMB_RE $SUPER_RE $SUPERCMD_RE ];
19 #our @EXPORT_OK = qw[
20 # %WORDMACROSEXTRA %DIACRITICSEXTRA %PUNCTUATION %NEGATEDSYMBOLS %SUPERSCRIPTS %SYMBOLS %CMDSUPERSCRIPTS %DINGS %GREEK
21 #];
22 #
23 #our %EXPORT_TAGS = (
24 # all => [ @EXPORT, @EXPORT_OK ],
25 # full => [ @EXPORT, @EXPORT_OK ],
26 # extra => [ @EXPORT, qw( %WORDMACROSEXTRA %DIACRITICSEXTRA ) ],
27 # letters => [ @EXPORT, qw( %WORDMACROSEXTRA %DIACRITICSEXTRA %SUPERSCRIPTS %GREEK ) ],
28 # symbols => [ @EXPORT, qw( %DINGS %SYMBOLS %NEGATEDSYMBOLS %PUNCTUATION %SUPERSCRIPTS %CMDSUPERSCRIPTS %GREEK )]
29 #);
30  
31 3 our %ACCENTS = (
32 chr(0x60) => "\x{300}", #`
33 chr(0x27) => "\x{301}", #'
34 chr(0x5e) => "\x{302}", #^
35 chr(0x7e) => "\x{303}", #~
36 chr(0x3d) => "\x{304}", #=
37 chr(0x2e) => "\x{307}", #.
38 chr(0x22) => "\x{308}", #"
39 );
40  
41 3 our %WORDMACROS = (
42 textquotedbl => "\x{0022}",
43 texthash => "\x{0023}",
44 textdollar => "\x{0024}",
45 textpercent => "\x{0025}",
46 textampersand => "\x{0026}",
47 textquotesingle => "\x{0027}",
48 textasteriskcentered => "\x{002A}",
49 textless => "\x{003C}",
50 textequals => "\x{003D}",
51 textgreater => "\x{003E}",
52 textbackslash => "\x{005C}",
53 textasciicircum => "\x{005E}",
54 textunderscore => "\x{005F}",
55 textasciigrave => "\x{0060}",
56 textg => "\x{0067}",
57 textbraceleft => "\x{007B}",
58 textbar => "\x{007C}",
59 textbraceright => "\x{007D}",
60 textasciitilde => "\x{007E}",
61 nobreakspace => "\x{00A0}",
62 textexclamdown => "\x{00A1}",
63 textcent => "\x{00A2}",
64 pounds => "\x{00A3}",
65 textsterling => "\x{00A3}",
66 textcurrency => "\x{00A4}",
67 textyen => "\x{00A5}",
68 textbrokenbar => "\x{00A6}",
69 S => "\x{00A7}",
70 textsection => "\x{00A7}",
71 textasciidieresis => "\x{00A8}",
72 copyright => "\x{00A9}",
73 textcopyright => "\x{00A9}",
74 textordfeminine => "\x{00AA}",
75 guillemotleft => "\x{00AB}",
76 lnot => "\x{00AC}",
77 textlogicalnot => "\x{00AC}",
78 textminus => "\x{2212}",
79 textregistered => "\x{00AE}",
80 textasciimacron => "\x{00AF}",
81 textdegree => "\x{00B0}",
82 pm => "\x{00B1}",
83 textpm => "\x{00B1}",
84 texttwosuperior => "\x{00B2}",
85 textthreesuperior => "\x{00B3}",
86 textasciiacute => "\x{00B4}",
87 mu => "\x{00B5}",
88 textmu => "\x{00B5}",
89 P => "\x{00B6}",
90 textparagraph => "\x{00B6}",
91 textperiodcentered => "\x{00B7}",
92 textcentereddot => "\x{00B7}",
93 textasciicedilla => "\x{00B8}",
94 textonesuperior => "\x{00B9}",
95 textordmasculine => "\x{00BA}",
96 guillemotright => "\x{00BB}",
97 textonequarter => "\x{00BC}",
98 textonehalf => "\x{00BD}",
99 textthreequarters => "\x{00BE}",
100 textquestiondown => "\x{00BF}",
101 AA => "\x{00C5}",
102 AE => "\x{00C6}",
103 DH => "\x{00D0}",
104 times => "\x{00D7}",
105 texttimes => "\x{00D7}",
106 O => "\x{00D8}",
107 TH => "\x{00DE}",
108 Thorn => "\x{00DE}",
109 ss => "\x{00DF}",
110 aa => "\x{00E5}",
111 ae => "\x{00E6}",
112 dh => "\x{00F0}",
113 div => "\x{00F7}",
114 textdiv => "\x{00F7}",
115 o => "\x{00F8}",
116 th => "\x{00FE}",
117 textthorn => "\x{00FE}",
118 textthornvari => "\x{00FE}",
119 textthornvarii => "\x{00FE}",
120 textthornvariii => "\x{00FE}",
121 textthornvariv => "\x{00FE}",
122 DJ => "\x{0110}",
123 dj => "\x{0111}",
124 textcrd => "\x{0111}",
125 textHbar => "\x{0126}",
126 textcrh => "\x{0127}",
127 texthbar => "\x{0127}",
128 i => "\x{0131}",
129 IJ => "\x{0132}",
130 ij => "\x{0133}",
131 textkra => "\x{0138}",
132 L => "\x{0141}",
133 l => "\x{0142}",
134 textbarl => "\x{0142}",
135 NG => "\x{014A}",
136 ng => "\x{014B}",
137 OE => "\x{0152}",
138 oe => "\x{0153}"
139 );
140  
141 3 our %WORDMACROSEXTRA = (
142 textTbar => "\x{0166}",
143 textTstroke => "\x{0166}",
144 texttbar => "\x{0167}",
145 texttstroke => "\x{0167}",
146 textcrb => "\x{0180}",
147 textBhook => "\x{0181}",
148 textOopen => "\x{0186}",
149 textChook => "\x{0187}",
150 textchook => "\x{0188}",
151 texthtc => "\x{0188}",
152 textDafrican => "\x{0189}",
153 textDhook => "\x{018A}",
154 textEreversed => "\x{018E}",
155 textEopen => "\x{0190}",
156 textFhook => "\x{0191}",
157 textflorin => "\x{0192}",
158 textGammaafrican => "\x{0194}",
159 texthvlig => "\x{0195}",
160 hv => "\x{0195}",
161 textIotaafrican => "\x{0196}",
162 textKhook => "\x{0198}",
163 textkhook => "\x{0199}",
164 texthtk => "\x{0199}",
165 textcrlambda => "\x{019B}",
166 textNhookleft => "\x{019D}",
167 OHORN => "\x{01A0}",
168 ohorn => "\x{01A1}",
169 textPhook => "\x{01A4}",
170 textphook => "\x{01A5}",
171 texthtp => "\x{01A5}",
172 textEsh => "\x{01A9}",
173 ESH => "\x{01A9}",
174 textlooptoprevesh => "\x{01AA}",
175 textpalhookbelow => "\x{01AB}",
176 textThook => "\x{01AC}",
177 textthook => "\x{01AD}",
178 texthtt => "\x{01AD}",
179 textTretroflexhook => "\x{01AE}",
180 UHORN => "\x{01AF}",
181 uhorn => "\x{01B0}",
182 textVhook => "\x{01B2}",
183 textYhook => "\x{01B3}",
184 textyhook => "\x{01B4}",
185 textEzh => "\x{01B7}",
186 texteturned => "\x{01DD}",
187 textturna => "\x{0250}",
188 textscripta => "\x{0251}",
189 textturnscripta => "\x{0252}",
190 textbhook => "\x{0253}",
191 texthtb => "\x{0253}",
192 textoopen => "\x{0254}",
193 textopeno => "\x{0254}",
194 textctc => "\x{0255}",
195 textdtail => "\x{0256}",
196 textrtaild => "\x{0256}",
197 textdhook => "\x{0257}",
198 texthtd => "\x{0257}",
199 textreve => "\x{0258}",
200 textschwa => "\x{0259}",
201 textrhookschwa => "\x{025A}",
202 texteopen => "\x{025B}",
203 textepsilon => "\x{025B}",
204 textrevepsilon => "\x{025C}",
205 textrhookrevepsilon => "\x{025D}",
206 textcloserevepsilon => "\x{025E}",
207 textbardotlessj => "\x{025F}",
208 texthtg => "\x{0260}",
209 textscriptg => "\x{0261}",
210 textscg => "\x{0262}",
211 textgammalatinsmall => "\x{0263}",
212 textgamma => "\x{0263}",
213 textramshorns => "\x{0264}",
214 textturnh => "\x{0265}",
215 texthth => "\x{0266}",
216 texththeng => "\x{0267}",
217 textbari => "\x{0268}",
218 textiotalatin => "\x{0269}",
219 textiota => "\x{0269}",
220 textsci => "\x{026A}",
221 textltilde => "\x{026B}",
222 textbeltl => "\x{026C}",
223 textrtaill => "\x{026D}",
224 textlyoghlig => "\x{026E}",
225 textturnm => "\x{026F}",
226 textturnmrleg => "\x{0270}",
227 textltailm => "\x{0271}",
228 textltailn => "\x{0272}",
229 textnhookleft => "\x{0272}",
230 textrtailn => "\x{0273}",
231 textscn => "\x{0274}",
232 textbaro => "\x{0275}",
233 textscoelig => "\x{0276}",
234 textcloseomega => "\x{0277}",
235 textphi => "\x{0278}",
236 textturnr => "\x{0279}",
237 textturnlonglegr => "\x{027A}",
238 textturnrrtail => "\x{027B}",
239 textlonglegr => "\x{027C}",
240 textrtailr => "\x{027D}",
241 textfishhookr => "\x{027E}",
242 textlhti => "\x{027F}", # ??
243 textscr => "\x{0280}",
244 textinvscr => "\x{0281}",
245 textrtails => "\x{0282}",
246 textesh => "\x{0283}",
247 texthtbardotlessj => "\x{0284}",
248 textraisevibyi => "\x{0285}", # ??
249 textctesh => "\x{0286}",
250 textturnt => "\x{0287}",
251 textrtailt => "\x{0288}",
252 texttretroflexhook => "\x{0288}",
253 textbaru => "\x{0289}",
254 textupsilon => "\x{028A}",
255 textscriptv => "\x{028B}",
256 textvhook => "\x{028B}",
257 textturnv => "\x{028C}",
258 textturnw => "\x{028D}",
259 textturny => "\x{028E}",
260 textscy => "\x{028F}",
261 textrtailz => "\x{0290}",
262 textctz => "\x{0291}",
263 textezh => "\x{0292}",
264 textyogh => "\x{0292}",
265 textctyogh => "\x{0293}",
266 textglotstop => "\x{0294}",
267 textrevglotstop => "\x{0295}",
268 textinvglotstop => "\x{0296}",
269 textstretchc => "\x{0297}",
270 textbullseye => "\x{0298}",
271 textscb => "\x{0299}",
272 textcloseepsilon => "\x{029A}",
273 texthtscg => "\x{029B}",
274 textsch => "\x{029C}",
275 textctj => "\x{029D}",
276 textturnk => "\x{029E}",
277 textscl => "\x{029F}",
278 texthtq => "\x{02A0}",
279 textbarglotstop => "\x{02A1}",
280 textbarrevglotstop => "\x{02A2}",
281 textdzlig => "\x{02A3}",
282 textdyoghlig => "\x{02A4}",
283 textdctzlig => "\x{02A5}",
284 texttslig => "\x{02A6}",
285 textteshlig => "\x{02A7}",
286 texttesh => "\x{02A7}",
287 texttctclig => "\x{02A8}",
288 hamza => "\x{02BE}",
289 ain => "\x{02BF}",
290 ayn => "\x{02BF}",
291 textprimstress => "\x{02C8}",
292 textlengthmark => "\x{02D0}"
293 );
294  
295 3 our %DIACRITICS = (
296 r => "\x{030A}",
297 H => "\x{030B}",
298 u => "\x{0306}",
299 v => "\x{030C}",
300 G => "\x{030F}",
301 M => "\x{0322}",
302 d => "\x{0323}",
303 c => "\x{0327}",
304 k => "\x{0328}",
305 b => "\x{0331}",
306 B => "\x{0335}",
307 t => "\x{0311}",
308 );
309  
310 3 our %DIACRITICSEXTRA = (
311 capitalring => "\x{030A}",
312 capitalhungarumlaut => "\x{030B}",
313 capitalcaron => "\x{030C}", # ??
314 textvbaraccent => "\x{030D}",
315 textdoublevbaraccent => "\x{030E}",
316 textdoublegrave => "\x{030F}",
317 textdotbreve => "\x{0310}",
318 textroundcap => "\x{0311}",
319 newtie => "\x{0311}",
320 capitalnewtie => "\x{0311}",
321 textturncommaabove => "\x{0312}",
322 textcommaabove => "\x{0313}",
323 textrevcommaabove => "\x{0314}",
324 textcommaabover => "\x{0315}",
325 textsubgrave => "\x{0316}",
326 textsubacute => "\x{0317}",
327 textadvancing => "\x{0318}",
328 textretracting => "\x{0319}",
329 textlangleabove => "\x{031A}",
330 textrighthorn => "\x{031B}",
331 textsublhalfring => "\x{031C}",
332 textraising => "\x{031D}",
333 textlowering => "\x{031E}",
334 textsubplus => "\x{031F}",
335 textsubbar => "\x{0320}",
336 textsubminus => "\x{0320}",
337 textpalhookbelow => "\x{0321}",
338 textrethookbelow => "\x{0322}",
339 textsubdot => "\x{0323}",
340 textsubumlaut => "\x{0324}",
341 textsubring => "\x{0325}",
342 textcommabelow => "\x{0326}",
343 capitalcedilla => "\x{0327}",
344 textpolhook => "\x{0328}",
345 capitalogonek => "\x{0328}",
346 textsyllabic => "\x{0329}",
347 textsubbridge => "\x{032A}",
348 textsubw => "\x{032B}",
349 textsubwedge => "\x{032C}",
350 textsubcircnum => "\x{032D}",
351 textsubbreve => "\x{032E}",
352 textundertie => "\x{032E}",
353 textsubarch => "\x{032F}",
354 textsubtilde => "\x{0330}",
355 textsubbar => "\x{0331}",
356 subdoublebar => "\x{0333}",
357 textsuperimposetilde => "\x{0334}",
358 textsstrokethru => "\x{0335}",
359 textlstrokethru => "\x{0336}",
360 textsstrikethru => "\x{0337}",
361 textlstrikethru => "\x{0338}",
362 textsubrhalfring => "\x{0339}",
363 textinvsubbridge => "\x{033A}",
364 textsubsquare => "\x{033B}",
365 textseagull => "\x{033C}",
366 textovercross => "\x{033D}",
367 overbridge => "\x{0346}",
368 subdoublebar => "\x{0347}", ## ??
369 subdoublevert => "\x{0348}",
370 subcorner => "\x{0349}",
371 crtilde => "\x{034A}",
372 textoverw => "\x{034A}",
373 dottedtilde => "\x{034B}",
374 doubletilde => "\x{034C}",
375 spreadlips => "\x{034D}",
376 whistle => "\x{034E}",
377 textrightarrowhead => "\x{0350}",
378 textlefthalfring => "\x{0351}",
379 sublptr => "\x{0354}",
380 subrptr => "\x{0355}",
381 textrightuparrowhead => "\x{0356}",
382 textrighthalfring => "\x{0357}",
383 textdoublebreve => "\x{035D}",
384 textdoublemacron => "\x{035E}",
385 textdoublemacronbelow => "\x{035F}",
386 textdoubletilde => "\x{0360}",
387 texttoptiebar => "\x{0361}",
388 sliding => "\x{0362}"
389 );
390  
391 # "\\prime" => "\x{2032}",
392 # "\\prime\\prime" => "\x{2033}",
393 # "\\prime\\prime\\prime" => "\x{2034}",
394  
395 3 our %PUNCTUATION = (
396 textendash => "\x{2013}",
397 textemdash => "\x{2014}",
398 textquoteleft => "\x{2018}",
399 textquoteright => "\x{2019}",
400 quotesinglbase => "\x{201A}",
401 textquotedblleft => "\x{201C}",
402 textquotedblright => "\x{201D}",
403 quotedblbase => "\x{201E}",
404 dag => "\x{2020}",
405 ddag => "\x{2021}",
406 textbullet => "\x{2022}",
407 dots => "\x{2026}",
408 textperthousand => "\x{2030}",
409 textpertenthousand => "\x{2031}",
410 guilsinglleft => "\x{2039}",
411 guilsinglright => "\x{203A}",
412 textreferencemark => "\x{203B}",
413 textinterrobang => "\x{203D}",
414 textoverline => "\x{203E}",
415 langle => "\x{27E8}",
416 rangle => "\x{27E9}"
417 );
418  
419 # \not\xxx
420 3 our %NEGATEDSYMBOLS = (
421 asymp => "\x{226D}",
422 lesssim => "\x{2274}",
423 gtrsim => "\x{2275}",
424 subset => "\x{2284}",
425 supset => "\x{2285}",
426 ni => "\x{220C}",
427 simeq => "\x{2244}",
428 approx => "\x{2249}",
429 equiv => "\x{2262}",
430 preccurlyeq => "\x{22E0}",
431 succcurlyeq => "\x{22E1}",
432 sqsubseteq => "\x{22E2}",
433 sqsupseteq => "\x{22E3}",
434 );
435  
436 # \textsuperscript{x}
437 3 our %SUPERSCRIPTS = (
438 0 => "\x{2070}",
439 i => "\x{2071}",
440 4 => "\x{2074}",
441 5 => "\x{2075}",
442 6 => "\x{2076}",
443 7 => "\x{2077}",
444 8 => "\x{2078}",
445 9 => "\x{2079}",
446 '+' => "\x{207A}",
447 '-' => "\x{207B}",
448 '=' => "\x{207C}",
449 '(' => "\x{207D}",
450 ')' => "\x{207E}",
451 n => "\x{207F}",
452 SM => "\x{2120}",
453 h => "\x{02b0}",
454 j => "\x{02b2}",
455 r => "\x{02b3}",
456 w => "\x{02b7}",
457 y => "\x{02b8}"
458 );
459  
460 # \textsuperscript{\xxx}
461 3 our %CMDSUPERSCRIPTS = (
462 texthth => "\x{02b1}",
463 textturnr => "\x{02b4}",
464 textturnrrtail => "\x{02b5}",
465 textinvscr => "\x{02b6}"
466 );
467  
468 3 our %SYMBOLS = (
469 textcolonmonetary => "\x{20A1}",
470 textlira => "\x{20A4}",
471 textnaira => "\x{20A6}",
472 textwon => "\x{20A9}",
473 textdong => "\x{20AB}",
474 euro => "\x{20AC}",
475 texteuro => "\x{20AC}",
476 textnumero => "\x{2116}",
477 texttrademark => "\x{2122}",
478 leftarrow => "\x{2190}",
479 uparrow => "\x{2191}",
480 rightarrow => "\x{2192}",
481 downarrow => "\x{2193}",
482 leftrightarrow => "\x{2194}",
483 updownarrow => "\x{2195}",
484 leadsto => "\x{219D}",
485 rightleftharpoons => "\x{21CC}",
486 Rightarrow => "\x{21D2}",
487 Leftrightarrow => "\x{21D4}",
488 forall => "\x{2200}",
489 complement => "\x{2201}",
490 partial => "\x{2202}",
491 exists => "\x{2203}",
492 nexists => "\x{2204}",
493 set => "\x{2205}",
494 Delta => "\x{2206}",
495 nabla => "\x{2207}",
496 in => "\x{2208}",
497 notin => "\x{2209}",
498 ni => "\x{220B}",
499 prod => "\x{220F}",
500 coprod => "\x{2210}",
501 sum => "\x{2211}",
502 mp => "\x{2213}",
503 dotplus => "\x{2214}",
504 setminus => "\x{2216}",
505 ast => "\x{2217}",
506 circ => "\x{2218}",
507 bullet => "\x{2219}",
508 surd => "\x{221A}",
509 propto => "\x{221D}",
510 infty => "\x{221E}",
511 angle => "\x{2220}",
512 measuredangle => "\x{2221}",
513 sphericalangle => "\x{2222}",
514 mid => "\x{2223}",
515 nmid => "\x{2224}",
516 parallel => "\x{2225}",
517 nparallel => "\x{2226}",
518 wedge => "\x{2227}",
519 vee => "\x{2228}",
520 cap => "\x{2229}",
521 cup => "\x{222A}",
522 int => "\x{222B}",
523 iint => "\x{222C}",
524 iiint => "\x{222D}",
525 oint => "\x{222E}",
526 therefore => "\x{2234}",
527 because => "\x{2235}",
528 sim => "\x{223C}",
529 backsim => "\x{223D}",
530 wr => "\x{2240}",
531 nsim => "\x{2241}",
532 simeq => "\x{2243}",
533 cong => "\x{2245}",
534 ncong => "\x{2247}",
535 approx => "\x{2248}",
536 approxeq => "\x{224A}",
537 asymp => "\x{224D}",
538 Bumpeq => "\x{224E}",
539 bumpeq => "\x{224F}",
540 doteq => "\x{2250}",
541 doteqdot => "\x{2251}",
542 fallingdotseq => "\x{2252}",
543 risingdotseq => "\x{2253}",
544 eqcirc => "\x{2256}",
545 circeq => "\x{2257}",
546 triangleq => "\x{225C}",
547 neq => "\x{2260}",
548 equiv => "\x{2261}",
549 leq => "\x{2264}",
550 geq => "\x{2265}",
551 leqq => "\x{2266}",
552 geqq => "\x{2267}",
553 lneqq => "\x{2268}",
554 gneqq => "\x{2269}",
555 ll => "\x{226A}",
556 gg => "\x{226B}",
557 between => "\x{226C}",
558 nless => "\x{226E}",
559 ngtr => "\x{226F}",
560 nleq => "\x{2270}",
561 ngeq => "\x{2271}",
562 lesssim => "\x{2272}",
563 gtrsim => "\x{2273}",
564 lessgtr => "\x{2276}",
565 gtrless => "\x{2277}",
566 prec => "\x{227A}",
567 succ => "\x{227B}",
568 preccurlyeq => "\x{227C}",
569 succcurlyeq => "\x{227D}",
570 precsim => "\x{227E}",
571 succsim => "\x{227F}",
572 nprec => "\x{2280}",
573 nsucc => "\x{2281}",
574 subset => "\x{2282}",
575 supset => "\x{2283}",
576 subseteq => "\x{2286}",
577 supseteq => "\x{2287}",
578 nsubseteq => "\x{2288}",
579 nsupseteq => "\x{2289}",
580 subsetneq => "\x{228A}",
581 supsetneq => "\x{228B}",
582 uplus => "\x{228E}",
583 sqsubset => "\x{228F}",
584 sqsupset => "\x{2290}",
585 sqsubseteq => "\x{2291}",
586 sqsupseteq => "\x{2292}",
587 sqcap => "\x{2293}",
588 sqcup => "\x{2294}",
589 oplus => "\x{2295}",
590 ominus => "\x{2296}",
591 otimes => "\x{2297}",
592 oslash => "\x{2298}",
593 odot => "\x{2299}",
594 circledcirc => "\x{229A}",
595 circledast => "\x{229B}",
596 circleddash => "\x{229D}",
597 boxplus => "\x{229E}",
598 boxminus => "\x{229F}",
599 boxtimes => "\x{22A0}",
600 boxdot => "\x{22A1}",
601 vdash => "\x{22A2}",
602 dashv => "\x{22A3}",
603 top => "\x{22A4}",
604 bot => "\x{22A5}",
605 Vdash => "\x{22A9}",
606 Vvdash => "\x{22AA}",
607 nVdash => "\x{22AE}",
608 lhd => "\x{22B2}",
609 rhd => "\x{22B3}",
610 unlhd => "\x{22B4}",
611 unrhd => "\x{22B5}",
612 multimap => "\x{22B8}",
613 intercal => "\x{22BA}",
614 veebar => "\x{22BB}",
615 barwedge => "\x{22BC}",
616 bigwedge => "\x{22C0}",
617 bigvee => "\x{22C1}",
618 bigcap => "\x{22C2}",
619 bigcup => "\x{22C3}",
620 diamond => "\x{22C4}",
621 cdot => "\x{22C5}",
622 star => "\x{22C6}",
623 divideontimes => "\x{22C7}",
624 bowtie => "\x{22C8}",
625 ltimes => "\x{22C9}",
626 rtimes => "\x{22CA}",
627 leftthreetimes => "\x{22CB}",
628 rightthreetimes => "\x{22CC}",
629 backsimeq => "\x{22CD}",
630 curlyvee => "\x{22CE}",
631 curlywedge => "\x{22CF}",
632 Subset => "\x{22D0}",
633 Supset => "\x{22D1}",
634 Cap => "\x{22D2}",
635 Cup => "\x{22D3}",
636 pitchfork => "\x{22D4}",
637 lessdot => "\x{22D6}",
638 gtrdot => "\x{22D7}",
639 lll => "\x{22D8}",
640 ggg => "\x{22D9}",
641 lesseqgtr => "\x{22DA}",
642 gtreqless => "\x{22DB}",
643 curlyeqprec => "\x{22DE}",
644 curlyeqsucc => "\x{22DF}",
645 lnsim => "\x{22E6}",
646 gnsim => "\x{22E7}",
647 precnsim => "\x{22E8}",
648 succnsim => "\x{22E9}",
649 ntriangleleft => "\x{22EA}",
650 ntriangleright => "\x{22EB}",
651 ntrianglelefteq => "\x{22EC}",
652 ntrianglerighteq => "\x{22ED}",
653 vdots => "\x{22EE}",
654 cdots => "\x{22EF}",
655 ddots => "\x{22F1}",
656 lceil => "\x{2308}",
657 rceil => "\x{2309}",
658 lfloor => "\x{230A}",
659 rfloor => "\x{230B}",
660 Box => "\x{25A1}",
661 spadesuit => "\x{2660}",
662 heartsuit => "\x{2661}",
663 diamondsuit => "\x{2662}",
664 clubsuit => "\x{2663}",
665 flat => "\x{266D}",
666 natural => "\x{266E}",
667 sharp => "\x{266F}",
668 tone5 => "\x{02E5}",
669 tone4 => "\x{02E6}",
670 tone3 => "\x{02E7}",
671 tone2 => "\x{02E8}",
672 tone1 => "\x{02E9}"
673 );
674  
675 3 our %DINGS = (
676 '21' => "\x{2701}",
677 '22' => "\x{2702}",
678 '23' => "\x{2703}",
679 '24' => "\x{2704}",
680 '25' => "\x{260E}",
681 '26' => "\x{2706}",
682 '27' => "\x{2707}",
683 '28' => "\x{2708}",
684 '29' => "\x{2709}",
685 '2A' => "\x{261B}",
686 '2B' => "\x{261E}",
687 '2C' => "\x{270C}",
688 '2D' => "\x{270D}",
689 '2E' => "\x{270E}",
690 '2F' => "\x{270F}",
691 '30' => "\x{2710}",
692 '31' => "\x{2711}",
693 '32' => "\x{2712}",
694 '33' => "\x{2713}",
695 '34' => "\x{2714}",
696 '35' => "\x{2715}",
697 '36' => "\x{2716}",
698 '37' => "\x{2717}",
699 '38' => "\x{2718}",
700 '39' => "\x{2719}",
701 '3A' => "\x{271A}",
702 '3B' => "\x{271B}",
703 '3C' => "\x{271C}",
704 '3D' => "\x{271D}",
705 '3E' => "\x{271E}",
706 '3F' => "\x{271F}",
707 '40' => "\x{2720}",
708 '41' => "\x{2721}",
709 '42' => "\x{2722}",
710 '43' => "\x{2723}",
711 '44' => "\x{2724}",
712 '45' => "\x{2725}",
713 '46' => "\x{2726}",
714 '47' => "\x{2727}",
715 '48' => "\x{2605}",
716 '49' => "\x{2729}",
717 '4A' => "\x{272A}",
718 '4B' => "\x{272B}",
719 '4C' => "\x{272C}",
720 '4D' => "\x{272D}",
721 '4E' => "\x{272E}",
722 '4F' => "\x{272F}",
723 '50' => "\x{2730}",
724 '51' => "\x{2731}",
725 '52' => "\x{2732}",
726 '53' => "\x{2733}",
727 '54' => "\x{2734}",
728 '55' => "\x{2735}",
729 '56' => "\x{2736}",
730 '57' => "\x{2737}",
731 '58' => "\x{2738}",
732 '59' => "\x{2739}",
733 '5A' => "\x{273A}",
734 '5B' => "\x{273B}",
735 '5C' => "\x{273C}",
736 '5D' => "\x{273D}",
737 '5E' => "\x{273E}",
738 '5F' => "\x{273F}",
739 '60' => "\x{2740}",
740 '61' => "\x{2741}",
741 '62' => "\x{2742}",
742 '63' => "\x{2743}",
743 '64' => "\x{2744}",
744 '65' => "\x{2745}",
745 '66' => "\x{2746}",
746 '67' => "\x{2747}",
747 '68' => "\x{2748}",
748 '69' => "\x{2749}",
749 '6A' => "\x{274A}",
750 '6B' => "\x{274B}",
751 '6C' => "\x{25CF}",
752 '6D' => "\x{274D}",
753 '6E' => "\x{25A0}",
754 '6F' => "\x{274F}",
755 '70' => "\x{2750}",
756 '71' => "\x{2751}",
757 '72' => "\x{2752}",
758 '73' => "\x{25B2}",
759 '74' => "\x{25BC}",
760 '75' => "\x{25C6}",
761 '76' => "\x{2756}",
762 '77' => "\x{25D7}",
763 '78' => "\x{2758}",
764 '79' => "\x{2759}",
765 '7A' => "\x{275A}",
766 '7B' => "\x{275B}",
767 '7C' => "\x{275C}",
768 '7D' => "\x{275D}",
769 '7E' => "\x{275E}",
770 'A1' => "\x{2761}",
771 'A2' => "\x{2762}",
772 'A3' => "\x{2763}",
773 'A4' => "\x{2764}",
774 'A5' => "\x{2765}",
775 'A6' => "\x{2766}",
776 'A7' => "\x{2767}",
777 'A9' => "\x{2666}",
778 'AA' => "\x{2665}",
779 'AC' => "\x{2460}",
780 'AD' => "\x{2461}",
781 'AE' => "\x{2462}",
782 'AF' => "\x{2463}",
783 'B0' => "\x{2464}",
784 'B1' => "\x{2465}",
785 'B2' => "\x{2466}",
786 'B3' => "\x{2467}",
787 'B4' => "\x{2468}",
788 'B5' => "\x{2469}",
789 'B6' => "\x{2776}",
790 'B7' => "\x{2777}",
791 'B8' => "\x{2778}",
792 'B9' => "\x{2779}",
793 'BA' => "\x{277A}",
794 'BB' => "\x{277B}",
795 'BC' => "\x{277C}",
796 'BD' => "\x{277D}",
797 'BE' => "\x{277E}",
798 'BF' => "\x{277F}",
799 'C0' => "\x{2780}",
800 'C1' => "\x{2781}",
801 'C2' => "\x{2782}",
802 'C3' => "\x{2783}",
803 'C4' => "\x{2784}",
804 'C5' => "\x{2785}",
805 'C6' => "\x{2786}",
806 'C7' => "\x{2787}",
807 'C8' => "\x{2788}",
808 'C9' => "\x{2789}",
809 'CA' => "\x{278A}",
810 'CB' => "\x{278B}",
811 'CC' => "\x{278C}",
812 'CD' => "\x{278D}",
813 'CE' => "\x{278E}",
814 'CF' => "\x{278F}",
815 'D0' => "\x{2790}",
816 'D1' => "\x{2791}",
817 'D2' => "\x{2792}",
818 'D3' => "\x{2793}",
819 'D4' => "\x{2794}",
820 'D6' => "\x{2194}",
821 'D7' => "\x{2195}",
822 'D8' => "\x{2798}",
823 'D9' => "\x{2799}",
824 'DA' => "\x{279A}",
825 'DB' => "\x{279B}",
826 'DC' => "\x{279C}",
827 'DD' => "\x{279D}",
828 'DE' => "\x{279E}",
829 'DF' => "\x{279F}",
830 'E0' => "\x{27A0}",
831 'E1' => "\x{27A1}",
832 'E2' => "\x{27A2}",
833 'E3' => "\x{27A3}",
834 'E4' => "\x{27A4}",
835 'E5' => "\x{27A5}",
836 'E6' => "\x{27A6}",
837 'E7' => "\x{27A7}",
838 'E8' => "\x{27A8}",
839 'E9' => "\x{27A9}",
840 'EA' => "\x{27AA}",
841 'EB' => "\x{27AB}",
842 'EC' => "\x{27AC}",
843 'ED' => "\x{27AD}",
844 'EE' => "\x{27AE}",
845 'EF' => "\x{27AF}",
846 'F1' => "\x{27B1}",
847 'F2' => "\x{27B2}",
848 'F3' => "\x{27B3}",
849 'F4' => "\x{27B4}",
850 'F5' => "\x{27B5}",
851 'F6' => "\x{27B6}",
852 'F7' => "\x{27B7}",
853 'F8' => "\x{27B8}",
854 'F9' => "\x{27B9}",
855 'FA' => "\x{27BA}",
856 'FB' => "\x{27BB}",
857 'FC' => "\x{27BC}",
858 'FD' => "\x{27BD}",
859 'FE' => "\x{27BE}"
860 );
861  
862 3 our %GREEK = (
863 alpha => "\x{3b1}",
864 beta => "\x{3b2}",
865 gamma => "\x{3b3}",
866 delta => "\x{3b4}",
867 varepsilon => "\x{3b5}",
868 zeta => "\x{3b6}",
869 eta => "\x{3b7}",
870 vartheta => "\x{3b8}",
871 iota => "\x{3b9}",
872 kappa => "\x{3ba}",
873 lambda => "\x{3bb}",
874 mu => "\x{3bc}",
875 nu => "\x{3bd}",
876 xi => "\x{3be}",
877 omicron => "\x{3bf}",
878 pi => "\x{3c0}",
879 varrho => "\x{3c1}",
880 varsigma => "\x{3c2}",
881 sigma => "\x{3c3}",
882 tau => "\x{3c4}",
883 upsilon => "\x{3c5}",
884 varphi => "\x{3c6}",
885 chi => "\x{3c7}",
886 psi => "\x{3c8}",
887 omega => "\x{3c9}",
888 Alpha => "\x{391}",
889 Beta => "\x{392}",
890 Gamma => "\x{393}",
891 Delta => "\x{394}",
892 Epsilon => "\x{395}",
893 Zeta => "\x{396}",
894 Eta => "\x{397}",
895 Theta => "\x{398}",
896 Iota => "\x{399}",
897 Kappa => "\x{39a}",
898 Lambda => "\x{39b}",
899 Mu => "\x{39c}",
900 Nu => "\x{39d}",
901 Xi => "\x{39e}",
902 Omicron => "\x{39f}",
903 Pi => "\x{3a0}",
904 Rho => "\x{3a1}",
905 Sigma => "\x{3a3}",
906 Tau => "\x{3a4}",
907 Upsilon => "\x{3a5}",
908 Phi => "\x{3a6}",
909 Chi => "\x{3a7}",
910 Psi => "\x{3a8}",
911 Omega => "\x{3a9}"
912 );
913  
914  
915 3 our $ACCENTS_RE = qr{[\^\.`'"~=]};
916  
917 3 our $DIAC_RE_BASE = join('|', keys %DIACRITICS);
918 3 $DIAC_RE_BASE = qr{$DIAC_RE_BASE};
919  
920 3 our $DIAC_RE_EXTRA = join('|', sort {length $b <=> length $a} keys %DIACRITICSEXTRA);
921 3 $DIAC_RE_EXTRA = qr{$DIAC_RE_EXTRA|$DIAC_RE_BASE};
922  
923 3 our $NEG_SYMB_RE = join('|', sort keys %NEGATEDSYMBOLS);
924 3 $NEG_SYMB_RE = qr{$NEG_SYMB_RE};
925  
926 3 our $SUPER_RE;
927 3 my @_ss = keys %SUPERSCRIPTS;
928 3 ▶$SUPER_RE = join('|', map { /[\+\-\)\(]/ ? '\\' . $_ : $_ } @_ss);
Branch: 1 branch
BranchTrueFalseTotal
/[\+\-\)\(]/ ? : 12 48 60
929 3 $SUPER_RE = qr{$SUPER_RE};
930  
931 3 our $SUPERCMD_RE = join('|', keys %CMDSUPERSCRIPTS);
932 3 $SUPERCMD_RE = qr{$SUPERCMD_RE};
933  
934 =head1 AUTHOR
935  
936 François Charette, C<< <firmicus@cpan.org> >>
937  
938 =head1 BUGS
939  
940 Please report any bugs or feature requests to C<bug-latex-decode at
941 rt.cpan.org>, or through the web interface at
942 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=LaTeX-Decode>. I will be
943 notified, and then you'll automatically be notified of progress on your bug as
944 I make changes.
945  
946  
947 =head1 COPYRIGHT & LICENSE
948  
949 Copyright 2009-2015 François Charette, all rights reserved.
950  
951 This module is free software. You can redistribute it and/or
952 modify it under the terms of the Artistic License 2.0.
953  
954 This program is distributed in the hope that it will be useful,
955 but without any warranty; without even the implied warranty of
956 merchantability or fitness for a particular purpose.
957  
958 =cut
959  
960 3 1;
961  
962 # vim: set tabstop=4 shiftwidth=4 expandtab:
« Decode.pm ↑ Summary