LaTeX-Encode-0.091.6/0000755000175000017500000000000012404070431013034 5ustar chrischrisLaTeX-Encode-0.091.6/TODO0000644000175000017500000000171512302613176013536 0ustar chrischris#================================================== -*- indented-text -*- # # TODO # # DESCRIPTION # TODO list for the LaTeX-Encode package, containing known bugs, # limitations, planned enhancements, long term visions and a few # whacky ideas. # # AUTHOR # Andrew Ford # #------------------------------------------------------------------------ # $Id: TODO 25 2012-08-29 06:35:46Z andrew $ #======================================================================== * add more unit tests * improve documentation (article about manipulating LaTeX with Perl) * verbatim mode - don't take "<" and ">" from math mode (or any other characters that do not have standard fixed width). * add box character with four hex digits for unrecognized Unicode characters (with option to display such a box, a specific replacement character or nothing for unrecognized characters). * options for preferring different implementation of symbols LaTeX-Encode-0.091.6/README0000644000175000017500000000402512302613176013723 0ustar chrischrisLaTeX-Encode ============ LaTeX::Encode exports the function 'latex_encode()' which encodes characters in a string, that would be incorrectly interpreted by LaTeX. Additional mappings can be added to the standard encoding table with the 'add_latex_encodings()' function, while encodings can be removed with the 'remove_latex_encodings()' function. Additions and deletions can also be specified on the 'use' statement (e.g.: "use LaTeX::Encode add => { '@' => 'AT' };". The 'latex_encode()' function takes a text string and an optional reference to a hash of options. The options currently supported are "exclude" to specify a list of characters that should not be encoded (often this is "\\{}" to allow LaTeX commands to be used in the text string), and "iquotes" to enable "intelligent quotes", that is double quotes around a phrase will be converted to "``" and "''" and single quotes to "`" and "'". Note that 'latex_encode()' will encode a utf8 string (a string with the utf8 flag set) or a non-utf8 string, which will normally be regarded as ISO-8859-1 (Latin 1) and will be upgraded to utf8. If you are seeing spurious LaTeX commands in the output then it may be that you are reading from a UTF-8 input or have data with UTF-8 characters in a literal but the utf8 flag is not being set correctly. Refer to the perlunicode, perluniintro and perlunitut manual pages for more details. The scripts directory contains scripts to help build the character encoding tables used by the module and to create and format a document listing the characters that the module encodes with their Unicode character value, HTML entity representation, LaTeX encoding and visual representation. These scripts are not installed by "make install". INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install COPYRIGHT AND LICENCE Copyright (C) 2007-2012, Andrew Ford This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. LaTeX-Encode-0.091.6/lib/0000755000175000017500000000000012404070431013602 5ustar chrischrisLaTeX-Encode-0.091.6/lib/LaTeX/0000755000175000017500000000000012404070431014557 5ustar chrischrisLaTeX-Encode-0.091.6/lib/LaTeX/Encode/0000755000175000017500000000000012404070431015754 5ustar chrischrisLaTeX-Encode-0.091.6/lib/LaTeX/Encode.pm0000644000175000017500000020227012404070351016316 0ustar chrischris#======================================================================== # # LaTeX::Encode # # DESCRIPTION # Provides a function to encode text that contains characters # special to LaTeX. # # AUTHOR # Andrew Ford # # COPYRIGHT # Copyright (C) 2007-2012 Andrew Ford. All Rights Reserved. # # This module is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # # $Id: Encode.pm 32 2012-09-30 20:33:42Z andrew $ #======================================================================== package LaTeX::Encode; use strict; use warnings; require 5.008_001; use Readonly; use base qw(Exporter); our $VERSION = '0.091.6'; our @EXPORT = qw(latex_encode); our @EXPORT_OK = qw(add_latex_encodings remove_latex_encodings reset_latex_encodings); our %EXPORT_TAGS = ( all => [ qw( latex_encode add_latex_encodings remove_latex_encodings reset_latex_encodings ) ] ); our @mappings_specified_on_import; Readonly my $IMPORT_TAG_ADD => 'add'; Readonly my $IMPORT_TAG_REMOVE => 'remove'; my %latex_encoding_base; our $encoded_char_re; our %latex_encoding; our %provided_by; # Encode text with characters special to LaTeX sub latex_encode { my $text = shift; my $options = ref $_[0] ? shift : { @_ }; my $exceptions = $options->{except}; my $iquotes = $options->{iquotes}; my $packages_reqd = $options->{packages}; my $unmatched = $options->{unmatched}; # If a list of exception characters was specified then we replace # those characters in the text string with something that is not # going to match the encoding regular expression. The encoding we # use is a hex 01 byte followed by four hexadecimal digits if ($exceptions) { $exceptions =~ s{ \\ }{\\\\}gx; $text =~ s{ ([\x{01}$exceptions]) } { sprintf("\x{01}%04x", ord($1)); }gxe; } # Deal with "intelligent quotes". This can be done separately # from the rest of the encoding as the characters ` and ' are not # encoded. if ($iquotes) { # A single or double quote before a word character, preceded # by start of line, whitespace or punctuation gets converted # to "`" or "``" respectively. $text =~ s{ ( ^ | [\s\p{IsPunct}] )( ['"] ) (?= \w ) } { $2 eq '"' ? "$1``" : "$1`" }mgxe; # A double quote preceded by a word or punctuation character # and followed by whitespace or end of line gets converted to # "''". (Final single quotes are represented by themselves so # we don't need to worry about those.) $text =~ s{ (?<= [\w\p{IsPunct}] ) " (?= \s | $ ) } { "''" }mgxe } # Replace any characters that need encoding $text =~ s{ ($encoded_char_re) } { $packages_reqd->{$provided_by{$1}} = 1 if ref $packages_reqd and exists $provided_by{$1}; $latex_encoding{$1} }gsxe; $text =~ s{ ([\x{00}\x{02}-\x{09}\x{0b}\x{0c}\x{0e}-\x{1f}\x{007f}-\x{ffff}]) } { _replace_unencoded_char(ord($1), $unmatched) }gxse; # If the caller specified exceptions then we need to decode them if ($exceptions) { $text =~ s{ \x{01} ([0-9a-f]{4}) }{ chr(hex($1)) }gxe; } return $text; } sub _replace_unencoded_char { my ($charcode, $action) = @_; if (ref $action eq 'CODE') { return $action->($charcode); } elsif (($action || '') eq 'ignore') { return ''; } else { return sprintf('\\%s{%04x}', $action || 'unmatched', $charcode); } } # Add encodings to the encoding table # Return the changed encodings sub add_latex_encodings { my (%new_encoding) = @_; my %old_encoding; my $changed; foreach my $key (keys %new_encoding) { if ((! exists $latex_encoding{$key}) or ($latex_encoding{$key} ne $new_encoding{$key})) { $old_encoding{$key} = $latex_encoding{$key} if defined wantarray and exists $latex_encoding{$key}; $latex_encoding{$key} = $new_encoding{$key}; $changed = 1; } } _compile_encoding_regexp() if $changed; return unless defined wantarray; return %old_encoding; } # Remove encodings from the encoding table # Return the removed encodings sub remove_latex_encodings { my (@keys) = @_; my %removed_encoding; foreach my $key (@keys) { if (exists $latex_encoding{$key}) { $removed_encoding{$key} = delete $latex_encoding{$key}; } } _compile_encoding_regexp() if keys %removed_encoding; return unless defined wantarray; return %removed_encoding; } # Reset the encoding table sub reset_latex_encodings { my ($class, $forget_import_specifiers) = @_; if ($class !~ /::/) { $forget_import_specifiers = $class; } %latex_encoding = (); $latex_encoding{$_} = $latex_encoding_base{$_} for keys %latex_encoding_base; if (! $forget_import_specifiers ) { foreach my $spec ( @mappings_specified_on_import ) { if ($spec->[0] eq $IMPORT_TAG_ADD) { add_latex_encodings(%{$spec->[1]}); } elsif ($spec->[0] eq $IMPORT_TAG_REMOVE) { remove_latex_encodings(@{$spec->[1]}); } } } _compile_encoding_regexp(); return; } # Import function - picks out 'add' and 'remove' tags and adds or removes encodings # appropriately sub import { my ($self, @list) = @_; $DB::Simple = 1; my $i = 0; while ($i < @list) { if ($list[$i] eq $IMPORT_TAG_ADD) { my ($add, $to_add) = splice(@list, $i, 2); add_latex_encodings(%$to_add); push @mappings_specified_on_import, [ $IMPORT_TAG_ADD => $to_add ]; } elsif ($list[$i] eq $IMPORT_TAG_REMOVE) { my ($remove, $to_remove) = splice(@list, $i, 2); remove_latex_encodings(@$to_remove); push @mappings_specified_on_import, [ $IMPORT_TAG_REMOVE => $to_remove ]; } else { $i++; } } $self->export_to_level(1, $self, @list); return; } %latex_encoding_base = ( chr(0x0022) => '{\\textacutedbl}', # QUOTATION MARK (") chr(0x0023) => '\\#', # NUMBER SIGN (#) chr(0x0024) => '\\$', # DOLLAR SIGN ($) chr(0x0025) => '\\%', # PERCENT SIGN (%) chr(0x0026) => '\\&', # AMPERSAND (&) chr(0x003c) => '{\\textlangle}', # LESS-THAN SIGN (<) chr(0x003e) => '{\\textrangle}', # GREATER-THAN SIGN (>) chr(0x005c) => '{\\textbackslash}', # REVERSE SOLIDUS (\) chr(0x005e) => '\\^{ }', # CIRCUMFLEX ACCENT (^) chr(0x005f) => '\\_', # LOW LINE (_) chr(0x007b) => '\\{', # LEFT CURLY BRACKET ({) chr(0x007d) => '\\}', # RIGHT CURLY BRACKET (}) chr(0x007e) => '{\\texttildelow}', # TILDE (~) # C1 Controls and Latin-1 Supplement chr(0x00a0) => '~', # NO-BREAK SPACE ( ) chr(0x00a1) => '{\\textexclamdown}', # INVERTED EXCLAMATION MARK (¡) chr(0x00a2) => '{\\textcent}', # CENT SIGN (¢) chr(0x00a3) => '{\\textsterling}', # POUND SIGN (£) chr(0x00a4) => '{\\textcurrency}', # CURRENCY SIGN (¤) chr(0x00a5) => '{\\textyen}', # YEN SIGN (¥) chr(0x00a6) => '{\\textbrokenbar}', # BROKEN BAR (¦) chr(0x00a7) => '{\\textsection}', # SECTION SIGN (§) chr(0x00a8) => '{\\textasciidieresis}', # DIAERESIS (¨) chr(0x00a9) => '{\\textcopyright}', # COPYRIGHT SIGN (©) chr(0x00aa) => '{\\textordfeminine}', # FEMININE ORDINAL INDICATOR (ª) chr(0x00ab) => '{\\guillemotleft}', # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK («) chr(0x00ac) => '{\\textlnot}', # NOT SIGN (¬) chr(0x00ad) => '\\-', # SOFT HYPHEN (­) chr(0x00ae) => '{\\textregistered}', # REGISTERED SIGN (®) chr(0x00af) => '{\\textasciimacron}', # MACRON (¯) chr(0x00b0) => '{\\textdegree}', # DEGREE SIGN (°) chr(0x00b1) => '{\\textpm}', # PLUS-MINUS SIGN (±) chr(0x00b2) => '{\\texttwosuperior}', # SUPERSCRIPT TWO (²) chr(0x00b3) => '{\\textthreesuperior}', # SUPERSCRIPT THREE (³) chr(0x00b4) => '{\\textasciiacute}', # ACUTE ACCENT (´) chr(0x00b5) => '{\\textmu}', # MICRO SIGN (µ) chr(0x00b6) => '{\\textparagraph}', # PILCROW SIGN (¶) chr(0x00b7) => '{\\textperiodcentered}', # MIDDLE DOT (·) chr(0x00b8) => '{\\c{~}}', # CEDILLA (¸) chr(0x00b9) => '{\\textonesuperior}', # SUPERSCRIPT ONE (¹) chr(0x00ba) => '{\\textordmasculine}', # MASCULINE ORDINAL INDICATOR (º) chr(0x00bb) => '{\\guillemotright}', # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK (») chr(0x00bc) => '{\\textonequarter}', # VULGAR FRACTION ONE QUARTER (¼) chr(0x00bd) => '{\\textonehalf}', # VULGAR FRACTION ONE HALF (½) chr(0x00be) => '{\\textthreequarters}', # VULGAR FRACTION THREE QUARTERS (¾) chr(0x00bf) => '{\\textquestiondown}', # INVERTED QUESTION MARK (¿) chr(0x00c0) => '{\\`A}', # LATIN CAPITAL LETTER A WITH GRAVE (À) chr(0x00c1) => '{\\\'A}', # LATIN CAPITAL LETTER A WITH ACUTE (Á) chr(0x00c2) => '{\\^A}', # LATIN CAPITAL LETTER A WITH CIRCUMFLEX (Â) chr(0x00c3) => '{\\~A}', # LATIN CAPITAL LETTER A WITH TILDE (Ã) chr(0x00c4) => '{\\"A}', # LATIN CAPITAL LETTER A WITH DIAERESIS (Ä) chr(0x00c5) => '{\\AA}', # LATIN CAPITAL LETTER A WITH RING ABOVE (Å) chr(0x00c6) => '{\\AE}', # LATIN CAPITAL LETTER AE (Æ) chr(0x00c7) => '\\c{C}', # LATIN CAPITAL LETTER C WITH CEDILLA (Ç) chr(0x00c8) => '{\\`E}', # LATIN CAPITAL LETTER E WITH GRAVE (È) chr(0x00c9) => '{\\\'E}', # LATIN CAPITAL LETTER E WITH ACUTE (É) chr(0x00ca) => '{\\^E}', # LATIN CAPITAL LETTER E WITH CIRCUMFLEX (Ê) chr(0x00cb) => '{\\"E}', # LATIN CAPITAL LETTER E WITH DIAERESIS (Ë) chr(0x00cc) => '{\\`I}', # LATIN CAPITAL LETTER I WITH GRAVE (Ì) chr(0x00cd) => '{\\\'I}', # LATIN CAPITAL LETTER I WITH ACUTE (Í) chr(0x00ce) => '{\\^I}', # LATIN CAPITAL LETTER I WITH CIRCUMFLEX (Î) chr(0x00cf) => '{\\"I}', # LATIN CAPITAL LETTER I WITH DIAERESIS (Ï) chr(0x00d0) => '{\\DH}', # LATIN CAPITAL LETTER ETH (Ð) chr(0x00d1) => '{\\~N}', # LATIN CAPITAL LETTER N WITH TILDE (Ñ) chr(0x00d2) => '{\\`O}', # LATIN CAPITAL LETTER O WITH GRAVE (Ò) chr(0x00d3) => '{\\\'O}', # LATIN CAPITAL LETTER O WITH ACUTE (Ó) chr(0x00d4) => '{\\^O}', # LATIN CAPITAL LETTER O WITH CIRCUMFLEX (Ô) chr(0x00d5) => '{\\~O}', # LATIN CAPITAL LETTER O WITH TILDE (Õ) chr(0x00d6) => '{\\"O}', # LATIN CAPITAL LETTER O WITH DIAERESIS (Ö) chr(0x00d7) => '{\\texttimes}', # MULTIPLICATION SIGN (×) chr(0x00d8) => '{\\O}', # LATIN CAPITAL LETTER O WITH STROKE (Ø) chr(0x00d9) => '{\\`U}', # LATIN CAPITAL LETTER U WITH GRAVE (Ù) chr(0x00da) => '{\\\'U}', # LATIN CAPITAL LETTER U WITH ACUTE (Ú) chr(0x00db) => '{\\^U}', # LATIN CAPITAL LETTER U WITH CIRCUMFLEX (Û) chr(0x00dc) => '{\\"U}', # LATIN CAPITAL LETTER U WITH DIAERESIS (Ü) chr(0x00dd) => '{\\\'Y}', # LATIN CAPITAL LETTER Y WITH ACUTE (Ý) chr(0x00de) => '{\\TH}', # LATIN CAPITAL LETTER THORN (Þ) chr(0x00df) => '{\\ss}', # LATIN SMALL LETTER SHARP S (ß) chr(0x00e0) => '{\\`a}', # LATIN SMALL LETTER A WITH GRAVE (à) chr(0x00e1) => '{\\\'a}', # LATIN SMALL LETTER A WITH ACUTE (á) chr(0x00e2) => '{\\^a}', # LATIN SMALL LETTER A WITH CIRCUMFLEX (â) chr(0x00e3) => '{\\~a}', # LATIN SMALL LETTER A WITH TILDE (ã) chr(0x00e4) => '{\\"a}', # LATIN SMALL LETTER A WITH DIAERESIS (ä) chr(0x00e5) => '{\\aa}', # LATIN SMALL LETTER A WITH RING ABOVE (å) chr(0x00e6) => '{\\ae}', # LATIN SMALL LETTER AE (æ) chr(0x00e7) => '\\c{c}', # LATIN SMALL LETTER C WITH CEDILLA (ç) chr(0x00e8) => '{\\`e}', # LATIN SMALL LETTER E WITH GRAVE (è) chr(0x00e9) => '{\\\'e}', # LATIN SMALL LETTER E WITH ACUTE (é) chr(0x00ea) => '{\\^e}', # LATIN SMALL LETTER E WITH CIRCUMFLEX (ê) chr(0x00eb) => '{\\"e}', # LATIN SMALL LETTER E WITH DIAERESIS (ë) chr(0x00ec) => '{\\`i}', # LATIN SMALL LETTER I WITH GRAVE (ì) chr(0x00ed) => '{\\\'i}', # LATIN SMALL LETTER I WITH ACUTE (í) chr(0x00ee) => '{\\^i}', # LATIN SMALL LETTER I WITH CIRCUMFLEX (î) chr(0x00ef) => '{\\"i}', # LATIN SMALL LETTER I WITH DIAERESIS (ï) chr(0x00f0) => '{\\dh}', # LATIN SMALL LETTER ETH (ð) chr(0x00f1) => '{\\~n}', # LATIN SMALL LETTER N WITH TILDE (ñ) chr(0x00f2) => '{\\`o}', # LATIN SMALL LETTER O WITH GRAVE (ò) chr(0x00f3) => '{\\\'o}', # LATIN SMALL LETTER O WITH ACUTE (ó) chr(0x00f4) => '{\\^o}', # LATIN SMALL LETTER O WITH CIRCUMFLEX (ô) chr(0x00f5) => '{\\~o}', # LATIN SMALL LETTER O WITH TILDE (õ) chr(0x00f6) => '{\\"o}', # LATIN SMALL LETTER O WITH DIAERESIS (ö) chr(0x00f7) => '{\\textdiv}', # DIVISION SIGN (÷) chr(0x00f8) => '{\\o}', # LATIN SMALL LETTER O WITH STROKE (ø) chr(0x00f9) => '{\\`u}', # LATIN SMALL LETTER U WITH GRAVE (ù) chr(0x00fa) => '{\\\'u}', # LATIN SMALL LETTER U WITH ACUTE (ú) chr(0x00fb) => '{\\^u}', # LATIN SMALL LETTER U WITH CIRCUMFLEX (û) chr(0x00fc) => '{\\"u}', # LATIN SMALL LETTER U WITH DIAERESIS (ü) chr(0x00fd) => '{\\\'y}', # LATIN SMALL LETTER Y WITH ACUTE (ý) chr(0x00fe) => '{\\th}', # LATIN SMALL LETTER THORN (þ) chr(0x00ff) => '{\\"y}', # LATIN SMALL LETTER Y WITH DIAERESIS (ÿ) # Latin Extended-A chr(0x0100) => '\\={A}', # LATIN CAPITAL LETTER A WITH MACRON chr(0x0101) => '\\={a}', # LATIN SMALL LETTER A WITH MACRON chr(0x0102) => '\\u{A}', # LATIN CAPITAL LETTER A WITH BREVE chr(0x0103) => '\\u{a}', # LATIN SMALL LETTER A WITH BREVE chr(0x0104) => '\\k{A}', # LATIN CAPITAL LETTER A WITH OGONEK chr(0x0105) => '\\k{a}', # LATIN SMALL LETTER A WITH OGONEK chr(0x0106) => '\\\'{C}', # LATIN CAPITAL LETTER C WITH ACUTE chr(0x0107) => '\\\'{c}', # LATIN SMALL LETTER C WITH ACUTE chr(0x0108) => '\\^{C}', # LATIN CAPITAL LETTER C WITH CIRCUMFLEX chr(0x0109) => '\\^{c}', # LATIN SMALL LETTER C WITH CIRCUMFLEX chr(0x010a) => '\\.{C}', # LATIN CAPITAL LETTER C WITH DOT ABOVE chr(0x010b) => '\\.{c}', # LATIN SMALL LETTER C WITH DOT ABOVE chr(0x010c) => '\\v{C}', # LATIN CAPITAL LETTER C WITH CARON chr(0x010d) => '\\v{c}', # LATIN SMALL LETTER C WITH CARON chr(0x010e) => '\\v{D}', # LATIN CAPITAL LETTER D WITH CARON chr(0x010f) => '\\v{d}', # LATIN SMALL LETTER D WITH CARON chr(0x0112) => '\\={E}', # LATIN CAPITAL LETTER E WITH MACRON chr(0x0113) => '\\={e}', # LATIN SMALL LETTER E WITH MACRON chr(0x0114) => '\\u{E}', # LATIN CAPITAL LETTER E WITH BREVE chr(0x0115) => '\\u{e}', # LATIN SMALL LETTER E WITH BREVE chr(0x0116) => '\\.{E}', # LATIN CAPITAL LETTER E WITH DOT ABOVE chr(0x0117) => '\\.{e}', # LATIN SMALL LETTER E WITH DOT ABOVE chr(0x0118) => '\\k{E}', # LATIN CAPITAL LETTER E WITH OGONEK chr(0x0119) => '\\k{e}', # LATIN SMALL LETTER E WITH OGONEK chr(0x011a) => '\\v{E}', # LATIN CAPITAL LETTER E WITH CARON chr(0x011b) => '\\v{e}', # LATIN SMALL LETTER E WITH CARON chr(0x011c) => '\\^{G}', # LATIN CAPITAL LETTER G WITH CIRCUMFLEX chr(0x011d) => '\\^{g}', # LATIN SMALL LETTER G WITH CIRCUMFLEX chr(0x011e) => '\\u{G}', # LATIN CAPITAL LETTER G WITH BREVE chr(0x011f) => '\\u{g}', # LATIN SMALL LETTER G WITH BREVE chr(0x0120) => '\\.{G}', # LATIN CAPITAL LETTER G WITH DOT ABOVE chr(0x0121) => '\\.{g}', # LATIN SMALL LETTER G WITH DOT ABOVE chr(0x0122) => '\\c{G}', # LATIN CAPITAL LETTER G WITH CEDILLA chr(0x0123) => '\\c{g}', # LATIN SMALL LETTER G WITH CEDILLA chr(0x0124) => '\\^{H}', # LATIN CAPITAL LETTER H WITH CIRCUMFLEX chr(0x0125) => '\\^{h}', # LATIN SMALL LETTER H WITH CIRCUMFLEX chr(0x0128) => '\\~{I}', # LATIN CAPITAL LETTER I WITH TILDE chr(0x0129) => '\\~{\\i}', # LATIN SMALL LETTER I WITH TILDE chr(0x012a) => '\\={I}', # LATIN CAPITAL LETTER I WITH MACRON chr(0x012b) => '\\={\\i}', # LATIN SMALL LETTER I WITH MACRON chr(0x012c) => '\\u{I}', # LATIN CAPITAL LETTER I WITH BREVE chr(0x012d) => '\\u{\\i}', # LATIN SMALL LETTER I WITH BREVE chr(0x012e) => '\\k{I}', # LATIN CAPITAL LETTER I WITH OGONEK chr(0x012f) => '\\k{i}', # LATIN SMALL LETTER I WITH OGONEK chr(0x0130) => '\\.{I}', # LATIN CAPITAL LETTER I WITH DOT ABOVE chr(0x0131) => '{\\i}', # LATIN SMALL LETTER DOTLESS I chr(0x0134) => '\\^{J}', # LATIN CAPITAL LETTER J WITH CIRCUMFLEX chr(0x0135) => '\\^{\\j}', # LATIN SMALL LETTER J WITH CIRCUMFLEX chr(0x0136) => '\\c{K}', # LATIN CAPITAL LETTER K WITH CEDILLA chr(0x0137) => '\\c{k}', # LATIN SMALL LETTER K WITH CEDILLA chr(0x0139) => '\\\'{L}', # LATIN CAPITAL LETTER L WITH ACUTE chr(0x013a) => '\\\'{l}', # LATIN SMALL LETTER L WITH ACUTE chr(0x013b) => '\\c{L}', # LATIN CAPITAL LETTER L WITH CEDILLA chr(0x013c) => '\\c{l}', # LATIN SMALL LETTER L WITH CEDILLA chr(0x013d) => '\\v{L}', # LATIN CAPITAL LETTER L WITH CARON chr(0x013e) => '\\v{l}', # LATIN SMALL LETTER L WITH CARON chr(0x0143) => '\\\'{N}', # LATIN CAPITAL LETTER N WITH ACUTE chr(0x0144) => '\\\'{n}', # LATIN SMALL LETTER N WITH ACUTE chr(0x0145) => '\\c{N}', # LATIN CAPITAL LETTER N WITH CEDILLA chr(0x0146) => '\\c{n}', # LATIN SMALL LETTER N WITH CEDILLA chr(0x0147) => '\\v{N}', # LATIN CAPITAL LETTER N WITH CARON chr(0x0148) => '\\v{n}', # LATIN SMALL LETTER N WITH CARON chr(0x014c) => '\\={O}', # LATIN CAPITAL LETTER O WITH MACRON chr(0x014d) => '\\={o}', # LATIN SMALL LETTER O WITH MACRON chr(0x014e) => '\\u{O}', # LATIN CAPITAL LETTER O WITH BREVE chr(0x014f) => '\\u{o}', # LATIN SMALL LETTER O WITH BREVE chr(0x0152) => '{\\OE}', # LATIN CAPITAL LIGATURE OE (Œ) chr(0x0153) => '{\\oe}', # LATIN SMALL LIGATURE OE (œ) chr(0x0154) => '\\\'{R}', # LATIN CAPITAL LETTER R WITH ACUTE chr(0x0155) => '\\\'{r}', # LATIN SMALL LETTER R WITH ACUTE chr(0x0156) => '\\c{R}', # LATIN CAPITAL LETTER R WITH CEDILLA chr(0x0157) => '\\c{r}', # LATIN SMALL LETTER R WITH CEDILLA chr(0x0158) => '\\v{R}', # LATIN CAPITAL LETTER R WITH CARON chr(0x0159) => '\\v{r}', # LATIN SMALL LETTER R WITH CARON chr(0x015a) => '\\\'{S}', # LATIN CAPITAL LETTER S WITH ACUTE chr(0x015b) => '\\\'{s}', # LATIN SMALL LETTER S WITH ACUTE chr(0x015c) => '\\^{S}', # LATIN CAPITAL LETTER S WITH CIRCUMFLEX chr(0x015d) => '\\^{s}', # LATIN SMALL LETTER S WITH CIRCUMFLEX chr(0x015e) => '\\c{S}', # LATIN CAPITAL LETTER S WITH CEDILLA chr(0x015f) => '\\c{s}', # LATIN SMALL LETTER S WITH CEDILLA chr(0x0160) => '\\v{S}', # LATIN CAPITAL LETTER S WITH CARON (Š) chr(0x0161) => '\\v{s}', # LATIN SMALL LETTER S WITH CARON (š) chr(0x0162) => '\\c{T}', # LATIN CAPITAL LETTER T WITH CEDILLA chr(0x0163) => '\\c{t}', # LATIN SMALL LETTER T WITH CEDILLA chr(0x0164) => '\\v{T}', # LATIN CAPITAL LETTER T WITH CARON chr(0x0165) => '\\v{t}', # LATIN SMALL LETTER T WITH CARON chr(0x0168) => '\\~{U}', # LATIN CAPITAL LETTER U WITH TILDE chr(0x0169) => '\\~{u}', # LATIN SMALL LETTER U WITH TILDE chr(0x016a) => '\\={U}', # LATIN CAPITAL LETTER U WITH MACRON chr(0x016b) => '\\={u}', # LATIN SMALL LETTER U WITH MACRON chr(0x016c) => '\\u{U}', # LATIN CAPITAL LETTER U WITH BREVE chr(0x016d) => '\\u{u}', # LATIN SMALL LETTER U WITH BREVE chr(0x016e) => '\\r{U}', # LATIN CAPITAL LETTER U WITH RING ABOVE chr(0x016f) => '\\r{u}', # LATIN SMALL LETTER U WITH RING ABOVE chr(0x0172) => '\\k{U}', # LATIN CAPITAL LETTER U WITH OGONEK chr(0x0173) => '\\k{u}', # LATIN SMALL LETTER U WITH OGONEK chr(0x0174) => '\\^{W}', # LATIN CAPITAL LETTER W WITH CIRCUMFLEX chr(0x0175) => '\\^{w}', # LATIN SMALL LETTER W WITH CIRCUMFLEX chr(0x0176) => '\\^{Y}', # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX chr(0x0177) => '\\^{y}', # LATIN SMALL LETTER Y WITH CIRCUMFLEX chr(0x0178) => '{\\"Y}', # LATIN CAPITAL LETTER Y WITH DIAERESIS (Ÿ) chr(0x0179) => '\\\'{Z}', # LATIN CAPITAL LETTER Z WITH ACUTE chr(0x017a) => '\\\'{z}', # LATIN SMALL LETTER Z WITH ACUTE chr(0x017b) => '\\.{Z}', # LATIN CAPITAL LETTER Z WITH DOT ABOVE chr(0x017c) => '\\.{z}', # LATIN SMALL LETTER Z WITH DOT ABOVE chr(0x017d) => '\\v{Z}', # LATIN CAPITAL LETTER Z WITH CARON chr(0x017e) => '\\v{z}', # LATIN SMALL LETTER Z WITH CARON chr(0x0192) => '{\\textflorin}', # LATIN SMALL LETTER F WITH HOOK (ƒ) chr(0x01cd) => '\\v{A}', # LATIN CAPITAL LETTER A WITH CARON chr(0x01ce) => '\\v{a}', # LATIN SMALL LETTER A WITH CARON chr(0x01cf) => '\\v{I}', # LATIN CAPITAL LETTER I WITH CARON chr(0x01d0) => '\\v{i}', # LATIN SMALL LETTER I WITH CARON chr(0x01d1) => '\\v{O}', # LATIN CAPITAL LETTER O WITH CARON chr(0x01d2) => '\\v{o}', # LATIN SMALL LETTER O WITH CARON chr(0x01d3) => '\\v{U}', # LATIN CAPITAL LETTER U WITH CARON chr(0x01d4) => '\\v{u}', # LATIN SMALL LETTER U WITH CARON chr(0x01e6) => '\\v{G}', # LATIN CAPITAL LETTER G WITH CARON chr(0x01e7) => '\\v{g}', # LATIN SMALL LETTER G WITH CARON chr(0x01e8) => '\\v{K}', # LATIN CAPITAL LETTER K WITH CARON chr(0x01e9) => '\\v{k}', # LATIN SMALL LETTER K WITH CARON chr(0x01ea) => '\\k{O}', # LATIN CAPITAL LETTER O WITH OGONEK chr(0x01eb) => '\\k{o}', # LATIN SMALL LETTER O WITH OGONEK chr(0x01f0) => '\\v{j}', # LATIN SMALL LETTER J WITH CARON chr(0x01f4) => '\\\'{G}', # LATIN CAPITAL LETTER G WITH ACUTE chr(0x01f5) => '\\\'{g}', # LATIN SMALL LETTER G WITH ACUTE chr(0x01f8) => '\\`{N}', # LATIN CAPITAL LETTER N WITH GRAVE chr(0x01f9) => '\\`{n}', # LATIN SMALL LETTER N WITH GRAVE # Spacing Modifier Letters chr(0x02c6) => '{\\textasciicircum}', # MODIFIER LETTER CIRCUMFLEX ACCENT (ˆ) chr(0x02dc) => '{\\textasciitilde}', # SMALL TILDE (˜) # Greek and Coptic chr(0x0391) => '\\ensuremath{\\mathrm{A}}', # GREEK CAPITAL LETTER ALPHA (Α) chr(0x0392) => '\\ensuremath{\\mathrm{B}}', # GREEK CAPITAL LETTER BETA (Β) chr(0x0393) => '\\ensuremath{\\Gamma}', # GREEK CAPITAL LETTER GAMMA (Γ) chr(0x0394) => '\\ensuremath{\\Delta}', # GREEK CAPITAL LETTER DELTA (Δ) chr(0x0395) => '\\ensuremath{\\mathrm{E}}', # GREEK CAPITAL LETTER EPSILON (Ε) chr(0x0396) => '\\ensuremath{\\mathrm{Z}}', # GREEK CAPITAL LETTER ZETA (Ζ) chr(0x0397) => '\\ensuremath{\\mathrm{H}}', # GREEK CAPITAL LETTER ETA (Η) chr(0x0398) => '\\ensuremath{\\Theta}', # GREEK CAPITAL LETTER THETA (Θ) chr(0x0399) => '\\ensuremath{\\mathrm{I}}', # GREEK CAPITAL LETTER IOTA (Ι) chr(0x039a) => '\\ensuremath{\\mathrm{K}}', # GREEK CAPITAL LETTER KAPPA (Κ) chr(0x039b) => '\\ensuremath{\\Lambda}', # GREEK CAPITAL LETTER LAMDA (Λ) chr(0x039c) => '\\ensuremath{\\mathrm{M}}', # GREEK CAPITAL LETTER MU (Μ) chr(0x039d) => '\\ensuremath{\\mathrm{N}}', # GREEK CAPITAL LETTER NU (Ν) chr(0x039e) => '\\ensuremath{\\Xi}', # GREEK CAPITAL LETTER XI (Ξ) chr(0x039f) => '\\ensuremath{\\mathrm{O}}', # GREEK CAPITAL LETTER OMICRON (Ο) chr(0x03a0) => '\\ensuremath{\\Pi}', # GREEK CAPITAL LETTER PI (Π) chr(0x03a1) => '\\ensuremath{\\mathrm{R}}', # GREEK CAPITAL LETTER RHO (Ρ) chr(0x03a3) => '\\ensuremath{\\Sigma}', # GREEK CAPITAL LETTER SIGMA (Σ) chr(0x03a4) => '\\ensuremath{\\mathrm{T}}', # GREEK CAPITAL LETTER TAU (Τ) chr(0x03a5) => '\\ensuremath{\\Upsilon}', # GREEK CAPITAL LETTER UPSILON (Υ) chr(0x03a6) => '\\ensuremath{\\Phi}', # GREEK CAPITAL LETTER PHI (Φ) chr(0x03a7) => '\\ensuremath{\\mathrm{X}}', # GREEK CAPITAL LETTER CHI (Χ) chr(0x03a8) => '\\ensuremath{\\Psi}', # GREEK CAPITAL LETTER PSI (Ψ) chr(0x03a9) => '\\ensuremath{\\Omega}', # GREEK CAPITAL LETTER OMEGA (Ω) chr(0x03b1) => '\\ensuremath{\\alpha}', # GREEK SMALL LETTER ALPHA (α) chr(0x03b2) => '\\ensuremath{\\beta}', # GREEK SMALL LETTER BETA (β) chr(0x03b3) => '\\ensuremath{\\gamma}', # GREEK SMALL LETTER GAMMA (γ) chr(0x03b4) => '\\ensuremath{\\delta}', # GREEK SMALL LETTER DELTA (δ) chr(0x03b5) => '\\ensuremath{\\epsilon}', # GREEK SMALL LETTER EPSILON (ε) chr(0x03b6) => '\\ensuremath{\\zeta}', # GREEK SMALL LETTER ZETA (ζ) chr(0x03b7) => '\\ensuremath{\\eta}', # GREEK SMALL LETTER ETA (η) chr(0x03b8) => '\\ensuremath{\\theta}', # GREEK SMALL LETTER THETA (θ) chr(0x03b9) => '\\ensuremath{\\iota}', # GREEK SMALL LETTER IOTA (ι) chr(0x03ba) => '\\ensuremath{\\kappa}', # GREEK SMALL LETTER KAPPA (κ) chr(0x03bb) => '\\ensuremath{\\lambda}', # GREEK SMALL LETTER LAMDA (λ) chr(0x03bc) => '\\ensuremath{\\mu}', # GREEK SMALL LETTER MU (μ) chr(0x03bd) => '\\ensuremath{\\nu}', # GREEK SMALL LETTER NU (ν) chr(0x03be) => '\\ensuremath{\\xi}', # GREEK SMALL LETTER XI (ξ) chr(0x03bf) => '\\ensuremath{o}', # GREEK SMALL LETTER OMICRON (ο) chr(0x03c0) => '\\ensuremath{\\pi}', # GREEK SMALL LETTER PI (π) chr(0x03c1) => '\\ensuremath{\\rho}', # GREEK SMALL LETTER RHO (ρ) chr(0x03c3) => '\\ensuremath{\\sigma}', # GREEK SMALL LETTER SIGMA (σ) chr(0x03c4) => '\\ensuremath{\\tau}', # GREEK SMALL LETTER TAU (τ) chr(0x03c5) => '\\ensuremath{\\upsilon}', # GREEK SMALL LETTER UPSILON (υ) chr(0x03c6) => '\\ensuremath{\\phi}', # GREEK SMALL LETTER PHI (φ) chr(0x03c7) => '\\ensuremath{\\chi}', # GREEK SMALL LETTER CHI (χ) chr(0x03c8) => '\\ensuremath{\\psi}', # GREEK SMALL LETTER PSI (ψ) chr(0x03c9) => '\\ensuremath{\\omega}', # GREEK SMALL LETTER OMEGA (ω) chr(0x0e3f) => '{\\textbaht}', # THAI CURRENCY SYMBOL BAHT # Latin Extended Additional chr(0x1e02) => '\\.{B}', # LATIN CAPITAL LETTER B WITH DOT ABOVE chr(0x1e03) => '\\.{b}', # LATIN SMALL LETTER B WITH DOT ABOVE chr(0x1e04) => '\\d{B}', # LATIN CAPITAL LETTER B WITH DOT BELOW chr(0x1e05) => '\\d{b}', # LATIN SMALL LETTER B WITH DOT BELOW chr(0x1e06) => '\\b{B}', # LATIN CAPITAL LETTER B WITH LINE BELOW chr(0x1e07) => '\\b{b}', # LATIN SMALL LETTER B WITH LINE BELOW chr(0x1e0a) => '\\.{D}', # LATIN CAPITAL LETTER D WITH DOT ABOVE chr(0x1e0b) => '\\.{d}', # LATIN SMALL LETTER D WITH DOT ABOVE chr(0x1e0c) => '\\d{D}', # LATIN CAPITAL LETTER D WITH DOT BELOW chr(0x1e0d) => '\\d{d}', # LATIN SMALL LETTER D WITH DOT BELOW chr(0x1e0e) => '\\b{D}', # LATIN CAPITAL LETTER D WITH LINE BELOW chr(0x1e0f) => '\\b{d}', # LATIN SMALL LETTER D WITH LINE BELOW chr(0x1e10) => '\\c{D}', # LATIN CAPITAL LETTER D WITH CEDILLA chr(0x1e11) => '\\c{d}', # LATIN SMALL LETTER D WITH CEDILLA chr(0x1e1e) => '\\.{F}', # LATIN CAPITAL LETTER F WITH DOT ABOVE chr(0x1e1f) => '\\.{f}', # LATIN SMALL LETTER F WITH DOT ABOVE chr(0x1e20) => '\\={G}', # LATIN CAPITAL LETTER G WITH MACRON chr(0x1e21) => '\\={g}', # LATIN SMALL LETTER G WITH MACRON chr(0x1e22) => '\\.{H}', # LATIN CAPITAL LETTER H WITH DOT ABOVE chr(0x1e23) => '\\.{h}', # LATIN SMALL LETTER H WITH DOT ABOVE chr(0x1e24) => '\\d{H}', # LATIN CAPITAL LETTER H WITH DOT BELOW chr(0x1e25) => '\\d{h}', # LATIN SMALL LETTER H WITH DOT BELOW chr(0x1e28) => '\\c{H}', # LATIN CAPITAL LETTER H WITH CEDILLA chr(0x1e29) => '\\c{h}', # LATIN SMALL LETTER H WITH CEDILLA chr(0x1e30) => '\\\'{K}', # LATIN CAPITAL LETTER K WITH ACUTE chr(0x1e31) => '\\\'{k}', # LATIN SMALL LETTER K WITH ACUTE chr(0x1e32) => '\\d{K}', # LATIN CAPITAL LETTER K WITH DOT BELOW chr(0x1e33) => '\\d{k}', # LATIN SMALL LETTER K WITH DOT BELOW chr(0x1e34) => '\\b{K}', # LATIN CAPITAL LETTER K WITH LINE BELOW chr(0x1e35) => '\\b{k}', # LATIN SMALL LETTER K WITH LINE BELOW chr(0x1e36) => '\\d{L}', # LATIN CAPITAL LETTER L WITH DOT BELOW chr(0x1e37) => '\\d{l}', # LATIN SMALL LETTER L WITH DOT BELOW chr(0x1e3a) => '\\b{L}', # LATIN CAPITAL LETTER L WITH LINE BELOW chr(0x1e3b) => '\\b{l}', # LATIN SMALL LETTER L WITH LINE BELOW chr(0x1e3e) => '\\\'{M}', # LATIN CAPITAL LETTER M WITH ACUTE chr(0x1e3f) => '\\\'{m}', # LATIN SMALL LETTER M WITH ACUTE chr(0x1e40) => '\\.{M}', # LATIN CAPITAL LETTER M WITH DOT ABOVE chr(0x1e41) => '\\.{m}', # LATIN SMALL LETTER M WITH DOT ABOVE chr(0x1e42) => '\\d{M}', # LATIN CAPITAL LETTER M WITH DOT BELOW chr(0x1e43) => '\\d{m}', # LATIN SMALL LETTER M WITH DOT BELOW chr(0x1e44) => '\\.{N}', # LATIN CAPITAL LETTER N WITH DOT ABOVE chr(0x1e45) => '\\.{n}', # LATIN SMALL LETTER N WITH DOT ABOVE chr(0x1e46) => '\\d{N}', # LATIN CAPITAL LETTER N WITH DOT BELOW chr(0x1e47) => '\\d{n}', # LATIN SMALL LETTER N WITH DOT BELOW chr(0x1e48) => '\\b{N}', # LATIN CAPITAL LETTER N WITH LINE BELOW chr(0x1e49) => '\\b{n}', # LATIN SMALL LETTER N WITH LINE BELOW chr(0x1e54) => '\\\'{P}', # LATIN CAPITAL LETTER P WITH ACUTE chr(0x1e55) => '\\\'{p}', # LATIN SMALL LETTER P WITH ACUTE chr(0x1e56) => '\\.{P}', # LATIN CAPITAL LETTER P WITH DOT ABOVE chr(0x1e57) => '\\.{p}', # LATIN SMALL LETTER P WITH DOT ABOVE chr(0x1e58) => '\\.{R}', # LATIN CAPITAL LETTER R WITH DOT ABOVE chr(0x1e59) => '\\.{r}', # LATIN SMALL LETTER R WITH DOT ABOVE chr(0x1e5a) => '\\d{R}', # LATIN CAPITAL LETTER R WITH DOT BELOW chr(0x1e5b) => '\\d{r}', # LATIN SMALL LETTER R WITH DOT BELOW chr(0x1e5e) => '\\b{R}', # LATIN CAPITAL LETTER R WITH LINE BELOW chr(0x1e5f) => '\\b{r}', # LATIN SMALL LETTER R WITH LINE BELOW chr(0x1e60) => '\\.{S}', # LATIN CAPITAL LETTER S WITH DOT ABOVE chr(0x1e61) => '\\.{s}', # LATIN SMALL LETTER S WITH DOT ABOVE chr(0x1e62) => '\\d{S}', # LATIN CAPITAL LETTER S WITH DOT BELOW chr(0x1e63) => '\\d{s}', # LATIN SMALL LETTER S WITH DOT BELOW chr(0x1e6a) => '\\.{T}', # LATIN CAPITAL LETTER T WITH DOT ABOVE chr(0x1e6b) => '\\.{t}', # LATIN SMALL LETTER T WITH DOT ABOVE chr(0x1e6c) => '\\d{T}', # LATIN CAPITAL LETTER T WITH DOT BELOW chr(0x1e6d) => '\\d{t}', # LATIN SMALL LETTER T WITH DOT BELOW chr(0x1e6e) => '\\b{T}', # LATIN CAPITAL LETTER T WITH LINE BELOW chr(0x1e6f) => '\\b{t}', # LATIN SMALL LETTER T WITH LINE BELOW chr(0x1e7c) => '\\~{V}', # LATIN CAPITAL LETTER V WITH TILDE chr(0x1e7d) => '\\~{v}', # LATIN SMALL LETTER V WITH TILDE chr(0x1e7e) => '\\d{V}', # LATIN CAPITAL LETTER V WITH DOT BELOW chr(0x1e7f) => '\\d{v}', # LATIN SMALL LETTER V WITH DOT BELOW chr(0x1e80) => '\\`{W}', # LATIN CAPITAL LETTER W WITH GRAVE chr(0x1e81) => '\\`{w}', # LATIN SMALL LETTER W WITH GRAVE chr(0x1e82) => '\\\'{W}', # LATIN CAPITAL LETTER W WITH ACUTE chr(0x1e83) => '\\\'{w}', # LATIN SMALL LETTER W WITH ACUTE chr(0x1e86) => '\\.{W}', # LATIN CAPITAL LETTER W WITH DOT ABOVE chr(0x1e87) => '\\.{w}', # LATIN SMALL LETTER W WITH DOT ABOVE chr(0x1e88) => '\\d{W}', # LATIN CAPITAL LETTER W WITH DOT BELOW chr(0x1e89) => '\\d{w}', # LATIN SMALL LETTER W WITH DOT BELOW chr(0x1e8a) => '\\.{X}', # LATIN CAPITAL LETTER X WITH DOT ABOVE chr(0x1e8b) => '\\.{x}', # LATIN SMALL LETTER X WITH DOT ABOVE chr(0x1e8e) => '\\.{Y}', # LATIN CAPITAL LETTER Y WITH DOT ABOVE chr(0x1e8f) => '\\.{y}', # LATIN SMALL LETTER Y WITH DOT ABOVE chr(0x1e90) => '\\^{Z}', # LATIN CAPITAL LETTER Z WITH CIRCUMFLEX chr(0x1e91) => '\\^{z}', # LATIN SMALL LETTER Z WITH CIRCUMFLEX chr(0x1e92) => '\\d{Z}', # LATIN CAPITAL LETTER Z WITH DOT BELOW chr(0x1e93) => '\\d{z}', # LATIN SMALL LETTER Z WITH DOT BELOW chr(0x1e94) => '\\b{Z}', # LATIN CAPITAL LETTER Z WITH LINE BELOW chr(0x1e95) => '\\b{z}', # LATIN SMALL LETTER Z WITH LINE BELOW chr(0x1e96) => '\\b{h}', # LATIN SMALL LETTER H WITH LINE BELOW chr(0x1e98) => '\\r{w}', # LATIN SMALL LETTER W WITH RING ABOVE chr(0x1e99) => '\\r{y}', # LATIN SMALL LETTER Y WITH RING ABOVE chr(0x1ea0) => '\\d{A}', # LATIN CAPITAL LETTER A WITH DOT BELOW chr(0x1ea1) => '\\d{a}', # LATIN SMALL LETTER A WITH DOT BELOW chr(0x1eb8) => '\\d{E}', # LATIN CAPITAL LETTER E WITH DOT BELOW chr(0x1eb9) => '\\d{e}', # LATIN SMALL LETTER E WITH DOT BELOW chr(0x1ebc) => '\\~{E}', # LATIN CAPITAL LETTER E WITH TILDE chr(0x1ebd) => '\\~{e}', # LATIN SMALL LETTER E WITH TILDE chr(0x1eca) => '\\d{I}', # LATIN CAPITAL LETTER I WITH DOT BELOW chr(0x1ecb) => '\\d{i}', # LATIN SMALL LETTER I WITH DOT BELOW chr(0x1ecc) => '\\d{O}', # LATIN CAPITAL LETTER O WITH DOT BELOW chr(0x1ecd) => '\\d{o}', # LATIN SMALL LETTER O WITH DOT BELOW chr(0x1ee4) => '\\d{U}', # LATIN CAPITAL LETTER U WITH DOT BELOW chr(0x1ee5) => '\\d{u}', # LATIN SMALL LETTER U WITH DOT BELOW chr(0x1ef2) => '\\`{Y}', # LATIN CAPITAL LETTER Y WITH GRAVE chr(0x1ef3) => '\\`{y}', # LATIN SMALL LETTER Y WITH GRAVE chr(0x1ef4) => '\\d{Y}', # LATIN CAPITAL LETTER Y WITH DOT BELOW chr(0x1ef5) => '\\d{y}', # LATIN SMALL LETTER Y WITH DOT BELOW chr(0x1ef8) => '\\~{Y}', # LATIN CAPITAL LETTER Y WITH TILDE chr(0x1ef9) => '\\~{y}', # LATIN SMALL LETTER Y WITH TILDE # General Punctuation chr(0x2002) => '\\phantom{N}', # EN SPACE ( ) chr(0x2003) => '\\hspace{1em}', # EM SPACE ( ) chr(0x2004) => '\\hspace{.333333em}', # THREE-PER-EM SPACE chr(0x2005) => '\\hspace{.25em}', # FOUR-PER-EM SPACE chr(0x2006) => '\\hspace{.166666em}', # SIX-PER-EM SPACE chr(0x2007) => '\\phantom{0}', # FIGURE SPACE chr(0x2008) => '\\phantom{,}', # PUNCTUATION SPACE chr(0x2009) => '\\,', # THIN SPACE ( ) chr(0x200a) => '\\ensuremath{\\mkern1mu}', # HAIR SPACE chr(0x200c) => '{}', # ZERO WIDTH NON-JOINER (‌) chr(0x2013) => '--', # EN DASH (–) chr(0x2014) => '---', # EM DASH (—) chr(0x2015) => '\\rule{1em}{1pt}', # HORIZONTAL BAR chr(0x2016) => '{\\textbardbl}', # DOUBLE VERTICAL LINE chr(0x2018) => '{\\textquoteleft}', # LEFT SINGLE QUOTATION MARK (‘) chr(0x2019) => '{\\textquoteright}', # RIGHT SINGLE QUOTATION MARK (’) chr(0x201a) => '{\\quotesinglbase}', # SINGLE LOW-9 QUOTATION MARK (‚) chr(0x201c) => '{\\textquotedblleft}', # LEFT DOUBLE QUOTATION MARK (“) chr(0x201d) => '{\\textquotedblright}', # RIGHT DOUBLE QUOTATION MARK (”) chr(0x201e) => '{\\quotedblbase}', # DOUBLE LOW-9 QUOTATION MARK („) chr(0x2020) => '{\\textdagger}', # DAGGER (†) chr(0x2021) => '{\\textdaggerdbl}', # DOUBLE DAGGER (‡) chr(0x2022) => '{\\textbullet}', # BULLET (•) chr(0x2026) => '{\\textellipsis}', # HORIZONTAL ELLIPSIS (…) chr(0x2030) => '{\\textperthousand}', # PER MILLE SIGN (‰) chr(0x2032) => '{\\textquotesingle}', # PRIME (′) chr(0x2033) => '{\\textquotedbl}', # DOUBLE PRIME (″) chr(0x2039) => '{\\guilsinglleft}', # SINGLE LEFT-POINTING ANGLE QUOTATION MARK (‹) chr(0x203a) => '{\\guilsinglright}', # SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (›) chr(0x203b) => '{\\textreferencemark}', # REFERENCE MARK chr(0x203d) => '{\\textinterrobang}', # INTERROBANG chr(0x203e) => '{\\textasciimacron}', # OVERLINE (‾) chr(0x2044) => '{\\textfractionsolidus}', # FRACTION SLASH (⁄) # Currency Symbols chr(0x20a1) => '{\\textcolonmonetary}', # COLON SIGN chr(0x20a4) => '{\\textlira}', # LIRA SIGN chr(0x20a6) => '{\\textnaira}', # NAIRA SIGN chr(0x20a9) => '{\\textwon}', # WON SIGN chr(0x20ab) => '{\\textdong}', # DONG SIGN chr(0x20ac) => '{\\texteuro}', # EURO SIGN (€) # Letterlike Symbols chr(0x2111) => '\\ensuremath{\\Re}', # BLACK-LETTER CAPITAL I (ℑ) chr(0x2116) => '{\\textnumero}', # NUMERO SIGN chr(0x2117) => '{\\textcircledP}', # SOUND RECORDING COPYRIGHT chr(0x2118) => '\\ensuremath{\\wp}', # SCRIPT CAPITAL P (℘) chr(0x211c) => '\\ensuremath{\\Im}', # BLACK-LETTER CAPITAL R (ℜ) chr(0x211e) => '{\\textrecipe}', # PRESCRIPTION TAKE chr(0x2120) => '{\\textservicemark}', # SERVICE MARK chr(0x2122) => '{\\texttrademark}', # TRADE MARK SIGN (™) chr(0x2126) => '{\\textohm}', # OHM SIGN chr(0x2127) => '{\\textmho}', # INVERTED OHM SIGN chr(0x212e) => '{\\textestimated}', # ESTIMATED SYMBOL chr(0x2190) => '{\\textleftarrow}', # LEFTWARDS ARROW (←) chr(0x2191) => '{\\textuparrow}', # UPWARDS ARROW (↑) chr(0x2192) => '{\\textrightarrow}', # RIGHTWARDS ARROW (→) chr(0x2193) => '{\\textdownarrow}', # DOWNWARDS ARROW (↓) chr(0x2194) => '\\ensuremath{\\leftrightarrow}', # LEFT RIGHT ARROW (↔) chr(0x21d0) => '\\ensuremath{\\Leftarrow}', # LEFTWARDS DOUBLE ARROW (⇐) chr(0x21d1) => '\\ensuremath{\\Uparrow}', # UPWARDS DOUBLE ARROW (⇑) chr(0x21d2) => '\\ensuremath{\\Rightarrow}', # RIGHTWARDS DOUBLE ARROW (⇒) chr(0x21d3) => '\\ensuremath{\\Downarrow}', # DOWNWARDS DOUBLE ARROW (⇓) chr(0x21d4) => '\\ensuremath{\\Leftrightarrow}', # LEFT RIGHT DOUBLE ARROW (⇔) # Mathematical Operations chr(0x2200) => '\\ensuremath{\\forall}', # FOR ALL (∀) chr(0x2202) => '\\ensuremath{\\partial}', # PARTIAL DIFFERENTIAL (∂) chr(0x2203) => '\\ensuremath{\\exists}', # THERE EXISTS (∃) chr(0x2205) => '\\ensuremath{\\emptyset}', # EMPTY SET (∅) chr(0x2207) => '\\ensuremath{\\nabla}', # NABLA (∇) chr(0x2208) => '\\ensuremath{\\in}', # ELEMENT OF (∈) chr(0x2209) => '\\ensuremath{\\notin}', # NOT AN ELEMENT OF (∉) chr(0x220b) => '\\ensuremath{\\ni}', # CONTAINS AS MEMBER (∋) chr(0x220f) => '\\ensuremath{\\prod}', # N-ARY PRODUCT (∏) chr(0x2211) => '\\ensuremath{\\sum}', # N-ARY SUMMATION (∑) chr(0x2212) => '\\ensuremath{-}', # MINUS SIGN (−) chr(0x2217) => '\\ensuremath{\\ast}', # ASTERISK OPERATOR (∗) chr(0x221a) => '\\ensuremath{\\surd}', # SQUARE ROOT (√) chr(0x221d) => '\\ensuremath{\\propto}', # PROPORTIONAL TO (∝) chr(0x221e) => '\\ensuremath{\\infty}', # INFINITY (∞) chr(0x2220) => '\\ensuremath{\\angle}', # ANGLE (∠) chr(0x2227) => '\\ensuremath{\\wedge}', # LOGICAL AND (∧) chr(0x2228) => '\\ensuremath{\\vee}', # LOGICAL OR (∨) chr(0x2229) => '\\ensuremath{\\cap}', # INTERSECTION (∩) chr(0x222a) => '\\ensuremath{\\cup}', # UNION (∪) chr(0x222b) => '\\ensuremath{\\int}', # INTEGRAL (∫) chr(0x2234) => '\\ensuremath{\\therefore}', # THEREFORE (∴) chr(0x223c) => '\\ensuremath{\\sim}', # TILDE OPERATOR (∼) chr(0x2245) => '\\ensuremath{\\cong}', # APPROXIMATELY EQUAL TO (≅) chr(0x2248) => '\\ensuremath{\\asymp}', # ALMOST EQUAL TO (≈) chr(0x2260) => '\\ensuremath{\\neq}', # NOT EQUAL TO (≠) chr(0x2261) => '\\ensuremath{\\equiv}', # IDENTICAL TO (≡) chr(0x2264) => '\\ensuremath{\\leq}', # LESS-THAN OR EQUAL TO (≤) chr(0x2265) => '\\ensuremath{\\geq}', # GREATER-THAN OR EQUAL TO (≥) chr(0x2282) => '\\ensuremath{\\subset}', # SUBSET OF (⊂) chr(0x2283) => '\\ensuremath{\\supset}', # SUPERSET OF (⊃) chr(0x2284) => '\\ensuremath{\\not\\subset}', # NOT A SUBSET OF (⊄) chr(0x2286) => '\\ensuremath{\\subseteq}', # SUBSET OF OR EQUAL TO (⊆) chr(0x2287) => '\\ensuremath{\\supseteq}', # SUPERSET OF OR EQUAL TO (⊇) chr(0x2295) => '\\ensuremath{\\oplus}', # CIRCLED PLUS (⊕) chr(0x2297) => '\\ensuremath{\\otimes}', # CIRCLED TIMES (⊗) chr(0x22a5) => '\\ensuremath{\\perp}', # UP TACK (⊥) chr(0x22c5) => '\\ensuremath{\\cdot}', # DOT OPERATOR (⋅) chr(0x2308) => '\\ensuremath{\\lceil}', # LEFT CEILING (⌈) chr(0x2309) => '\\ensuremath{\\rceil}', # RIGHT CEILING (⌉) chr(0x230a) => '\\ensuremath{\\lfloor}', # LEFT FLOOR (⌊) chr(0x230b) => '\\ensuremath{\\rfloor}', # RIGHT FLOOR (⌋) chr(0x2329) => '\\ensuremath{\\langle}', # LEFT-POINTING ANGLE BRACKET (⟨) chr(0x232a) => '\\ensuremath{\\rangle}', # RIGHT-POINTING ANGLE BRACKET (⟩) chr(0x25ca) => '\\ensuremath{\\lozenge}', # LOZENGE (◊) # Miscellaneous Symbols chr(0x263f) => '{\\Mercury}', # MERCURY chr(0x2640) => '{\\Venus}', # FEMALE SIGN chr(0x2641) => '{\\Earth}', # EARTH chr(0x2642) => '{\\Mars}', # MALE SIGN chr(0x2643) => '{\\Jupiter}', # JUPITER chr(0x2644) => '{\\Saturn}', # SATURN chr(0x2645) => '{\\Uranus}', # URANUS chr(0x2646) => '{\\Neptune}', # NEPTUNE chr(0x2647) => '{\\Pluto}', # PLUTO chr(0x2648) => '{\\Aries}', # ARIES chr(0x2649) => '{\\Taurus}', # TAURUS chr(0x264a) => '{\\Gemini}', # GEMINI chr(0x264b) => '{\\Cancer}', # CANCER chr(0x264c) => '{\\Leo}', # LEO chr(0x264d) => '{\\Virgo}', # VIRGO chr(0x264e) => '{\\Libra}', # LIBRA chr(0x264f) => '{\\Scorpio}', # SCORPIUS chr(0x2650) => '{\\Sagittarius}', # SAGITTARIUS chr(0x2651) => '{\\Capricorn}', # CAPRICORN chr(0x2652) => '{\\Aquarius}', # AQUARIUS chr(0x2653) => '{\\Pisces}', # PISCES chr(0x2660) => '\\ensuremath{\\spadesuit}', # BLACK SPADE SUIT (♠) chr(0x2663) => '\\ensuremath{\\clubsuit}', # BLACK CLUB SUIT (♣) chr(0x2665) => '\\ensuremath{\\heartsuit}', # BLACK HEART SUIT (♥) chr(0x2666) => '\\ensuremath{\\diamondsuit}', # BLACK DIAMOND SUIT (♦) chr(0x266d) => '\\ensuremath{\\flat}', # MUSIC FLAT SIGN chr(0x266e) => '\\ensuremath{\\natural}', # MUSIC NATURAL SIGN chr(0x266f) => '\\ensuremath{\\sharp}', # MUSIC SHARP SIGN chr(0x26ad) => '{\\textmarried}', # MARRIAGE SYMBOL chr(0x26ae) => '{\\textdivorced}', # DIVORCE SYMBOL # Supplemental Punctuation chr(0x2e18) => '{\\textinterrobangdown}', # INVERTED INTERROBANG chr(0x2e3a) => '---{}---', # unnamed character chr(0x2e3b) => '---{}---{}---', # unnamed character ); %provided_by = ( chr(0x0022) => 'textcomp', # QUOTATION MARK chr(0x003c) => 'textcomp', # LESS-THAN SIGN chr(0x003e) => 'textcomp', # GREATER-THAN SIGN chr(0x005c) => 'textcomp', # REVERSE SOLIDUS chr(0x007e) => 'textcomp', # TILDE chr(0x0e3f) => 'textcomp', # THAI CURRENCY SYMBOL BAHT chr(0x2016) => 'textcomp', # DOUBLE VERTICAL LINE chr(0x203b) => 'textcomp', # REFERENCE MARK chr(0x203d) => 'textcomp', # INTERROBANG chr(0x20a1) => 'textcomp', # COLON SIGN chr(0x20a4) => 'textcomp', # LIRA SIGN chr(0x20a6) => 'textcomp', # NAIRA SIGN chr(0x20a9) => 'textcomp', # WON SIGN chr(0x20ab) => 'textcomp', # DONG SIGN chr(0x2116) => 'textcomp', # NUMERO SIGN chr(0x2117) => 'textcomp', # SOUND RECORDING COPYRIGHT chr(0x211e) => 'textcomp', # PRESCRIPTION TAKE chr(0x2120) => 'textcomp', # SERVICE MARK chr(0x2126) => 'textcomp', # OHM SIGN chr(0x2127) => 'textcomp', # INVERTED OHM SIGN chr(0x212e) => 'textcomp', # ESTIMATED SYMBOL chr(0x263f) => 'marvosym', # MERCURY chr(0x2640) => 'marvosym', # FEMALE SIGN chr(0x2641) => 'marvosym', # EARTH chr(0x2642) => 'marvosym', # MALE SIGN chr(0x2643) => 'marvosym', # JUPITER chr(0x2644) => 'marvosym', # SATURN chr(0x2645) => 'marvosym', # URANUS chr(0x2646) => 'marvosym', # NEPTUNE chr(0x2647) => 'marvosym', # PLUTO chr(0x2648) => 'marvosym', # ARIES chr(0x2649) => 'marvosym', # TAURUS chr(0x264a) => 'marvosym', # GEMINI chr(0x264b) => 'marvosym', # CANCER chr(0x264c) => 'marvosym', # LEO chr(0x264d) => 'marvosym', # VIRGO chr(0x264e) => 'marvosym', # LIBRA chr(0x264f) => 'marvosym', # SCORPIUS chr(0x2650) => 'marvosym', # SAGITTARIUS chr(0x2651) => 'marvosym', # CAPRICORN chr(0x2652) => 'marvosym', # AQUARIUS chr(0x2653) => 'marvosym', # PISCES chr(0x26ad) => 'textcomp', # MARRIAGE SYMBOL chr(0x26ae) => 'textcomp', # DIVORCE SYMBOL chr(0x2e18) => 'textcomp', # INVERTED INTERROBANG ); reset_latex_encodings(1); sub _compile_encoding_regexp { $encoded_char_re = join q{}, sort keys %latex_encoding; $encoded_char_re =~ s{ ([#\[\]\\\$]) }{\\$1}gmsx; $encoded_char_re = eval "qr{[$encoded_char_re]}x"; return; } _compile_encoding_regexp; 1; __END__ =head1 NAME LaTeX::Encode - encode characters for LaTeX formatting =head1 SYNOPSIS use LaTeX::Encode ':all', add => { '@' => 'AT' }, remove => [ '$' ]; $latex_string = latex_encode($text, %options); %old_encodings = add_latex_encodings( chr(0x2002) => '\\hspace{.6em}' ); %old_encodings = remove_latex_encodings( '<', '>' ); reset_latex_encodings(1); =head1 VERSION This manual page describes version 0.091.5 of the C module. =head1 DESCRIPTION This module provides a function to encode text that is to be formatted with LaTeX. It encodes characters that are special to LaTeX or that are represented in LaTeX by LaTeX text-mode commands. The special characters are: C<\> (command character), C<{> (open group), C<}> (end group), C<&> (table column separator), C<#> (parameter specifier), C<%> (comment character), C<_> (subscript), C<^> (superscript), C<~> (non-breakable space), C<$> (mathematics mode). Note that some of the LaTeX commands for characters are defined in the LaTeX C package. If your text includes such characters, you will need to include the following lines in the preamble to your LaTeX document. \usepackage[T1]{fontenc} \usepackage{textcomp} The function is useful for encoding data that is interpolated into LaTeX document templates, say with C (shameless plug!). =head1 WARNING ABOUT UTF-8 DATA Note that C will encode a UTF8 string (a string with the UTF8 flag set) or a non-UTF8 string, which will normally be regarded as ISO-8859-1 (Latin 1) and will be upgraded to UTF8. The UTF8 flag indicates whether the contents of a string are regarded as a sequence of Unicode characters or as a string of bytes. Refer to the L, L and L manual pages for more details. If you are seeing spurious LaTeX commands in the output of C then it may be that you are reading from a UTF-8 input or have data with UTF-8 characters in a literal but the UTF8 flag is not being set correctly. The fact that your programs are dealing with UTF-8 characters on a byte-by-byte basis may not be apparent normally as the terminal may make no distinction and happily display the byte sequence in the program's output as the UTF-8 characters they represent, however in a Perl program that deals with individual characters, what happens is that the individual bytes that make up multi-byte characters are regarded as separate characters; if the strings are promoted to UTF8 strings then the individual bytes are converted separately to UTF8. This is termed double encoding. C will then map the double-encoded characters. If the input text is Western European text then what you are likely to see in the output from C is spurious sequences of C<{\^A}> or C<{\~A}> followed by the mapping of an apparently random character (or the right character if it is a symbol such as the Sterling POUND sign, i.e. "£" will map to C<{\^A}\textsterling>); this is because the initial byte of a two-byte UTF-8 character in the LATIN1 range will either be 0xC2 or 0xC3 and the next byte will always have the top two bits set to C<10> to indicate that it is a continuation byte. =head1 SUBROUTINES/METHODS =over 4 =item C Encodes the specified text such that it is suitable for processing with LaTeX. The behaviour of the filter is modified by the options: =over 4 =item C Lists the characters that should be excluded from encoding. By default no special characters are excluded, but it may be useful to specify C to allow the input string to contain LaTeX commands such as C<"this is \\textbf{bold} text"> (the doubled backslashes in the strings represent Perl escapes, and will be evaluated to single backslashes). =item C If true then single or double quotes around words will be changed to LaTeX single or double quotes; double quotes around a phrase will be converted to "``" and "''" and single quotes to "`" and "'". This is sometimes called "intelligent quotes" =item C If passed a reference to a hash C will update the hash with names of LaTeX packages that are required for typesetting the encoded string. =back =item C Adds a set of new or modified encodings. Returns a hash of any encodings that were modified. =item C Removes a set of encodings. Returns a hash of the removed encodings. =item C Resets the LaTeX encodings to the state that they were when the module was loaded (including any additions and removals specified on the 'use' statement), or to the standard set of encodings if C<$forget_import_specifiers> is true. =back =head1 EXAMPLES The following snippet shows how data from a database can be encoded and inserted into a LaTeX table, the source of which is generated with C. my $sth = $dbh->prepare('select col1, col2, col3 from table where $expr'); $sth->execute; while (my $href = $sth->fetchrow_hashref) { my @row; foreach my $col (qw(col1 col2 col3)) { push(@row, latex_encode($href->{$col})); } push @data, \@row; } my $headings = [ [ 'Col1', 'Col2', 'Col3' ] ]; my $table = LaTeX::Table->new( { caption => 'My caption', label => 'table:caption', type => 'xtab', header => $header, data => \@data } ); my $table_text = $table->generate_string; Now C<$table_text> can be interpolated into a LaTeX document template. =head1 DIAGNOSTICS None. You could probably break the C function by passing it an array reference as the options, but there are no checks for that. =head1 CONFIGURATION AND ENVIRONMENT Not applicable. =head1 DEPENDENCIES The C and C modules were used for building the encoding table but this is not rebuilt at installation time. The C module is used for formatting the character encodings reference document. =head1 INCOMPATIBILITIES None known. =head1 BUGS AND LIMITATIONS Not all LaTeX special characters are included in the encoding tables (more may be added when I track down the definitions). =head1 AUTHOR Andrew Ford Ea.ford@ford-mason.co.ukE =head1 LICENSE AND COPYRIGHT Copyright (C) 2007-2012 Andrew Ford. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =head1 SEE ALSO L L L L =cut # Local Variables: # mode: perl # perl-indent-level: 4 # indent-tabs-mode: nil # End: # # vim: expandtab shiftwidth=4: LaTeX-Encode-0.091.6/Makefile.PL0000644000175000017500000000264312404070377015024 0ustar chrischris# $Id: Makefile.PL 30 2012-09-25 20:24:40Z andrew $ use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'LaTeX::Encode', AUTHOR => 'Chris Travers ', VERSION_FROM => 'lib/LaTeX/Encode.pm', ABSTRACT_FROM => 'lib/LaTeX/Encode.pm', PL_FILES => {}, EXE_FILES => [ 'scripts/latex-encode' ], ($ExtUtils::MakeMaker::VERSION >= 6.3002 ? ('LICENSE'=> 'perl') : ()), PREREQ_PM => { 'Getopt::Long' => 0, 'HTML::Entities' => 0, 'Pod::LaTeX' => 0, 'Pod::Usage' => 0, 'Readonly' => 0, }, BUILD_REQUIRES => { 'Test::More' => 0, 'Carp::Always' => 0, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'LaTeX-Encode-*' }, META_MERGE => { 'meta-spec' => { version => 2 }, resources => { repository => { type => 'git', url => 'https://github.com/einhverfr/LaTeX-Encode.git', web => 'https://github.com/einhverfr/LaTeX-Encode', }, }, }, ); no warnings 'redefine'; sub MY::postamble { return q{ lib/LaTeX/Encode/EncodingTable.pm: scripts/build-encoding-table scripts/build-encoding-table >lib/LaTeX/Encode/EncodingTable.pm }; } LaTeX-Encode-0.091.6/scripts/0000755000175000017500000000000012404070431014523 5ustar chrischrisLaTeX-Encode-0.091.6/scripts/README0000644000175000017500000000157212302613176015416 0ustar chrischrisThis "scripts" directory contains a couple of scripts that are not intended for installation. The "build-character-table" script probes the tables of HTML entities to UTF-8 characters (%entity2char) in HTML::Entities and the table of HTML entities to LaTeX encodings in Pod::LaTeX. From that information and some local overrides it builds a UTF-8 character to LaTeX representation, which it prints out as a version of the LaTeX::Encode::EncodingTable module, which I use to compare against the current version in "../lib". I incorporate any changes that I notice. The "format-encoding-reference" script probes the encoding table and creates a LaTeX document (with the help of LaTeX::Table) and formats it with LaTeX::Driver to create a dvi document that shows all the characters that are encoded with their Unicode values in hex, their LaTeX encoding and their formatted representation.LaTeX-Encode-0.091.6/scripts/build-encoding-table0000755000175000017500000005535212302613176020441 0ustar chrischris#!/usr/bin/perl # Script to build the LaTeX::Encode::EncodingTable module # This script is not meant to be installed. # $Id: build-encoding-table 30 2012-09-25 20:24:40Z andrew $ use strict; use warnings; use charnames qw(); use HTML::Entities qw(%char2entity); use Pod::LaTeX; our $revision = '$Revision: 30 $'; $revision =~ s/.*?(\d+).*/$1/; # Map of character code to encoding that is built up, before being output. It is # initialized with mapping of characters for which we specify explicit encodings my %char_encoding = ( # LaTeX special characters '\\' => { 'textcomp' => '\\textbackslash' }, # command character '{' => '\\{', # begin group '}' => '\\}', # end group '%' => '\\%', # comment '#' => '\\#', # command parameter '$' => '\\$', # introduces math mode '_' => '\\_', # subscript '^' => '\\^{ }', # superscript '&' => '\\&', # tabbing character '~' => { 'textcomp' => '\\texttildelow' }, # non-breaking space # Characters that are not set as themselves '"' => { 'textcomp' => '\\textacutedbl' }, '<' => { 'textcomp' => '\\textlangle' }, '>' => { 'textcomp' => '\\textrangle' }, # Other characters with explicit encodings chr(0x00b8) => '{\\c{~}}', chr(0x0131) => '{\\i}', chr(0x0e3f) => { 'textcomp' => '\\textbaht' }, # Cyrillic characters # chr(0x0401) => '\\cyrchar\\CYRYO{}', # chr(0x0402) => '\\cyrchar\\CYRDJE{}', # chr(0x0403) => "\\cyrchar{\\'\\CYRG}", # chr(0x0404) => '\\cyrchar\\CYRIE{}', # chr(0x0405) => '\\cyrchar\\CYRDZE{}', # chr(0x0406) => '\\cyrchar\\CYRII{}', # chr(0x0407) => '\\cyrchar\\CYRYI{}', # chr(0x0408) => '\\cyrchar\\CYRJE{}', # chr(0x0409) => '\\cyrchar\\CYRLJE{}', # chr(0x040A) => '\\cyrchar\\CYRNJE{}', # chr(0x040B) => '\\cyrchar\\CYRTSHE{}', # chr(0x040C) => "\\cyrchar{\\'\\CYRK}", # chr(0x040E) => '\\cyrchar\\CYRUSHRT{}', # chr(0x040F) => '\\cyrchar\\CYRDZHE{}', # chr(0x0410) => '\\cyrchar\\CYRA{}', # chr(0x0411) => '\\cyrchar\\CYRB{}', # chr(0x0412) => '\\cyrchar\\CYRV{}', # chr(0x0413) => '\\cyrchar\\CYRG{}', # chr(0x0414) => '\\cyrchar\\CYRD{}', # chr(0x0415) => '\\cyrchar\\CYRE{}', # chr(0x0416) => '\\cyrchar\\CYRZH{}', # chr(0x0417) => '\\cyrchar\\CYRZ{}', # chr(0x0418) => '\\cyrchar\\CYRI{}', # chr(0x0419) => '\\cyrchar\\CYRISHRT{}', # chr(0x041A) => '\\cyrchar\\CYRK{}', # chr(0x041B) => '\\cyrchar\\CYRL{}', # chr(0x041C) => '\\cyrchar\\CYRM{}', # chr(0x041D) => '\\cyrchar\\CYRN{}', # chr(0x041E) => '\\cyrchar\\CYRO{}', # chr(0x041F) => '\\cyrchar\\CYRP{}', # chr(0x0420) => '\\cyrchar\\CYRR{}', # chr(0x0421) => '\\cyrchar\\CYRS{}', # chr(0x0422) => '\\cyrchar\\CYRT{}', # chr(0x0423) => '\\cyrchar\\CYRU{}', # chr(0x0424) => '\\cyrchar\\CYRF{}', # chr(0x0425) => '\\cyrchar\\CYRH{}', # chr(0x0426) => '\\cyrchar\\CYRC{}', # chr(0x0427) => '\\cyrchar\\CYRCH{}', # chr(0x0428) => '\\cyrchar\\CYRSH{}', # chr(0x0429) => '\\cyrchar\\CYRSHCH{}', # chr(0x042A) => '\\cyrchar\\CYRHRDSN{}', # chr(0x042B) => '\\cyrchar\\CYRERY{}', # chr(0x042C) => '\\cyrchar\\CYRSFTSN{}', # chr(0x042D) => '\\cyrchar\\CYREREV{}', # chr(0x042E) => '\\cyrchar\\CYRYU{}', # chr(0x042F) => '\\cyrchar\\CYRYA{}', # chr(0x0430) => '\\cyrchar\\cyra{}', # chr(0x0431) => '\\cyrchar\\cyrb{}', # chr(0x0432) => '\\cyrchar\\cyrv{}', # chr(0x0433) => '\\cyrchar\\cyrg{}', # chr(0x0434) => '\\cyrchar\\cyrd{}', # chr(0x0435) => '\\cyrchar\\cyre{}', # chr(0x0436) => '\\cyrchar\\cyrzh{}', # chr(0x0437) => '\\cyrchar\\cyrz{}', # chr(0x0438) => '\\cyrchar\\cyri{}', # chr(0x0439) => '\\cyrchar\\cyrishrt{}', # chr(0x043A) => '\\cyrchar\\cyrk{}', # chr(0x043B) => '\\cyrchar\\cyrl{}', # chr(0x043C) => '\\cyrchar\\cyrm{}', # chr(0x043D) => '\\cyrchar\\cyrn{}', # chr(0x043E) => '\\cyrchar\\cyro{}', # chr(0x043F) => '\\cyrchar\\cyrp{}', # chr(0x0440) => '\\cyrchar\\cyrr{}', # chr(0x0441) => '\\cyrchar\\cyrs{}', # chr(0x0442) => '\\cyrchar\\cyrt{}', # chr(0x0443) => '\\cyrchar\\cyru{}', # chr(0x0444) => '\\cyrchar\\cyrf{}', # chr(0x0445) => '\\cyrchar\\cyrh{}', # chr(0x0446) => '\\cyrchar\\cyrc{}', # chr(0x0447) => '\\cyrchar\\cyrch{}', # chr(0x0448) => '\\cyrchar\\cyrsh{}', # chr(0x0449) => '\\cyrchar\\cyrshch{}', # chr(0x044A) => '\\cyrchar\\cyrhrdsn{}', # chr(0x044B) => '\\cyrchar\\cyrery{}', # chr(0x044C) => '\\cyrchar\\cyrsftsn{}', # chr(0x044D) => '\\cyrchar\\cyrerev{}', # chr(0x044E) => '\\cyrchar\\cyryu{}', # chr(0x044F) => '\\cyrchar\\cyrya{}', # chr(0x0451) => '\\cyrchar\\cyryo{}', # chr(0x0452) => '\\cyrchar\\cyrdje{}', # chr(0x0453) => "\\cyrchar{\\'\\cyrg}", # chr(0x0454) => '\\cyrchar\\cyrie{}', # chr(0x0455) => '\\cyrchar\\cyrdze{}', # chr(0x0456) => '\\cyrchar\\cyrii{}', # chr(0x0457) => '\\cyrchar\\cyryi{}', # chr(0x0458) => '\\cyrchar\\cyrje{}', # chr(0x0459) => '\\cyrchar\\cyrlje{}', # chr(0x045A) => '\\cyrchar\\cyrnje{}', # chr(0x045B) => '\\cyrchar\\cyrtshe{}', # chr(0x045C) => "\\cyrchar{\\'\\cyrk}", # chr(0x045E) => '\\cyrchar\\cyrushrt{}', # chr(0x045F) => '\\cyrchar\\cyrdzhe{}', # chr(0x0460) => '\\cyrchar\\CYROMEGA{}', # chr(0x0461) => '\\cyrchar\\cyromega{}', # chr(0x0462) => '\\cyrchar\\CYRYAT{}', # chr(0x0464) => '\\cyrchar\\CYRIOTE{}', # chr(0x0465) => '\\cyrchar\\cyriote{}', # chr(0x0466) => '\\cyrchar\\CYRLYUS{}', # chr(0x0467) => '\\cyrchar\\cyrlyus{}', # chr(0x0468) => '\\cyrchar\\CYRIOTLYUS{}', # chr(0x0469) => '\\cyrchar\\cyriotlyus{}', # chr(0x046A) => '\\cyrchar\\CYRBYUS{}', # chr(0x046C) => '\\cyrchar\\CYRIOTBYUS{}', # chr(0x046D) => '\\cyrchar\\cyriotbyus{}', # chr(0x046E) => '\\cyrchar\\CYRKSI{}', # chr(0x046F) => '\\cyrchar\\cyrksi{}', # chr(0x0470) => '\\cyrchar\\CYRPSI{}', # chr(0x0471) => '\\cyrchar\\cyrpsi{}', # chr(0x0472) => '\\cyrchar\\CYRFITA{}', # chr(0x0474) => '\\cyrchar\\CYRIZH{}', # chr(0x0478) => '\\cyrchar\\CYRUK{}', # chr(0x0479) => '\\cyrchar\\cyruk{}', # chr(0x047A) => '\\cyrchar\\CYROMEGARND{}', # chr(0x047B) => '\\cyrchar\\cyromegarnd{}', # chr(0x047C) => '\\cyrchar\\CYROMEGATITLO{}', # chr(0x047D) => '\\cyrchar\\cyromegatitlo{}', # chr(0x047E) => '\\cyrchar\\CYROT{}', # chr(0x047F) => '\\cyrchar\\cyrot{}', # chr(0x0480) => '\\cyrchar\\CYRKOPPA{}', # chr(0x0481) => '\\cyrchar\\cyrkoppa{}', # chr(0x0482) => '\\cyrchar\\cyrthousands{}', # chr(0x0488) => '\\cyrchar\\cyrhundredthousands{}', # chr(0x0489) => '\\cyrchar\\cyrmillions{}', # chr(0x048C) => '\\cyrchar\\CYRSEMISFTSN{}', # chr(0x048D) => '\\cyrchar\\cyrsemisftsn{}', # chr(0x048E) => '\\cyrchar\\CYRRTICK{}', # chr(0x048F) => '\\cyrchar\\cyrrtick{}', # chr(0x0490) => '\\cyrchar\\CYRGUP{}', # chr(0x0491) => '\\cyrchar\\cyrgup{}', # chr(0x0492) => '\\cyrchar\\CYRGHCRS{}', # chr(0x0493) => '\\cyrchar\\cyrghcrs{}', # chr(0x0494) => '\\cyrchar\\CYRGHK{}', # chr(0x0495) => '\\cyrchar\\cyrghk{}', # chr(0x0496) => '\\cyrchar\\CYRZHDSC{}', # chr(0x0497) => '\\cyrchar\\cyrzhdsc{}', # chr(0x0498) => '\\cyrchar\\CYRZDSC{}', # chr(0x0499) => '\\cyrchar\\cyrzdsc{}', # chr(0x049A) => '\\cyrchar\\CYRKDSC{}', # chr(0x049B) => '\\cyrchar\\cyrkdsc{}', # chr(0x049C) => '\\cyrchar\\CYRKVCRS{}', # chr(0x049D) => '\\cyrchar\\cyrkvcrs{}', # chr(0x049E) => '\\cyrchar\\CYRKHCRS{}', # chr(0x049F) => '\\cyrchar\\cyrkhcrs{}', # chr(0x04A0) => '\\cyrchar\\CYRKBEAK{}', # chr(0x04A1) => '\\cyrchar\\cyrkbeak{}', # chr(0x04A2) => '\\cyrchar\\CYRNDSC{}', # chr(0x04A3) => '\\cyrchar\\cyrndsc{}', # chr(0x04A4) => '\\cyrchar\\CYRNG{}', # chr(0x04A5) => '\\cyrchar\\cyrng{}', # chr(0x04A6) => '\\cyrchar\\CYRPHK{}', # chr(0x04A7) => '\\cyrchar\\cyrphk{}', # chr(0x04A8) => '\\cyrchar\\CYRABHHA{}', # chr(0x04A9) => '\\cyrchar\\cyrabhha{}', # chr(0x04AA) => '\\cyrchar\\CYRSDSC{}', # chr(0x04AB) => '\\cyrchar\\cyrsdsc{}', # chr(0x04AC) => '\\cyrchar\\CYRTDSC{}', # chr(0x04AD) => '\\cyrchar\\cyrtdsc{}', # chr(0x04AE) => '\\cyrchar\\CYRY{}', # chr(0x04AF) => '\\cyrchar\\cyry{}', # chr(0x04B0) => '\\cyrchar\\CYRYHCRS{}', # chr(0x04B1) => '\\cyrchar\\cyryhcrs{}', # chr(0x04B2) => '\\cyrchar\\CYRHDSC{}', # chr(0x04B3) => '\\cyrchar\\cyrhdsc{}', # chr(0x04B4) => '\\cyrchar\\CYRTETSE{}', # chr(0x04B5) => '\\cyrchar\\cyrtetse{}', # chr(0x04B6) => '\\cyrchar\\CYRCHRDSC{}', # chr(0x04B7) => '\\cyrchar\\cyrchrdsc{}', # chr(0x04B8) => '\\cyrchar\\CYRCHVCRS{}', # chr(0x04B9) => '\\cyrchar\\cyrchvcrs{}', # chr(0x04BA) => '\\cyrchar\\CYRSHHA{}', # chr(0x04BB) => '\\cyrchar\\cyrshha{}', # chr(0x04BC) => '\\cyrchar\\CYRABHCH{}', # chr(0x04BD) => '\\cyrchar\\cyrabhch{}', # chr(0x04BE) => '\\cyrchar\\CYRABHCHDSC{}', # chr(0x04BF) => '\\cyrchar\\cyrabhchdsc{}', # chr(0x04C0) => '\\cyrchar\\CYRpalochka{}', # chr(0x04C3) => '\\cyrchar\\CYRKHK{}', # chr(0x04C4) => '\\cyrchar\\cyrkhk{}', # chr(0x04C7) => '\\cyrchar\\CYRNHK{}', # chr(0x04C8) => '\\cyrchar\\cyrnhk{}', # chr(0x04CB) => '\\cyrchar\\CYRCHLDSC{}', # chr(0x04CC) => '\\cyrchar\\cyrchldsc{}', # chr(0x04D4) => '\\cyrchar\\CYRAE{}', # chr(0x04D5) => '\\cyrchar\\cyrae{}', # chr(0x04D8) => '\\cyrchar\\CYRSCHWA{}', # chr(0x04D9) => '\\cyrchar\\cyrschwa{}', # chr(0x04E0) => '\\cyrchar\\CYRABHDZE{}', # chr(0x04E1) => '\\cyrchar\\cyrabhdze{}', # chr(0x04E8) => '\\cyrchar\\CYROTLD{}', # chr(0x04E9) => '\\cyrchar\\cyrotld{}', chr(0x2002) => '\\phantom{N}', chr(0x2004) => '\\hspace{.333333em}', chr(0x2005) => '\\hspace{.25em}', chr(0x2006) => '\\hspace{.166666em}', chr(0x2007) => '\\phantom{0}', chr(0x2008) => '\\phantom{,}', chr(0x200a) => '\\ensuremath{\\mkern1mu}', chr(0x2015) => '\\rule{1em}{1pt}', chr(0x2016) => { 'textcomp' => '\\textbardbl' }, chr(0x203b) => { 'textcomp' => '\\textreferencemark' }, chr(0x203d) => { 'textcomp' => '\\textinterrobang' }, chr(0x20a1) => { 'textcomp' => '\\textcolonmonetary' }, chr(0x20a4) => { 'textcomp' => '\\textlira' }, chr(0x20a6) => { 'textcomp' => '\\textnaira' }, chr(0x20a9) => { 'textcomp' => '\\textwon' }, chr(0x20ab) => { 'textcomp' => '\\textdong' }, chr(0x2116) => { 'textcomp' => '\\textnumero' }, chr(0x2117) => { 'textcomp' => '\\textcircledP' }, chr(0x211e) => { 'textcomp' => '\\textrecipe' }, chr(0x2120) => { 'textcomp' => '\\textservicemark' }, chr(0x212e) => { 'textcomp' => '\\textestimated' }, chr(0x2126) => { 'textcomp' => '\\textohm' }, chr(0x2127) => { 'textcomp' => '\\textmho' }, # Astrological symbols chr(0x263f) => { 'marvosym' => '\\Mercury' }, chr(0x2640) => { 'marvosym' => '\\Venus' }, chr(0x2641) => { 'marvosym' => '\\Earth' }, chr(0x2642) => { 'marvosym' => '\\Mars' }, chr(0x2643) => { 'marvosym' => '\\Jupiter' }, chr(0x2644) => { 'marvosym' => '\\Saturn' }, chr(0x2645) => { 'marvosym' => '\\Uranus' }, chr(0x2646) => { 'marvosym' => '\\Neptune' }, chr(0x2647) => { 'marvosym' => '\\Pluto' }, # Zodiacal symbols chr(0x2648) => { 'marvosym' => '\\Aries' }, chr(0x2649) => { 'marvosym' => '\\Taurus' }, chr(0x264a) => { 'marvosym' => '\\Gemini' }, chr(0x264b) => { 'marvosym' => '\\Cancer' }, chr(0x264c) => { 'marvosym' => '\\Leo' }, chr(0x264d) => { 'marvosym' => '\\Virgo' }, chr(0x264e) => { 'marvosym' => '\\Libra' }, chr(0x264f) => { 'marvosym' => '\\Scorpio' }, chr(0x2650) => { 'marvosym' => '\\Sagittarius' }, chr(0x2651) => { 'marvosym' => '\\Capricorn' }, chr(0x2652) => { 'marvosym' => '\\Aquarius' }, chr(0x2653) => { 'marvosym' => '\\Pisces' }, chr(0x266d) => '\\ensuremath{\\flat}', chr(0x266e) => '\\ensuremath{\\natural}', chr(0x266f) => '\\ensuremath{\\sharp}', chr(0x26ad) => { 'textcomp' => '\\textmarried' }, chr(0x26ae) => { 'textcomp' => '\\textdivorced' }, chr(0x2e18) => { 'textcomp' => '\\textinterrobangdown' }, chr(0x2e3a) => '---{}---', chr(0x2e3b) => '---{}---{}---', ); my %provided_by; # Formats for building accented characters # See http://en.wikibooks.org/wiki/LaTeX/Accents my %accent_format = ( ACUTE => '\\\'{%s}', BREVE => '\\u{%s}', CARON => '\\v{%s}', CEDILLA => '\\c{%s}', CIRCUMFLEX => '\\^{%s}', 'DOT ABOVE' => '\\.{%s}', 'DOT BELOW' => '\\d{%s}', GRAVE => '\\`{%s}', 'LINE BELOW' => '\\b{%s}', MACRON => '\\={%s}', OGONEK => '\\k{%s}', 'RING ABOVE' => '\\r{%s}', TILDE => '\\~{%s}', DIARESIS => '\\"{%s}', ); # Comments to intersperse in the encodign table my %comments = ( 0x00a0 => 'C1 Controls and Latin-1 Supplement', 0x0100 => 'Latin Extended-A', 0x0200 => 'Spacing Modifier Letters', 0x0390 => 'Greek and Coptic', # 0x0400 => 'Cyrillic characters', 0x1e00 => 'Latin Extended Additional', 0x2000 => 'General Punctuation', 0x2100 => 'Letterlike Symbols', 0x20a0 => 'Currency Symbols', 0x2200 => 'Mathematical Operations', 0x2600 => 'Miscellaneous Symbols', 0x2e00 => 'Supplemental Punctuation', ); gather_pod_latex_encodings(); generate_accented_char_encodings(); my $module_text = module_text(); my $encoding_table = encoding_table(); my $provided_by_map = provided_by_map(); my $date = `date`; $module_text =~ s/<>/$revision/g; $module_text =~ s/<>/$encoding_table/g; $module_text =~ s/<>/$provided_by_map/g; print $module_text; exit(0); # Gather the encodings defined in Pod::LaTeX sub gather_pod_latex_encodings { foreach my $char (sort keys %char2entity) { next if exists $char_encoding{$char}; my $charcode = ord $char; my $html_enc = $char2entity{$char}; (my $html_name = $html_enc) =~ s/^&(.*);$/$1/; my $latex_enc = $Pod::LaTeX::HTML_Escapes{$html_name}; if (!defined($latex_enc)) { # printf(STDERR "ignoring character 0x%x%s - no known encoding\n", # ord($char), (ord($char) >= 0x20 && ord($char) < 256) ? " '$char'" : ""); next; } if ($char eq $latex_enc) { printf(STDERR "ignoring character 0x%x%s - encoding equals character\n", ord($char), (ord($char) >= 0x20 && ord($char) < 256) ? " '$char'" : ""); next; } $latex_enc =~ s/\$(.*)\$/\\ensuremath{$1}/; $char_encoding{$char} = $latex_enc; } return; } # Generate encodings for recognized accented characters sub generate_accented_char_encodings { foreach my $charcode (0x0100 .. 0x0200, 0x1e00 .. 0x1eff) { my $char = chr($charcode); next if exists $char_encoding{$char}; my $charname = charnames::viacode($charcode); if ($charname =~ /^LATIN (CAPITAL|SMALL) LETTER ([A-Z]) WITH ([\w ]+)$/) { my ($case, $letter, $accent) = ($1, $2, $3); next unless exists $accent_format{$accent}; if ( $case eq 'SMALL' and $letter =~ /[ij]/i and $accent =~ /TILDE|MACRON|BREVE|CIRCUMFLEX/) { $letter = "\\$letter"; } $char_encoding{$char} = sprintf($accent_format{$accent}, $case eq 'SMALL' ? lc $letter : $letter); } } return; } # Output the encoding table sub encoding_table { my $string = ''; foreach my $char (sort { $a cmp $b } keys %char_encoding) { my $charcode = ord $char; my $latex_enc = $char_encoding{$char}; my $html_enc = $char2entity{$char}; if (my $comment = comment_for_code($charcode)) { $string .= "\n # $comment\n\n"; } if ( ref $latex_enc ) { my $real_enc; foreach my $package (sort keys %$latex_enc) { $real_enc = $provided_by{$char}{$package} = $latex_enc->{$package};; } $latex_enc = $real_enc; } # Make sure that characters are properly escaped for inclusion in # a Perl single-quoted string $latex_enc =~ s{\\}{\\\\}g; $latex_enc =~ s{'}{\\'}g; $latex_enc =~ s/^(\\.*[a-z])(?:\{\})?$/{$1}/i; # Format a line of the encoding table, including the Unicode character name and the # HTML entity name (if one exists) as the comment for the entry. my $line = sprintf(" %-11s => %-30s # %-44s%s", sprintf("chr(0x%04x)", $charcode), sprintf("'%s',", $latex_enc || ''), charnames::viacode($charcode) || 'unnamed character', $html_enc ? " ($html_enc)" : ''); $line =~ s/\s*$//; $string .= "$line\n"; } return $string; } sub provided_by_map { my $string = ''; foreach my $char (sort keys %provided_by) { my $charcode = ord $char; my ($module) = (sort keys %{$provided_by{$char}}); $string .= sprintf(" chr(0x%04x) => '%s', # %s\n", $charcode, $module, charnames::viacode($charcode)); } return $string; } sub module_text { my $string = join q{}, (); $string =~ s/^# ?//msg; return $string; } sub comment_for_code { my ($code) = @_; foreach my $key (sort keys %comments) { return delete $comments{$key} if $code >= $key; } return; } =head1 NAME build-character-table =head1 SYNOPSIS =head1 DESCRIPTION This is a script to rebuild the C module. =head1 AUTHOR Andrew Ford Ea.ford@ford-mason.co.ukE =head1 COPYRIGHT AND LICENSE Copyright (C) 2007 Andrew Ford. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut __DATA__ # # LaTeX::Encode character encoding table # # Note: this module was automatically generated # # by build-encoding-table (version <>) # # package LaTeX::Encode::EncodingTable; # # use strict; # use warnings; # # our @ISA = qw(Exporter); # # our @EXPORT = qw(%latex_encoding $encoded_char_re %provided_by); # # our $encoded_char_re; # # our %latex_encoding = ( # # <> # ); # # our %provided_by = ( # # <> # ); # # sub _compile_encoding_regexp { # $encoded_char_re = join q{}, sort keys %latex_encoding; # $encoded_char_re =~ s{ ([#$\[\]\\]) }{\\$1}gmsx; # $encoded_char_re = eval "qr{[$encoded_char_re]}x"; # return; # } # # _compile_encoding_regexp(); # # # 1; # # __END__ # # =head1 NAME # # LaTeX::Encode::EncodingTable - character encoding table for LaTeX::Encode # # =head1 SYNOPSIS # # This module is not intended to be used except by LaTeX::Encode. # # =head1 VERSION # # This manual page describes version <> of the # C module. # # =head1 DESCRIPTION # # This module contains the C<%latex_encoding> table, which is used in # the C module in the C function. The # table is automatically generated by the C script # from the C distribution, which builds tables based on # information in the C, C and C # modules, as well as using explicit rules. # # =head1 SUBROUTINES/METHODS # # Not applicable. # # =head1 DIAGNOSTICS # # Not applicable. # # =head1 CONFIGURATION AND ENVIRONMENT # # Not applicable. # # =head1 DEPENDENCIES # # The C and C modules were used for building # the encoding table in C, but this is not # rebuilt at installation time. # # # =head1 INCOMPATIBILITIES # # Not applicable. # # =head1 BUGS AND LIMITATIONS # # Not all LaTeX special characters are included in the encoding tables # (more may be added when I track down the definitions). # # =head1 AUTHOR # # Andrew Ford Ea.ford@ford-mason.co.ukE # # =head1 LICENSE AND COPYRIGHT # # Copyright (C) 2007-2012 Andrew Ford. All Rights Reserved. # # This module is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # =head1 SEE ALSO # # L, L # # =cut # ## Local Variables: ## mode: perl ## perl-indent-level: 4 ## indent-tabs-mode: nil ## End: ## ## vim: expandtab shiftwidth=4: LaTeX-Encode-0.091.6/scripts/format-encoding-reference0000755000175000017500000000403212302613176021466 0ustar chrischris#!/usr/bin/perl # Script to generate and format a references document giving the # characters that are encoded. use strict; use warnings; use blib; use charnames qw(); use LaTeX::Encode; use LaTeX::Encode::EncodingTable; use LaTeX::Table; use LaTeX::Driver; use File::Slurp; use HTML::Entities qw(%char2entity); my $basename = './character-encodings'; # Create the table of encoded characters using LaTeX::Table my $header = [ [ 'Code', 'Char', 'Entity', 'Encoding', 'Name' ] ]; my $data = []; foreach my $char (sort keys %latex_encoding) { my $charcode = ord $char; my $entity = $char2entity{$char}; my $charname = charnames::viacode($charcode); push(@$data, [ sprintf("0x%x", $charcode), latex_encode($char), sprintf("\\texttt{%s}", latex_encode($entity)), sprintf("\\texttt{%s}", latex_encode(latex_encode($char))), "\\small $charname" ]); } my $table = LaTeX::Table->new( { caption => 'Characters', label => 'table:charencodings', type => 'xtab', header => $header, data => $data } ); $table = $table->generate_string; # Read the template from the DATA section and create the source document my $doc = join("", ()); $doc =~ s/\[\* table \*\]/$table/; write_file("${basename}.tex", \$doc); # Format the document with LaTeX::Driver my $drv = LaTeX::Driver->new(source => $basename . ".tex", output => $basename . ".dvi", format => 'dvi', tmpdir => 1, DEBUG => 1, DEBUGPREFIX => '#latex: ', ); $drv->run; exit(0); __END__ % [% TAGS star %] \documentclass[a4paper,10pt]{article} \usepackage[textwidth=180mm,textheight=250mm]{geometry} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage{booktabs} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{xtab} \title{Characters encoded by \texttt{LaTeX::Encode}} \author{automatically generated} \begin{document} \maketitle [* table *] \end{document} LaTeX-Encode-0.091.6/scripts/character-encodings.dvi0000644000175000017500000011013012302613176021134 0ustar chrischris; TeX output 2012.08.26:1849S;W 덠ՍVQUsGGecrm1728CharactershencosdedbyyN9>GGectt1728LaTeX::Encode ecrm1200automaticallylgeneratedvVXAugustl26,2012. hB8 * 1 ecrm1000CoGde(~CharJ/Entity,hEncoGding%Name[ 20x22(~,9 tcrm1000׀J/-qL ectt1000",h{\textacutedbl}%عQUOT*ATIONU MARK 0x23(~#J/#,h\#%عNUMBERU SIGN0x24(~$J/$,h\$%عDOLLARU SIGN0x25(~%J/%,h\%%عPERCENTU SIGN0x26(~&J/&,h\&%عAMPERSAND0x3c(~J/>,h{\textrangle}%عGREA*TER-THANU SIGN0x5c(~\J/\,h{\textbackslash}%عREVERSEU SOLIDUS0x5e(~J/^,h\{?}%عCIRCUMFLEXU ACCENT0x5f(~_J/_,h\_%عLOWU LINE0x7b(~{J/{,h\{%عLEFTU CURL*YBRACKET0x7d(~}J/},h\}%عRIGHTU CURL*YBRACKET0x7e(~~J/~,h{\texttildelow}%عTILDE0xa0J/ ,h.e| tctt1000~%عNO-BREAKU SP*ACE0xa1(~J/¡,h{\textexclamdown}%عINVER*TEDU EXCLAMATIONMARK0xa2(~׀J/¢,h{\textcent}%عCENTU SIGN0xa3(~J/£,h{\textsterling}%عPOUNDU SIGN0xa4(~׀J/¤,h{\textcurrency}%عCURRENCYU SIGN0xa5(~׀J/¥,h{\textyen}%عYENU SIGN0xa6(~׀J/¦,h{\textbrokenbar}%عBROKENU BAR0xa7(~J/§,h{\textsection}%عSECTIONU SIGN0xa8(~׀J/¨,h{\textasciidieresis}%عDIAERESIS0xa9(~׀J/©,h{\textcopyright}%عCOPYRIGHTU SIGN0xaa(~׀J/ª,h{\textordfeminine}%عFEMININEU ORDINALINDICA*TOR0xab(~J/«,h{\guillemotleft}%عLEFT-POINTINGU DOUBLEANGLEQUOT*ATIONU MARK0xac(~׀J/¬,h{\textlnot}%عNOTU SIGN0xadJ/­,h\-%عSOFTU HYPHEN0xae(~׀J/®,h{\textregistered}%عREGISTEREDU SIGN 2ContinuedU onnextpage#掎 1*S;W 덠"hȉ쒟 *CoGde(~CharJ/Entity,hEncoGdingeName[쒟 20xaf(~׀J/¯,h{\textasciimacron}eMACRON 0xb0(~׀J/°,h{\textdegree}eDEGREEU SIGN0xb1(~׀J/±,h{\textpm}ePLUS-MINUSU SIGN0xb2(~׀J/²,h{\texttwosuperior}eSUPERSCRIPTU TWO0xb3(~׀J/³,h{\textthreesuperior}eSUPERSCRIPTU THREE0xb4(~׀J/´,h{\textasciiacute}eACUTEU ACCENT0xb5(~׀J/µ,h{\textmu}eMICROU SIGN0xb6(~׀J/¶,h{\textparagraph}ePILCROWU SIGN0xb7(~׀J/·,h{\textperiodcentered}eMIDDLEU DOT0xb8'j J/¸,h{\c{?}}eCEDILLA0xb9(~׀J/¹,h{\textonesuperior}eSUPERSCRIPTU ONE0xba(~׀J/º,h{\textordmasculine}eMASCULINEU ORDINALINDICA*TOR0xbb(~J/»,h{\guillemotright}eRIGHT-POINTINGU DOUBLEANGLEQUOT*ATIONU MARK0xbGc(~׀J/¼,h{\textonequarter}eVULGARU FRACTIONONEQUAR*TER0xbGd(~׀J/½,h{\textonehalf}eVULGARU FRACTIONONEHALF0xbGe(~׀J/¾,h{\textthreequarters}eVULGARU FRACTIONTHREEQUAR*TERS0xbf(~J/¿,h{\textquestiondown}eINVER*TEDU QUESTIONMARK )0xc0(~J/À,h{\`A}eLA*TINU CAPITALLETTERAWITHGRAVE0xc1(~J/Á,h{\'A}eLA*TINU CAPITALLETTERAWITHACUTE 0xc2(~ŽJ/Â,h{\A}eLA*TINU CAPITALLETTERAWITHCIRCUMFLEX0xc3(~ÎJ/Ã,h{\~A}eLA*TINU CAPITALLETTERAWITHTILDE0xc4(~ĎJ/Ä,h{\ـA}eLA*TINU CAPITALLETTERAWITHDIAERESIS )0xc5(~ŎJ/Å,h{\AA}eLA*TINU CAPITALLETTERAWITHRINGABOVE 0xc6(~ƎJ/Æ,h{\AE}eLA*TINU CAPITALLETTERAE0xc7(~ǎJ/Ç,h\c{C}eLA*TINU CAPITALLETTERCWITHCEDILLA0xc8(~ȎJ/È,h{\`E}eLA*TINU CAPITALLETTEREWITHGRAVE0xc9(~ɎJ/É,h{\'E}eLA*TINU CAPITALLETTEREWITHACUTE 0xca(~ʎJ/Ê,h{\E}eLA*TINU CAPITALLETTEREWITHCIRCUMFLEX0xcb(~ˎJ/Ë,h{\ـE}eLA*TINU CAPITALLETTEREWITHDIAERESIS0xcc(~̎J/Ì,h{\`I}eLA*TINU CAPITALLETTERIWITHGRAVE0xcd(~͎J/Í,h{\'I}eLA*TINU CAPITALLETTERIWITHACUTE0xce(~ΎJ/Î,h{\I}eLA*TINU CAPITALLETTERIWITHCIRCUMFLEX0xcf(~ώJ/Ï,h{\ـI}eLA*TINU CAPITALLETTERIWITHDIAERESIS 0xd0(~ЎJ/Ð,h{\DH}eLA*TINU CAPITALLETTERETH0xd1(~юJ/Ñ,h{\~N}eLA*TINU CAPITALLETTERNWITHTILDE0xd2(~ҎJ/Ò,h{\`O}eLA*TINU CAPITALLETTEROWITHGRAVE0xd3(~ӎJ/Ó,h{\'O}eLA*TINU CAPITALLETTEROWITHACUTE0xd4(~ԎJ/Ô,h{\O}eLA*TINU CAPITALLETTEROWITHCIRCUMFLEX[쒟 2::ContinuedU onnextpage#쒎 2 XS;W 덠Z!{ *CoGde(~CharJ/Entity,hEncoGding(xName[ _0xd5(~ՎJ/Õ,h{\~O}(xLA*TINU CAPITALLETTEROWITHTILDE 0xd6(~֎J/Ö,h{\ـO}(xLA*TINU CAPITALLETTEROWITHDIAERESIS 0xd7(~׀֎J/×,h{\texttimes}(xMUL*TIPLICATIONU SIGN0xd8(~؎J/Ø,h{\O}(xLA*TINU CAPITALLETTEROWITHSTROKE )0xd9(~َJ/Ù,h{\`U}(xLA*TINU CAPITALLETTERUWITHGRAVE0xda(~ڎJ/Ú,h{\'U}(xLA*TINU CAPITALLETTERUWITHACUTE0xdb(~ێJ/Û,h{\U}(xLA*TINU CAPITALLETTERUWITHCIRCUMFLEX0xdc(~܎J/Ü,h{\ـU}(xLA*TINU CAPITALLETTERUWITHDIAERESIS0xdd(~ݎJ/Ý,h{\'Y}(xLA*TINU CAPITALLETTERYWITHACUTE 0xde(~ގJ/Þ,h{\TH}(xLA*TINU CAPITALLETTERTHORN0xdf(~J/ß,h{\ss}(xLA*TINU SMALLLETTERSHARPS0xe0(~J/à,h{\`a}(xLA*TINU SMALLLETTERAWITHGRAVE0xe1(~ᎍJ/á,h{\'a}(xLA*TINU SMALLLETTERAWITHACUTE0xe2(~⎍J/â,h{\a}(xLA*TINU SMALLLETTERAWITHCIRCUMFLEX0xe3(~㎍J/ã,h{\~a}(xLA*TINU SMALLLETTERAWITHTILDE0xe4(~䎍J/ä,h{\ـa}(xLA*TINU SMALLLETTERAWITHDIAERESIS0xe5(~厍J/å,h{\aa}(xLA*TINU SMALLLETTERAWITHRINGABOVE0xe6(~掍J/æ,h{\ae}(xLA*TINU SMALLLETTERAE0xe7(~玍J/ç,h\c{c}(xLA*TINU SMALLLETTERCWITHCEDILLA0xe8(~莍J/è,h{\`e}(xLA*TINU SMALLLETTEREWITHGRAVE0xe9(~鎍J/é,h{\'e}(xLA*TINU SMALLLETTEREWITHACUTE0xea(~ꎍJ/ê,h{\e}(xLA*TINU SMALLLETTEREWITHCIRCUMFLEX0xeb(~뎍J/ë,h{\ـe}(xLA*TINU SMALLLETTEREWITHDIAERESIS0xec(~쎍J/ì,h{\`i}(xLA*TINU SMALLLETTERIWITHGRAVE0xed(~펍J/í,h{\'i}(xLA*TINU SMALLLETTERIWITHACUTE0xee(~J/î,h{\i}(xLA*TINU SMALLLETTERIWITHCIRCUMFLEX0xef(~J/ï,h{\ـi}(xLA*TINU SMALLLETTERIWITHDIAERESIS0xf0(~J/ð,h{\dh}(xLA*TINU SMALLLETTERETH0xf1(~񎍑J/ñ,h{\~n}(xLA*TINU SMALLLETTERNWITHTILDE0xf2(~򎍑J/ò,h{\`o}(xLA*TINU SMALLLETTEROWITHGRAVE0xf3(~󎍑J/ó,h{\'o}(xLA*TINU SMALLLETTEROWITHACUTE0xf4(~􎍑J/ô,h{\o}(xLA*TINU SMALLLETTEROWITHCIRCUMFLEX0xf5(~J/õ,h{\~o}(xLA*TINU SMALLLETTEROWITHTILDE0xf6(~J/ö,h{\ـo}(xLA*TINU SMALLLETTEROWITHDIAERESIS0xf7(~׀J/÷,h{\textdiv}(xDIVISIONU SIGN0xf8(~J/ø,h{\o}(xLA*TINU SMALLLETTEROWITHSTROKE0xf9(~J/ù,h{\`u}(xLA*TINU SMALLLETTERUWITHGRAVE0xfa(~J/ú,h{\'u}(xLA*TINU SMALLLETTERUWITHACUTE[ 2~.ContinuedU onnextpage# 3PS;W 덠0o *CoGde+ӺCharM'EntityEncoGdingwName[ 20xfb+ӺM'û{\u}wܹLA*TINU SMALLLETTERUWITHCIRCUMFLEX 0xfc+ӺM'ü{\ـu}wܹLA*TINU SMALLLETTERUWITHDIAERESIS0xfd+ӺM'ý{\'y}wܹLA*TINU SMALLLETTERYWITHACUTE0xfe+ӺM'þ{\th}wܹLA*TINU SMALLLETTERTHORN0x+ӺM'ÿ{\ـy}wܹLA*TINU SMALLLETTERYWITHDIAERESIS 0x102+Ӻ\u{A}wܹLA*TINU CAPITALLETTERAWITHBREVE0x103+Ӻ\u{a}wܹLA*TINU SMALLLETTERAWITHBREVE )0x106+Ӻ{\'C}wܹLA*TINU CAPITALLETTERCWITHACUTE0x107+Ӻ{\'c}wܹLA*TINU SMALLLETTERCWITHACUTE 0x108,j+ӺC{\C}wܹLA*TINU CAPITALLETTERCWITHCIRCUMFLEX0x109+Ghc{\c}wܹLA*TINU SMALLLETTERCWITHCIRCUMFLEX 鍍0x10a. zj +ӺC\.{C}wܹLA*TINU CAPITALLETTERCWITHDOTABOVE0x10b, cc\.{c}wܹLA*TINU SMALLLETTERCWITHDOTABOVE0x10c+Ӻ\v{C}wܹLA*TINU CAPITALLETTERCWITHCARON0x10d+Ӻ\v{c}wܹLA*TINU SMALLLETTERCWITHCARON0x10e+Ӻ\v{D}wܹLA*TINU CAPITALLETTERDWITHCARON0x10f+Ӻ\v{d}wܹLA*TINU SMALLLETTERDWITHCARON 0x114,ȟj+ӺE\u{E}wܹLA*TINU CAPITALLETTEREWITHBREVE0x115+Ghe\u{e}wܹLA*TINU SMALLLETTEREWITHBREVE 鍍0x116-(j +ӺE\.{E}wܹLA*TINU CAPITALLETTEREWITHDOTABOVE0x117, ce\.{e}wܹLA*TINU SMALLLETTEREWITHDOTABOVE0x11a+Ӻ\v{E}wܹLA*TINU CAPITALLETTEREWITHCARON0x11b+Ӻ\v{e}wܹLA*TINU SMALLLETTEREWITHCARON 0x11c-@j+ӺG{\G}wܹLA*TINU CAPITALLETTERGWITHCIRCUMFLEX0x11d+ӺPg{\g}wܹLA*TINU SMALLLETTERGWITHCIRCUMFLEX0x11e+Ӻ\u{G}wܹLA*TINU CAPITALLETTERGWITHBREVE0x11f+Ӻ\u{g}wܹLA*TINU SMALLLETTERGWITHBREVE 鍍0x120.\uj +ӺG\.{G}wܹLA*TINU CAPITALLETTERGWITHDOTABOVE0x121, g\.{g}wܹLA*TINU SMALLLETTERGWITHDOTABOVE0x122+ӺG-- \c{G}wܹLA*TINU CAPITALLETTERGWITHCEDILLA0x123, Ghg\c{g}wܹLA*TINU SMALLLETTERGWITHCEDILLA 0x124-j+ӺH{\H}wܹLA*TINU CAPITALLETTERHWITHCIRCUMFLEX0x125,ҟj+Ӻh{\h}wܹLA*TINU SMALLLETTERHWITHCIRCUMFLEX0x128+!j+ӺI{\~I}wܹLA*TINU CAPITALLETTERIWITHTILDE X 0x129*Z+Ӻi{\~i}wܹLA*TINU SMALLLETTERIWITHTILDE0x12c+!j+ӺI\u{I}wܹLA*TINU CAPITALLETTERIWITHBREVE0x12d*Z+Ӻi\u{i}wܹLA*TINU SMALLLETTERIWITHBREVE )0x130+Ӻ\.{I}wܹLA*TINU CAPITALLETTERIWITHDOTABOVE[ 2lLContinuedU onnextpage#ꎎ 4+\S;W 덠Xo~ *CoGde+ӺCharM'EntityEncoGdingwName[ 20x131+Ӻ{\i}wܹLA*TINU SMALLLETTERDOTLESSI 0x134+借j+ӺJ{\J}wܹLA*TINU CAPITALLETTERJWITHCIRCUMFLEX X 0x135*+Ӻj{\j}wܹLA*TINU SMALLLETTERJWITHCIRCUMFLEX 0x136+ӺK-~J \c{K}wܹLA*TINU CAPITALLETTERKWITHCEDILLA0x137+Ӻk,>^ \c{k}wܹLA*TINU SMALLLETTERKWITHCEDILLA )0x139+Ӻ{\'L}wܹLA*TINU CAPITALLETTERLWITHACUTE0x13a+Ӻ{\'l}wܹLA*TINU SMALLLETTERLWITHACUTE 0x13b+ӺL, \c{L}wܹLA*TINU CAPITALLETTERLWITHCEDILLA0x13c+Ӻl*r \c{l}wܹLA*TINU SMALLLETTERLWITHCEDILLA 0x13d+Ӻ\v{L}wܹLA*TINU CAPITALLETTERLWITHCARON0x13e+Ӻ\v{l}wܹLA*TINU SMALLLETTERLWITHCARON )0x143+Ӻ{\'N}wܹLA*TINU CAPITALLETTERNWITHACUTE0x144+Ӻ{\'n}wܹLA*TINU SMALLLETTERNWITHACUTE0x145+ӺN-Z \c{N}wܹLA*TINU CAPITALLETTERNWITHCEDILLA0x146,a Pn\c{n}wܹLA*TINU SMALLLETTERNWITHCEDILLA0x147+Ӻ\v{N}wܹLA*TINU CAPITALLETTERNWITHCARON0x148+Ӻ\v{n}wܹLA*TINU SMALLLETTERNWITHCARON 0x14e-72j+ӺO\u{O}wܹLA*TINU CAPITALLETTEROWITHBREVE0x14f+ӺPo\u{o}wܹLA*TINU SMALLLETTEROWITHBREVE0x152+Ӻ׎M'Œ{\OE}wܹLA*TINU CAPITALLIGATUREOE0x153+ӺM'œ{\oe}wܹLA*TINU SMALLLIGATUREOE )0x154+Ӻ{\'R}wܹLA*TINU CAPITALLETTERRWITHACUTE0x155+Ӻ{\'r}wܹLA*TINU SMALLLETTERRWITHACUTE0x156+ӺR-H \c{R}wܹLA*TINU CAPITALLETTERRWITHCEDILLA0x157+0 r\c{r}wܹLA*TINU SMALLLETTERRWITHCEDILLA0x158+Ӻ\v{R}wܹLA*TINU CAPITALLETTERRWITHCARON0x159+Ӻ\v{r}wܹLA*TINU SMALLLETTERRWITHCARON )0x15a+Ӻ{\'S}wܹLA*TINU CAPITALLETTERSWITHACUTE0x15b+Ӻ{\'s}wܹLA*TINU SMALLLETTERSWITHACUTE 0x15c,ҟj+ӺS{\S}wܹLA*TINU CAPITALLETTERSWITHCIRCUMFLEX0x15d+Lds{\s}wܹLA*TINU SMALLLETTERSWITHCIRCUMFLEX0x15e+Ӻ\c{S}wܹLA*TINU CAPITALLETTERSWITHCEDILLA0x15f+Ӻ\c{s}wܹLA*TINU SMALLLETTERSWITHCEDILLA0x160+ӺM'Š\v{S}wܹLA*TINU CAPITALLETTERSWITHCARON0x161+ӺM'š\v{s}wܹLA*TINU SMALLLETTERSWITHCARON0x162+Ӻ\c{T}wܹLA*TINU CAPITALLETTERTWITHCEDILLA0x163+Ӻ\c{t}wܹLA*TINU SMALLLETTERTWITHCEDILLA0x164+Ӻ\v{T}wܹLA*TINU CAPITALLETTERTWITHCARON[ 2lLContinuedU onnextpage#ꎎ 5:͠S;W 덠 hٶ C *CoGde+ӺCharM'Entity~AEncoGdingName[ C 20x165+Ӻ~A\v{t}LA*TINU SMALLLETTERTWITHCARON 0x168-j+ӺU~A{\~U}LA*TINU CAPITALLETTERUWITHTILDE 0x169,8u~A{\~u}LA*TINU SMALLLETTERUWITHTILDE0x16c-j+ӺU~A\u{U}LA*TINU CAPITALLETTERUWITHBREVE0x16d,8u~A\u{u}LA*TINU SMALLLETTERUWITHBREVE0x174.wj+ӺW~A{\W}LA*TINU CAPITALLETTERWWITHCIRCUMFLEX0x175,w~A{\w}LA*TINU SMALLLETTERWWITHCIRCUMFLEX0x176-j+ӺY~A{\Y}LA*TINU CAPITALLETTERYWITHCIRCUMFLEX0x177+Fy~A{\y}LA*TINU SMALLLETTERYWITHCIRCUMFLEX 0x178+ӺM'Ÿ~A{\ـY}LA*TINU CAPITALLETTERYWITHDIAERESIS )0x179+Ӻ~A{\'Z}LA*TINU CAPITALLETTERZWITHACUTE0x17a+Ӻ~A{\'z}LA*TINU SMALLLETTERZWITHACUTE0x17b+Ӻ~A\.{Z}LA*TINU CAPITALLETTERZWITHDOTABOVE0x17c+Ӻ~A\.{z}LA*TINU SMALLLETTERZWITHDOTABOVE 0x17d+Ӻ~A\v{Z}LA*TINU CAPITALLETTERZWITHCARON0x17e+Ӻ~A\v{z}LA*TINU SMALLLETTERZWITHCARON0x192+Ӻ׀M'ƒ~A{\textflorin}LA*TINU SMALLLETTERFWITHHOOK 0x1cd-j+ӺA~A\v{A}LA*TINU CAPITALLETTERAWITHCARON0x1ce+ӺPa~A\v{a}LA*TINU SMALLLETTERAWITHCARON0x1cf+!j+ӺI~A\v{I}LA*TINU CAPITALLETTERIWITHCARON X 0x1d0*Z+Ӻi~A\v{i}LA*TINU SMALLLETTERIWITHCARON0x1d1-72j+ӺO~A\v{O}LA*TINU CAPITALLETTEROWITHCARON0x1d2+ӺPo~A\v{o}LA*TINU SMALLLETTEROWITHCARON0x1d3-j+ӺU~A\v{U}LA*TINU CAPITALLETTERUWITHCARON0x1d4,8u~A\v{u}LA*TINU SMALLLETTERUWITHCARON0x1e6-@j+ӺG~A\v{G}LA*TINU CAPITALLETTERGWITHCARON0x1e7+ӺPg~A\v{g}LA*TINU SMALLLETTERGWITHCARON0x1e8-72j+ӺK~A\v{K}LA*TINU CAPITALLETTERKWITHCARON0x1e9+Fj+Ӻk~A\v{k}LA*TINU SMALLLETTERKWITHCARON X 0x1f0*+Ӻj~A\v{j}LA*TINU SMALLLETTERJWITHCARON0x1f4-@j+ӺG~A{\'G}LA*TINU CAPITALLETTERGWITHACUTE0x1f5+ӺPg~A{\'g}LA*TINU SMALLLETTERGWITHACUTE0x1f8-j+ӺN~A{\`N}LA*TINU CAPITALLETTERNWITHGRAVE0x1f9,8n~A{\`n}LA*TINU SMALLLETTERNWITHGRAVE0x2c6+Ӻ^M'ˆ~A{\textasciicircum}MODIFIERU LETTERCIRCUMFLEXACCENT0x2dc+Ӻ~M'˜~A{\textasciitilde}SMALLU TILDE0x391+ӺK`y cmr10AM'Α~A$\mathrm{A}$GREEKU CAPIT*ALLETTERALPHA0x392+ӺBM'Β~A$\mathrm{B}$GREEKU CAPIT*ALLETTERBETA[ C 2ContinuedU onnextpage# C 6IS;W 덠8 *CoGde,CharNYoEntity|EncoGdingԒName[ 20x393,NYoΓ|$\Gamma$ԒGREEKU CAPIT*ALLETTERGAMMA 0x394,NYoΔ|$\Delta$ԒGREEKU CAPIT*ALLETTERDELTA0x395,ENYoΕ|$\mathrm{E}$ԒGREEKU CAPIT*ALLETTEREPSILON0x396,ZNYoΖ|$\mathrm{Z}$ԒGREEKU CAPIT*ALLETTERZETA0x397,HNYoΗ|$\mathrm{H}$ԒGREEKU CAPIT*ALLETTERETA0x398,NYoΘ|$\Theta$ԒGREEKU CAPIT*ALLETTERTHETA0x399,INYoΙ|$\mathrm{I}$ԒGREEKU CAPIT*ALLETTERIOTA0x39a,KNYoΚ|$\mathrm{K}$ԒGREEKU CAPIT*ALLETTERKAPPA0x39b,NYoΛ|$\Lambda$ԒGREEKU CAPIT*ALLETTERLAMDA0x39c,MNYoΜ|$\mathrm{M}$ԒGREEKU CAPIT*ALLETTERMU0x39d,NNYoΝ|$\mathrm{N}$ԒGREEKU CAPIT*ALLETTERNU0x39e,NYoΞ|$\Xi$ԒGREEKU CAPIT*ALLETTERXI0x39f,ONYoΟ|$\mathrm{O}$ԒGREEKU CAPIT*ALLETTEROMICRON0x3a0,NYoΠ|$\Pi$ԒGREEKU CAPIT*ALLETTERPI0x3a1,RNYoΡ|$\mathrm{R}$ԒGREEKU CAPIT*ALLETTERRHO0x3a3,NYoΣ|$\Sigma$ԒGREEKU CAPIT*ALLETTERSIGMA0x3a4,TNYoΤ|$\mathrm{T}$ԒGREEKU CAPIT*ALLETTERTAU0x3a5,NYoΥ|$\Upsilon$ԒGREEKU CAPIT*ALLETTERUPSILON0x3a6,NYoΦ|$\Phi$ԒGREEKU CAPIT*ALLETTERPHI0x3a7,XNYoΧ|$\mathrm{X}$ԒGREEKU CAPIT*ALLETTERCHI0x3a8, NYoΨ|$\Psi$ԒGREEKU CAPIT*ALLETTERPSI0x3a9, NYoΩ|$\Omega$ԒGREEKU CAPIT*ALLETTEROMEGA0x3b1, b> cmmi10 NYoα|$\alpha$ԒGREEKU SMALLLETTERALPHA0x3b2, NYoβ|$\beta$ԒGREEKU SMALLLETTERBET*A0x3b3, NYoγ|$\gamma$ԒGREEKU SMALLLETTERGAMMA0x3b4,NYoδ|$\delta$ԒGREEKU SMALLLETTERDEL*TA0x3b5,NYoε|$\epsilon$ԒGREEKU SMALLLETTEREPSILON0x3b6,NYoζ|$\zeta$ԒGREEKU SMALLLETTERZET*A0x3b7,NYoη|$\eta$ԒGREEKU SMALLLETTERET*A0x3b8,NYoθ|$\theta$ԒGREEKU SMALLLETTERTHET*A0x3b9,NYoι|$\iota$ԒGREEKU SMALLLETTERIOT*A0x3ba,NYoκ|$\kappa$ԒGREEKU SMALLLETTERKAPP*A0x3bb,NYoλ|$\lambda$ԒGREEKU SMALLLETTERLAMDA0x3bGc,NYoμ|$\mu$ԒGREEKU SMALLLETTERMU0x3bGd,NYoν|$\nu$ԒGREEKU SMALLLETTERNU0x3bGe,NYoξ|$\xi$ԒGREEKU SMALLLETTERXI0x3bf,oNYoο|$o$ԒGREEKU SMALLLETTEROMICRON0x3c0,NYoπ|$\pi$ԒGREEKU SMALLLETTERPI 2gBContinuedU onnextpage# 7Y_S;W 덠h8/ *CoGde0jCharREntityEncoGding 9Name[/ 20x3c10jRρ$\rho$ 9GREEKU SMALLLETTERRHO 0x3c30jRσ$\sigma$ 9GREEKU SMALLLETTERSIGMA0x3c40jRτ$\tau$ 9GREEKU SMALLLETTERT*AU0x3c50jRυ$\upsilon$ 9GREEKU SMALLLETTERUPSILON0x3c60jRφ$\phi$ 9GREEKU SMALLLETTERPHI0x3c70jRχ$\chi$ 9GREEKU SMALLLETTERCHI0x3c80j Rψ$\psi$ 9GREEKU SMALLLETTERPSI0x3c90j!Rω$\omega$ 9GREEKU SMALLLETTEROMEGA0xe3f0j׀{\textbaht} 9THAIU CURRENCYSYMBOLBAHT0x2002R \phantom{N} 9ENU SP*ACE0x2003R \hspace{1em} 9EMU SP*ACE0x2004\hspace{.333333em} 9THREE-PER-EMU SP*ACE0x2005\hspace{.25em} 9FOUR-PER-EMU SP*ACE0x2006\hspace{.166666em} 9SIX-PER-EMU SP*ACE0x2009R \, 9THINU SP*ACE0x200cR‌{} 9ZEROU WIDTHNON-JOINER0x20130jR– 9ENU DASH0x20140jR—- 9EMU DASH0x20160j׀{\textbardbl} 9DOUBLEU VER*TICALLINE0x20180j`R‘{\textquoteleft} 9LEFTU SINGLEQUOT*ATIONU MARK0x20190j'R’{\textquoteright} 9RIGHTU SINGLEQUOT*ATIONU MARK0x201a0j R‚{\quotesinglbase} 9SINGLEU LOW-9QUOT*ATIONU MARK0x201c0jR“{\textquotedblleft} 9LEFTU DOUBLEQUOT*ATIONU MARK0x201d0jR”{\textquotedblright} 9RIGHTU DOUBLEQUOT*ATIONU MARK0x201e0jR„{\quotedblbase} 9DOUBLEU LOW-9QUOT*ATIONU MARK0x20200j׀R†{\textdagger} 9DAGGER0x20210j׀R‡{\textdaggerdbl} 9DOUBLEU DAGGER0x20220j׀R•{\textbullet} 9BULLET0x20260j...R…{\textellipsis} 9HORIZONT*ALU ELLIPSIS0x20300j׀R‰{\textperthousand} 9PERU MILLESIGN0x20320j'R′{\textquotesingle} 9PRIME0x20330j"R″{\textquotedbl} 9DOUBLEU PRIME0x20390jR‹{\guilsinglleft} 9SINGLEU LEFT-POINTINGANGLEQUOT*ATIONU MARK0x203a0jR›{\guilsinglright} 9SINGLEU RIGHT-POINTINGANGLEQUOT*ATIONU MARK0x203e0j׀R‾{\textasciimacron} 9OVERLINE0x20440j/R⁄{\textfractionsolidus} 9FRACTIONU SLASH0x20a30j׀{\textlira} 9FRENCHU FRANCSIGN0x20a60j׀{\textnaira} 9NAIRAU SIGN/ 2bContinuedU onnextpage#/ 8 hqS;W 덠h8B *CoGde0jCharREntity8EncoGdingName[B 20x20a90j׀8{\textwon}WONU SIGN 0x20ab0j׀8{\textdong}DONGU SIGN0x20ac0j׀R€8{\texteuro}EUROU SIGN0x21110j !", cmsy10GGectt1728UsGGecrm1728 1 ecrm1000 !", cmsy10 b> cmmi10K`y cmr10u cmex10LaTeX-Encode-0.091.6/scripts/latex-encode0000644000175000017500000000337712302613176017036 0ustar chrischris#!/usr/bin/perl # $Id: latex-encode 28 2012-08-30 20:00:09Z andrew $ use strict; use LaTeX::Encode; use Getopt::Long; use Pod::Usage; my ($list_packages, $help, $man); GetOptions('packages' => \$list_packages, 'help|?' => \$help, 'man' => \$man) or pod2usage(2); pod2usage(1) if $help; pod2usage(-exitstatus => 0, -verbose => 2) if $man; if ($list_packages) { my $text = join(qr{}, <>); my $packages = {}; latex_encode($text, $packages); foreach my $package (sort keys %$packages) { print "$package\n"; } } else { while (<>) { print latex_encode($_); } } __END__ =head1 NAME latex-encode - LaTeX-encode data =head1 USAGE latex-encode [options] latex-file =head1 OPTIONS =over 4 =item C<-packages|-p> rather than output the LaTeX-encoded version of the input, C outputs a list of the LaTeX packages that are required to typeset the encoded version of the input, one package per line =item C<-help|?> output a help string =item C<-man> display the man page for latex-encode =back =head1 DESCRIPTION This script converts utf-8 characters in its input to their LaTeX encodings using the C module, unless the C<-packages> option is given, in which case it outputs a list of the LaTeX packages required to typeset the encoded bersion of the input. =head1 DIAGNOSTICS =head1 EXIT STATUS =head1 CONFIGURATION =head1 DEPENDENCIES =head1 INCOMPATIBILITIES =head1 BUGS AND LIMITATIONS =head1 AUTHOR Andrew Ford Ea.ford@ford-mason.co.ukE =head1 COPYRIGHT AND LICENSE Copyright (C) 2012 Andrew Ford. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut LaTeX-Encode-0.091.6/scripts/character-encodings.tex0000644000175000017500000016113712302613176021167 0ustar chrischris% [% TAGS star %] \documentclass[a4paper,10pt]{article} \usepackage[textwidth=180mm,textheight=220mm]{geometry} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage{booktabs} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{xtab} \title{Characters encoded by \texttt{LaTeX::Encode}} \author{automatically generated} \begin{document} \maketitle { \bottomcaption{Characters} \label{table:charencodings} \tablehead{\toprule Code & Char & Entity & Encoding & Name \\ \midrule } \tabletail{\midrule \multicolumn{5}{r}{{Continued on next page}} \\ \bottomrule } \tablelasttail{} \begin{center} \begin{xtabular}{llllp{10cm}} 0x22 & {\textacutedbl} & \texttt{\"} & \texttt{\{{\textbackslash}textacutedbl\}} & QUOTATION MARK \\ 0x23 & \# & \texttt{\&\#35;} & \texttt{{\textbackslash}\#} & NUMBER SIGN \\ 0x24 & \$ & \texttt{\&\#36;} & \texttt{{\textbackslash}\$} & DOLLAR SIGN \\ 0x25 & \% & \texttt{\&\#37;} & \texttt{{\textbackslash}\%} & PERCENT SIGN \\ 0x26 & \& & \texttt{\&} & \texttt{{\textbackslash}\&} & AMPERSAND \\ 0x3c & {\textlangle} & \texttt{\<} & \texttt{\{{\textbackslash}textlangle\}} & LESS-THAN SIGN \\ 0x3e & {\textrangle} & \texttt{\>} & \texttt{\{{\textbackslash}textrangle\}} & GREATER-THAN SIGN \\ 0x5c & {\textbackslash} & \texttt{\&\#92;} & \texttt{\{{\textbackslash}textbackslash\}} & REVERSE SOLIDUS \\ 0x5e & \^{ } & \texttt{\&\#94;} & \texttt{{\textbackslash}\^{ }\{ \}} & CIRCUMFLEX ACCENT \\ 0x5f & \_ & \texttt{\&\#95;} & \texttt{{\textbackslash}\_} & LOW LINE \\ 0x7b & \{ & \texttt{\&\#123;} & \texttt{{\textbackslash}\{} & LEFT CURLY BRACKET \\ 0x7d & \} & \texttt{\&\#125;} & \texttt{{\textbackslash}\}} & RIGHT CURLY BRACKET \\ 0x7e & {\texttildelow} & \texttt{\&\#126;} & \texttt{\{{\textbackslash}texttildelow\}} & TILDE \\ 0xa0 & ~ & \texttt{\ } & \texttt{{\texttildelow}} & NO-BREAK SPACE \\ 0xa1 & {\textexclamdown} & \texttt{\¡} & \texttt{\{{\textbackslash}textexclamdown\}} & INVERTED EXCLAMATION MARK \\ 0xa2 & {\textcent} & \texttt{\¢} & \texttt{\{{\textbackslash}textcent\}} & CENT SIGN \\ 0xa3 & {\textsterling} & \texttt{\£} & \texttt{\{{\textbackslash}textsterling\}} & POUND SIGN \\ 0xa4 & {\textcurrency} & \texttt{\¤} & \texttt{\{{\textbackslash}textcurrency\}} & CURRENCY SIGN \\ 0xa5 & {\textyen} & \texttt{\¥} & \texttt{\{{\textbackslash}textyen\}} & YEN SIGN \\ 0xa6 & {\textbrokenbar} & \texttt{\¦} & \texttt{\{{\textbackslash}textbrokenbar\}} & BROKEN BAR \\ 0xa7 & {\textsection} & \texttt{\§} & \texttt{\{{\textbackslash}textsection\}} & SECTION SIGN \\ 0xa8 & {\textasciidieresis} & \texttt{\¨} & \texttt{\{{\textbackslash}textasciidieresis\}} & DIAERESIS \\ 0xa9 & {\textcopyright} & \texttt{\©} & \texttt{\{{\textbackslash}textcopyright\}} & COPYRIGHT SIGN \\ 0xaa & {\textordfeminine} & \texttt{\ª} & \texttt{\{{\textbackslash}textordfeminine\}} & FEMININE ORDINAL INDICATOR \\ 0xab & {\guillemotleft} & \texttt{\«} & \texttt{\{{\textbackslash}guillemotleft\}} & LEFT-POINTING DOUBLE ANGLE QUOTATION MARK \\ 0xac & {\textlnot} & \texttt{\¬} & \texttt{\{{\textbackslash}textlnot\}} & NOT SIGN \\ 0xad & \- & \texttt{\­} & \texttt{{\textbackslash}-} & SOFT HYPHEN \\ 0xae & {\textregistered} & \texttt{\®} & \texttt{\{{\textbackslash}textregistered\}} & REGISTERED SIGN \\ 0xaf & {\textasciimacron} & \texttt{\¯} & \texttt{\{{\textbackslash}textasciimacron\}} & MACRON \\ 0xb0 & {\textdegree} & \texttt{\°} & \texttt{\{{\textbackslash}textdegree\}} & DEGREE SIGN \\ 0xb1 & {\textpm} & \texttt{\±} & \texttt{\{{\textbackslash}textpm\}} & PLUS-MINUS SIGN \\ 0xb2 & {\texttwosuperior} & \texttt{\²} & \texttt{\{{\textbackslash}texttwosuperior\}} & SUPERSCRIPT TWO \\ 0xb3 & {\textthreesuperior} & \texttt{\³} & \texttt{\{{\textbackslash}textthreesuperior\}} & SUPERSCRIPT THREE \\ 0xb4 & {\textasciiacute} & \texttt{\´} & \texttt{\{{\textbackslash}textasciiacute\}} & ACUTE ACCENT \\ 0xb5 & {\textmu} & \texttt{\µ} & \texttt{\{{\textbackslash}textmu\}} & MICRO SIGN \\ 0xb6 & {\textparagraph} & \texttt{\¶} & \texttt{\{{\textbackslash}textparagraph\}} & PILCROW SIGN \\ 0xb7 & {\textperiodcentered} & \texttt{\·} & \texttt{\{{\textbackslash}textperiodcentered\}} & MIDDLE DOT \\ 0xb8 & {\c{ }} & \texttt{\¸} & \texttt{\{{\textbackslash}c\{ \}\}} & CEDILLA \\ 0xb9 & {\textonesuperior} & \texttt{\¹} & \texttt{\{{\textbackslash}textonesuperior\}} & SUPERSCRIPT ONE \\ 0xba & {\textordmasculine} & \texttt{\º} & \texttt{\{{\textbackslash}textordmasculine\}} & MASCULINE ORDINAL INDICATOR \\ 0xbb & {\guillemotright} & \texttt{\»} & \texttt{\{{\textbackslash}guillemotright\}} & RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK \\ 0xbc & {\textonequarter} & \texttt{\¼} & \texttt{\{{\textbackslash}textonequarter\}} & VULGAR FRACTION ONE QUARTER \\ 0xbd & {\textonehalf} & \texttt{\½} & \texttt{\{{\textbackslash}textonehalf\}} & VULGAR FRACTION ONE HALF \\ 0xbe & {\textthreequarters} & \texttt{\¾} & \texttt{\{{\textbackslash}textthreequarters\}} & VULGAR FRACTION THREE QUARTERS \\ 0xbf & {\textquestiondown} & \texttt{\¿} & \texttt{\{{\textbackslash}textquestiondown\}} & INVERTED QUESTION MARK \\ 0xc0 & {\`A} & \texttt{\À} & \texttt{\{{\textbackslash}`A\}} & LATIN CAPITAL LETTER A WITH GRAVE \\ 0xc1 & {\'A} & \texttt{\Á} & \texttt{\{{\textbackslash}'A\}} & LATIN CAPITAL LETTER A WITH ACUTE \\ 0xc2 & {\^A} & \texttt{\Â} & \texttt{\{{\textbackslash}\^{ }A\}} & LATIN CAPITAL LETTER A WITH CIRCUMFLEX \\ 0xc3 & {\~A} & \texttt{\Ã} & \texttt{\{{\textbackslash}{\texttildelow}A\}} & LATIN CAPITAL LETTER A WITH TILDE \\ 0xc4 & {\"A} & \texttt{\Ä} & \texttt{\{{\textbackslash}{\textacutedbl}A\}} & LATIN CAPITAL LETTER A WITH DIAERESIS \\ 0xc5 & {\AA} & \texttt{\Å} & \texttt{\{{\textbackslash}AA\}} & LATIN CAPITAL LETTER A WITH RING ABOVE \\ 0xc6 & {\AE} & \texttt{\Æ} & \texttt{\{{\textbackslash}AE\}} & LATIN CAPITAL LETTER AE \\ 0xc7 & \c{C} & \texttt{\Ç} & \texttt{{\textbackslash}c\{C\}} & LATIN CAPITAL LETTER C WITH CEDILLA \\ 0xc8 & {\`E} & \texttt{\È} & \texttt{\{{\textbackslash}`E\}} & LATIN CAPITAL LETTER E WITH GRAVE \\ 0xc9 & {\'E} & \texttt{\É} & \texttt{\{{\textbackslash}'E\}} & LATIN CAPITAL LETTER E WITH ACUTE \\ 0xca & {\^E} & \texttt{\Ê} & \texttt{\{{\textbackslash}\^{ }E\}} & LATIN CAPITAL LETTER E WITH CIRCUMFLEX \\ 0xcb & {\"E} & \texttt{\Ë} & \texttt{\{{\textbackslash}{\textacutedbl}E\}} & LATIN CAPITAL LETTER E WITH DIAERESIS \\ 0xcc & {\`I} & \texttt{\Ì} & \texttt{\{{\textbackslash}`I\}} & LATIN CAPITAL LETTER I WITH GRAVE \\ 0xcd & {\'I} & \texttt{\Í} & \texttt{\{{\textbackslash}'I\}} & LATIN CAPITAL LETTER I WITH ACUTE \\ 0xce & {\^I} & \texttt{\Î} & \texttt{\{{\textbackslash}\^{ }I\}} & LATIN CAPITAL LETTER I WITH CIRCUMFLEX \\ 0xcf & {\"I} & \texttt{\Ï} & \texttt{\{{\textbackslash}{\textacutedbl}I\}} & LATIN CAPITAL LETTER I WITH DIAERESIS \\ 0xd0 & {\DH} & \texttt{\Ð} & \texttt{\{{\textbackslash}DH\}} & LATIN CAPITAL LETTER ETH \\ 0xd1 & {\~N} & \texttt{\Ñ} & \texttt{\{{\textbackslash}{\texttildelow}N\}} & LATIN CAPITAL LETTER N WITH TILDE \\ 0xd2 & {\`O} & \texttt{\Ò} & \texttt{\{{\textbackslash}`O\}} & LATIN CAPITAL LETTER O WITH GRAVE \\ 0xd3 & {\'O} & \texttt{\Ó} & \texttt{\{{\textbackslash}'O\}} & LATIN CAPITAL LETTER O WITH ACUTE \\ 0xd4 & {\^O} & \texttt{\Ô} & \texttt{\{{\textbackslash}\^{ }O\}} & LATIN CAPITAL LETTER O WITH CIRCUMFLEX \\ 0xd5 & {\~O} & \texttt{\Õ} & \texttt{\{{\textbackslash}{\texttildelow}O\}} & LATIN CAPITAL LETTER O WITH TILDE \\ 0xd6 & {\"O} & \texttt{\Ö} & \texttt{\{{\textbackslash}{\textacutedbl}O\}} & LATIN CAPITAL LETTER O WITH DIAERESIS \\ 0xd7 & {\texttimes} & \texttt{\×} & \texttt{\{{\textbackslash}texttimes\}} & MULTIPLICATION SIGN \\ 0xd8 & {\O} & \texttt{\Ø} & \texttt{\{{\textbackslash}O\}} & LATIN CAPITAL LETTER O WITH STROKE \\ 0xd9 & {\`U} & \texttt{\Ù} & \texttt{\{{\textbackslash}`U\}} & LATIN CAPITAL LETTER U WITH GRAVE \\ 0xda & {\'U} & \texttt{\Ú} & \texttt{\{{\textbackslash}'U\}} & LATIN CAPITAL LETTER U WITH ACUTE \\ 0xdb & {\^U} & \texttt{\Û} & \texttt{\{{\textbackslash}\^{ }U\}} & LATIN CAPITAL LETTER U WITH CIRCUMFLEX \\ 0xdc & {\"U} & \texttt{\Ü} & \texttt{\{{\textbackslash}{\textacutedbl}U\}} & LATIN CAPITAL LETTER U WITH DIAERESIS \\ 0xdd & {\'Y} & \texttt{\Ý} & \texttt{\{{\textbackslash}'Y\}} & LATIN CAPITAL LETTER Y WITH ACUTE \\ 0xde & {\TH} & \texttt{\Þ} & \texttt{\{{\textbackslash}TH\}} & LATIN CAPITAL LETTER THORN \\ 0xdf & {\ss} & \texttt{\ß} & \texttt{\{{\textbackslash}ss\}} & LATIN SMALL LETTER SHARP S \\ 0xe0 & {\`a} & \texttt{\à} & \texttt{\{{\textbackslash}`a\}} & LATIN SMALL LETTER A WITH GRAVE \\ 0xe1 & {\'a} & \texttt{\á} & \texttt{\{{\textbackslash}'a\}} & LATIN SMALL LETTER A WITH ACUTE \\ 0xe2 & {\^a} & \texttt{\â} & \texttt{\{{\textbackslash}\^{ }a\}} & LATIN SMALL LETTER A WITH CIRCUMFLEX \\ 0xe3 & {\~a} & \texttt{\ã} & \texttt{\{{\textbackslash}{\texttildelow}a\}} & LATIN SMALL LETTER A WITH TILDE \\ 0xe4 & {\"a} & \texttt{\ä} & \texttt{\{{\textbackslash}{\textacutedbl}a\}} & LATIN SMALL LETTER A WITH DIAERESIS \\ 0xe5 & {\aa} & \texttt{\å} & \texttt{\{{\textbackslash}aa\}} & LATIN SMALL LETTER A WITH RING ABOVE \\ 0xe6 & {\ae} & \texttt{\æ} & \texttt{\{{\textbackslash}ae\}} & LATIN SMALL LETTER AE \\ 0xe7 & \c{c} & \texttt{\ç} & \texttt{{\textbackslash}c\{c\}} & LATIN SMALL LETTER C WITH CEDILLA \\ 0xe8 & {\`e} & \texttt{\è} & \texttt{\{{\textbackslash}`e\}} & LATIN SMALL LETTER E WITH GRAVE \\ 0xe9 & {\'e} & \texttt{\é} & \texttt{\{{\textbackslash}'e\}} & LATIN SMALL LETTER E WITH ACUTE \\ 0xea & {\^e} & \texttt{\ê} & \texttt{\{{\textbackslash}\^{ }e\}} & LATIN SMALL LETTER E WITH CIRCUMFLEX \\ 0xeb & {\"e} & \texttt{\ë} & \texttt{\{{\textbackslash}{\textacutedbl}e\}} & LATIN SMALL LETTER E WITH DIAERESIS \\ 0xec & {\`i} & \texttt{\ì} & \texttt{\{{\textbackslash}`i\}} & LATIN SMALL LETTER I WITH GRAVE \\ 0xed & {\'i} & \texttt{\í} & \texttt{\{{\textbackslash}'i\}} & LATIN SMALL LETTER I WITH ACUTE \\ 0xee & {\^i} & \texttt{\î} & \texttt{\{{\textbackslash}\^{ }i\}} & LATIN SMALL LETTER I WITH CIRCUMFLEX \\ 0xef & {\"i} & \texttt{\ï} & \texttt{\{{\textbackslash}{\textacutedbl}i\}} & LATIN SMALL LETTER I WITH DIAERESIS \\ 0xf0 & {\dh} & \texttt{\ð} & \texttt{\{{\textbackslash}dh\}} & LATIN SMALL LETTER ETH \\ 0xf1 & {\~n} & \texttt{\ñ} & \texttt{\{{\textbackslash}{\texttildelow}n\}} & LATIN SMALL LETTER N WITH TILDE \\ 0xf2 & {\`o} & \texttt{\ò} & \texttt{\{{\textbackslash}`o\}} & LATIN SMALL LETTER O WITH GRAVE \\ 0xf3 & {\'o} & \texttt{\ó} & \texttt{\{{\textbackslash}'o\}} & LATIN SMALL LETTER O WITH ACUTE \\ 0xf4 & {\^o} & \texttt{\ô} & \texttt{\{{\textbackslash}\^{ }o\}} & LATIN SMALL LETTER O WITH CIRCUMFLEX \\ 0xf5 & {\~o} & \texttt{\õ} & \texttt{\{{\textbackslash}{\texttildelow}o\}} & LATIN SMALL LETTER O WITH TILDE \\ 0xf6 & {\"o} & \texttt{\ö} & \texttt{\{{\textbackslash}{\textacutedbl}o\}} & LATIN SMALL LETTER O WITH DIAERESIS \\ 0xf7 & {\textdiv} & \texttt{\÷} & \texttt{\{{\textbackslash}textdiv\}} & DIVISION SIGN \\ 0xf8 & {\o} & \texttt{\ø} & \texttt{\{{\textbackslash}o\}} & LATIN SMALL LETTER O WITH STROKE \\ 0xf9 & {\`u} & \texttt{\ù} & \texttt{\{{\textbackslash}`u\}} & LATIN SMALL LETTER U WITH GRAVE \\ 0xfa & {\'u} & \texttt{\ú} & \texttt{\{{\textbackslash}'u\}} & LATIN SMALL LETTER U WITH ACUTE \\ 0xfb & {\^u} & \texttt{\û} & \texttt{\{{\textbackslash}\^{ }u\}} & LATIN SMALL LETTER U WITH CIRCUMFLEX \\ 0xfc & {\"u} & \texttt{\ü} & \texttt{\{{\textbackslash}{\textacutedbl}u\}} & LATIN SMALL LETTER U WITH DIAERESIS \\ 0xfd & {\'y} & \texttt{\ý} & \texttt{\{{\textbackslash}'y\}} & LATIN SMALL LETTER Y WITH ACUTE \\ 0xfe & {\th} & \texttt{\þ} & \texttt{\{{\textbackslash}th\}} & LATIN SMALL LETTER THORN \\ 0xff & {\"y} & \texttt{\ÿ} & \texttt{\{{\textbackslash}{\textacutedbl}y\}} & LATIN SMALL LETTER Y WITH DIAERESIS \\ 0x102 & \u{A} & \texttt{} & \texttt{{\textbackslash}u\{A\}} & LATIN CAPITAL LETTER A WITH BREVE \\ 0x103 & \u{a} & \texttt{} & \texttt{{\textbackslash}u\{a\}} & LATIN SMALL LETTER A WITH BREVE \\ 0x106 & {\'C} & \texttt{} & \texttt{\{{\textbackslash}'C\}} & LATIN CAPITAL LETTER C WITH ACUTE \\ 0x107 & {\'c} & \texttt{} & \texttt{\{{\textbackslash}'c\}} & LATIN SMALL LETTER C WITH ACUTE \\ 0x108 & {\^C} & \texttt{} & \texttt{\{{\textbackslash}\^{ }C\}} & LATIN CAPITAL LETTER C WITH CIRCUMFLEX \\ 0x109 & {\^c} & \texttt{} & \texttt{\{{\textbackslash}\^{ }c\}} & LATIN SMALL LETTER C WITH CIRCUMFLEX \\ 0x10a & \.{C} & \texttt{} & \texttt{{\textbackslash}.\{C\}} & LATIN CAPITAL LETTER C WITH DOT ABOVE \\ 0x10b & \.{c} & \texttt{} & \texttt{{\textbackslash}.\{c\}} & LATIN SMALL LETTER C WITH DOT ABOVE \\ 0x10c & \v{C} & \texttt{} & \texttt{{\textbackslash}v\{C\}} & LATIN CAPITAL LETTER C WITH CARON \\ 0x10d & \v{c} & \texttt{} & \texttt{{\textbackslash}v\{c\}} & LATIN SMALL LETTER C WITH CARON \\ 0x10e & \v{D} & \texttt{} & \texttt{{\textbackslash}v\{D\}} & LATIN CAPITAL LETTER D WITH CARON \\ 0x10f & \v{d} & \texttt{} & \texttt{{\textbackslash}v\{d\}} & LATIN SMALL LETTER D WITH CARON \\ 0x114 & \u{E} & \texttt{} & \texttt{{\textbackslash}u\{E\}} & LATIN CAPITAL LETTER E WITH BREVE \\ 0x115 & \u{e} & \texttt{} & \texttt{{\textbackslash}u\{e\}} & LATIN SMALL LETTER E WITH BREVE \\ 0x116 & \.{E} & \texttt{} & \texttt{{\textbackslash}.\{E\}} & LATIN CAPITAL LETTER E WITH DOT ABOVE \\ 0x117 & \.{e} & \texttt{} & \texttt{{\textbackslash}.\{e\}} & LATIN SMALL LETTER E WITH DOT ABOVE \\ 0x11a & \v{E} & \texttt{} & \texttt{{\textbackslash}v\{E\}} & LATIN CAPITAL LETTER E WITH CARON \\ 0x11b & \v{e} & \texttt{} & \texttt{{\textbackslash}v\{e\}} & LATIN SMALL LETTER E WITH CARON \\ 0x11c & {\^G} & \texttt{} & \texttt{\{{\textbackslash}\^{ }G\}} & LATIN CAPITAL LETTER G WITH CIRCUMFLEX \\ 0x11d & {\^g} & \texttt{} & \texttt{\{{\textbackslash}\^{ }g\}} & LATIN SMALL LETTER G WITH CIRCUMFLEX \\ 0x11e & \u{G} & \texttt{} & \texttt{{\textbackslash}u\{G\}} & LATIN CAPITAL LETTER G WITH BREVE \\ 0x11f & \u{g} & \texttt{} & \texttt{{\textbackslash}u\{g\}} & LATIN SMALL LETTER G WITH BREVE \\ 0x120 & \.{G} & \texttt{} & \texttt{{\textbackslash}.\{G\}} & LATIN CAPITAL LETTER G WITH DOT ABOVE \\ 0x121 & \.{g} & \texttt{} & \texttt{{\textbackslash}.\{g\}} & LATIN SMALL LETTER G WITH DOT ABOVE \\ 0x122 & \c{G} & \texttt{} & \texttt{{\textbackslash}c\{G\}} & LATIN CAPITAL LETTER G WITH CEDILLA \\ 0x123 & \c{g} & \texttt{} & \texttt{{\textbackslash}c\{g\}} & LATIN SMALL LETTER G WITH CEDILLA \\ 0x124 & {\^H} & \texttt{} & \texttt{\{{\textbackslash}\^{ }H\}} & LATIN CAPITAL LETTER H WITH CIRCUMFLEX \\ 0x125 & {\^h} & \texttt{} & \texttt{\{{\textbackslash}\^{ }h\}} & LATIN SMALL LETTER H WITH CIRCUMFLEX \\ 0x128 & {\~I} & \texttt{} & \texttt{\{{\textbackslash}{\texttildelow}I\}} & LATIN CAPITAL LETTER I WITH TILDE \\ 0x129 & {\~i} & \texttt{} & \texttt{\{{\textbackslash}{\texttildelow}i\}} & LATIN SMALL LETTER I WITH TILDE \\ 0x12c & \u{I} & \texttt{} & \texttt{{\textbackslash}u\{I\}} & LATIN CAPITAL LETTER I WITH BREVE \\ 0x12d & \u{i} & \texttt{} & \texttt{{\textbackslash}u\{i\}} & LATIN SMALL LETTER I WITH BREVE \\ 0x130 & \.{I} & \texttt{} & \texttt{{\textbackslash}.\{I\}} & LATIN CAPITAL LETTER I WITH DOT ABOVE \\ 0x131 & {\i} & \texttt{} & \texttt{\{{\textbackslash}i\}} & LATIN SMALL LETTER DOTLESS I \\ 0x134 & {\^J} & \texttt{} & \texttt{\{{\textbackslash}\^{ }J\}} & LATIN CAPITAL LETTER J WITH CIRCUMFLEX \\ 0x135 & {\^j} & \texttt{} & \texttt{\{{\textbackslash}\^{ }j\}} & LATIN SMALL LETTER J WITH CIRCUMFLEX \\ 0x136 & \c{K} & \texttt{} & \texttt{{\textbackslash}c\{K\}} & LATIN CAPITAL LETTER K WITH CEDILLA \\ 0x137 & \c{k} & \texttt{} & \texttt{{\textbackslash}c\{k\}} & LATIN SMALL LETTER K WITH CEDILLA \\ 0x139 & {\'L} & \texttt{} & \texttt{\{{\textbackslash}'L\}} & LATIN CAPITAL LETTER L WITH ACUTE \\ 0x13a & {\'l} & \texttt{} & \texttt{\{{\textbackslash}'l\}} & LATIN SMALL LETTER L WITH ACUTE \\ 0x13b & \c{L} & \texttt{} & \texttt{{\textbackslash}c\{L\}} & LATIN CAPITAL LETTER L WITH CEDILLA \\ 0x13c & \c{l} & \texttt{} & \texttt{{\textbackslash}c\{l\}} & LATIN SMALL LETTER L WITH CEDILLA \\ 0x13d & \v{L} & \texttt{} & \texttt{{\textbackslash}v\{L\}} & LATIN CAPITAL LETTER L WITH CARON \\ 0x13e & \v{l} & \texttt{} & \texttt{{\textbackslash}v\{l\}} & LATIN SMALL LETTER L WITH CARON \\ 0x143 & {\'N} & \texttt{} & \texttt{\{{\textbackslash}'N\}} & LATIN CAPITAL LETTER N WITH ACUTE \\ 0x144 & {\'n} & \texttt{} & \texttt{\{{\textbackslash}'n\}} & LATIN SMALL LETTER N WITH ACUTE \\ 0x145 & \c{N} & \texttt{} & \texttt{{\textbackslash}c\{N\}} & LATIN CAPITAL LETTER N WITH CEDILLA \\ 0x146 & \c{n} & \texttt{} & \texttt{{\textbackslash}c\{n\}} & LATIN SMALL LETTER N WITH CEDILLA \\ 0x147 & \v{N} & \texttt{} & \texttt{{\textbackslash}v\{N\}} & LATIN CAPITAL LETTER N WITH CARON \\ 0x148 & \v{n} & \texttt{} & \texttt{{\textbackslash}v\{n\}} & LATIN SMALL LETTER N WITH CARON \\ 0x14e & \u{O} & \texttt{} & \texttt{{\textbackslash}u\{O\}} & LATIN CAPITAL LETTER O WITH BREVE \\ 0x14f & \u{o} & \texttt{} & \texttt{{\textbackslash}u\{o\}} & LATIN SMALL LETTER O WITH BREVE \\ 0x152 & {\OE} & \texttt{\Œ} & \texttt{\{{\textbackslash}OE\}} & LATIN CAPITAL LIGATURE OE \\ 0x153 & {\oe} & \texttt{\œ} & \texttt{\{{\textbackslash}oe\}} & LATIN SMALL LIGATURE OE \\ 0x154 & {\'R} & \texttt{} & \texttt{\{{\textbackslash}'R\}} & LATIN CAPITAL LETTER R WITH ACUTE \\ 0x155 & {\'r} & \texttt{} & \texttt{\{{\textbackslash}'r\}} & LATIN SMALL LETTER R WITH ACUTE \\ 0x156 & \c{R} & \texttt{} & \texttt{{\textbackslash}c\{R\}} & LATIN CAPITAL LETTER R WITH CEDILLA \\ 0x157 & \c{r} & \texttt{} & \texttt{{\textbackslash}c\{r\}} & LATIN SMALL LETTER R WITH CEDILLA \\ 0x158 & \v{R} & \texttt{} & \texttt{{\textbackslash}v\{R\}} & LATIN CAPITAL LETTER R WITH CARON \\ 0x159 & \v{r} & \texttt{} & \texttt{{\textbackslash}v\{r\}} & LATIN SMALL LETTER R WITH CARON \\ 0x15a & {\'S} & \texttt{} & \texttt{\{{\textbackslash}'S\}} & LATIN CAPITAL LETTER S WITH ACUTE \\ 0x15b & {\'s} & \texttt{} & \texttt{\{{\textbackslash}'s\}} & LATIN SMALL LETTER S WITH ACUTE \\ 0x15c & {\^S} & \texttt{} & \texttt{\{{\textbackslash}\^{ }S\}} & LATIN CAPITAL LETTER S WITH CIRCUMFLEX \\ 0x15d & {\^s} & \texttt{} & \texttt{\{{\textbackslash}\^{ }s\}} & LATIN SMALL LETTER S WITH CIRCUMFLEX \\ 0x15e & \c{S} & \texttt{} & \texttt{{\textbackslash}c\{S\}} & LATIN CAPITAL LETTER S WITH CEDILLA \\ 0x15f & \c{s} & \texttt{} & \texttt{{\textbackslash}c\{s\}} & LATIN SMALL LETTER S WITH CEDILLA \\ 0x160 & \v{S} & \texttt{\Š} & \texttt{{\textbackslash}v\{S\}} & LATIN CAPITAL LETTER S WITH CARON \\ 0x161 & \v{s} & \texttt{\š} & \texttt{{\textbackslash}v\{s\}} & LATIN SMALL LETTER S WITH CARON \\ 0x162 & \c{T} & \texttt{} & \texttt{{\textbackslash}c\{T\}} & LATIN CAPITAL LETTER T WITH CEDILLA \\ 0x163 & \c{t} & \texttt{} & \texttt{{\textbackslash}c\{t\}} & LATIN SMALL LETTER T WITH CEDILLA \\ 0x164 & \v{T} & \texttt{} & \texttt{{\textbackslash}v\{T\}} & LATIN CAPITAL LETTER T WITH CARON \\ 0x165 & \v{t} & \texttt{} & \texttt{{\textbackslash}v\{t\}} & LATIN SMALL LETTER T WITH CARON \\ 0x168 & {\~U} & \texttt{} & \texttt{\{{\textbackslash}{\texttildelow}U\}} & LATIN CAPITAL LETTER U WITH TILDE \\ 0x169 & {\~u} & \texttt{} & \texttt{\{{\textbackslash}{\texttildelow}u\}} & LATIN SMALL LETTER U WITH TILDE \\ 0x16c & \u{U} & \texttt{} & \texttt{{\textbackslash}u\{U\}} & LATIN CAPITAL LETTER U WITH BREVE \\ 0x16d & \u{u} & \texttt{} & \texttt{{\textbackslash}u\{u\}} & LATIN SMALL LETTER U WITH BREVE \\ 0x174 & {\^W} & \texttt{} & \texttt{\{{\textbackslash}\^{ }W\}} & LATIN CAPITAL LETTER W WITH CIRCUMFLEX \\ 0x175 & {\^w} & \texttt{} & \texttt{\{{\textbackslash}\^{ }w\}} & LATIN SMALL LETTER W WITH CIRCUMFLEX \\ 0x176 & {\^Y} & \texttt{} & \texttt{\{{\textbackslash}\^{ }Y\}} & LATIN CAPITAL LETTER Y WITH CIRCUMFLEX \\ 0x177 & {\^y} & \texttt{} & \texttt{\{{\textbackslash}\^{ }y\}} & LATIN SMALL LETTER Y WITH CIRCUMFLEX \\ 0x178 & {\"Y} & \texttt{\Ÿ} & \texttt{\{{\textbackslash}{\textacutedbl}Y\}} & LATIN CAPITAL LETTER Y WITH DIAERESIS \\ 0x179 & {\'Z} & \texttt{} & \texttt{\{{\textbackslash}'Z\}} & LATIN CAPITAL LETTER Z WITH ACUTE \\ 0x17a & {\'z} & \texttt{} & \texttt{\{{\textbackslash}'z\}} & LATIN SMALL LETTER Z WITH ACUTE \\ 0x17b & \.{Z} & \texttt{} & \texttt{{\textbackslash}.\{Z\}} & LATIN CAPITAL LETTER Z WITH DOT ABOVE \\ 0x17c & \.{z} & \texttt{} & \texttt{{\textbackslash}.\{z\}} & LATIN SMALL LETTER Z WITH DOT ABOVE \\ 0x17d & \v{Z} & \texttt{} & \texttt{{\textbackslash}v\{Z\}} & LATIN CAPITAL LETTER Z WITH CARON \\ 0x17e & \v{z} & \texttt{} & \texttt{{\textbackslash}v\{z\}} & LATIN SMALL LETTER Z WITH CARON \\ 0x192 & {\textflorin} & \texttt{\ƒ} & \texttt{\{{\textbackslash}textflorin\}} & LATIN SMALL LETTER F WITH HOOK \\ 0x1cd & \v{A} & \texttt{} & \texttt{{\textbackslash}v\{A\}} & LATIN CAPITAL LETTER A WITH CARON \\ 0x1ce & \v{a} & \texttt{} & \texttt{{\textbackslash}v\{a\}} & LATIN SMALL LETTER A WITH CARON \\ 0x1cf & \v{I} & \texttt{} & \texttt{{\textbackslash}v\{I\}} & LATIN CAPITAL LETTER I WITH CARON \\ 0x1d0 & \v{i} & \texttt{} & \texttt{{\textbackslash}v\{i\}} & LATIN SMALL LETTER I WITH CARON \\ 0x1d1 & \v{O} & \texttt{} & \texttt{{\textbackslash}v\{O\}} & LATIN CAPITAL LETTER O WITH CARON \\ 0x1d2 & \v{o} & \texttt{} & \texttt{{\textbackslash}v\{o\}} & LATIN SMALL LETTER O WITH CARON \\ 0x1d3 & \v{U} & \texttt{} & \texttt{{\textbackslash}v\{U\}} & LATIN CAPITAL LETTER U WITH CARON \\ 0x1d4 & \v{u} & \texttt{} & \texttt{{\textbackslash}v\{u\}} & LATIN SMALL LETTER U WITH CARON \\ 0x1e6 & \v{G} & \texttt{} & \texttt{{\textbackslash}v\{G\}} & LATIN CAPITAL LETTER G WITH CARON \\ 0x1e7 & \v{g} & \texttt{} & \texttt{{\textbackslash}v\{g\}} & LATIN SMALL LETTER G WITH CARON \\ 0x1e8 & \v{K} & \texttt{} & \texttt{{\textbackslash}v\{K\}} & LATIN CAPITAL LETTER K WITH CARON \\ 0x1e9 & \v{k} & \texttt{} & \texttt{{\textbackslash}v\{k\}} & LATIN SMALL LETTER K WITH CARON \\ 0x1f0 & \v{j} & \texttt{} & \texttt{{\textbackslash}v\{j\}} & LATIN SMALL LETTER J WITH CARON \\ 0x1f4 & {\'G} & \texttt{} & \texttt{\{{\textbackslash}'G\}} & LATIN CAPITAL LETTER G WITH ACUTE \\ 0x1f5 & {\'g} & \texttt{} & \texttt{\{{\textbackslash}'g\}} & LATIN SMALL LETTER G WITH ACUTE \\ 0x1f8 & {\`N} & \texttt{} & \texttt{\{{\textbackslash}`N\}} & LATIN CAPITAL LETTER N WITH GRAVE \\ 0x1f9 & {\`n} & \texttt{} & \texttt{\{{\textbackslash}`n\}} & LATIN SMALL LETTER N WITH GRAVE \\ 0x2c6 & {\textasciicircum} & \texttt{\ˆ} & \texttt{\{{\textbackslash}textasciicircum\}} & MODIFIER LETTER CIRCUMFLEX ACCENT \\ 0x2dc & {\textasciitilde} & \texttt{\˜} & \texttt{\{{\textbackslash}textasciitilde\}} & SMALL TILDE \\ 0x391 & $\mathrm{A}$ & \texttt{\Α} & \texttt{\${\textbackslash}mathrm\{A\}\$} & GREEK CAPITAL LETTER ALPHA \\ 0x392 & $\mathrm{B}$ & \texttt{\Β} & \texttt{\${\textbackslash}mathrm\{B\}\$} & GREEK CAPITAL LETTER BETA \\ 0x393 & $\Gamma$ & \texttt{\Γ} & \texttt{\${\textbackslash}Gamma\$} & GREEK CAPITAL LETTER GAMMA \\ 0x394 & $\Delta$ & \texttt{\Δ} & \texttt{\${\textbackslash}Delta\$} & GREEK CAPITAL LETTER DELTA \\ 0x395 & $\mathrm{E}$ & \texttt{\Ε} & \texttt{\${\textbackslash}mathrm\{E\}\$} & GREEK CAPITAL LETTER EPSILON \\ 0x396 & $\mathrm{Z}$ & \texttt{\Ζ} & \texttt{\${\textbackslash}mathrm\{Z\}\$} & GREEK CAPITAL LETTER ZETA \\ 0x397 & $\mathrm{H}$ & \texttt{\Η} & \texttt{\${\textbackslash}mathrm\{H\}\$} & GREEK CAPITAL LETTER ETA \\ 0x398 & $\Theta$ & \texttt{\Θ} & \texttt{\${\textbackslash}Theta\$} & GREEK CAPITAL LETTER THETA \\ 0x399 & $\mathrm{I}$ & \texttt{\Ι} & \texttt{\${\textbackslash}mathrm\{I\}\$} & GREEK CAPITAL LETTER IOTA \\ 0x39a & $\mathrm{K}$ & \texttt{\Κ} & \texttt{\${\textbackslash}mathrm\{K\}\$} & GREEK CAPITAL LETTER KAPPA \\ 0x39b & $\Lambda$ & \texttt{\Λ} & \texttt{\${\textbackslash}Lambda\$} & GREEK CAPITAL LETTER LAMDA \\ 0x39c & $\mathrm{M}$ & \texttt{\Μ} & \texttt{\${\textbackslash}mathrm\{M\}\$} & GREEK CAPITAL LETTER MU \\ 0x39d & $\mathrm{N}$ & \texttt{\Ν} & \texttt{\${\textbackslash}mathrm\{N\}\$} & GREEK CAPITAL LETTER NU \\ 0x39e & $\Xi$ & \texttt{\Ξ} & \texttt{\${\textbackslash}Xi\$} & GREEK CAPITAL LETTER XI \\ 0x39f & $\mathrm{O}$ & \texttt{\Ο} & \texttt{\${\textbackslash}mathrm\{O\}\$} & GREEK CAPITAL LETTER OMICRON \\ 0x3a0 & $\Pi$ & \texttt{\Π} & \texttt{\${\textbackslash}Pi\$} & GREEK CAPITAL LETTER PI \\ 0x3a1 & $\mathrm{R}$ & \texttt{\Ρ} & \texttt{\${\textbackslash}mathrm\{R\}\$} & GREEK CAPITAL LETTER RHO \\ 0x3a3 & $\Sigma$ & \texttt{\Σ} & \texttt{\${\textbackslash}Sigma\$} & GREEK CAPITAL LETTER SIGMA \\ 0x3a4 & $\mathrm{T}$ & \texttt{\Τ} & \texttt{\${\textbackslash}mathrm\{T\}\$} & GREEK CAPITAL LETTER TAU \\ 0x3a5 & $\Upsilon$ & \texttt{\Υ} & \texttt{\${\textbackslash}Upsilon\$} & GREEK CAPITAL LETTER UPSILON \\ 0x3a6 & $\Phi$ & \texttt{\Φ} & \texttt{\${\textbackslash}Phi\$} & GREEK CAPITAL LETTER PHI \\ 0x3a7 & $\mathrm{X}$ & \texttt{\Χ} & \texttt{\${\textbackslash}mathrm\{X\}\$} & GREEK CAPITAL LETTER CHI \\ 0x3a8 & $\Psi$ & \texttt{\Ψ} & \texttt{\${\textbackslash}Psi\$} & GREEK CAPITAL LETTER PSI \\ 0x3a9 & $\Omega$ & \texttt{\Ω} & \texttt{\${\textbackslash}Omega\$} & GREEK CAPITAL LETTER OMEGA \\ 0x3b1 & $\alpha$ & \texttt{\α} & \texttt{\${\textbackslash}alpha\$} & GREEK SMALL LETTER ALPHA \\ 0x3b2 & $\beta$ & \texttt{\β} & \texttt{\${\textbackslash}beta\$} & GREEK SMALL LETTER BETA \\ 0x3b3 & $\gamma$ & \texttt{\γ} & \texttt{\${\textbackslash}gamma\$} & GREEK SMALL LETTER GAMMA \\ 0x3b4 & $\delta$ & \texttt{\δ} & \texttt{\${\textbackslash}delta\$} & GREEK SMALL LETTER DELTA \\ 0x3b5 & $\epsilon$ & \texttt{\ε} & \texttt{\${\textbackslash}epsilon\$} & GREEK SMALL LETTER EPSILON \\ 0x3b6 & $\zeta$ & \texttt{\ζ} & \texttt{\${\textbackslash}zeta\$} & GREEK SMALL LETTER ZETA \\ 0x3b7 & $\eta$ & \texttt{\η} & \texttt{\${\textbackslash}eta\$} & GREEK SMALL LETTER ETA \\ 0x3b8 & $\theta$ & \texttt{\θ} & \texttt{\${\textbackslash}theta\$} & GREEK SMALL LETTER THETA \\ 0x3b9 & $\iota$ & \texttt{\ι} & \texttt{\${\textbackslash}iota\$} & GREEK SMALL LETTER IOTA \\ 0x3ba & $\kappa$ & \texttt{\κ} & \texttt{\${\textbackslash}kappa\$} & GREEK SMALL LETTER KAPPA \\ 0x3bb & $\lambda$ & \texttt{\λ} & \texttt{\${\textbackslash}lambda\$} & GREEK SMALL LETTER LAMDA \\ 0x3bc & $\mu$ & \texttt{\μ} & \texttt{\${\textbackslash}mu\$} & GREEK SMALL LETTER MU \\ 0x3bd & $\nu$ & \texttt{\ν} & \texttt{\${\textbackslash}nu\$} & GREEK SMALL LETTER NU \\ 0x3be & $\xi$ & \texttt{\ξ} & \texttt{\${\textbackslash}xi\$} & GREEK SMALL LETTER XI \\ 0x3bf & $o$ & \texttt{\ο} & \texttt{\$o\$} & GREEK SMALL LETTER OMICRON \\ 0x3c0 & $\pi$ & \texttt{\π} & \texttt{\${\textbackslash}pi\$} & GREEK SMALL LETTER PI \\ 0x3c1 & $\rho$ & \texttt{\ρ} & \texttt{\${\textbackslash}rho\$} & GREEK SMALL LETTER RHO \\ 0x3c3 & $\sigma$ & \texttt{\σ} & \texttt{\${\textbackslash}sigma\$} & GREEK SMALL LETTER SIGMA \\ 0x3c4 & $\tau$ & \texttt{\τ} & \texttt{\${\textbackslash}tau\$} & GREEK SMALL LETTER TAU \\ 0x3c5 & $\upsilon$ & \texttt{\υ} & \texttt{\${\textbackslash}upsilon\$} & GREEK SMALL LETTER UPSILON \\ 0x3c6 & $\phi$ & \texttt{\φ} & \texttt{\${\textbackslash}phi\$} & GREEK SMALL LETTER PHI \\ 0x3c7 & $\chi$ & \texttt{\χ} & \texttt{\${\textbackslash}chi\$} & GREEK SMALL LETTER CHI \\ 0x3c8 & $\psi$ & \texttt{\ψ} & \texttt{\${\textbackslash}psi\$} & GREEK SMALL LETTER PSI \\ 0x3c9 & $\omega$ & \texttt{\ω} & \texttt{\${\textbackslash}omega\$} & GREEK SMALL LETTER OMEGA \\ 0xe3f & {\textbaht} & \texttt{} & \texttt{\{{\textbackslash}textbaht\}} & THAI CURRENCY SYMBOL BAHT \\ 0x2002 & \phantom{N} & \texttt{\ } & \texttt{{\textbackslash}phantom\{N\}} & EN SPACE \\ 0x2003 & \hspace{1em} & \texttt{\ } & \texttt{{\textbackslash}hspace\{1em\}} & EM SPACE \\ 0x2004 & \hspace{.333333em} & \texttt{} & \texttt{{\textbackslash}hspace\{.333333em\}} & THREE-PER-EM SPACE \\ 0x2005 & \hspace{.25em} & \texttt{} & \texttt{{\textbackslash}hspace\{.25em\}} & FOUR-PER-EM SPACE \\ 0x2006 & \hspace{.166666em} & \texttt{} & \texttt{{\textbackslash}hspace\{.166666em\}} & SIX-PER-EM SPACE \\ 0x2009 & \, & \texttt{\ } & \texttt{{\textbackslash},} & THIN SPACE \\ 0x200c & {} & \texttt{\‌} & \texttt{\{\}} & ZERO WIDTH NON-JOINER \\ 0x2013 & -- & \texttt{\–} & \texttt{--} & EN DASH \\ 0x2014 & --- & \texttt{\—} & \texttt{---} & EM DASH \\ 0x2016 & {\textbardbl} & \texttt{} & \texttt{\{{\textbackslash}textbardbl\}} & DOUBLE VERTICAL LINE \\ 0x2018 & {\textquoteleft} & \texttt{\‘} & \texttt{\{{\textbackslash}textquoteleft\}} & LEFT SINGLE QUOTATION MARK \\ 0x2019 & {\textquoteright} & \texttt{\’} & \texttt{\{{\textbackslash}textquoteright\}} & RIGHT SINGLE QUOTATION MARK \\ 0x201a & {\quotesinglbase} & \texttt{\‚} & \texttt{\{{\textbackslash}quotesinglbase\}} & SINGLE LOW-9 QUOTATION MARK \\ 0x201c & {\textquotedblleft} & \texttt{\“} & \texttt{\{{\textbackslash}textquotedblleft\}} & LEFT DOUBLE QUOTATION MARK \\ 0x201d & {\textquotedblright} & \texttt{\”} & \texttt{\{{\textbackslash}textquotedblright\}} & RIGHT DOUBLE QUOTATION MARK \\ 0x201e & {\quotedblbase} & \texttt{\„} & \texttt{\{{\textbackslash}quotedblbase\}} & DOUBLE LOW-9 QUOTATION MARK \\ 0x2020 & {\textdagger} & \texttt{\†} & \texttt{\{{\textbackslash}textdagger\}} & DAGGER \\ 0x2021 & {\textdaggerdbl} & \texttt{\‡} & \texttt{\{{\textbackslash}textdaggerdbl\}} & DOUBLE DAGGER \\ 0x2022 & {\textbullet} & \texttt{\•} & \texttt{\{{\textbackslash}textbullet\}} & BULLET \\ 0x2026 & {\textellipsis} & \texttt{\…} & \texttt{\{{\textbackslash}textellipsis\}} & HORIZONTAL ELLIPSIS \\ 0x2030 & {\textperthousand} & \texttt{\‰} & \texttt{\{{\textbackslash}textperthousand\}} & PER MILLE SIGN \\ 0x2032 & {\textquotesingle} & \texttt{\′} & \texttt{\{{\textbackslash}textquotesingle\}} & PRIME \\ 0x2033 & {\textquotedbl} & \texttt{\″} & \texttt{\{{\textbackslash}textquotedbl\}} & DOUBLE PRIME \\ 0x2039 & {\guilsinglleft} & \texttt{\‹} & \texttt{\{{\textbackslash}guilsinglleft\}} & SINGLE LEFT-POINTING ANGLE QUOTATION MARK \\ 0x203a & {\guilsinglright} & \texttt{\›} & \texttt{\{{\textbackslash}guilsinglright\}} & SINGLE RIGHT-POINTING ANGLE QUOTATION MARK \\ 0x203e & {\textasciimacron} & \texttt{\‾} & \texttt{\{{\textbackslash}textasciimacron\}} & OVERLINE \\ 0x2044 & {\textfractionsolidus} & \texttt{\⁄} & \texttt{\{{\textbackslash}textfractionsolidus\}} & FRACTION SLASH \\ 0x20a3 & {\textlira} & \texttt{} & \texttt{\{{\textbackslash}textlira\}} & FRENCH FRANC SIGN \\ 0x20a6 & {\textnaira} & \texttt{} & \texttt{\{{\textbackslash}textnaira\}} & NAIRA SIGN \\ 0x20a9 & {\textwon} & \texttt{} & \texttt{\{{\textbackslash}textwon\}} & WON SIGN \\ 0x20ab & {\textdong} & \texttt{} & \texttt{\{{\textbackslash}textdong\}} & DONG SIGN \\ 0x20ac & {\texteuro} & \texttt{\€} & \texttt{\{{\textbackslash}texteuro\}} & EURO SIGN \\ 0x2111 & $\Re$ & \texttt{\ℑ} & \texttt{\${\textbackslash}Re\$} & BLACK-LETTER CAPITAL I \\ 0x2118 & $\wp$ & \texttt{\℘} & \texttt{\${\textbackslash}wp\$} & SCRIPT CAPITAL P \\ 0x211c & $\Im$ & \texttt{\ℜ} & \texttt{\${\textbackslash}Im\$} & BLACK-LETTER CAPITAL R \\ 0x2122 & {\texttrademark} & \texttt{\™} & \texttt{\{{\textbackslash}texttrademark\}} & TRADE MARK SIGN \\ 0x2190 & {\textleftarrow} & \texttt{\←} & \texttt{\{{\textbackslash}textleftarrow\}} & LEFTWARDS ARROW \\ 0x2191 & {\textuparrow} & \texttt{\↑} & \texttt{\{{\textbackslash}textuparrow\}} & UPWARDS ARROW \\ 0x2192 & {\textrightarrow} & \texttt{\→} & \texttt{\{{\textbackslash}textrightarrow\}} & RIGHTWARDS ARROW \\ 0x2193 & {\textdownarrow} & \texttt{\↓} & \texttt{\{{\textbackslash}textdownarrow\}} & DOWNWARDS ARROW \\ 0x2194 & $\leftrightarrow$ & \texttt{\↔} & \texttt{\${\textbackslash}leftrightarrow\$} & LEFT RIGHT ARROW \\ 0x21d0 & $\Leftarrow$ & \texttt{\⇐} & \texttt{\${\textbackslash}Leftarrow\$} & LEFTWARDS DOUBLE ARROW \\ 0x21d1 & $\Uparrow$ & \texttt{\⇑} & \texttt{\${\textbackslash}Uparrow\$} & UPWARDS DOUBLE ARROW \\ 0x21d2 & $\Rightarrow$ & \texttt{\⇒} & \texttt{\${\textbackslash}Rightarrow\$} & RIGHTWARDS DOUBLE ARROW \\ 0x21d3 & $\Downarrow$ & \texttt{\⇓} & \texttt{\${\textbackslash}Downarrow\$} & DOWNWARDS DOUBLE ARROW \\ 0x21d4 & $\Leftrightarrow$ & \texttt{\⇔} & \texttt{\${\textbackslash}Leftrightarrow\$} & LEFT RIGHT DOUBLE ARROW \\ 0x2200 & $\forall$ & \texttt{\∀} & \texttt{\${\textbackslash}forall\$} & FOR ALL \\ 0x2202 & $\partial$ & \texttt{\∂} & \texttt{\${\textbackslash}partial\$} & PARTIAL DIFFERENTIAL \\ 0x2203 & $\exists$ & \texttt{\∃} & \texttt{\${\textbackslash}exists\$} & THERE EXISTS \\ 0x2205 & $\emptyset$ & \texttt{\∅} & \texttt{\${\textbackslash}emptyset\$} & EMPTY SET \\ 0x2207 & $\nabla$ & \texttt{\∇} & \texttt{\${\textbackslash}nabla\$} & NABLA \\ 0x2208 & $\in$ & \texttt{\∈} & \texttt{\${\textbackslash}in\$} & ELEMENT OF \\ 0x2209 & $\notin$ & \texttt{\∉} & \texttt{\${\textbackslash}notin\$} & NOT AN ELEMENT OF \\ 0x220b & $\ni$ & \texttt{\∋} & \texttt{\${\textbackslash}ni\$} & CONTAINS AS MEMBER \\ 0x220f & $\prod$ & \texttt{\∏} & \texttt{\${\textbackslash}prod\$} & N-ARY PRODUCT \\ 0x2211 & $\sum$ & \texttt{\∑} & \texttt{\${\textbackslash}sum\$} & N-ARY SUMMATION \\ 0x2212 & $-$ & \texttt{\−} & \texttt{\$-\$} & MINUS SIGN \\ 0x2217 & $\ast$ & \texttt{\∗} & \texttt{\${\textbackslash}ast\$} & ASTERISK OPERATOR \\ 0x221a & $\surd$ & \texttt{\√} & \texttt{\${\textbackslash}surd\$} & SQUARE ROOT \\ 0x221d & $\propto$ & \texttt{\∝} & \texttt{\${\textbackslash}propto\$} & PROPORTIONAL TO \\ 0x221e & $\infty$ & \texttt{\∞} & \texttt{\${\textbackslash}infty\$} & INFINITY \\ 0x2220 & $\angle$ & \texttt{\∠} & \texttt{\${\textbackslash}angle\$} & ANGLE \\ 0x2227 & $\wedge$ & \texttt{\∧} & \texttt{\${\textbackslash}wedge\$} & LOGICAL AND \\ 0x2228 & $\vee$ & \texttt{\∨} & \texttt{\${\textbackslash}vee\$} & LOGICAL OR \\ 0x2229 & $\cap$ & \texttt{\∩} & \texttt{\${\textbackslash}cap\$} & INTERSECTION \\ 0x222a & $\cup$ & \texttt{\∪} & \texttt{\${\textbackslash}cup\$} & UNION \\ 0x222b & $\int$ & \texttt{\∫} & \texttt{\${\textbackslash}int\$} & INTEGRAL \\ 0x2234 & $\therefore$ & \texttt{\∴} & \texttt{\${\textbackslash}therefore\$} & THEREFORE \\ 0x223c & $\sim$ & \texttt{\∼} & \texttt{\${\textbackslash}sim\$} & TILDE OPERATOR \\ 0x2245 & $\cong$ & \texttt{\≅} & \texttt{\${\textbackslash}cong\$} & APPROXIMATELY EQUAL TO \\ 0x2248 & $\asymp$ & \texttt{\≈} & \texttt{\${\textbackslash}asymp\$} & ALMOST EQUAL TO \\ 0x2260 & $\neq$ & \texttt{\≠} & \texttt{\${\textbackslash}neq\$} & NOT EQUAL TO \\ 0x2261 & $\equiv$ & \texttt{\≡} & \texttt{\${\textbackslash}equiv\$} & IDENTICAL TO \\ 0x2264 & $\leq$ & \texttt{\≤} & \texttt{\${\textbackslash}leq\$} & LESS-THAN OR EQUAL TO \\ 0x2265 & $\geq$ & \texttt{\≥} & \texttt{\${\textbackslash}geq\$} & GREATER-THAN OR EQUAL TO \\ 0x2282 & $\subset$ & \texttt{\⊂} & \texttt{\${\textbackslash}subset\$} & SUBSET OF \\ 0x2283 & $\supset$ & \texttt{\⊃} & \texttt{\${\textbackslash}supset\$} & SUPERSET OF \\ 0x2284 & $\not\subset$ & \texttt{\⊄} & \texttt{\${\textbackslash}not{\textbackslash}subset\$} & NOT A SUBSET OF \\ 0x2286 & $\subseteq$ & \texttt{\⊆} & \texttt{\${\textbackslash}subseteq\$} & SUBSET OF OR EQUAL TO \\ 0x2287 & $\supseteq$ & \texttt{\⊇} & \texttt{\${\textbackslash}supseteq\$} & SUPERSET OF OR EQUAL TO \\ 0x2295 & $\oplus$ & \texttt{\⊕} & \texttt{\${\textbackslash}oplus\$} & CIRCLED PLUS \\ 0x2297 & $\otimes$ & \texttt{\⊗} & \texttt{\${\textbackslash}otimes\$} & CIRCLED TIMES \\ 0x22a5 & $\perp$ & \texttt{\⊥} & \texttt{\${\textbackslash}perp\$} & UP TACK \\ 0x22c5 & $\cdot$ & \texttt{\⋅} & \texttt{\${\textbackslash}cdot\$} & DOT OPERATOR \\ 0x2308 & $\lceil$ & \texttt{\⌈} & \texttt{\${\textbackslash}lceil\$} & LEFT CEILING \\ 0x2309 & $\rceil$ & \texttt{\⌉} & \texttt{\${\textbackslash}rceil\$} & RIGHT CEILING \\ 0x230a & $\lfloor$ & \texttt{\⌊} & \texttt{\${\textbackslash}lfloor\$} & LEFT FLOOR \\ 0x230b & $\rfloor$ & \texttt{\⌋} & \texttt{\${\textbackslash}rfloor\$} & RIGHT FLOOR \\ 0x2329 & $\langle$ & \texttt{\⟨} & \texttt{\${\textbackslash}langle\$} & LEFT-POINTING ANGLE BRACKET \\ 0x232a & $\rangle$ & \texttt{\⟩} & \texttt{\${\textbackslash}rangle\$} & RIGHT-POINTING ANGLE BRACKET \\ 0x25ca & $\lozenge$ & \texttt{\◊} & \texttt{\${\textbackslash}lozenge\$} & LOZENGE \\ 0x2660 & $\spadesuit$ & \texttt{\♠} & \texttt{\${\textbackslash}spadesuit\$} & BLACK SPADE SUIT \\ 0x2663 & $\clubsuit$ & \texttt{\♣} & \texttt{\${\textbackslash}clubsuit\$} & BLACK CLUB SUIT \\ 0x2665 & $\heartsuit$ & \texttt{\♥} & \texttt{\${\textbackslash}heartsuit\$} & BLACK HEART SUIT \\ 0x2666 & $\diamondsuit$ & \texttt{\♦} & \texttt{\${\textbackslash}diamondsuit\$} & BLACK DIAMOND SUIT \\ \bottomrule \end{xtabular} \end{center} } \end{document} LaTeX-Encode-0.091.6/MYMETA.yml0000644000175000017500000000115712404070415014561 0ustar chrischris--- abstract: 'encode characters for LaTeX formatting' author: - 'Andrew Ford ' build_requires: Carp::Always: 0 Test::More: 0 configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 0 generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120921, CPAN::Meta::Converter version 2.132140' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: LaTeX-Encode no_index: directory: - t - inc requires: Getopt::Long: 0 HTML::Entities: 0 Pod::LaTeX: 0 Pod::Usage: 0 Readonly: 0 version: 0.08 LaTeX-Encode-0.091.6/Changes0000644000175000017500000000535312314543323014342 0ustar chrischris2014-03-25 Chris Travers * version 0.091.3 * Further regexp fixes for 5.19 bracket handling 2014-03-24 Chris Travers * version 0.091.1 * Fixed Test Cases failing taint mode under Perl 5.12 and lower. 2014-03-23 Chris Travers * version 0.09 * Added additional test case for some entities to make verify table * Merged in LaTeX::Encode::EncodingTable 2012-09-30 Andrew Ford * version 0.08 * change t/11-unmatched-chars.t to use an unmatched ideographic character instead of 0x{ffff} as some versions of perl protest about having an illegal Unicode character in a string. 2012-09-23 Andrew Ford * version 0.07 * remove use of 'parent' in generated module * add handling of unmatched characters * add note about Unicode data that does not have the UTF8 flag set 2012-08-29 Andrew Ford * version 0.06 * added script "latex-encode" as a simple filter that uses LaTeX::Encode * added a couple more encodings * reverted to 'base' from 'parent' for setting up inheritance * updated author tests 2012-08-28 Andrew Ford * version 0.05 * added more symbols * build-character-table now builds a %provided_by map that gives the LaTeX package that provides the LaTeX command used in the encoding * removed unimplemented "use_textcomp" option * added "packages" option to latex_encode() to pass a reference to a hash that is updated with the names of optional LaTeX packages (styles) that implement the commands included in the encoded string 2012-08-27 Andrew Ford * version 0.04 * added requirement for Perl 5.8.1 or later due to deficiencies in Unicode handling of earlier Perl versions. * updated encoding table to add Turkish characters (RT #55526) and to not include spaces after accented characters (RT #49357) * switch from 'base' to 'parent' for setting up inheritance * added add_latex_encodings() and remove_latex_encodings() functions to update the encoding table. * allow 'add' and 'remove' specifiers to be provided on the 'use' statement 2007-10-03 Andrew Ford * version 0.03 2007-10-02 Andrew Ford * version 0.02 * added a script build-character-table to build the hash of characters to be encoded. 2007-09-20 Andrew Ford * 0.01 - Initial version LaTeX-Encode-0.091.6/META.json0000664000175000017500000000217712404070431014466 0ustar chrischris{ "abstract" : "encode characters for LaTeX formatting", "author" : [ "Chris Travers " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.132140", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "LaTeX-Encode", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "Carp::Always" : "0", "Test::More" : "0" } }, "runtime" : { "requires" : { "Getopt::Long" : "0", "HTML::Entities" : "0", "Pod::LaTeX" : "0", "Pod::Usage" : "0", "Readonly" : "0" } } }, "release_status" : "stable", "resources" : { "repository" : { "type" : "git", "url" : "https://github.com/einhverfr/LaTeX-Encode.git", "web" : "https://github.com/einhverfr/LaTeX-Encode" } }, "version" : "v0.091.6" } LaTeX-Encode-0.091.6/t/0000755000175000017500000000000012404070431013277 5ustar chrischrisLaTeX-Encode-0.091.6/t/07-reset-encodings.t0000755000175000017500000000130112302644214017002 0ustar chrischris#!/usr/bin/perl # $Id: 07-reset-encodings.t 19 2012-08-29 06:19:44Z andrew $ use strict; use warnings; use Test::More tests => 5; use blib; use LaTeX::Encode qw(:all); is(latex_encode('$'), '\\$', 'pre remove_latex_encoding (\'$\' => \'\\$\')'); my %removed_encodings = remove_latex_encodings( qw($) ); ok(exists $removed_encodings{'$'}, 'remove_latex_encodings returns hash with key \'$\''); is($removed_encodings{'$'}, '\\$', 'removed encoding hash element \'$\' has value \'\\$\''); is(latex_encode('$'), '$', 'post remove_latex_encoding (\'$\' => \'$\')'); LaTeX::Encode->reset_latex_encodings(); is(latex_encode('$'), '\\$', 'post reset_latex_encoding (\'$\' => \'\\$\')'); LaTeX-Encode-0.091.6/t/09-packages-reqd.t0000755000175000017500000000071612302613176016436 0ustar chrischris#!/usr/bin/perl # $Id: 09-packages-reqd.t 19 2012-08-29 06:19:44Z andrew $ use strict; use warnings; use Test::More tests => 3; use blib; use LaTeX::Encode; my $packages = {}; my $string = latex_encode(chr(0x20a4) . chr(0x263f), { packages => $packages }); is($string, '{\\textlira}{\\Mercury}', 'translation ok'); ok(exists $packages->{'textcomp'}, 'required package indicated'); ok(exists $packages->{'marvosym'}, 'required package indicated'); LaTeX-Encode-0.091.6/t/11-unmatched-chars.t0000755000175000017500000000066712303023147016765 0ustar chrischris#!/usr/bin/perl # $Id: 04-utf8.t 27 2012-08-30 19:54:25Z andrew $ use strict; use warnings; use blib; use LaTeX::Encode; use charnames qw(); use Test::More tests => 3; is(latex_encode("a\nb"), "a\nb", 'string including newline' ); is(latex_encode("a\rb"), "a\rb", 'string including carriage return' ); is(latex_encode("a\x{f900}b"), "a\\unmatched{f900}b", 'string including an unsupported ideograph' ); LaTeX-Encode-0.091.6/t/91-pod.t0000755000175000017500000000051112303023202014465 0ustar chrischris#!/usr/bin/perl # $Id: 91-pod.t 27 2012-08-30 19:54:25Z andrew $ use strict; use Test::More; BEGIN { plan( skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.' ) unless $ENV{TEST_AUTHOR}; } eval "use Test::Pod"; plan skip_all => "Test::Pod required for testing POD" if $@; all_pod_files_ok(); LaTeX-Encode-0.091.6/t/05-add-encodings.t0000755000175000017500000000140512302613176016416 0ustar chrischris#!/usr/bin/perl # $Id: 05-add-encodings.t 19 2012-08-29 06:19:44Z andrew $ use strict; use warnings; use Test::More tests => 6; use blib; use LaTeX::Encode qw(:all); is(latex_encode('A'), 'A', 'pre add_latex_encoding (\'A\' => \'A\')'); is(latex_encode('$'), '\\$', 'pre add_latex_encoding (\'$\' => \'\\$\')'); is(latex_encode("\x{00A3}"), '{\\textsterling}', 'post add_latex_encoding (\'£\' => \'{\\textsterling}\')'); add_latex_encodings( 'A' => 'B'); add_latex_encodings( '$' => 'DOLLAR', "\x{00A3}" => 'POUND'); is(latex_encode('A'), 'B', 'post add_latex_encoding (\'A\' => \'B\')'); is(latex_encode('$'), 'DOLLAR', 'post add_latex_encoding (\'$\' => \'DOLLAR\')'); is(latex_encode("\x{00A3}"), 'POUND', 'post add_latex_encoding (\'£\' => \'POUND\')'); LaTeX-Encode-0.091.6/t/perlcriticrc0000644000175000017500000000050412303023216015703 0ustar chrischris# perlcriticrc file for our Test::Perl::Critic tests # $Id: perlcriticrc 19 2012-08-29 06:19:44Z andrew $ severity = 3 only = 1 force = 0 verbose = 4 top = 50 theme = (pbp || security) && bugs include = NamingConventions ClassHierarchies exclude = Variables Modules::RequirePackage color = 0 LaTeX-Encode-0.091.6/t/08-import-specs.t0000755000175000017500000000272512302613176016355 0ustar chrischris#!/usr/bin/perl # $Id: 08-import-specs.t 19 2012-08-29 06:19:44Z andrew $ use strict; use warnings; use Test::More tests => 9; use blib; use LaTeX::Encode ':all', add => { "\$" => 'DOLLAR', "\x{00A3}" => 'POUND' }, remove => [ qw( % ) ]; diag('add/remove specified on \'use LaTeX::Encode\''); is(latex_encode('$'), 'DOLLAR', '\'$\' => \'DOLLAR\' - mapping added on import'); is(latex_encode("\x{00A3}"), 'POUND', '\'£\' => \'POUND\' - mapping added on import'); is(latex_encode('%'), '%', '\'%\' => \'%\') - mapping removed on import'); diag('resetting and forgetting mappings specified on import'); LaTeX::Encode->reset_latex_encodings(1); is(latex_encode('$'), '\\$', '\'$\' => \'\\$\' - standard mapping restored on reset'); is(latex_encode("\x{00A3}"), '{\\textsterling}', '\'£\' => \'{\\textsterling}\' - standard mapping restored on reset'); is(latex_encode('%'), '\\%', '\'%\' => \'\\%\' - standard mapping restored on reset'); diag('resetting and remembering mappings specified on import'); LaTeX::Encode->reset_latex_encodings(); is(latex_encode('$'), 'DOLLAR', '\'$\' => \'DOLLAR\' - our mapping restored on reset'); is(latex_encode("\x{00A3}"), 'POUND', '\'£\' => \'POUND\' - our mapping restored on reset'); is(latex_encode('%'), '%', '\'%\' => \'%\') - our mapping restored on reset'); LaTeX-Encode-0.091.6/t/10-typeset-document.t0000755000175000017500000000342212316425101017217 0ustar chrischris#!/usr/bin/perl # $Id: 10-typeset-document.t 27 2012-08-30 19:54:25Z andrew $ use strict; use warnings; use blib; use FindBin; use File::Basename; use IO::File; use LaTeX::Encode; use charnames qw(); use Test::More; my $latex_bin = find_latex(); if ($latex_bin) { plan skip_all => 'This is failing on some platforms due to dependencies'; #plan tests => 1; } else { plan skip_all => 'cannot find \'latex\' binary'; } my $table_body = ''; my %latex_encoding = %LaTeX::Encode::latex_encoding; foreach my $char (sort keys %latex_encoding) { my $charcode = ord($char); my $charname = charnames::viacode($charcode); my $encoding = $latex_encoding{$char}; $table_body .= sprintf(" U+%04x & %s & \\verb@%s@ & %s \\\\\n", $charcode, $encoding, $encoding, $charname || 'unnamed character'); } my $document = <new(">$FindBin::Bin/$basename.tex"); $fh->print($document); undef $fh; my $rc = system("cd $FindBin::Bin; $latex_bin '\\nonstopmode\\input{$basename.tex}'"); is($rc, 0, "typesetting table"); foreach my $ext (qw(aux dvi log tex)) { unlink "$FindBin::Bin/$basename.$ext"; } sub find_latex { foreach my $dir (qw{ /usr/bin /bin }) { my $prog = "$dir/latex"; return $prog if -x $prog; } return; } LaTeX-Encode-0.091.6/t/01-filter.t0000644000175000017500000000140412302613176015174 0ustar chrischris#!/usr/bin/perl # $Id: 01-filter.t 17 2012-08-29 06:16:11Z andrew $ use strict; use warnings; use Test::More tests => 7; use blib; use LaTeX::Encode; # Basic special characters: \ { } & # ^ _ $ % is(latex_encode('AT&T'), "AT\\&T", "'&' - ampersand"); is(latex_encode('\\LaTeX'), "{\\textbackslash}LaTeX", "'\\' - backslash"); is(latex_encode('$0.01'), "\\\$0.01", "'\$' - dollar"); is(latex_encode('10% discount'), '10\\% discount', "'%' - per cent"); is(latex_encode('mod_perl'), 'mod\\_perl', "'_' - underscore"); is(latex_encode('Looking after #1'), 'Looking after \\#1', "'#' - hash sign"); is(latex_encode('\\textbf{AT&T}', except => '\\{}'), "\\textbf{AT\\&T}", "emboldened text"); LaTeX-Encode-0.091.6/t/92-pod-coverage.t0000755000175000017500000000054012303023203016262 0ustar chrischris#!/usr/bin/perl # $Id: 92-pod-coverage.t 30 2012-09-25 20:24:40Z andrew $ use strict; use Test::More; plan( skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.' ) unless $ENV{TEST_AUTHOR}; eval "use Test::Pod::Coverage"; plan skip_all => "Test::Pod::Coverage required for testing POD coverage" if $@; all_pod_coverage_ok(); LaTeX-Encode-0.091.6/t/04-utf8.t0000755000175000017500000000303012302635762014605 0ustar chrischris#!/usr/bin/perl # $Id: 04-utf8.t 27 2012-08-30 19:54:25Z andrew $ use strict; use warnings; use blib; use LaTeX::Encode; use charnames qw(); my %latex_encoding = %LaTeX::Encode::latex_encoding; my $tests = 8 + scalar(keys %latex_encoding); warn $tests; use Test::More; plan tests => $tests; ok(int keys %latex_encoding > 300, "encoding table isn\'t empty (has " . int(keys %latex_encoding) . " keys)"); # spot checks is($latex_encoding{chr(0x0024)}, '\\$', 'encoding for: dollar sign' ); is($latex_encoding{chr(0x00a2)}, '{\\textcent}', 'encoding for: cent sign' ); is($latex_encoding{chr(0x00a3)}, '{\\textsterling}', 'encoding for: pound sign' ); is($latex_encoding{chr(0x00a5)}, '{\\textyen}', 'encoding for: yen sign' ); is($latex_encoding{chr(0x0192)}, '{\\textflorin}', 'encoding for: florin' ); is($latex_encoding{chr(0x2020)}, '{\\textdagger}', 'encoding for: dagger' ); is($latex_encoding{chr(0x20ac)}, '{\\texteuro}', 'encoding for: euro sign' ); # thorough test of all entries in encoding table foreach my $char (sort keys %latex_encoding) { my $encoding = $latex_encoding{$char}; my $charcode = ord($char); my $charname = charnames::viacode($charcode) || ''; my $comment = $charname || "unnamed character encoded as '$encoding'"; warn(sprintf('encoding for charcode U+%04d is undefined', $charcode)) if !defined $encoding; is(latex_encode("$charname: $char."), "$charname: $encoding.", sprintf("translating U+%04x (%s)", $charcode, $comment)); } LaTeX-Encode-0.091.6/t/90-kwalitee.t0000755000175000017500000000060312303023200015507 0ustar chrischris#!/usr/bin/perl # $Id: 90-kwalitee.t 27 2012-08-30 19:54:25Z andrew $ use strict; use Test::More; plan( skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.' ) unless $ENV{TEST_AUTHOR}; eval { require Test::Kwalitee; Test::Kwalitee->import( tests => [ qw( -has_meta_yml) ] ); }; plan( skip_all => 'Test::Kwalitee not installed; skipping' ) if $@; LaTeX-Encode-0.091.6/t/06-remove-encodings.t0000755000175000017500000000110412302613176017160 0ustar chrischris#!/usr/bin/perl # $Id: 06-remove-encodings.t 19 2012-08-29 06:19:44Z andrew $ use strict; use warnings; use Test::More tests => 4; use blib; use LaTeX::Encode qw(:all); is(latex_encode('$'), '\\$', 'pre remove_latex_encoding (\'$\' => \'\\$\')'); my %removed_encodings = remove_latex_encodings( qw($) ); ok(exists $removed_encodings{'$'}, 'remove_latex_encodings returns hash with key \'$\''); is($removed_encodings{'$'}, '\\$', 'removed encoding hash element \'$\' has value \'\\$\''); is(latex_encode('$'), '$', 'post remove_latex_encoding (\'$\' => \'$\')'); LaTeX-Encode-0.091.6/t/02-iquotes.t0000755000175000017500000000234212302613176015406 0ustar chrischris#!/usr/bin/perl # $Id: 02-iquotes.t 17 2012-08-29 06:16:11Z andrew $ use strict; use warnings; use Test::More tests => 7; use blib; use LaTeX::Encode; # Basic special characters: \ { } & # ^ _ $ % is(latex_encode('blah "double quoted string" blah', { iquotes => 1 }), "blah ``double quoted string'' blah", "double quoted string"); is(latex_encode("blah\n\"double quoted string\"\nblah", { iquotes => 1 }), "blah\n``double quoted string''\nblah", "double quoted string on a separate line"); is(latex_encode('blah:"double quoted string" blah', { iquotes => 1 }), "blah:``double quoted string'' blah", "double quoted string with preceding punctuation"); is(latex_encode("blah 'single quoted string' blah", { iquotes => 1 }), "blah `single quoted string' blah", "single quoted string"); is(latex_encode("blah\n'single quoted string'\nblah", { iquotes => 1 }), "blah\n`single quoted string'\nblah", "single quoted string on a separate line"); is(latex_encode("blah:'single quoted string' blah", { iquotes => 1 }), "blah:`single quoted string' blah", "single quoted string with preceding punctuation"); is(latex_encode("isn't, doesn't", { iquotes => 1 }), "isn't, doesn't", "abbreviations"); exit(0); LaTeX-Encode-0.091.6/t/93-perl-critic.t0000755000175000017500000000114212303023207016130 0ustar chrischris#!/usr/bin/perl # $Id: 93-perl-critic.t 17 2012-08-29 06:16:11Z andrew $ use strict; use warnings; use FindBin qw($Bin); use File::Spec; use Test::More; use English qw(-no_match_vars); if ( not $ENV{TEST_AUTHOR} ) { my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.'; plan( skip_all => $msg ); } eval { require Test::Perl::Critic; }; if ( $EVAL_ERROR ) { my $msg = 'Test::Perl::Critic required to criticise code'; plan( skip_all => $msg ); } my $rcfile = File::Spec->catfile( $Bin, 'perlcriticrc' ); Test::Perl::Critic->import( -profile => $rcfile ); all_critic_ok(); LaTeX-Encode-0.091.6/t/03-iso-latin1.t0000755000175000017500000000116012302613176015673 0ustar chrischris#!/usr/bin/perl # $Id: 03-iso-latin1.t 19 2012-08-29 06:19:44Z andrew $ use strict; use warnings; use Test::More tests => 4; use blib; use LaTeX::Encode; is_conversion_ok('24', 'dollar sign', '\\$'); is_conversion_ok('a2', 'cent sign', '{\\textcent}'); is_conversion_ok('a3', 'pound sign', '{\\textsterling}'); is_conversion_ok('a5', 'yen sign', '{\\textyen}'); sub is_conversion_ok { my ($code, $name, $translation) = @_; my $codestr = sprintf('\x%s', $code); $codestr = eval "\"$codestr\""; is(latex_encode("$name: $codestr."), "$name: $translation.", "0x$code - $name"); return; } LaTeX-Encode-0.091.6/t/00-basic.t0000755000175000017500000000025312314030764014772 0ustar chrischris#!/usr/bin/perl -T # $Id: 00-basic.t 17 2012-08-29 06:16:11Z andrew $ use strict; use warnings; use Carp::Always; use Test::More tests => 1; use_ok("LaTeX::Encode"); LaTeX-Encode-0.091.6/META.yml0000664000175000017500000000113712404070431014311 0ustar chrischris--- abstract: 'encode characters for LaTeX formatting' author: - 'Chris Travers ' build_requires: Carp::Always: 0 Test::More: 0 dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.132140' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: LaTeX-Encode no_index: directory: - t - inc requires: Getopt::Long: 0 HTML::Entities: 0 Pod::LaTeX: 0 Pod::Usage: 0 Readonly: 0 resources: repository: https://github.com/einhverfr/LaTeX-Encode.git version: v0.091.6 LaTeX-Encode-0.091.6/MYMETA.json0000644000175000017500000000210112404070415014717 0ustar chrischris{ "abstract" : "encode characters for LaTeX formatting", "author" : [ "Andrew Ford " ], "dynamic_config" : 0, "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120921, CPAN::Meta::Converter version 2.132140", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "LaTeX-Encode", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "Carp::Always" : "0", "Test::More" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Getopt::Long" : "0", "HTML::Entities" : "0", "Pod::LaTeX" : "0", "Pod::Usage" : "0", "Readonly" : "0" } } }, "release_status" : "stable", "version" : "0.08" } LaTeX-Encode-0.091.6/MANIFEST0000644000175000017500000000136612302613176014201 0ustar chrischrisMakefile.PL MANIFEST README Changes TODO MYMETA.yml MYMETA.json lib/LaTeX/Encode.pm lib/LaTeX/Encode/EncodingTable.pm scripts/README scripts/build-encoding-table scripts/format-encoding-reference scripts/latex-encode scripts/character-encodings.tex scripts/character-encodings.dvi t/00-basic.t t/01-filter.t t/02-iquotes.t t/03-iso-latin1.t t/04-utf8.t t/05-add-encodings.t t/06-remove-encodings.t t/07-reset-encodings.t t/08-import-specs.t t/09-packages-reqd.t t/10-typeset-document.t t/11-unmatched-chars.t t/90-kwalitee.t t/91-pod.t t/92-pod-coverage.t t/93-perl-critic.t t/perlcriticrc META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker)