1Biber::LaTeX::Recode(3)User Contributed Perl DocumentatioBniber::LaTeX::Recode(3)
2
3
4
6 Biber::LaTeX::Recode - Encode/Decode chars to/from UTF-8/lacros in
7 LaTeX
8
10 use Biber::LaTeX:Recode
11
12 my $string = 'MuXammad ibn MXsX al-KhwXrizmX';
13 my $latex_string = latex_encode($string);
14 # => 'Mu\d{h}ammad ibn M\=us\=a al-Khw\=arizm\={\i}'
15
16 my $string = 'Mu\d{h}ammad ibn M\=us\=a al-Khw\=arizm\={\i}';
17 my $utf8_string = latex_decode($string);
18 # => 'MuXammad ibn MXsX al-KhwXrizmX'
19
21 Allows conversion between Unicode chars and LaTeX macros.
22
24 Possible values for the encoding/decoding set to use are 'null', 'base'
25 and 'full'; default value is 'base'.
26
27 null => No conversion
28
29 base => Most common macros and diacritics (sufficient for Western
30 languages
31 and common symbols)
32
33 full => Also converts punctuation, larger range of diacritics and
34 macros
35 (e.g. for IPA, Latin Extended Additional, etc.), symbols,
36 Greek letters,
37 dingbats, negated symbols, and superscript characters and
38 symbols ...
39
40 init_sets(<decode set>, <encode_set>)
41 Initialise recoding sets. We can't do this on loading the module as we don't have the config
42 information to do this yet
43
44 latex_decode($text, @options)
45 Converts LaTeX macros in the $text to Unicode characters.
46
47 The function accepts a number of options:
48
49 * normalize => $bool (default 1)
50 whether the output string should be normalized with Unicode::Normalize
51
52 * normalization => <normalization form> (default 'NFD')
53 and if yes, the normalization form to use (see the Unicode::Normalize documentation)
54
55 latex_encode($text, @options)
56 Converts UTF-8 to LaTeX
57
59 Philip Kime "<philip at kime.org.uk>"
60
62 Please report any bugs or feature requests on our Github tracker at
63 <https://github.com/plk/biber/issues>.
64
66 Copyright 2009-2012 Francois Charette and Philip Kime, all rights
67 reserved. Copyright 2012-2019 Philip Kime, all rights reserved.
68
69 This module is free software. You can redistribute it and/or modify it
70 under the terms of the Artistic License 2.0.
71
72 This program is distributed in the hope that it will be useful, but
73 without any warranty; without even the implied warranty of
74 merchantability or fitness for a particular purpose.
75
76
77
78perl v5.32.0 2020-07-27 Biber::LaTeX::Recode(3)