Text::...bFormat(3pm)

okay bestie, welcome to the Text::...bFormat(3pm) page from the User Contributed Perl Documentation πŸ’– β€” it's giving Text::BibTeX::BibFormat realness, and we're about to make bibliography formatting make sense, no cap.

🌸 NAME 🌸

Text::BibTeX::BibFormat β€” formats bibliography entries. periodt. ✨

✨ SYNOPSIS ✨

# Assuming $entry comes from a database of the 'Bib' structure
# (i.e., that it's blessed into the BibEntry class, which inherits
# the format method from BibFormat):
@blocks = $entry->format;

so like, if $entry came from a 'Bib' database, you can just call $entry->format and get @blocks back. iconic behavior honestly 🫢

πŸ’– DESCRIPTION πŸ’–

The Text::BibTeX::BibFormat class is a base class of Text::BibTeX::BibEntry for formatting bibliography entries. it's literally doing the main-character job of any program that would hope to supplant BibTeX itself πŸ‘‘ the other important job β€” sorting β€” is handled by its companion class, Text::BibTeX::BibSort.

quick nickname moment: BibFormat is what we're calling it here, because the Text::BibTeX prefix gets dropped for brevity. πŸ’…

BibFormat pays attention to almost all of the structure options described in Text::BibTeX::Bib; it only ignores those that cover sorting, currently just sortby. in particular, all of the markup options control what language is generated by BibFormat; if none of those options are set, then it will generate plain, unmarked text. lowkey clean, highkey useful 🌈

the only method in BibFormat's documented interface (so far) is format. the class defines many other methods, but these should not be necessary to outsiders, so they are undocumented and subject to change. so yeah β€” don't get attached to the hidden methods, bestie πŸ™ˆ

πŸŽ€ METHODS πŸŽ€

format ()

Formats a single entry for inclusion in the bibliography of some document. the exact processing performed is highly dependent on the entry type and the fields present; in general, you should be able to join format's outputs together to create a single paragraph for inclusion in a document of whatever markup language you're working with. very flexible, very demure ✨

Returns a list of "blocks," which can either be jammed together like sentences (for a traditional "tight" bibliography) or printed on separate lines (for an "open" bibliography format). each block is a reference to a list of sentences; sentences should be joined together with an intervening period. each sentence is either a single string or a list of clauses; clauses should be joined together with an intervening comma. each clause is just a simple string. okay structure queen πŸ’…

See the source code for btformat for an example of how to use the output of format. iykyk πŸ¦‹

🌈 SEE ALSO 🌈

  • Text::BibTeX::Structure
  • Text::BibTeX::Bib
  • Text::BibTeX::BibSort

πŸ’« AUTHOR πŸ’«

Greg Ward <gward@python.net> β€” yes, that Greg Ward. legends only πŸ”₯

Copyright (c) 1997-2000 by Gregory P. Ward. All rights reserved. This file is part of the Text::BibTeX library. This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself. legal slay, read it and respect it πŸŽ€


mwah πŸ’‹ this page is perl v5.42.0, dated 2025-01-31, and yes β€” it's still the Text::...bFormat(3pm) page. bye bestie, go format some bibliography entries 🌸

πŸ“¦ where this page comes from