summaryrefslogtreecommitdiff
path: root/tex/bbdb-print-brief.tex
blob: f1162708d7ba5586dc44b076789f5f367bdb8c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
%%% bbdb-print-brief.tex - for formatting address lists, one line per entry.

%%% Authors: Luigi Semenzato <luigi@paris.cs.berkeley.edu>
%%%          Boris Goldowsky <boris@cs.rochester.edu>
%%% Copyright (C) 1993 Boris Goldowsky
%%% Version: 3.91; 19Dec94

%%% For instructions on using this format file with BBDB, see bbdb-print.el
%%% which should have come bundled with this file; or write to
%%% boris@cs.rochester.edu.

%%% This file is part of the bbdb-print extensions to the Insidious
%%% Big Brother Database, which is for use with GNU Emacs.
%%%
%%% The Insidious Big Brother Database is free software; you can redistribute
%%% it and/or modify it under the terms of the GNU General Public License as
%%% published by the Free Software Foundation; either version 1, or (at your
%%% option) any later version.
%%%
%%% BBDB is distributed in the hope that it will be useful, but WITHOUT ANY
%%% WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
%%% FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
%%% details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with GNU Emacs; see the file COPYING.  If not, write to
%%% the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

%%% The address-list file should look something like this:

%%% \input file          % this format file's filename
%%% \setsize{6}          % point size of type to use
%%%                      % or \setpssize{6} to use PostScript fonts. (optional)
%%% \setseparator{3}     % which style of separators, 0-7
%%%
%%% \separator{A}        % include a separator here
%%%
%%% \beginrecord         % and start a record
%%% \name{A. Name}
%%% \phone{location: (xxx) xxx-xxxx}
%%% \address{1234 Main Street\\
%%% Anytown, XX 00000\\}
%%% \note{note name}{note text}
%%% \notes{blah blah}
%%% \endrecord
%%% 
%%% \endaddresses        % done
%%% \bye

\nopagenumbers
\raggedright
\tolerance=10000
\hbadness=10000
\parskip 0pt
\parindent=0pt  % was 10pt

%%%
%%% Fonts
%%%

\def\setsize#1{
  \font\rm=ecrm#1
  \font\bf=ecbx#1
  \font\it=\ifnum #1=6 ecti7 \else ecti#1 \fi
  \font\tt=ectt#1
  \font\bigbf=ecbx#1 scaled \magstep3
  \rm
  \baselineskip=#1pt
  \ifnum #1>9 \advance\baselineskip by 1pt \fi
}

\def\setpssize#1{
  \font\rm=ptmr at #1pt
  \font\bf=ptmb at #1pt
  \font\it=ptmri at #1pt
  \font\tt=pcrr at #1pt
  {\dimen0=#1pt\global\font\bigbf=ptmb at 1.8\dimen0}
  \rm
  \baselineskip=#1pt
}

%%%
%%% Define separator types
%%% 

\def\setseparator#1{
  \ifnum #1=1
    \def\sep##1{\line{\hrulefill}\smallskip\mark{##1}}
  \else \ifnum #1=2
    \def\sep##1{\hbox{\vrule\hskip -0.4pt\vbox{\hrule\smallskip
            \centerline{\bf{##1}}\smallskip\hrule}\hskip -0.4pt\vrule
            \mark{##1}}}
  \else \ifnum #1=3
    \def\sep##1{\hbox{\vrule\hskip -0.4pt\vbox{\hrule\smallskip
            \centerline{\bigbf{##1}}\smallskip\hrule}\hskip -0.4pt\vrule}
            \medskip\mark{##1}}
  \else \ifnum #1=4
    \def\sep##1{\smallskip\centerline{\bigbf{##1}}\medskip\mark{##1}}
  \else \ifnum #1=5
    \def\sep##1{\hrule\smallskip
            \centerline{\bigbf{##1}}\smallskip\hrule\medskip\mark{##1}}
  \else \ifnum #1=6
    \def\cute{$\sya\syb\syc\syd$}
    \def\revcute{$\syd\syc\syb\sya$}
    \let\sya=\heartsuit\let\syb=\spadesuit
      \let\syc\diamondsuit\let\syd=\clubsuit
    \def\cycle{\let\tmp=\sya\let\sya=\syb
                   \let\syb=\syc\let\syc=\syd\let\syd=\tmp}
    \def\sep##1{\smallskip
        \hbox to \hsize{\hfil\cute\hfil\bigbf{##1}\hfil\revcute\hfil}
        \cycle\medskip\mark{##1}}
  \else \ifnum #1=7
    \def\cute{$\sya\syb\syc\syd$}
    \def\revcute{$\syd\syc\syb\sya$}
    \let\sya=\heartsuit\let\syb=\spadesuit
    \let\syc=\diamondsuit\let\syd=\clubsuit
    \def\cycle{\let\tmp=\sya\let\sya=\syb\let\syb=\syc\let\syc=\syd
               \let\syd=\tmp}
    \def\sep##1{\hbox{\vrule\vbox{\hrule\smallskip
            \hbox to \hsize{\hfil\cute\hfil\bigbf{##1}\hfil\revcute\hfil}
            \smallskip\hrule}\vrule}\medskip\cycle\mark{##1}}
  \else
    \def\sep##1{\mark{##1}}
  \fi\fi\fi\fi\fi\fi\fi
  \def\separator##1{\noalign{\sep##1}}
} % end setseparator

%%%
%%% Macros for formatting the entries.
%%%

\def\\{}

\def\firstline#1#2{% the name and (maybe) the first phone number.
  {\bf #1}\hfil&\hfil#2&\hskip0pt}

\def\name#1{\firstline{#1}{}} % for backwards compatibility

\def\phone#1{\hfil#1&\hskip0pt}

\def\address#1{#1\hfil&\hskip0pt}

\def\comp#1{\hskip0pt}
\def\email#1{\hskip0pt}
\def\note#1#2{\hskip0pt}
\def\notes#1{\hskip0pt}

\def\beginrecord{\relax}
\def\endrecord{\cr}

\def\beginaddresses{\halign\bgroup&##\quad\cr}
\def\endaddresses{\egroup}

\def\today{\number\day\space
        \ifcase\month\or Jan\or Feb\or Mar\or Apr \or May\or June\or
        Jul\or Aug\or Sept\or Oct\or Nov\or Dec\fi
        \space\number\year}

%%% bbdb-print-brief.tex ends here.