% \CheckSum{490}
% \iffalse
% ====================================================================
% adrconv.dtx
% Copyright (c) 1999 - 2003 Axel Kielhorn
%
% This file is part of the adrconv bundle.
%
% This file can be distributed and/or modified under the conditions of
% the LaTeX Project Public License, either version 1.2 of the license
% or (at you option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.2 or later ist part of all distributions of LaTeX
% version 1999/12/01 or later.
%
% The adrconv bundle consists at least of the files adrconv.dtx,
% adrconv.ins and adrguide.tex. Use
%   tex adrconv.ins
% or
%   latex adrconv.ins
% to generate the other files, which are indirect parts of the
% bundle. Use
%   latex adrconv.dtx
% to generate the implementation documentation. Use
%   latex adrguide.tex
% to generate the user documentation.
% ====================================================================
%
%<*dtx>
\ProvidesFile{adrconv.dtx}
%</dtx>
%<driver>\ProvidesFile{adrconv.drv}
%<guide>\ProvidesFile{adrguide.tex}
%<*tex|cfg|dir>
%<tex|cfg|dir>\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
%<tex|cfg|dir>\ProvidesFile{%
%<conv>  adrconv%
%<fax>   adrfax%
%<dir>   adrdir%
%<birthday>  birthday%
%<email>  email%
%<planer>  adrplaner
%<small>  adrsmall
%<tex>  .tex%
%<dir&!cfg>  .tex%
%<cfg>  .cfg%
%<tex|cfg|dir>  }
%</tex|cfg|dir>
%<*dtx|driver|guide|tex|cfg|dir>
  [2002/06/23 v1.2b LaTeX2e
%<*dtx>
  adrconv docstrip file]
%</dtx>
%<driver> adrconv implementation documentation driver]
%<guide>  Address guide]
%<tex>  Interactive driver of BibTeX database to addressfile converter]
%<cfg>  adrconv configuration file]
%<dir&!cfg>  Interactive address directory generation]
%</dtx|driver|guide|tex|cfg|dir>
%<*driver>
\documentclass{ltxdoc}
\CodelineIndex
\RecordChanges

\newcommand*{\Class}[1]{\textsf{#1}}
\newcommand*{\Package}[1]{\textsf{#1}}
\newcommand*{\File}[1]{\texttt{#1}}

\ifx\KOMAScipt\undefined
  \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
      M\kern.05em A\kern.1em-\kern.1em Script}}
\fi

\makeatletter
\DeclareRobustCommand{\BibTeX}{B\kern-.05em%
  % Der folgende Hack stammt aus der Definition des
  % Makros \LaTeX, siehe Datei `ltlogos.dtx' der
  % LaTeX2e-Verteilung.
  \hbox{$\m@th$% %% force math size calculations
    \csname S@\f@size\endcsname \fontsize\sf@size\z@
    \math@fontsfalse\selectfont
    I\kern-.025emB}%
  \kern-.08em%
  \-\TeX%
}
\makeatother

\begin{document}
  \DocInput{adrconv.dtx}
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{adrconv.dtx}
% \title{\BibTeX{} address database to addressfile
%   converter\footnote{This file hat version number \fileversion, last
%     revised \filedate}}
% \author{Axel Kielhorn}
% \date{\filedate}
% \maketitle
% \begin{abstract}
% \Package{adrconv} is an example for converting \BibTeX{} address
% databases to \KOMAScript{} address files. For more information see
% the ``ADRconv Anleitung''. This is only the implementation
% documentation.
% \end{abstract}
%
% \StopEventually{\PrintIndex\PrintChanges}
%
% \tableofcontents
%
% \section{General}
%
% This implementation documentation is very rudimentary because it was
% not written by Axel Kielhorn but by Markus Kohm. I've done this
% because after two years waiting I wanted to make the break and
% remove the old version of \Package{adrconv} from \KOMAScript.
%
% The use of \Package{adrconv} is described at the ``ADRconv
% Anleitung''. You'll get the guide, running \TeX{} or \LaTeX{} in
% \File{adrconv.ins}.
%
%
% \section{The interactive drivers}
%
% \iffalse
%<*tex>
% \fi
% Remember the files should work not only with \LaTeX{} but also with
% Plain\TeX. So we can olny use macros, which are defined at both:
% \LaTeX{} and Plain\TeX.
%
%    \begin{macrocode}
\catcode`\@=11
\newlinechar`\^^J
\message{%
  Now you have to typein the name of the BibTeX addressfile, you want
  to^^J%
  convert to script-address-file-format (without extension
  `.bib'):^^J%
  Geben Sie nun den Namen der BibTeX-Adressdatei ein, die sie in
  das^^J%
  Script-Adressdateiformat konvertieren wollen (ohne `.bib'):^^J%
  ^^J%
  addressfile=%
}
\def\skiplastspace#1 \@e@o@l@{#1}
\read-1 to \addressfile
\edef\addressfile{\expandafter\skiplastspace\addressfile\@e@o@l@}
\newwrite\auxfile
\immediate\openout\auxfile=\addressfile.aux
\immediate\write\auxfile{%
  \string\citation{*}^^J%
%<conv>  \string\bibstyle{adrconv}^^J%
%<fax>  \string\bibstyle{adrfax}^^J%
%<birthday>  \string\bibstyle{birthday}^^J%
%<email>  \string\bibstyle{email}^^J%
  \string\bibdata{\addressfile}%
}
\immediate\closeout\auxfile
\message{%
  After running BibTeX rename file `\addressfile.bbl' to
  `\addressfile.adr'!^^J%
  Nach dem BibTeX-Lauf benennen Sie bitte die Datei `\addressfile.bbl'
  in^^J%
  `\addressfile.adr' um!^^J%
}
\ifx\@@end\undefined\let\@@end\end\fi
\@@end
%    \end{macrocode}
% \iffalse
%</tex>
% \fi
%
%
% \section{The interactive generator}
%
% \iffalse
%<*!cfg>
%<*dir>
% \fi
%    \begin{macrocode}
\documentclass[headsepline,10pt,twoside]{scrartcl}
%    \end{macrocode}
% Define some new commands
%    \begin{macrocode}
\newcommand*\jj {j}
\newcommand*\ja {ja}
\newcommand*\y  {y}
\newcommand*\yes{yes}
\newread\ttyin
\newcommand*{\gobble}[1]{}
\def\iden#1{#1}
\def\strip#1#2 \gobble{\def #1{#2}}
\def\defpar{\par}
\def\Ask#1#2{%
    \message{#2}\read\ttyin to #1\ifx#1\defpar\def#1{}\else
    \iden{\expandafter\strip\expandafter#1#1\gobble\gobble}
    \gobble\fi}
%    \end{macrocode}
% \cs{ifGerman} to load \Package{german} or \Package{ngerman}.
% \cs{RunningHead} to get the names in the header (Telephonebook
% style). Otherwise a new page is started for each new letter (This is
% needed for Birthday lists). 
%    \begin{macrocode}
\newif\ifGerman
\newif\ifRunningHead
%    \end{macrocode}
%    \begin{macrocode}
\newdimen\leftfield
\newdimen\rightfield
\newdimen\adrindent
\oddsidemargin  -1in
\evensidemargin -1in
%    \end{macrocode}
%    \begin{macrocode}
\newcommand*\adrfile{}
\newcommand*\adrtitle{}
\typeout{^^J%
   *** dir.tex v2.0 by Frank Neukam <01 Dec 1993>^^J%
   *** LaTeX2e-changes by Markus Kohm 1994/10/29^^J%
   *** ADRconv-changes by Axel Kielhorn 1999^^J%
   *** ngerman-changes by Markus Kohm 2001^^J%
   ^^J%
   To create a address-directory just answer the questions:^^J%
   ^^J}
\Ask\answer{Use german? [y/n]^^J%
  Mit deutscher Sprachanpassung? [j/n]}
\ifx\jj\answer\Germantrue\else
\ifx\ja\answer\Germantrue\else
\ifx\y\answer\Germantrue\else
\ifx\yes\answer\Germantrue\else
                \Germanfalse\fi\fi\fi\fi
\ifGerman
  \def\germanpackage{ngerman}
  \Ask\answer{Mit alter deutscher Rechtschreibung? [j/n]}
  \ifx\jj\answer\def\germanpackage{german}\else
    \ifx\ja\answer\def\germanpackage{german}\else
      \ifx\y\answer\def\germanpackage{german}\else
        \ifx\yes\answer\def\germanpackage{german}\fi\fi\fi\fi
     \usepackage{\germanpackage}
\fi
\InputIfFileExists{dir.cfg}{%
  \typeout{Load local configuration-file.}}{%
  \typeout{No local configuration-file found.}}
\Ask\adrfile{^^J%
  Name of address-file (without .adr)?^^J%
  Name der Adressdatei (ohne .adr)?}
\Ask\adrtitle{^^J%
  Title of directory/list?^^J%
  Titel des Verzeichnisses?}
\Ask\adrformat{^^J%
  Name of the layout^^J%
  Layoutname?}
\Ask\answer{^^J%
  With running head? [y/n]^^J%
  Namen in der Kopfzeile? [j/n]}
\ifx\jj\answer\RunningHeadtrue\else
\ifx\ja\answer\RunningHeadtrue\else
\ifx\y\answer\RunningHeadtrue\else
\ifx\yes\answer\RunningHeadtrue\else
               \RunningHeadfalse\fi\fi\fi\fi
%    \end{macrocode}
% Since the file uses \Class{scrartcl} it assumes that
% \Package{scrpage} is available. We use \Package{scrpage} and not
% \Package{scrpage2}, because of maybe old \KOMAScript.
%    \begin{macrocode}
\ifRunningHead
\usepackage{scrpage}
\renewpagestyle{headings}{%
  (0pt,0pt)%
  {\strut\rightmark\ -- \leftmark\hfil}%
  {\hfil\strut\rightmark\ -- \leftmark}%
  {\hfil\strut\rightmark\ -- \leftmark\hfil}%
  (\textwidth,.4pt)%
  }{%
  (0pt,0pt)%
  {\pagemark\hfill}%
  {\hfill\pagemark}%
  {\hfill\pagemark\hfill}%
  (0pt,0pt)}
\fi
\def\headfont{\sffamily\bfseries}
%    \end{macrocode}
% Loading the Layout definition.
% If no filename is specified, adrdir will be used.
%    \begin{macrocode}
\ifx\adrformat\empty
  \def\adrformat{adrdir}
\fi
\InputIfFileExists{\adrformat.cfg}{}{%
  \typeout{^^J%
    *** File \adrformat.cfg not found!^^J%
    *** Datei \adrformat.cfg nicht gefunden!^^J%
    ^^J}
  }
%    \end{macrocode}
% All definitions are done, let's start with the document.
%    \begin{macrocode}
\begin{document}
%    \end{macrocode}
% Don't start a new page for every letter when running head is used.
%    \begin{macrocode}
\ifRunningHead
  \def\adrchar#1{\typeout{#1}}
\else
  \def\adrchar#1{\clearpage\typeout{#1}\markboth{#1}{#1}}
\fi
%    \end{macrocode}
% This command does all the formatting:
%    \begin{macrocode}
\def\adrentry#1#2#3#4#5#6#7#8{\hspace{\adrindent}%
 \parbox[b]{\leftfield}
   {\raggedright \hspace{-\adrindent}{\sc #1}%
    \def\tempa{#1}\ifx \tempa\empty \else , #2\fi%
    \def\tempa{#3}\ifx \tempa\empty \else \par #3\fi%
    \def\tempa{#7}\ifx \tempa\empty \else \par (#7)\fi%
   }%
 \hfill%
 \parbox[b]{\rightfield}
   {\raggedleft%
    \def\tempa{#8}\ifx \tempa\empty \else {\scriptsize #8}\par \fi 
    {\small #4}%
   }\par%
 \ifRunningHead
   \markboth{#1}{#1}
 \fi
}
\ifx\adrfile\empty \else
     \InputIfFileExists{\adrfile.adr}{%
     \pagestyle{empty}
     \null\vfil
     \begin{center}
       {\Large \sfb \adrtitle\par}
     \end{center}
     \vfil\vfil\null
%    \end{macrocode}
% Always start on a right page
%    \begin{macrocode}
     \cleardoublepage
     \raggedbottom
     \pagestyle{headings}
     }{%
     \typeout{^^J%
              *** File \adrfile.adr not found!^^J%
              *** Datei \adrfile.adr nicht gefunden!^^J%
              ^^J}
     }
\fi
\end{document}
%    \end{macrocode}
% \iffalse
%</dir>
%</!cfg>
% \fi
%
%
% \section{The configuration files}
%
% \iffalse
%<*cfg>
% \fi
%    \begin{macrocode}
%<*dir>
%    \end{macrocode}
% Configfile for A6 phone book (105\,mm $\times$ 148\,mm).
% Original was former part of \KOMAScript{}.
%
%    \begin{macrocode}
\setlength{\paperwidth}{210mm}
\setlength{\textwidth}{85mm}
\setlength{\leftfield}{50mm}
\setlength{\rightfield}{30mm}
%    \end{macrocode}
%    \begin{macrocode}
\addtolength{\evensidemargin}{9mm}
\addtolength{\oddsidemargin}{\paperwidth}
\addtolength{\oddsidemargin}{-9mm}
\addtolength{\oddsidemargin}{-\textwidth}
%    \end{macrocode}
%    \begin{macrocode}
%</dir>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*planer>
%    \end{macrocode}
% Configfile for organizers (95\,mm $\times$ 172\,mm) maybe from
% ALDI\footnote{ALDI is a german so called ``Billigheimer''.}.
%
%    \begin{macrocode}
\setlength{\paperwidth}{95mm}
\setlength{\textwidth}{70mm}
\setlength{\leftfield}{45mm}
\setlength{\rightfield}{25mm}
%    \end{macrocode}
%    \begin{macrocode}
\addtolength{\evensidemargin}{12mm}
\addtolength{\oddsidemargin}{12mm}
%    \end{macrocode}
%    \begin{macrocode}
%</planer>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*small>
%    \end{macrocode}
% Configfile for pocket callenders (87\,mm $\times$ 148\,mm)
% e.g. ``Sparkassenkalender''.
%
%    \begin{macrocode}
\setlength{\paperwidth}{174mm}
\setlength{\textwidth}{75mm}
\setlength{\leftfield}{45mm}
\setlength{\rightfield}{30mm}
%    \end{macrocode}
%    \begin{macrocode}
\addtolength{\evensidemargin}{9mm}
\addtolength{\oddsidemargin}{\paperwidth}
\addtolength{\oddsidemargin}{-9mm}
\addtolength{\oddsidemargin}{-\textwidth}
%    \end{macrocode}
%    \begin{macrocode}
%</small>
%    \end{macrocode}
%
%    \begin{macrocode}
\setlength{\adrindent}{1em}
\addtolength{\leftfield}{-\adrindent}
%    \end{macrocode}
%    \begin{macrocode}
%<*dir>
\setlength{\paperheight}{148mm}
\setlength{\textheight}{112mm}
%</dir>
%<*planer>
\setlength{\paperheight}{172mm}
\setlength{\textheight}{148mm}
%</planer>
%<*small>
\setlength{\textheight}{112mm}
%</small>
\setlength{\headheight}{1.25\baselineskip}
\setlength{\headsep}{0.25\baselineskip}
\setlength{\footskip}{1.50\baselineskip}
\setlength{\topmargin}{-1in}
%<dir>\addtolength{\topmargin}{8mm}
%<planer>\addtolength{\topmargin}{7mm}
\setlength{\marginparwidth}{0in}
\setlength{\marginparsep}{0in}
\setlength{\marginparpush}{0in}
\setlength{\parskip}{0.5\baselineskip}
\setlength{\parindent}{0in}
\typeout{%
  ********************************************************************%
  ^^J^^J%
  DVIDVI Options:^^J%
  Front:^^J%
%<*dir|small>
%<dir>  1st Step (2 x A6 at A5)^^J%
%<small>  1st Step (2 x callenders at A5)^^J%
  -l xx -m 4:-1,2^^J%
  2nd Step (2 x A5 at A4)^^J%
  -m 2:0,1(0mm,148mm)^^J%
%</dir|small>
%<planer>  -l 24 -m 6:0(4mm,0mm),2(99mm,0mm),4(192mm,0mm)
  ^^J%
  Back:^^J%
%<*dir|small>
  1st Step^^J%
  -l xx -r -m 4:-3,0^^J%
  2nd Step^^J%
  -m 2:1,0(0mm,148mm)^^J%
%</dir|small>
%<planer>  -l 24 -r -m 6:5(8mm,0mm),3(103mm,0mm),1(198mm,0mm)
  ^^J%
%<dir|small>  xx must be the result of a multiplication with 4.^^J%
%<small>  Cut 36 mm from one side and tack in the middle.^^J%
  ^^J%
  ********************************************************************
  }
%    \end{macrocode}
% German Remark from Axel to \File{adrdir.cfg}:
% \begin{quote}
% Das ist die einfache Version, einfach in der Mitte durchschneiden,
% Seiten sortieren, ineinanderstecken und heften.
%
% Nicht alle Tacker k\"onnen dieses Format verarbeiten, ich habe
% lange gesucht und benutze den Novus B5, der passt ganz knapp und ist
% noch bezahlbar. Danach kommen die Hochleistungstacker \"uber 50 DM.
% \end{quote}
%
% German Remark from Axel to \File{adrplaner.cfg}:
% \begin{quote}
% Der Deskjet kann die letzten 14\,mm des Blattes nicht bedrucken,
% daher wurde das ganze Layout um 4\,mm verschoben, diese m\"ussen an
% der kurzen Kante abgeschnitten werden.
%
% Bei anderen Druckern kann man bei den Vorderseiten 3\,mm von der
% x-Koordinate abziehen und bei den R\"uckseiten zuaddieren.
% \end{quote}
%
% German Remark from Axel to \File{adrsmall.cfg}:
% \begin{quote}
% Von einer Seite m\"ussen noch 36\,mm abgeschnitten werden, dann
% in der Mitte heften und in den Taschenkalender einstecken.
% \end{quote}
%
% \iffalse
%</cfg>
% \fi
%
%
% \section{The \BibTeX{} files}
%
% \iffalse
%<*bst>
% \fi
%
% These \BibTeX{} files are BibTeX-Database to \Class{scrlettr}
% converters. They are based on BibTeX bibliography style
% \File{address} Gerd Neugebauer has written in 1994.
%
% The files generated from these files may be used for
% \Class{scrlettr}, \Class{scrlttr2}, \File{phone.tex} or
% \File{dir.tex} from the \KOMAScript{} Package, \Class{akletter} and
% some versions of \Class{myletter} which preceded
% \Class{akletter}. They will even work with the \LaTeX 2.09 version
% of \textsc{Script}.
%
% This is only one way to use the address database layout defined by
% Gerd Neugebauer. Use this as an example for your own conversion
% program.
%
% \changes{v1.0}{1996/01/01}{Added the key-field}
% \changes{v1.1}{1996/01/02}{Changed \texttt{net} to \texttt{url} and
%   \texttt{email}}
% \changes{v1.1.1}{1996/01/03}{Function address: moved
%   \texttt{\bslash\bslash} inside if condition}
% \changes{v1.1.1}{1996/01/03}{No more warnings if street is empty
%   (reported by Jan Holl\"ander)}
% \changes{v1.1.2}{1996/01/04}{The \emph{von} part was ignored in
%   names} 
% \changes{v1.1.3}{1996/01/04}{Support for second (mobile)
%   telephonenumber}
% \changes{v1.2}{1999/11/01}{New release independend of KOMA-Script}
% \changes{v1.2a}{2001/10/11}{\Package{docstrip} version}
% \changes{v1.2b}{2002/06/23}{Documentation updated}
%
% The \File{birthday.bst} prints the entries with birthdays only. The
% entries are sorted by month and inside one month by date.
%
%    \begin{macrocode}
ENTRY
  { name
    title
    organization
    city
    zip
    country
    street
    phone
    mobile
    fax
    url
    email
    note
    key
    birthday
    nbirthday
  }
  {}
%<!birthday>  { adr.char }
%<birthday>  { b.month }
%    \end{macrocode}
%    \begin{macrocode}
%<!birthday>INTEGERS { cur.adr.char }
%<birthday>STRINGS { cur.month num.index alpha.index }
%    \end{macrocode}
%    \begin{macrocode}
FUNCTION {get.names}
{ name empty$
   { organization empty$
      { "{}{}" }
      { organization "{}" * }
     if$
   }
   { "{" name #1 "{ll}" format.name$ "}" * *
     "{" name #1 "{ff}{ vv}" format.name$ "}" * * *
   }
   if$
}
%    \end{macrocode}
%    \begin{macrocode}
FUNCTION {print.adrchr}
%<*!birthday>
{ adr.char chr.to.int$ cur.adr.char >
  { newline$ "\adrchar{" adr.char "}" * * write$ newline$
    adr.char chr.to.int$ 'cur.adr.char :=
  }
  'skip$
%</!birthday>
%<*birthday>
{ b.month cur.month =
  'skip$
  { newline$ "\adrchar{\convdate{" b.month "}}" * * write$ newline$
    b.month 'cur.month :=
  }
%</birthday>
  if$
}
%    \end{macrocode}
%\iffalse
% $% <-- we do this to correct syntax hightlight.
%\fi
%    \begin{macrocode}
%<*conv|birthday>
FUNCTION{format.phone.and.mobile}
{ phone empty$
    {
      mobile empty$
        { "" }
        { mobile }
      if$
    }{
      mobile empty$
        { phone }
        { phone "\\" mobile * * }
      if$
    }
  if$
}
%</conv|birthday>
%    \end{macrocode}
%    \begin{macrocode}
%<*fax>
FUNCTION{format.phone.and.fax}
{ phone empty$
    { "" }
    { phone }
  if$
  fax empty$
    'skip$
    { phone empty$
      { fax * }
      { "\\Fax:\\" fax * * }
      if$
    }
  if$
}
%</fax>
%    \end{macrocode}
%\iffalse
% $% <-- we do this to correct syntax hightlight.
%\fi
%    \begin{macrocode}
FUNCTION{address}
{
%<*birthday>
  nbirthday empty$
  'skip$
  {
%</birthday>
    print.adrchr
    "\adrentry" write$
    get.names write$ newline$
    "{" 
    street empty$
      { "" }
      { street " \\ " *}
    if$
    *
    zip empty$
      { "" }
      { zip }
    if$
    " " * *
    city empty$
      { "" }
      { city }
    if$ 
    "}{" * *
%<conv|birthday>    format.phone.and.mobile
%<fax>    format.phone.and.fax
%<*email>
    email empty$
      { "" }
      { email }
    if$
%</email>
    "}{}{}{}{" * * 
%<*birthday>
    birthday empty$
      { "" }
      { birthday }
    if$
    "}{" * *
%</birthday>
    key empty$
      { "" }
%<!birthday>      { key }
%<birthday>      { "" }
    if$
    "}" * * write$ newline$
%<*birthday>
  }
  if$
%</birthday>
}
%    \end{macrocode}
%    \begin{macrocode}
FUNCTION{presort}
%<*!birthday>
{
  name empty$
  { organization empty$
    { key empty$
      { "No name, organization, or key to sort " cite$ * warning$
        "???"
      }
      { key }
      if$
    }
    { organization }
    if$
  }
  { name #1 "{ll},{f }{v }{, j}" format.name$ }
%</!birthday>
%<*birthday>
{ nbirthday empty$
  { "" }
  { nbirthday }
%</birthday>
  if$
  duplicate$
  'sort.key$ :=
%<*!birthday>
  #1 #1 substring$
  'adr.char :=
%</!birthday>
%<*birthday>
  #1 #2 substring$
  'b.month :=
%</birthday>
%    \end{macrocode}
% At every but \File{birthday.bst} the adr.char is the first letter of
% the sort.key.
%    \begin{macrocode}
}
%    \end{macrocode}
%    \begin{macrocode}
READ
%    \end{macrocode}
%    \begin{macrocode}
ITERATE {presort}
%    \end{macrocode}
%    \begin{macrocode}
SORT
%    \end{macrocode}
%    \begin{macrocode}
FUNCTION {begin.bib}
{ 
%<*birthday>
  "\def\convdate#1{\ifcase#1 \or 1 \or 2 \or 3 \or 4 \or 5 "
  "\or 6 \or 7 \or 8 \or 9 \or 10 \or 11 \or 12 \fi}" * 'num.index :=
  "\def\convdate#1{\ifcase#1 \or Januar \or Februar \or "
  " M{^^b a}rz \or April \or Mai \or Juni \or Juli "
  "\or August \or September \or Oktober \or November \or Dezember \fi}"
  * * 'alpha.index :=
  alpha.index write$
  newline$
%</birthday>
%<*email>
  "\def\sbscrpt{\_} \catcode`\_=\active \let_=\sbscrpt"
  write$ newline$
%</email>
  preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
%<!birthday>  #0 'cur.adr.char :=
%<birthday>  "00" 'cur.month :=
}
%\iffalse
% $% <-- we do this to correct syntax hightlight.
%\fi
%    \begin{macrocode}
EXECUTE {begin.bib}
%    \end{macrocode}
%    \begin{macrocode}
ITERATE {call.type$}
%    \end{macrocode}
% Print a newline and flush the write buffer
%    \begin{macrocode}
FUNCTION {end.bib}
{ newline$ }
%    \end{macrocode}
%    \begin{macrocode}
EXECUTE {end.bib}
%    \end{macrocode}
%
% \iffalse
%</bst>
% \fi
%
%
% \section{An example \BibTeX{} database}
%
% Do not believe everything you read here. It is just a
% demonstration.
% 
% \iffalse
%<*bib>
%<*example>
% \fi
%    \begin{macrocode}
@address{mustermann,
   name =    {Hans Mustermann},
   city =    {Heimstatt},
   zip =     01234,
   country = {D -},
   street =  {Einbahnstra{\ss}e 1},
   phone =   {01234 / 5 67 89},
   fax =     {01234 / 5 67 89},
   email =   {hm{@}work.com},
   note =    {Alles nur Erfindung},
}
@address{AxelK,
   name =      {Axel Kielhorn},
   city =      {Verden},
   zip =       27283,
   street =    {Lange Stra{\ss}e 17},
   phone =     {04231 / 12 34 56},
   fax =       {04231 / 65 34 21},
   email =     {a.kielhorn{@}web.de},
   key =       {Aki},
   note =      {Author of the modified addressen.bst},
   birthday =  {16.05.1967},
   nbirthday = 0516,         
}
@address{RalfK,
   name =      {Ralf Kielhorn},
   city =      {Braunschweig},
   zip =       38116,
   street =    {Gro{\ss}e Stra{\ss}e 17},
   phone =     {0531 / 12 34 56},
   key =       {Rki},
   birthday =  {05.08.1969},
   nbirthday = 0805,
}
@address{SabineK,
   name =      {Sabine Kielhorn},
   city =      {Oldenburg},
   zip =       26133,
   street =    {Fraunhoferstra{\ss}e 21},
   phone =     {0441 / 12 34 56},
   key =       {Ski},
   birthday =  {13.11.1970},
   nbirthday = 1113,
}
%    \end{macrocode}
%
% \iffalse
%</example>
%</bib>
% \fi
% \Finale
\endinput
%
% end of file ``adrconv.dtx''
