---
name: "LaTeXML::Util::Unicode"
section: "3pm"
platform: "linux"
package: "latexml"
version: "0.8.8-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/LaTeXML::Util::Unicode"
---

# LaTeXML::Util::Unicode(3pm)

Unicode Utilities.

## 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"`.
