%%
%% This is file `authoryear-ibid-archaeology.bbx',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% biblatex-archaeology.dtx  (with options: `authoryearibidBBX,authoryearsharedBBX')
%% 

\ProvidesFile{authoryear-ibid-archaeology.bbx}
[2019/12/30 v2.2 biblatex-archaeology bibliography style (IB)]
\RequireBibliographyStyle{authoryear-ibid}
\def\archaeobibstyletitle{\blxarch@style@ayi}
\def\blxarch@fork@authordate{}
\RequirePackage{biblatex-archaeology}
\ExecuteBibliographyOptions{
    mergedate=false,
    labeldate=true,
    sorting=nyvc,
    uniquename=init,
    uniquelist=false,
}
\def\blxarch@settabbedlabeldate#1{%
    \xpatchbibdriver{#1}{\setunit{\printdelim{nametitledelim}}\newblock}
        {\setunit{\printdelim{nametitledelim}}%
            \iftabbedlabeldate{&}{\newblock}}
            {}{Patching driver '#1' failed (a)}
    \xapptobibdriver{#1}{\end{tabbedlabeldate}}
    {}{Patching driver '#1' failed (b)}
}
\blxarch@settabbedlabeldate{article}
\blxarch@settabbedlabeldate{book}
\blxarch@settabbedlabeldate{inbook}
\blxarch@settabbedlabeldate{misc}
\blxarch@settabbedlabeldate{online}
\blxarch@settabbedlabeldate{periodical}
\blxarch@settabbedlabeldate{thesis}
\blxarch@settabbedlabeldate{unpublished}
\xpatchbibdriver{inreference}{{finentry}}{{finentry}\end{tabbedlabeldate}}
  {}{Patching driver 'inreference' failed (1)}
\DeclareNameAlias{sortname}{family-given/given-family}
\renewbibmacro*{labeltitle}{%
  \iffieldundef{label}
    {\iffieldundef{shorttitle}
       {\printfield{title}%
        \clearfield{title}}
       {\printfield[label]{shorttitle}}}
    {\printfield{label}}}
\xpretobibmacro{begentry}{%
    \csuse{blxarch@issuedate}%
    \iffieldequalstr{labelnamesource}{anonstring}
        {\ifrepeatlabel{false}
            {\ifbibliography
                {\savename*{anonstring}{\blxarch@field@anonstring}%
                 \restorename{author}{\blxarch@field@anonstring}%
                }
                {}}
            {}}
        {}%
    \ifentrytype{periodical}
        {\ifboolexpr{
            test {\ifcitation}
            or
            not test {\ifrepeatlabel{false}}
         }
            {\clearfield{shorttitle}}
            {}}
        {}%
}{}{Patching bibmacro 'begentry' failed (1)}
\xpretobibmacro{finentry}{%
    \restorebibmacro{issue+date}%
}{}{Patching bibmacro 'finentry' failed (2)}
\xpatchbibmacro{author}{\printnames{author}}{%
    \ifidemincitation
        {\printtext{%
            \bibstring{idem\thefield{gender}}}}
        {\usebibmacro{sortnamelist}{author}}}
        {}{Patching bibmacro 'author' failed (1)}
\xpatchbibmacro{author}{\usebibmacro{date+extradate}}{\usebibmacro{labeldate+edition}}
  {}{Patching bibmacro 'author' failed (2)}
\xpatchbibmacro{bbx:editor}{\printnames{editor}}{%
    \ifidemincitation
        {\printtext{%
            \bibstring{idem\thefield{gender}}}}
        {\usebibmacro{sortnamelist}{editor}}}
        {}{Patching bibmacro 'bbx:editor' failed (1)}
\xpatchbibmacro{bbx:translator}{\printnames{translator}}{%
    \ifidemincitation
        {\printtext{%
            \bibstring{idem\thefield{gender}}}}
        {\usebibmacro{sortnamelist}{translator}}}
        {}{Patching bibmacro 'bbx:translator' failed}
\xpatchbibmacro{bbx:editor}{\usebibmacro{date+extradate}}{\usebibmacro{labeldate+edition}}
  {}{Patching bibmacro 'bbx:editor' failed (2)}
\xpatchbibmacro{bbx:translator}{\usebibmacro{date+extradate}}{\usebibmacro{labeldate+edition}}
  {}{Patching bibmacro 'bbx:translator' failed}
\endinput
%%
%% End of file `authoryear-ibid-archaeology.bbx'.
