LaTeXML...:BibTeX(3)
π NAME π
okay bestie, you're on the LaTeXML...:BibTeX(3) page β yes, a User Contributed Perl Documentation moment β and here's the name tea: "LaTeXML::Pre::BibTeX" β implements a BibTeX parser for LaTeXML. Periodt. β¨
β¨ DESCRIPTION β¨
okay so "LaTeXML::Pre::BibTeX" is your low-level parser bestie for BibTeX database files. It parses and stores a LaTeXML::Pre::BibTeX::Entry for each entry into the current STATE. BibTeX "string" macros get substituted into the field values, but no other processing of the data is done β that's important, no extra glow-ups here. See "LaTeXML::Package::BibTeX.pool.ltxml" for how further processing is carried out, and how it can be customized. π
π Creating a BibTeX π
my $bib = LaTeXML::Pre::BibTeX->newFromFile($bibname);β Creates aLaTeXML::Pre::BibTeXobject representing a bibliography from a BibTeX database file. iconic.my $bib = LaTeXML::Pre::BibTeX->newFromString($string);β Creates aLaTeXML::Pre::BibTeXobject representing a bibliography from a string containing the BibTeX data. slay.
π οΈ Methods π οΈ
$string = $bib->toTeX;β Returns a string containing the TeX code to be digested by a LaTeXML object to process the bibliography. The string contains all@PREAMBLEdata and invocations of"\\ProcessBibTeXEntry{$key}"for each bibliographic entry. The$keycan be used to lookup the data from$STATEasLookupValue('BIBITEM@'.$key). See"BibTeX.pool"for how the processing is carried out. no cap, that's the whole method.
π BibEntry objects π
The representation of a BibTeX entry. That's the vibe.
$type = $bibentry->getType;β Returns a string naming the entry type of the entry (No aliasing is done here).$key = $bibentry->getKey;β Returns the bibliographic key for the entry.@fields = $bibentry->getFields;β Returns a list of pairs[$name,$value]representing all fields, in the order defined, for the entry. Both the$nameand$valueare strings. Field names may be repeated, if they are in the bibliography.$value = $bibentry->getField($name);β Returns the value (orundef) associated with the the given field name. If the field was repeated in the bibliography, only the last one is returned. yes bestie, only the last one.
π AUTHOR π
Bruce Miller <bruce.miller@nist.gov> β the icon behind this. π«Ά
π COPYRIGHT π
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US. fr fr, that's the legal tea. π
catch u later, bestie π β this cute little footer moment is brought to you by perl v5.42.3, dated 2024-02-26, on the LaTeXML...:BibTeX(3) page. mwah πβ¨
π¦ where this page comes from
- nixos 26.05: perl5.42.3-LaTeXML 0.8.8
- nixpkgs unstable: perl5.42.3-LaTeXML 0.8.8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms