The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

LaTeXML::Util::Unicode - Unicode Utilities.

SYNOPSIS

LaTeXML::Util::Unicode provides several useful utilities for manipulating Unicode for LaTeXML, mostly to assist with mathematics.

DESCRIPTION

$string = UTF($codepoint);

Converts the given numeric codepoint to unicode. This is useful for codepoints under 255, such as UTF(0xA0) for non-breaking space, which perl does not reliably handle.

$mathvariant = unicode_mathvariant($font);

Converts the font to a Unicode-appropriate mathvariant. The font should be in the string form generally found during post-processing, eg "bold italic". The mathvariant returned can be used in MathML, or passed to unicode_convert to convert strings into the given style.

$unicode = unicode_convert($string,$style);

Converts the given string to the codepoints correspinding to the requested style. Returns undef if not all characters in the string can be converted. The recognized styles are bold, italic, bold-italic, sans-serif, bold-sans-serif, sans-serif-italic, sans-serif-bold-italic, monospace, script, bold-script, fraktur, bold-fraktur, double-struck, as well as superscript and subscript.