% $Id: authortitle.bbx,v 0.8e 2009/07/04 15:02:31 lehman beta $

\ProvidesFile{authortitle.bbx}
[\abx@bbxid $Id: authortitle.bbx,v 0.8e 2009/07/04 15:02:31 lehman beta $]

\RequireBibliographyStyle{standard}
\ExecuteBibliographyOptions{pagetracker}

\DeclareFieldFormat{shorthandwidth}{#1}
\renewcommand*{\thebibitem}{\item}
\renewcommand*{\thelositem}{\item}
\setlength{\bibitemsep}{0pt}

\renewenvironment*{thebibliography}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}

\renewenvironment*{theshorthands}
  {\list
     {\printfield[shorthandwidth]{shorthand}}
     {\setlength{\labelwidth}{\shorthandwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}%
      \renewcommand*{\makelabel}[1]{##1\hss}}}
  {\endlist}

\InitializeBibliographyStyle{%
  \global\undef\bbx@lasthash}

\renewbibmacro*{author}{%
  \ifthenelse{\ifuseauthor\AND\NOT\ifnameundef{author}}
    {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND
                 \NOT\iffirstonpage}
       {\bibnamedash}
       {\printnames{author}%
	\setunit{\addcomma\space}%
        \savefield{fullhash}{\bbx@lasthash}}%
     \usebibmacro{authorstrg}}
    {\global\undef\bbx@lasthash}}

\renewbibmacro*{editor}{%
  \usebibmacro{bbx:editor}{editorstrg}}
\renewbibmacro*{editor+others}{%
  \usebibmacro{bbx:editor}{editor+othersstrg}}
\newbibmacro*{bbx:editor}[1]{%
  \ifthenelse{\ifuseeditor\AND\NOT\ifnameundef{editor}}
    {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND
                 \NOT\iffirstonpage}
       {\bibnamedash}
       {\printnames{editor}%
	\setunit{\addcomma\space}%
        \savefield{fullhash}{\bbx@lasthash}}%
     \usebibmacro{#1}%
     \clearname{editor}}
    {\global\undef\bbx@lasthash}}

\renewbibmacro*{translator}{%
  \usebibmacro{bbx:translator}{translatorstrg}}
\renewbibmacro*{translator+others}{%
  \usebibmacro{bbx:translator}{translator+othersstrg}}
\newbibmacro*{bbx:translator}[1]{%
  \ifthenelse{\ifusetranslator\AND\NOT\ifnameundef{translator}}
    {\ifthenelse{\iffieldequals{fullhash}{\bbx@lasthash}\AND
                 \NOT\iffirstonpage}
       {\bibnamedash}
       {\printnames{translator}%
	\setunit{\addcomma\space}%
        \savefield{fullhash}{\bbx@lasthash}}%
     \usebibmacro{#1}%
     \clearname{translator}}
    {\global\undef\bbx@lasthash}}

\endinput
