GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LaTeXML::Common::Object(3) User Contributed Perl Documentation LaTeXML::Common::Object(3)

"LaTeXML::Common::Object" - abstract base class for most LaTeXML objects.

"LaTeXML::Common::Object" serves as an abstract base class for all other objects (both the data objects and control objects). It provides for common methods for stringification and comparison operations to simplify coding and to beautify error reporting.

"$string = Stringify($object);"
Returns a string identifying $object, for debugging. Works on any values and objects, but invokes the stringify method on blessed objects. More informative than the default perl conversion to a string.
"$string = ToString($object);"
Converts $object to string attempting, when possible, to generate straight text without TeX markup. This is most useful for converting Tokens or Boxes to document content or attribute values, or values to be used for pathnames, keywords, etc. Generally, however, it is not possible to convert Whatsits generated by Constructors into clean strings, without TeX markup. Works on any values and objects, but invokes the toString method on blessed objects.
"$boolean = Equals($x,$y);"
Compares the two objects for equality. Works on any values and objects, but invokes the equals method on blessed objects, which does a deep comparison of the two objects.
"$tokens = Revert($object);"
Returns a Tokens list containing the TeX that would create $object. Note that this is not necessarily the original TeX code; expansions or other substitutions may have taken place.

"$string = $object->stringify;"
Returns a readable representation of $object, useful for debugging.
"$string = $object->toString;"
Returns the string content of $object; most useful for extracting a clean, usable, Unicode string from tokens or boxes that might representing a filename or such. To the extent possible, this should provide a string that can be used as XML content, or attribute values, or for filenames or whatever. However, control sequences defined as Constructors may leave TeX code in the value.
"$boole = $object->equals($other);"
Returns whether $object and $other are equal. Should perform a deep comparison, but the default implementation just compares for object identity.
"$boole = $object->isaToken;"
Returns whether $object is an LaTeXML::Core::Token.
"$boole = $object->isaBox;"
Returns whether $object is an LaTeXML::Core::Box.
"$boole = $object->isaDefinition;"
Returns whether $object is an LaTeXML::Core::Definition.
"$digested = $object->beDigested;"
Does whatever is needed to digest the object, and return the digested representation. Tokens would be digested into boxes; Some objects, such as numbers can just return themselves.
"$object->beAbsorbed($document);"
Do whatever is needed to absorb the $object into the $document, typically by invoking appropriate methods on the $document.

Bruce Miller <bruce.miller@nist.gov>

Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.
2021-05-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.