LaTeX::Decode(3pm)

πŸ“¦
version 0.05 Β· 2 versions
  • 0.05 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.05 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– LaTeX::Decode β€” bestie edition πŸ’–

okay so real talk, this is the LaTeX::Decode manual page, and it's here to teach you how to turn LaTeX into Unicode like the icon you are. ✨


✨ VERSION ✨

Version 0.05 β€” she's grown, she's stable, she's serving. πŸ’…


🌸 SYNOPSIS 🌸

use LaTeX::Decode;

my $latex_string = 'Mu\\d{h}ammad ibn M\\=us\=a al-Khw\\=arizm\\={\\i}';
my $new_string   = latex_decode($latex_string); # => 'MuXammad ibn MXsX al-KhwXrizmX'

like. look at that. LaTeX goes in, Unicode comes out. main character transformation arc fr fr. πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

not me checking the DESCRIPTION section and it's… literally empty πŸ’€ no cap, there is genuinely nothing written here in the original. moving on bestie, the real tea is in FUNCTIONS.

🧚 EXPORT 🧚

also empty!! πŸ™ˆ the original says nothing here either. we don't gatekeep, we just report the facts. onto the good stuff.

πŸ‘‘ FUNCTIONS πŸ‘‘

latex_decode($text, %options)

Decodes the given text from LaTeX to Unicode. that's the whole job and she does it flawlessly, no notes. 🌈

The function accepts a number of options:

  • normalize => $bool (default 0) β€” whether the output string should be normalized with Unicode::Normalize. lowkey a yes from me.
  • normalization => <normalization form> (default 'NFC') β€” and if yes (see above), which normalization form to use. go read the Unicode::Normalize documentation for the deets, iykyk. ✨
  • 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}, and the reason is to prevent something like \textuppercase{\'e} from becoming \textuppercasee. Setting this option to TRUE can be useful for instance when converting BibTeX files. 🫢

πŸ’œ GLOBAL OPTIONS πŸ’œ

The decoding scheme can be set with

$LaTeX::Decode::DefaultScheme = '<name>';

Possible values are 'base', 'extra' and 'full'; default value is 'extra'. ⭐

TODO : explain these scheme! β€” nope, that's not me being lazy, that's literally what the original says. the author left us on read. πŸ’€
  • base => Most common macros and diacritics (sufficient for Western languages and common symbols)
  • extra => Also converts punctuation, larger range of diacritics and macros (e.g. for IPA, Latin Extended Additional, etc.)
  • full => Also converts symbols, Greek letters, dingbats, negated symbols, and superscript characters and symbols …

🌟 AUTHOR 🌟

Francois Charette, "<firmicus@cpan.org>" β€” thank you king, we appreciate you. πŸ‘‘


πŸ”₯ BUGS πŸ”₯

Please report any bugs or feature requests to "bug-latex-decode at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=LaTeX-Decode>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. so like, you will hear back, no ghosting here bestie. πŸ’–


Copyright 2009-2015 Francois Charette, 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. (translation: she's giving free software realness, but don't come for her if something breaks, okay? 😭)


and that's the whole page, you absolute legend. this was LaTeX::Decode manual page, perl v5.36.0, dated 2022-11-27, and you read all of it. slay. go decode something gorgeous. periodt. πŸ’…βœ¨