Biber::LaTeX::Recode(3pm) User Contributed Perl Documentation Biber::LaTeX::Recode(3pm)
NAME
Biber::LaTeX::Recode - Encode/Decode chars to/from UTF-8/lacros in LaTeX
SYNOPSIS
use Biber::LaTeX:Recode
my $string = 'MuXammad ibn MXsX al-KhwXrizmX';
my $latex_string = latex_encode($string);
# => 'Mud{h}ammad ibn M=us=a al-Khw=arizm={i}'
my $string = 'Mud{h}ammad ibn M=us=a al-Khw=arizm={i}';
my $utf8_string = latex_decode($string);
# => 'MuXammad ibn MXsX al-KhwXrizmX'
DESCRIPTION
Allows conversion between Unicode chars and LaTeX macros.
GLOBAL OPTIONS
Possible values for the encoding/decoding scheme to use are 'base' and 'full'; default value is 'base'.
base => Most common macros and diacritics (sufficient for Western languages
and common symbols)
full => Also converts punctuation, larger range of diacritics and macros
(e.g. for IPA, Latin Extended Additional, etc.), symbols, Greek letters,
dingbats, negated symbols, and superscript characters and symbols ...
init_schemes(<decode scheme>, <encode_scheme>)
Initialise schemes. We can't do this on loading the module as we don't have the config
information to do this yet
latex_decode($text, @options)
Converts LaTeX macros in the $text to Unicode characters.
The function accepts a number of options:
* normalize => $bool (default 1)
whether the output string should be normalized with Unicode::Normalize
* normalization => <normalization form> (default 'NFC')
and if yes, the normalization form to use (see the Unicode::Normalize documentation)
* strip_outer_braces => $bool (default 0)
whether the outer curly braces around letters+combining marks should be
stripped off. By default "fut{\'e}" becomes fut{e}, to prevent something
like '\textuppercase{\'e}' from becoming '\textuppercasee'. Setting this option to
TRUE can be useful for instance when converting BibTeX files.
latex_encode($text, @options)
Converts LaTeX character macros to UTF-8
AUTHOR
Francois Charette, "<firmicus at ankabut.net>" Philip Kime "<philip at kime.org.uk>"
BUGS
Please report any bugs or feature requests on our sourceforge tracker at <https://sourceforge.net/tracker2/?func=browse&group_id=228270>.
COPYRIGHT & LICENSE
Copyright 2009-2012 Francois Charette and Philip Kime, all rights reserved.
This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.
This program 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.
perl v5.14.2 2012-06-17 Biber::LaTeX::Recode(3pm)