| 1 |
LaTeX-Encode |
| 2 |
============ |
| 3 |
|
| 4 |
LaTeX::Encode exports the function 'latex_encode()' which encodes characters in a string, that |
| 5 |
would be incorrectly interpreted by LaTeX. |
| 6 |
|
| 7 |
Additional mappings can be added to the standard encoding table with the 'add_latex_encodings()' |
| 8 |
function, while encodings can be removed with the 'remove_latex_encodings()' function. Additions |
| 9 |
and deletions can also be specified on the 'use' statement (e.g.: "use LaTeX::Encode add => { '@' |
| 10 |
=> 'AT' };". |
| 11 |
|
| 12 |
|
| 13 |
The 'latex_encode()' function takes a text string and an optional reference to a hash of options. |
| 14 |
The options currently supported are "exclude" to specify a list of characters that should not be |
| 15 |
encoded (often this is "\\{}" to allow LaTeX commands to be used in the text string), and |
| 16 |
"iquotes" to enable "intelligent quotes", that is double quotes around a phrase will be converted |
| 17 |
to "``" and "''" and single quotes to "`" and "'". |
| 18 |
|
| 19 |
Note that 'latex_encode()' will encode a utf8 string (a string with the utf8 flag set) or a |
| 20 |
non-utf8 string, which will normally be regarded as ISO-8859-1 (Latin 1) and will be upgraded to |
| 21 |
utf8. If you are seeing spurious LaTeX commands in the output then it may be that you are reading |
| 22 |
from a UTF-8 input or have data with UTF-8 characters in a literal but the utf8 flag is not being |
| 23 |
set correctly. Refer to the perlunicode, perluniintro and perlunitut manual pages for more details. |
| 24 |
|
| 25 |
|
| 26 |
The scripts directory contains scripts to help build the character encoding tables used by the |
| 27 |
module and to create and format a document listing the characters that the module encodes with |
| 28 |
their Unicode character value, HTML entity representation, LaTeX encoding and visual |
| 29 |
representation. These scripts are not installed by "make install". |
| 30 |
|
| 31 |
|
| 32 |
INSTALLATION |
| 33 |
|
| 34 |
To install this module, run the following commands: |
| 35 |
|
| 36 |
perl Makefile.PL |
| 37 |
make |
| 38 |
make test |
| 39 |
make install |
| 40 |
|
| 41 |
|
| 42 |
COPYRIGHT AND LICENCE |
| 43 |
|
| 44 |
Copyright (C) 2007-2012, Andrew Ford <[email protected]> |
| 45 |
|
| 46 |
This library is free software; you can redistribute it and/or modify |
| 47 |
it under the same terms as Perl itself. |