Alberto Manuel Brandão Simões > Text-BibTeX-0.70 > Text::BibTeX::BibSort

Download:
Text-BibTeX-0.70.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  3
View/Report Bugs
Module Version: 0.1   Source  

NAME ^

Text::BibTeX::BibSort - generate sort keys for bibliographic entries

SYNOPSIS ^

   # 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 ()

Generates a sort key for a single bibliographic entry. 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 descripton of the C function bt_purify_string() in bt_misc for all the gory details.)

SEE ALSO ^

Text::BibTeX::Structure, Text::BibTeX::Bib, Text::BibTeX::BibFormat

AUTHOR ^

Greg Ward <gward@python.net>

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.

syntax highlighting:
http://search.cpan.org/~ambs/Text-BibTeX-0.70/lib/Text/BibTeX/BibSort.pm
search.cpan.org
crawl=CC-MAIN-2014-41
14411
application/http; msgtype=response
sha1:NWBRFGIFUR22DQGAH4MYZK4K5KOQEBZW
<urn:uuid:08cb2b4c-6180-43d7-ae44-bd439ed63224>
2014-09-30T22:40:54Z
199.15.177.149
sha1:AFKQYHUTQPVFQ6HRI2PW72HXZEAOCSYD
<urn:uuid:1b1c34a9-d382-4b79-b5a6-26c7b5322293>
http://search.cpan.org/~ambs/Text-BibTeX-0.70/lib/Text/BibTeX/BibSort.pm
response
<urn:uuid:f6484ffa-d2a3-4d49-9302-db3085592644>
robots: classic
hostname: ip-10-234-18-248.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2014-41
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for September 2014
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf