.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Text::BibTeX::BibFormat 3pm" .TH Text::BibTeX::BibFormat 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Text::BibTeX::BibFormat \- formats bibliography entries .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& # Assuming $entry comes from a database of the \*(AqBib\*(Aq structure \& # (i.e., that it\*(Aqs blessed into the BibEntry class, which inherits \& # the format method from BibFormat): \& @blocks = $entry\->format; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The \f(CW\*(C`Text::BibTeX::BibFormat\*(C'\fR class is a base class of \&\f(CW\*(C`Text::BibTeX::BibEntry\*(C'\fR for formatting bibliography entries. It thus performs the main job of any program that would hope to supplant BibTeX itself; the other important job (sorting) is handled by its companion class, \f(CW\*(C`Text::BibTeX::BibSort\*(C'\fR. .PP \&\f(CW\*(C`BibFormat\*(C'\fR (the \f(CW\*(C`Text::BibTeX\*(C'\fR prefix will be dropped for brevity) pays attention to almost all of the structure options described in Text::BibTeX::Bib; it only ignores those that cover sorting, currently just \f(CW\*(C`sortby\*(C'\fR. In particular, all of the "markup" options control what language is generated by \f(CW\*(C`BibFormat\*(C'\fR; if none of those options are set, then it will generate plain, unmarked text. .PP The only method in \f(CW\*(C`BibFormat\*(C'\fR's documented interface (so far) is \&\f(CW\*(C`format\*(C'\fR. (The class defines many other methods, but these should not be necessary to outsiders, so they are undocumented and subject to change.) .SH METHODS .IX Header "METHODS" .IP "format ()" 4 .IX Item "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 \f(CW\*(C`format\*(C'\fR's outputs together to create a single paragraph for inclusion in a document of whatever markup language you're working with. .Sp 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. .Sp See the source code for \f(CW\*(C`btformat\*(C'\fR for an example of how to use the output of \f(CW\*(C`format\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" Text::BibTeX::Structure, Text::BibTeX::Bib, Text::BibTeX::BibSort .SH AUTHOR .IX Header "AUTHOR" Greg Ward .SH COPYRIGHT .IX Header "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.