1Text::BibTeX::BibFormatU(s3eprm)Contributed Perl DocumenTteaxtti:o:nBibTeX::BibFormat(3pm)
2
3
4

NAME

6       Text::BibTeX::BibFormat - formats bibliography entries
7

SYNOPSIS

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

DESCRIPTION

15       The "Text::BibTeX::BibFormat" class is a base class of
16       "Text::BibTeX::BibEntry" for formatting bibliography entries.  It thus
17       performs the main job of any program that would hope to supplant BibTeX
18       itself; the other important job (sorting) is handled by its companion
19       class, "Text::BibTeX::BibSort".
20
21       "BibFormat" (the "Text::BibTeX" prefix will be dropped for brevity)
22       pays attention to almost all of the structure options described in
23       Text::BibTeX::Bib; it only ignores those that cover sorting, currently
24       just "sortby".  In particular, all of the "markup" options control what
25       language is generated by "BibFormat"; if none of those options are set,
26       then it will generate plain, unmarked text.
27
28       The only method in "BibFormat"'s documented interface (so far) is
29       "format".  (The class defines many other methods, but these should not
30       be necessary to outsiders, so they are undocumented and subject to
31       change.)
32

METHODS

34       format ()
35           Formats a single entry for inclusion in the bibliography of some
36           document.  The exact processing performed is highly dependent on
37           the entry type and the fields present; in general, you should be
38           able to join "format"'s outputs together to create a single
39           paragraph for inclusion in a document of whatever markup language
40           you're working with.
41
42           Returns a list of "blocks," which can either be jammed together
43           like sentences (for a traditional "tight" bibliography) or printed
44           on separate lines (for an "open" bibliography format).  Each block
45           is a reference to a list of sentences; sentences should be joined
46           together with an intervening period.  Each sentence is either a
47           single string or a list of clauses; clauses should be joined
48           together with an intervening comma.  Each clause is just a simple
49           string.
50
51           See the source code for "btformat" for an example of how to use the
52           output of "format".
53

SEE ALSO

55       Text::BibTeX::Structure, Text::BibTeX::Bib, Text::BibTeX::BibSort
56

AUTHOR

58       Greg Ward <gward@python.net>
59
61       Copyright (c) 1997-2000 by Gregory P. Ward.  All rights reserved.  This
62       file is part of the Text::BibTeX library.  This library is free
63       software; you may redistribute it and/or modify it under the same terms
64       as Perl itself.
65
66
67
68perl v5.38.0                      2023-07-21      Text::BibTeX::BibFormat(3pm)
Impressum