`bbdb-print'
------------
`bbdb-print' is a utility for pretty-printing entries from the BBDB
using TeX. It is invoked by pressing `P' in the `*BBDB*' buffer - this
will cause all records in the BBDB to be printed as governed by the
variables described below. If `P' is prefixed by a `*', only the
currently-displayed records will be printed. Once invoked, `bbdb-print'
will generate the TeX output in a buffer named `~/bbdb.tex' (controlled
by `bbdb-print-file-name'). The generated output will be shown, and
must be manually saved.
For each record printed, `bbdb-print' will look for the presence of
the `tex-name' field. If this field is found, its value will be printed
instead of the `name' field for the record in question. This field is
intended to allow the storage of names with accents or other characters
that would be illegal in the address portion of a message. While other
fields have special characters quoted by `bbdb-print' as described
below, the contents of the `tex-name' field (if present) are used
verbatim.
The following variables govern the printing of records (and of the
printing of the fields therein):
`bbdb-print-elide'
This variable should be set to a list of the fields that are not
to be printed by `bbdb-print'. It defaults to:
`(tex-name aka mail-alias)'
`bbdb-print-file-name'
The name of the file where generated TeX output is to be stored.
The default is `~/bbdb.tex'.
`bbdb-print-require'
The fields required for printing a record. This allows, for
example, only records with phone numbers to be printed. The value
of the value of the variable will be evaluated once for each
record, and the record will be printed only if the evaluation
returns a non-nil value. The symbols `name', `company', `net',
`phone', `address', and `notes' will be set to the appropriate
values during evaluation; they will be nil if the field does not
exist or is elided.
The value of this variable can be any lisp expression, but
typically it will be used for a boolean combination of the field
variables, as in the following simple examples:
* Print only people whose phone numbers are known:
`(setq bbdb-print-require 'phone)'
* Print people whose names AND companies are known:
`(setq bbdb-print-require '(and name company))'
* Print people whose names, and either addresses OR phone
numbers are known:
`(setq bbdb-print-require '(and name (or address phone))).'
The default value is:
`(or address phone)'
`bbdb-print-alist'
Formatting options for all formats of `bbdb-print'. The value is
an alist of the form
`((OPTION . VALUE) (OPTION . VALUE) ...)'
Separate settings can be
configured using `bbdb-print-brief-alist' and
`bbdb-print-full-alist'. Settings in these variables will
override the ones in `bbdb-print-alist'.
The possible options and legal settings are:
`columns'
`1', `2', `3', `4', `quad' (4 little 2-column pages per
sheet) or `grid' (12 credit-card-sized pages per sheet).
`separator'
`0'-`7', the style of heading for each letter. `0'=none,
`1'=line, `2'=boxed letters, `3'=large boxed letters,
`4'=large letters, `5'=letters with lines, `6'=letters with
suits, `7'=boxed letters with suits.
`omit-area-code'
A regular expression matching area codes to omit.
`phone-on-first-line'
If `t', the first phone number will be put on the same line
as the name. If `nil', the name will be the only text on the
line. If set to a string, the field of type `phone' whose
name matches the string will be used. The string should be a
valid regular expression.
`n-phones'
Maximum number of phone numbers to include.
`n-addresses'
Maximum number of addresses to include.
`include-files'
List of TeX files to `\input'. If the filenames are not
absolute, the files must be located somewhere in the TeX
input path.
`ps-fonts'
Postscript fonts (TimesNewRoman and Courier) will be used if
the value is non-`nil'. Standard TeX fonts (ec-fonts) will
be used otherwise.
`font-size'
The integer point size of the font to be used.
`hsize'
The horizontal dimension of the pages. The value must be a
string, and must be a valid TeX dimension. Alternatively,
the TeX default will be used if the value is `nil'.
`vsize'
The vertical dimension of the pages. The value must be a
string, and must be a valid TeX dimension. Alternatively,
the TeX default will be used if the value is `nil'.
`hoffset'
The TeX output will be offset to the right by the value of
this option. The value must be either a string containing a
valid TeX dimension or `nil' or `0' to use the default TeX
horizontal offset.
`voffset'
The TeX output will be offset downward by the value of this
option. The value must be either a string containing a valid
TeX dimension or `nil' or `0' to use the default TeX vertical
offset.
`quad-hsize'
Horizontal size to be used for the individual pages in the
quad format. The value must be a string containing a valid
TeX dimension.
`quad-vsize'
Vertical size to be used for the individual pages in the quad
format. The value must be a string containing a valid TeX
dimension.
The default value is
((omit-area-code . "(AREA-CODE)")
(phone-on-first-line . "^[ \t]*$")
(ps-fonts . nil)
(font-size . 6)
(quad-hsize . "3.15in")
(quad-vsize . "4.5in"))
Where AREA-CODE is the value of `bbdb-default-area-code' or `000'
if there is no default area code.
`bbdb-print-brief-alist'
Extra options for the `bbdb-print' brief format. The value(s) of
this variable can either supplement or override the values in
`bbdb-print-alist'. The format and possible values of this
variable are as in `bbdb-print-alist', described above.
The default value is
((columns . 1)
(separator . 1)
(n-phones . 2)
(n-addresses . 1)
(include-files "bbdb-print-brief" "bbdb-cols"))
`bbdb-print-full-alist'
Extra options for the `bbdb-print' non-brief format. The value(s)
of this variable can either supplement or override the values in
`bbdb-print-alist'. The format and possible values of this
variable are as in `bbdb-print-alist', described above.
The default value is
((columns . 3)
(separator . 2)
(include-files "bbdb-print" "bbdb-cols"))
`bbdb-print-prolog'
TeX statements to include at the beginning of the `bbdb-print'
output file.
`bbdb-print-epilog'
TeX statements to include at the end of the `bbdb-print' output
file.