LaTeXML(3pm)
πΈ NAME πΈ
LaTeXML(3pm) β okay so this is the User Contributed Perl Documentation page for LaTeXML, and LaTeXML is a converter that transforms TeX and LaTeX into XML/HTML/MathML. That's the whole vibe, bestie. β¨
π SYNOPSIS π
Here's the group-chat cheat sheet, literally:
use LaTeXML;
my $converter = LaTeXML->get_converter($config);
my $converter = LaTeXML->new($config);
$converter->prepare_session($opts);
$converter->initialize_session; # SHOULD BE INTERNAL
$hashref = $converter->convert($tex);
my ($result,$log,$status)
= map {$hashref->{$_}} qw(result log status);
sidebar: the synopsis itself says# SHOULD BE INTERNALnext toinitialize_session, so don't go treating it like a normal main-character call, okay? π
π DESCRIPTION π
LaTeXML is a converter that transforms TeX and LaTeX into XML/HTML/MathML and other formats. No cap, that's the whole iconic job. π
A LaTeXML object represents a converter instance and can convert files on demand, until dismissed. It's giving "your own little convert-y bestie that hangs around until you're done with it." π¦
π¦ METHODS π¦
my $converter = LaTeXML->new($config);β Creates a new converter object for a givenLaTeXML::Common::Configobject,$config. Fresh converter, just dropped. β¨my $converter = LaTeXML->get_converter($config);β Either creates, or looks up a cached converter for the$configconfiguration object. It's very "have we already made this one? bet." π$converter->prepare_session($opts);β Top-level preparation routine that prepares both a correct options object and an initializedLaTeXMLobject, using theinitialize_optionsandinitialize_sessionroutines, when needed.
Contains optimization checks that skip initializations unless necessary.
Also adds support for partial option specifications during daemon runtime, falling back on the option defaults given when converter object was created.
my ($result,$status,$log) = $converter->convert($tex);β Converts a TeX input string$texinto theLaTeXML::Core::Documentobject$result.
Supplies detailed information of the conversion log ($log), as well as a brief conversion status summary ($status).
π₯ INTERNAL ROUTINES π₯
$converter->initialize_session($opts);β Given an options hash reference$opts, initializes a session by creating a newLaTeXMLobject with initialized state and loading a daemonized preamble (if any).
Sets the "ready" flag to true, making a subsequent convert call immediately possible.
my $latexml = new_latexml($opts);β Creates a newLaTeXMLobject and initializes its state.my $postdoc = $converter->convert_post($dom);β Post-processes aLaTeXML::Core::Documentobject$dominto a final format, based on the preferences specified in$$self{opts}.
Typically used only internally by convert.
$converter->bind_log;β BindsSTDERRto a"log"field in the$converterobject.my $log = $converter->flush_log;β Flushes out the accumulated conversion log into$log, resettingSTDERRto its usual stream.
π AUTHOR π
Bruce Miller <bruce.miller@nist.gov> and Deyan Ginev <deyan.ginev@nist.gov>. Legends, fr fr. π«Ά
π COPYRIGHT π
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US. You may consider this as released under the CC0 License.
So yeah β public domain, government-made, CC0 License vibes. Periodt. π
okay bye bestie β this was the LaTeXML(3pm) page, from perl v5.40.1, dated 2025-11-16. mwah ππ
π¦ where this page comes from
- ubuntu resolute: latexml 0.8.8-4 Β· PD
- ubuntu stonking: latexml 0.8.8-4 Β· PD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms