Text::...BibSort(3pm)
π NAME π
okay so bestie, welcome to Text::BibTeX::BibSort β that's the 3pm Perl manual page from the User Contributed Perl Documentation, and the header line is folded right in here so you don't have to stare at it. This module is literally here to generate sort keys for bibliographic entries. Slay. π
β¨ SYNOPSIS β¨
Here's the vibe, bestie β code first:
# Assuming $entry comes from a database of the 'Bib' structure
# (i.e., that it's blessed into the BibEntry class, which inherits
# the sort_key method from BibSort):
$sort_key = $entry->sort_key;
π¦ DESCRIPTION π¦
Text::BibTeX::BibSort is a base class of Text::BibTeX::BibEntry for generating sort keys from bibliography entries. It could in principle (and, someday, might) offer a wide range of highly customizable sort-key generators. Currently, though, it provides only a single method (sort_key) for public use, and that method only pays attention to one structure option, sortby.
π« METHODS π«
π§ sort_key () π§
sort_key () generates a sort key for a single bibliographic entry. It assumes this entry conforms to the Bib database structure. The nature of this sort key is controlled by the sortby option, which can be either name or year. (The namestyle also has a role, in determining how author/editor names are formatted for inclusion in the sort key.)
For by-name sorting (which is how BibTeX's standard styles work), the sort key consists of one of the author, editor, organization, or key fields (depending on the entry type and which fields are actually present), followed by the year and the title. All fields are drastically simplified to produce the sort key: non-English letters are mercilessly anglicized, non-alphabetic characters are stripped, and everything is forced to lowercase. (The first two steps are done by the purify_string routine; see "Generic string-processing functions" in Text::BibTeX for a brief description, and the description of the C function bt_purify_string() in bt_misc for all the gory details.)
π SEE ALSO π
go peek at these icons:
Text::BibTeX::StructureText::BibTeX::BibText::BibTeX::BibFormat
π AUTHOR π
The author is Greg Ward <gward@python.net> β icon. π
π COPYRIGHT π
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.
β¨ That's the whole page, bestie. Footer sign-off: from perl v5.42.0, dated 2025-01-31, and it's the Text::...BibSort(3pm) manual page. Bye fr fr! ππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Text-BibTeX 0.910.0-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Text-BibTeX 0.910.0-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Text-BibTeX 0.910.0-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Text-BibTeX 0.910.0-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms