Biber:...Recode(3pm)

πŸ¦‹ Biber::LaTeX::Recode β€” the manual, but make it cute

okay bestie, so this is a page from the User Contributed Perl Documentation for a little Perl module called Biber::LaTeX::Recode, and honestly? it's giving translator-energy. πŸ’…


✨ NAME ✨

Biber::LaTeX::Recode β€” it encodes and decodes chars to and from UTF-8 / lacros in LaTeX. that's the whole job. no cap.


🌸 SYNOPSIS 🌸

here's how you actually use it, bestie:

use Biber::LaTeX:Recode

my $string = 'MuαΈ₯ammad ibn MΕ«sā al-KhwārizmΔ«';
my $latex_string = latex_encode($string);
    # => 'Mu\d{h}ammad ibn M\=us\=a al-Khw\=arizm\={\i}'

my $string = 'Mu\d{h}ammad ibn M\=us\=a al-Khw\=arizm\={\i}';
my $utf8_string   = latex_decode($string);
    # => 'MuαΈ₯ammad ibn MΕ«sā al-KhwārizmΔ«'

like… she goes both ways and she does it flawlessly. 🫢 (and yes, use Biber::LaTeX:Recode is written exactly like that in the original β€” not me being chaotic, I promise. copy it as-is, iykyk.)


πŸ’– DESCRIPTION πŸ’–

Allows conversion between Unicode chars and LaTeX macros. that's it. that's the vibe. Unicode in, LaTeX out; LaTeX in, Unicode out. iconic behaviour honestly.


πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

so there are encoding/decoding sets you can pick from, and the possible values are 'null', 'base' and 'full'. the default? 'base'. periodt.

  • null β€” No conversion. literally nothing happens. she's off duty. πŸ’€
  • base β€” Most common macros and diacritics (sufficient for Western languages and common symbols). this is the default, so it's what you get if you don't say anything.
  • 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 ... the overachiever of the group. 🌈

πŸŽ€ init_sets(<decode set>, <encode_set>)

Initialise recoding sets. We can't do this on loading the module as we don't have the config information to do this yet. so like… she needs her info first, bestie. don't rush her. πŸ™ˆ


πŸ¦‹ latex_decode($text, @options)

Converts LaTeX macros in the $text to Unicode characters. reverse-uno card, slay.

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 'NFD') β€” and if yes, the normalization form to use (see the Unicode::Normalize documentation)

⭐ latex_encode($text, @options)

Converts UTF-8 to LaTeX. yeah. that's the description. short and confident, we respect it. ✨


πŸ’œ AUTHOR πŸ’œ

Philip Kime "<philip at kime.org.uk>" β€” the legend herself. πŸ‘‘


πŸ“ BUGS πŸ“

Please report any bugs or feature requests on our Github tracker at <https://github.com/plk/biber/issues>.

bestie if something's broken, tell the tracker, not the group chat. fr fr.

Copyright 2009-2012 FranΓ§ois Charette and Philip Kime, all rights reserved. Copyright 2012-2026 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.


okay that's the whole page, no notes. πŸ’– this was Biber:...Recode(3pm) on perl v5.42.3, dated 2026-08-14 β€” mwah, go forth and recode, main character. πŸŽ€πŸ’…

πŸ“¦ where this page comes from