diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-archaeology/biblatex-archaeology.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-archaeology/biblatex-archaeology.sty | 869 |
1 files changed, 662 insertions, 207 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-archaeology/biblatex-archaeology.sty b/Master/texmf-dist/tex/latex/biblatex-archaeology/biblatex-archaeology.sty index d16c94d8d8d..0b5cf70a461 100644 --- a/Master/texmf-dist/tex/latex/biblatex-archaeology/biblatex-archaeology.sty +++ b/Master/texmf-dist/tex/latex/biblatex-archaeology/biblatex-archaeology.sty @@ -46,6 +46,14 @@ \edef\blxarch@shortform@value{true}} \def\blxarch@shortform@errstr#1{% Invalid value of #1} +\def\blxarch@opt@repeatlabel@dashed{% + \edef\blxarch@repeatlabel@value{dashed}} +\def\blxarch@opt@repeatlabel@false{% + \edef\blxarch@repeatlabel@value{false}} +\def\blxarch@opt@repeatlabel@true{% + \edef\blxarch@repeatlabel@value{true}} +\def\blxarch@repeatlabel@errstr#1{% + Invalid value of #1} \def\blxarch@opt@editionsuperscript@none{% \edef\blxarch@editionsuperscript@value{none}} \def\blxarch@opt@editionsuperscript@predate{% @@ -94,7 +102,7 @@ \def\blxarch@giveninitialletters#1{% \fullexpandarg% \StrLeft{#1}{1}[\blxarch@str]% - \renewcommand{\do}[1]{% + \renewcommand*{\do}[1]{% \IfBeginWith{#1}{##1} {\def\blxarch@str{##1}\listbreak} {}% @@ -139,22 +147,23 @@ {} {\ifthenelse{\blxarch@posbuffer<\blxarch@namefirstsepposition}{% \let\blxarch@namefirstsepposition\blxarch@posbuffer% - \renewcommand{\blxarch@namefirstsep}{#1}} + \renewcommand*{\blxarch@namefirstsep}{#1}} {}}% } \def\blxarch@namefirstsep{} \def\blxarch@namefirstdelim{\bibinitperiod\bibinitdelim} \ProvidesPackage{biblatex-archaeology} -[2017/11/16 v1.3 biblatex-archaeology (Ingram Braun) based on biblatex] +[2018/06/10 v2.0 biblatex-archaeology (Ingram Braun) based on biblatex] \RequirePackage{xpatch} \RequireBiber[3] -\@ifpackagelater{biblatex}{2017/11/05} +\@ifpackagelater{biblatex}{2018/03/04} {} {\blxarch@errmsg{too old\MessageBreak biblatex version - update required}} \DeclareLanguageMappingSuffix{-archaeology} \ExecuteBibliographyOptions{ abbreviate=true, % abbreviates bibstrings arxiv=pdf, % although I've never seen an arXiv link we point them to PDFs. + autopunct=true, % wether cite commands should scan ahead for punctuation autolang=hyphen, % language-dependent hyphenation rules backref=false, % wether to print back references in the bilbiography block=none, % no extra spacing between blocks @@ -210,7 +219,9 @@ realdate=ymd, } \DeclareDriverSourcemap[datatype=bibtex]{ - \map[overwrite]{ + \map[ + overwrite + ]{ \pertype{thesis} \step[ fieldsource=type, @@ -219,7 +230,44 @@ fieldvalue=phdthesis, ] } - \map[overwrite]{ + \map[ + overwrite=true, + foreach={titleaddon,booktitleaddon,maintitleaddon}, + ]{ +\pernottype{article} + \pernottype{review} + \pernottype{reference} + \pernottype{inreference} + \pernottype{mvreference} + \pernottype{thesis} + \step[ + fieldsource=\regexp{$MAPLOOP}, + match=\regexp{[Ee]xhibi[ct]|[Aa]usstellung|[Uu][dt]st[iä]ll[n]ing|[Tt]entoonstelling|[Ee][xs]posi[cçtz]}, + fieldset=eventtype, + fieldvalue=exhibition, + append=true, + notfield=eventtype, + ] + \step[ + fieldsource=\regexp{$MAPLOOP}, + match=\regexp{[KkCc]onf[eé]ren[cstz]|[Ss]ymposi|[KkCc]ol{1,2}[oó]qu|[KkCc]onvent|[Mm]eeting|}, + fieldset=eventtype, + fieldvalue=conference, + append=true, + notfield=eventtype, + ] + \step[ + fieldsource=\regexp{$MAPLOOP}, + match=\regexp{[Aa]u[ck]tion|Versteigerung|\b[Ee]nchère|[Vv]eiling|[Ss]ubasta|[Ll]eil(ões|ão)}, + fieldset=eventtype, + fieldvalue=auction, + append=true, + notfield=eventtype, + ] + } + \map[ + overwrite + ]{ \step[ fieldsource=eventtype, match=\regexp{[Aa]u[ck]tion}, @@ -231,7 +279,43 @@ origfieldval=true, ] } + \map[ + overwrite + ]{ + \step[ + fieldsource=date+an, + match=\regexp{\battributed\b}, % find all date+an field that match "attributed" (<field>+an are csv) + final=true, % do not add entries in further steps + ] + \step[ + fieldsource=date, + fieldtarget=realdate, + ] + } + \map[ + overwrite + ]{ + \step[ + fieldsource=year, + match=\regexp{\A\[.+\]\Z}, + fieldtarget=realdate, + ] + \step[ + fieldsource=date, + match=\regexp{\A\[.+\]\Z}, + fieldtarget=realdate, + ] + } \map[overwrite]{ + \step[ + fieldsource=realdate, + match=\regexp{\A\[(.+)\]\Z}, + replace={$1}, + ] + } + \map[ + overwrite + ]{ \pertype{article} \pertype{periodical} \pertype{suppperiodical} @@ -247,21 +331,28 @@ origfieldval=true, ] } - \map[overwrite]{ + \map[ + overwrite + ]{ \step[ fieldsource=edition, match=\regexp{(\d+)}, replace={$1}, ] } - \map[overwrite, foreach={location, multivenue}]{ + \map[ + overwrite, + foreach={location, multivenue} + ]{ \step[ fieldsource=\regexp{$MAPLOOP}, match={\blxarch@regex@location@match}, replace={\blxarch@regex@location@replace}, ] } - \map[overwrite]{ + \map[ + overwrite + ]{ \step[ fieldsource=venue, match={\blxarch@regex@location@match}, @@ -379,34 +470,35 @@ \DeclareBibliographyAlias{reference}{book} \DeclareBibliographyAlias{report}{book} \DeclareBibliographyAlias{patent}{book} -\renewcommand{\mkbibacro}[1]{\MakeLowercase{#1}} +\renewcommand*{\mkbibacro}[1]{\MakeLowercase{#1}} \renewbibmacro*{doi+eprint+url}{% \printfield{doi}% \newunit\newblock% \usebibmacro{eprint}% \newunit\newblock% \usebibmacro{url+urldate}} -\newcommand{\mkbibletterspacing}[1]{\ifcsdef{textls}{\textls{#1}}{#1}} -\renewcommand{\mkbibnamegiven}[1]{#1} -\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}} -\renewcommand{\mkbibnameprefix}[1]{\textsc{#1}} -\renewcommand{\mkbibnamesuffix}[1]{#1} -\newcommand{\mkbibrepeatgiven}[1]{#1} -\newcommand{\mkbibrepeatfamily}[1]{\textsc{#1}} -\newcommand{\mkbibrepeatprefix}[1]{\textsc{#1}} -\newcommand{\mkbibrepeatsuffix}[1]{#1} -\newcommand{\mkbibbooknamegiven}[1]{#1} -\newcommand{\mkbibbooknamefamily}[1]{#1} -\newcommand{\mkbibbooknameprefix}[1]{#1} -\newcommand{\mkbibbooknamesuffix}[1]{#1} -\newcommand{\mkbibsourcenamegiven}[1]{#1} -\newcommand{\mkbibsourcenamefamily}[1]{#1} -\newcommand{\mkbibsourcenameprefix}[1]{#1} -\newcommand{\mkbibsourcenamesuffix}[1]{#1} -\newcommand{\mkbiblistnamegiven}[1]{#1} -\newcommand{\mkbiblistnamefamily}[1]{#1} -\newcommand{\mkbiblistnameprefix}[1]{#1} -\newcommand{\mkbiblistnamesuffix}[1]{#1} +\newcommand*{\mkbibletterspacing}[1]{\textls{#1}} +\providecommand*{\textls}[1]{\textsc{#1}} +\renewcommand*{\mkbibnamegiven}[1]{#1} +\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}} +\renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}} +\renewcommand*{\mkbibnamesuffix}[1]{#1} +\newcommand*{\mkbibrepeatgiven}[1]{#1} +\newcommand*{\mkbibrepeatfamily}[1]{\textsc{#1}} +\newcommand*{\mkbibrepeatprefix}[1]{\textsc{#1}} +\newcommand*{\mkbibrepeatsuffix}[1]{#1} +\newcommand*{\mkbibbooknamegiven}[1]{#1} +\newcommand*{\mkbibbooknamefamily}[1]{#1} +\newcommand*{\mkbibbooknameprefix}[1]{#1} +\newcommand*{\mkbibbooknamesuffix}[1]{#1} +\newcommand*{\mkbibsourcenamegiven}[1]{#1} +\newcommand*{\mkbibsourcenamefamily}[1]{#1} +\newcommand*{\mkbibsourcenameprefix}[1]{#1} +\newcommand*{\mkbibsourcenamesuffix}[1]{#1} +\newcommand*{\mkbiblistnamegiven}[1]{#1} +\newcommand*{\mkbiblistnamefamily}[1]{#1} +\newcommand*{\mkbiblistnameprefix}[1]{#1} +\newcommand*{\mkbiblistnamesuffix}[1]{#1} \newcommand{\ifshortform}[3]{% \ifdefstring{\blxarch@shortform@value}{#1} {#2} @@ -452,7 +544,7 @@ } \DeclareMultiCiteCommand{\shortformcites}[\mkbibfootnote] {\shortformcite}{\multicitedelim} -\newcommand{\nameshortformdelim}{\usebibmacro{in:}} +\newcommand*{\nameshortformdelim}{\usebibmacro{in:}} \DeclareBibliographyDriver{inreference}{% \ifshortform{true} {\usebibmacro{bibindex}% @@ -488,55 +580,73 @@ \usebibmacro{finentry}} {\usedriver{}{inbook}\usebibmacro{finentry}}% } -\newtoggle{archbool:repeatlabel} -\DeclareBibliographyOption{repeatlabel}[true]{% - \settoggle{archbool:repeatlabel}{#1}} +\newcommand{\ifrepeatlabel}[3]{% + \ifbibliography + {\ifdefstring{\blxarch@repeatlabel@value}{#1} + {#2} + {\ifcsdef{blxarch@opt@repeatlabel@#1} + {#3} + {\blxarch@errmsg{\blxarch@repeatlabel@errstr{\unexpanded{\ifrepeatlabel}}}}}}% + {\ifstrequal{false}{#1} + {#2} + {\ifcsdef{blxarch@opt@repeatlabel@#1} + {#3} + {\blxarch@errmsg{\blxarch@repeatlabel@errstr{\unexpanded{\ifrepeatlabel}}}}}}% +} +\DeclareBibliographyOption[string]{repeatlabel}[true]{% + \ifcsdef{blxarch@opt@repeatlabel@#1} + {\csuse{blxarch@opt@repeatlabel@#1}}% + {\blxarch@errmsg{\blxarch@repeatlabel@errstr{option 'repeatlabel'}}}} \ExecuteBibliographyOptions{repeatlabel} -\newcommand{\ifrepeatlabel}[2]{% - \ifboolexpr{ - togl {archbool:repeatlabel} - and - test {\ifbibliography} - } - {#1} - {#2}} -\newcommand{\repeatlabelwrap}[1]{#1} -\newcommand{\repeatlabeldelim}{\newline} +\newcommand*{\repeatlabeldash}{--\addspace} +\DeclareFieldFormat*{repeatlabel}{#1} +\newcommand*{\repeatlabeldelim}{\newline} \newbibmacro*{repeatlabel}{% - \repeatlabelwrap{% - \let\blxarch@buffer@repeatfamily\mkbibnamefamily - \let\blxarch@buffer@repeatprefix\mkbibnameprefix - \let\blxarch@buffer@repeatgiven\mkbibnamegiven - \let\blxarch@buffer@repeatsuffix\mkbibnamesuffix - \let\mkbibnamefamily\mkbibrepeatfamily - \let\mkbibnameprefix\mkbibrepeatprefix - \let\mkbibnamegiven\mkbibrepeatgiven - \let\mkbibnamesuffix\mkbibrepeatsuffix - \let\blxarch@buffer@repeatnames\c@minnames - \let\blxarch@buffer@maxnames\c@maxnames - \let\blxarch@buffer@minnames\c@minnames - \let\c@maxnames\blx@maxcitenames - \let\c@minnames\blx@mincitenames - \ifhyperref - {\let\bibhyperref\@empty} - {}% + \let\blxarch@buffer@repeatfamily\mkbibnamefamily% + \let\blxarch@buffer@repeatprefix\mkbibnameprefix% + \let\blxarch@buffer@repeatgiven\mkbibnamegiven% + \let\blxarch@buffer@repeatsuffix\mkbibnamesuffix% + \let\mkbibnamefamily\mkbibrepeatfamily% + \let\mkbibnameprefix\mkbibrepeatprefix% + \let\mkbibnamegiven\mkbibrepeatgiven% + \let\mkbibnamesuffix\mkbibrepeatsuffix% + \let\blxarch@buffer@repeatnames\c@minnames% + \let\blxarch@buffer@maxnames\c@maxnames% + \let\blxarch@buffer@minnames\c@minnames% + \let\c@maxnames\blx@maxcitenames% + \let\c@minnames\blx@mincitenames% + \ifhyperref + {\let\bibhyperref\@empty} + {}% + \printtext[repeatlabel]{% \iffieldundef{shorthand} - {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} - {\usebibmacro{cite:label}% - \setunit{\printdelim{nonameyeardelim}}} - {\printnames{labelname}% - \setunit{\printdelim{nameyeardelim}}}% - \ifeditionsuperscript{prelabel}{\usebibmacro{editionsuperscript}}{}% - \usebibmacro{cite:labeldate+extradate}% - \ifeditionsuperscript{prelabel}{\usebibmacro{editionsuperscript}}{}}% + {\ifboolexpr{ + test {\ifrepeatlabel{dashed}} + and + test {\iffieldequalcs{namehash}{blxarch@field@namehash}}} + {\printtext{\repeatlabeldash}% + \ifeditionsuperscript{prelabel}{\usebibmacro{editionsuperscript}}{}% + \usebibmacro{cite:labeldate+extradate}% + \ifeditionsuperscript{postlabel}{\usebibmacro{editionsuperscript}}{}} + {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} + {\usebibmacro{cite:label}% + \setunit{\printdelim{nonameyeardelim}}} + {\printnames{labelname}% + \setunit{\printdelim{nameyeardelim}}}% + \ifeditionsuperscript{prelabel}{\usebibmacro{editionsuperscript}}{}% + \usebibmacro{cite:labeldate+extradate}% + \ifeditionsuperscript{postlabel}{\usebibmacro{editionsuperscript}}{}}}% {\usebibmacro{cite:shorthand}}% - \ifhyperref{\let\bibhyperref\blxarch@buffer@hyperref}{}% - \let\c@maxnames\blxarch@buffer@maxnames - \let\c@minnames\blxarch@buffer@minnames - \let\mkbibnamefamily\blxarch@buffer@repeatfamily - \let\mkbibnameprefix\blxarch@buffer@repeatprefix - \let\mkbibnamegiven\blxarch@buffer@repeatgiven - \let\mkbibnamesuffix\blxarch@buffer@repeatsuffix}}% + }% + \ifhyperref{\let\bibhyperref\blxarch@buffer@hyperref}{}% + \let\c@maxnames\blxarch@buffer@maxnames% + \let\c@minnames\blxarch@buffer@minnames% + \let\mkbibnamefamily\blxarch@buffer@repeatfamily% + \let\mkbibnameprefix\blxarch@buffer@repeatprefix% + \let\mkbibnamegiven\blxarch@buffer@repeatgiven% + \let\mkbibnamesuffix\blxarch@buffer@repeatsuffix% + \savefield{namehash}{\blxarch@field@namehash}% +} \renewbibmacro*{begentry}{% \ifboolexpr{ togl {archbool:noseries} @@ -553,14 +663,14 @@ and not test {\iffieldundef{shortform}} } - {\savefield{shortform}{\blxarch@field@shortform}% + {\savefield*{shortform}{\blxarch@field@shortform}% \restorefield{booktitle}{\blxarch@field@shortform}% \clearfield{booksubtitle}% \clearfield{booktitleaddon}} {}% \iffieldundef{volume} {} - {\savefield{volume}{\blxarch@field@volume}% + {\savefield*{volume}{\blxarch@field@volume}% \restorefield{usera}{\blxarch@field@volume}}% \ifboolexpr{ test {\iffieldequalstr{entrysubtype}{digital}} @@ -598,7 +708,7 @@ \clearlist{origpublisher}}% \ifeditionsuperscript{none} {\clearfield{usere}} - {\savefield{edition}{\blxarch@field@edition}% + {\savefield*{edition}{\blxarch@field@edition}% \clearfield{edition}% \restorefield{usere}{\blxarch@field@edition}}% \ifboolexpr{ @@ -608,10 +718,10 @@ and not test {\ifselfcontained} } - {\savefield{maintitle}{\blxarch@field@maintitle}% - \savefield{mainsubtitle}{\blxarch@field@mainsubtitle}% - \savefield{maintitleaddon}{\blxarch@field@maintitleaddon}% - \savefield{maintitlenote}{\blxarch@field@maintitlenote}% + {\savefield*{maintitle}{\blxarch@field@maintitle}% + \savefield*{mainsubtitle}{\blxarch@field@mainsubtitle}% + \savefield*{maintitleaddon}{\blxarch@field@maintitleaddon}% + \savefield*{maintitlenote}{\blxarch@field@maintitlenote}% \restorefield{booktitle}{\blxarch@field@maintitle}% \restorefield{booksubtitle}{\blxarch@field@mainsubtitle}% \restorefield{booktitleaddon}{\blxarch@field@maintitleaddon}% @@ -627,7 +737,7 @@ and not test {\iffieldundef{shortjournal}} } - {\savefield{shortjournal}{\blxarch@field@shortjournal}% + {\savefield*{shortjournal}{\blxarch@field@shortjournal}% \restorefield{journaltitle}{\blxarch@field@shortjournal}% \clearfield{journalsubtitle}} {}% @@ -641,17 +751,17 @@ and not test {\iffieldundef{shortseries}} } - {\savefield{shortseries}{\blxarch@field@shortseries}% - \savefield{shortsubseries}{\blxarch@field@shortsubseries}% + {\savefield*{shortseries}{\blxarch@field@shortseries}% + \savefield*{shortsubseries}{\blxarch@field@shortsubseries}% \iffieldundef{shortsubseries} {} {\restorefield{series}{\blxarch@field@shortseries}% \restorefield{subseries}{\blxarch@field@shortsubseries}}% } {}% - \ifrepeatlabel - {\usebibmacro{repeatlabel}\repeatlabeldelim} - {}% + \ifrepeatlabel{false} + {} + {\usebibmacro{repeatlabel}\repeatlabeldelim}% \let\blxarch@buffer@list@namegiven\mkbibnamegiven% \let\blxarch@buffer@list@namefamily\mkbibnamefamily% \let\blxarch@buffer@list@nameprefix\mkbibnameprefix% @@ -678,10 +788,10 @@ \settoggle{archbool:usefestschriftaddon}{#1}} \ExecuteBibliographyOptions{usefestschriftaddon} \DeclareNameAlias{festschrift}{g-family} -\newcommand{\mkbibfestschriftnamegiven}[1]{#1} -\newcommand{\mkbibfestschriftnamefamily}[1]{#1} -\newcommand{\mkbibfestschriftnameprefix}[1]{#1} -\newcommand{\mkbibfestschriftnamesuffix}[1]{#1} +\newcommand*{\mkbibfestschriftnamegiven}[1]{#1} +\newcommand*{\mkbibfestschriftnamefamily}[1]{#1} +\newcommand*{\mkbibfestschriftnameprefix}[1]{#1} +\newcommand*{\mkbibfestschriftnamesuffix}[1]{#1} \newbibmacro*{festschrift}[1]{% \printtext[#1note]{% \let\blxarch@buffer@festschrift@namegiven\mkbibnamegiven% @@ -771,8 +881,8 @@ \setcounter{multivenueloop}{1}% }% } -\newcommand{\multivenuedelim}{\addcomma\space} -\newcommand{\eventtypepunct}{\addspace} +\newcommand*{\multivenuedelim}{\addcomma\space} +\newcommand*{\eventtypepunct}{\addspace} \DeclareListFormat*{notruncation}{#1} \newbibmacro*{titlenote}[1]{% \iftoggle{archbool:titlenote} @@ -813,37 +923,48 @@ \clearlist{multivenue}% \clearlist{multieventdate}% } -\renewcommand{\bibsetup}{% +\xpretocmd{\bibsetup}{% \def\blxarch@buffer@hyperref{\bibhyperref}% - \ifcsdef{blxarch@fork@authordate} - {\csuse{blxarch@issuedate}} - {} -} -\xpretobibmacro*{finentry}{% + \let\blxarch@field@namehash\undefined% +}{}{Patching macro '\bibsetup' failed} +\xpretobibmacro{finentry}{% \let\mkbibnamegiven\blxarch@buffer@list@namegiven% \let\mkbibnamefamily\blxarch@buffer@list@nameprefix% \let\mkbibnameprefix\blxarch@buffer@list@namefamily% \let\mkbibnamesuffix\blxarch@buffer@list@namesuffix% -} -\xpatchbibdriver{book}{\printfield {volume}}{}{}{} -\xpatchbibdriver{book}{\printfield {part}}{}{}{} -\xpatchbibdriver{inbook}{\printfield {volume}}{}{}{} -\xpatchbibdriver{inbook}{\printfield {part}}{}{}{} -\xpatchbibdriver{book}{\iffieldundef {maintitle} {} {}\newunit}{}{}{} -\xpatchbibdriver{inbook}{\iffieldundef {maintitle} {} {}\newunit}{}{}{} -\xpatchbibdriver{article}{\usebibmacro{byeditor+others}}{}{}{} -\newcommand{\titleseriesdelim}{\addperiod\space} -\xpatchbibdriver{inbook}{newunit \newblock \usebibmacro {in:}}{printunit{\inbookbookdelim}\newblock\usebibmacro{in:}}{}{} +}{}{Patching 'finentry' failed (1)} +\xpatchbibdriver{book}{\printfield {volume}}{} + {}{Patching driver 'book' failed (1)} +\xpatchbibdriver{book}{\printfield {part}}{} + {}{Patching driver 'book' failed (2)} +\xpatchbibdriver{inbook}{\printfield {volume}}{} + {}{blxarch@warning{patching driver 'inbook' failed (1)} +\xpatchbibdriver{inbook}{\printfield {part}}{} + {}{Patching driver 'inbook' failed (2)} +\xpatchbibdriver{book}{\iffieldundef {maintitle} {} {}\newunit}{} + {}{Patching driver 'book' failed (3)} +\xpatchbibdriver{inbook}{\iffieldundef {maintitle} {} {}\newunit}{} + {}{Patching driver 'inbook' failed (3)}} +\xpatchbibdriver{article}{\usebibmacro{byeditor+others}}{} + {}{Patching driver 'book' failed (4)} +\newcommand*{\titleseriesdelim}{\addperiod\space} +\newcommand*{\articletitlepunct}{\newunitpunct} +\xpatchbibdriver{inbook}{newunit \newblock \usebibmacro {in:}}{printunit{\inbookbookdelim}\newblock\usebibmacro{in:}} + {}{Patching driver 'inbook' failed (4)} \newcommand{\inbookbookdelim}{\newunitpunct} \DeclareFieldFormat[inreference]{dictionary}{\midsentence\bibstring{subverbum}\space\mkbibquote{#1\isdot}} \newtoggle{archbool:titlebrackets} \DeclareBibliographyOption{titlebrackets}[true]{% \settoggle{archbool:titlebrackets}{#1}} \ExecuteBibliographyOptions{titlebrackets} +\DeclareEntryOption{titlebrackets}[true]{% + \settoggle{archbool:titlebrackets}{#1}} \newtoggle{archbool:titlenote} \DeclareBibliographyOption{titlenote}[true]{% \settoggle{archbool:titlenote}{#1}} \ExecuteBibliographyOptions{titlenote} +\DeclareEntryOption{titlenote}[true]{% + \settoggle{archbool:titlenote}{#1}} \newtoggle{archbool:summarytitle} \DeclareBibliographyOption{summarytitle}[true]{% \settoggle{archbool:summarytitle}{#1}} @@ -865,7 +986,7 @@ {#1} {#2} } -\renewcommand{\subtitlepunct}{\addperiod\space} +\renewcommand*{\subtitlepunct}{\addperiod\space} \DeclareDataInheritance {mvbook,book,collection,mvcollection,proceedings,mvproceedings,reference,mvreference} {inbook,bookinbook,suppbook,incollection,suppcollection,inproceedings,inreference}{% @@ -880,6 +1001,7 @@ \inherit[override=true]{venue}{venue} \inherit[override=true]{multivenue}{multivenue} \inherit[override=true]{multieventdate}{multieventdate} + \inherit[override=true]{options}{options} \noinherit{summarytitle} } \renewbibmacro*{maintitle+title}{% @@ -958,7 +1080,9 @@ {\usebibmacro{titlenote}{title}} {\printfield[titlenote]{titleaddon}}}% {}% - \newunit}}% + \iffieldundef{journaltitle} + {\newunit} + {\printunit{\articletitlepunct}}}}% \iftoggle{archbool:titlebrackets} {} {\ifselfcontained @@ -1066,11 +1190,14 @@ \DeclareBibliographyOption{volumeafterseries}[false]{% \settoggle{archbool:volumeafterseries}{#1}} \ExecuteBibliographyOptions{volumeafterseries} -\newcommand{\articlesubtitlepunct}{\addcolon\space\midsentence} +\newcommand*{\articlesubtitlepunct}{\addcolon\space\midsentence} +\renewbibmacro*{bytranslator+others}{} \newtoggle{archbool:usesourceeditor} \DeclareBibliographyOption{usesourceeditor}[true]{% \settoggle{archbool:usesourceeditor}{#1}} \ExecuteBibliographyOptions{usesourceeditor} +\DeclareEntryOption{usesourceeditor}[true]{% + \settoggle{archbool:usesourceeditor}{#1}} \newcommand{\ifsourceeditor}[2]{% \ifboolexpr{ togl {archbool:usesourceeditor} @@ -1080,21 +1207,21 @@ {#1} {#2}% } -\newcommand{\multisourceeditordelim}{\addcomma\space} -\newcommand{\finalsourceeditordelim}{\addspace\bibstring{and}\space} +\newcommand*{\multisourceeditordelim}{\addcomma\space} +\newcommand*{\finalsourceeditordelim}{\addspace\bibstring{and}\space} \DeclareNameAlias{byeditor}{given-family} \xpretobibmacro{byeditor}{% \usebibmacro{byeditor:start} -}{}{} +}{}{Patching bibmacro 'byeditor' failed (1)} \xpretobibmacro{byeditor+others}{% \usebibmacro{byeditor:start} -}{}{} +}{}{Patching bibmacro 'byeditor:others' failed (1)} \xapptobibmacro{byeditor}{% \usebibmacro{byeditor:end} -}{}{} +}{}{Patching bibmacro 'byeditor:' failed (2)} \xapptobibmacro{byeditor+others}{% \usebibmacro{byeditor:end} -}{}{} +}{}{Patching bibmacro 'byeditor:others' failed (2)} \newbibmacro*{byeditor:start}{% \ifsourceeditor {\let\blxarch@buffer@multinamedelim\multinamedelim% @@ -1167,8 +1294,9 @@ \let\c@minnames\blxarch@buffer@minbooknames% } \DeclareDelimFormat{booknametitledelim}{\booklabelnamepunct} -\newcommand{\booklabelnamepunct}{\addcomma\space} +\newcommand*{\booklabelnamepunct}{\addcomma\space} \def\blxarch@issuedate{% + \savebibmacro{issue+date}% \renewbibmacro*{issue+date}{% \printtext[journaldateparens]{% \printfield{issue}% @@ -1180,9 +1308,9 @@ \DeclareBibliographyOption{shortjournal}[true]{% \settoggle{archbool:shortjournal}{#1}} \ExecuteBibliographyOptions{shortjournal} -\newcommand{\volumedatedelim}{\addcomma\space} -\newcommand{\journalvolumedelim}{\addspace} -\newcommand{\volumenumberdelim}{\addslash} +\newcommand*{\volumedatedelim}{\addcomma\space} +\newcommand*{\journalvolumedelim}{\addspace} +\newcommand*{\volumenumberdelim}{\addslash} \renewbibmacro*{volume+number+eid}{% \printfield{volume}% \setunit*{\volumenumberdelim}% @@ -1195,7 +1323,7 @@ {\newunit% \usebibmacro{location}{location}} {}% -} +}{}{Patching bibmacro 'note+pages' failed} \renewbibmacro*{journal+issuetitle}{% \printtext[journalvolumeblock]{% \usebibmacro{journal}% @@ -1258,8 +1386,8 @@ \clearfield{usere}% }% } -\newcommand{\mkbiblocationaddon}[1]{} -\renewcommand{\finallistdelim}{\multilistdelim} +\newcommand*{\mkbiblocationaddon}[1]{} +\renewcommand*{\finallistdelim}{\multilistdelim} \newcommand{\ifuselocation}[3]{% \ifdefstring{\blxarch@uselocation@value}{#1} {#2} @@ -1275,7 +1403,7 @@ \DeclareBibliographyOption{pagesfirst}[true]{% \settoggle{archbool:pagesfirst}{#1}} \ExecuteBibliographyOptions{pagesfirst} -\newcommand{\ifpagesfirst}[2]{% +\newcommand*{\ifpagesfirst}[2]{% \iftoggle{archbool:pagesfirst} {#1} {#2}}% @@ -1287,7 +1415,7 @@ \DeclareBibliographyOption{usepublisher}[true]{% \settoggle{archbool:usepublisher}{#1}} \ExecuteBibliographyOptions{usepublisher} -\newcommand{\locationpublisherdelim}{\addcolon\space} +\newcommand*{\locationpublisherdelim}{\addcolon\space} \newcommand{\iforigfields}[2]{% \iftoggle{archbool:origfields} {\iffieldundef{origyear} @@ -1332,7 +1460,7 @@ \setunit{\addspace}% \usebibmacro{bibliographydate}}% \newunit}% -\DeclareFieldFormat*{reprintbrackets}{\mkbibbrackets{#1}} +\DeclareFieldFormat*{reprintparens}{\mkbibbrackets{#1}} \newbibmacro*{origfields+reprint}{% \printtext[locationdateparens]{% \ifeditionsuperscript{preloc} @@ -1351,7 +1479,7 @@ \usebibmacro{origdate} \usebibmacro{editionsuperscript}% \setunit{\addspace}% - \printtext[reprintbrackets]{% + \printtext[reprintparens]{% \bibstring{reprint}\addspace% \printtext{\usebibmacro{location}{location}}% \setunit{\locationpublisherdelim}% @@ -1370,8 +1498,10 @@ {\ifcsdef{blxarch@opt@useinstitution@#1} {#3} {\blxarch@errmsg{\blxarch@useinstitution@errstr{\unexpanded{\ifuseinstitution}}}}}}% -\xpatchbibdriver{thesis}{\printfield {type}}{}{}{} -\xpatchbibdriver{thesis}{\printlist {language}}{}{}{} +\xpatchbibdriver{thesis}{\printfield {type}}{} + {}{Patching driver 'thesis' failed (1)} +\xpatchbibdriver{thesis}{\printlist {language}}{} + {}{Patching driver 'thesis' failed (2)} \newtoggle{archbool:useunpublishedthesis} \DeclareBibliographyOption{useunpublishedthesis}[true]{% \settoggle{archbool:useunpublishedthesis}{#1}} @@ -1459,8 +1589,8 @@ {\printtext[type]{\bibstring{unpublished\thefield{type}}}} {\printfield{type}} } -\newcommand{\institutionlocationdelim}{\addcomma\space} -\newcommand{\typeinstitutiondelim}{\addspace} +\newcommand*{\institutionlocationdelim}{\addcomma\space} +\newcommand*{\typeinstitutiondelim}{\addspace} \newcommand{\ifpositionlabeldate}[3]{% \ifdefstring{\blxarch@positionlabeldate@value}{#1} {#2} @@ -1488,26 +1618,60 @@ \ifbibextrayear {\printfield{extrayear}} {}}} -\DeclareFieldFormat*{extrayear}{\mknumalph{#1}}% +\DeclareFieldFormat*{extradate}{\mknumalph{#1}}% \newcommand{\ifbibextrayear}[2]{% \ifboolexpr{ - not test {\iffieldundef{extrayear}} + not test {\iffieldundef{extradate}} and test {\ifpositionlabeldate{location}} and - not test {\ifrepeatlabel} + test {\ifrepeatlabel{false}} and test {\ifbibliography} } {#1} {#2}} \DeclareFieldFormat*{newsparens}{\addcomma\space#1} -\newbibmacro*{extendeddate}[1]{% - \iffieldundef{#1year} - {} - {\printtext[#1dateparen]{\csuse{print#1date}}}% +\blxarch@newcounter{minrealdatediff}{3} +\blxarch@newcounter{currentrealdatediff}{0} +\DeclareBibliographyOption[integer]{minrealdatediff}[3]{% + \setcounter{minrealdatediff}{#1} + \addtocounter{minrealdatediff}{-1}} +\ExecuteBibliographyOptions{minrealdatediff} +\newbibmacro*{extendeddate}[2]{% + \clearfield{#1day}% + \clearfield{#1month}% + \clearfield{#1endday}% + \clearfield{#1endmonth}% + \iffieldint{#1year} + {\iffieldint{#2endyear} + {\ifnumcomp{\thefield{#1year}}{>}{\thefield{#2endyear}} + {\setcounter{currentrealdatediff}{\thefield{#1year}}% + \addtocounter{currentrealdatediff}{-\thefield{#2endyear}}} + {\setcounter{currentrealdatediff}{\thefield{#2endyear}}% + \addtocounter{currentrealdatediff}{-\thefield{#1year}}} + \ifnumcomp{\value{currentrealdatediff}}{>}{\value{minrealdatediff}} + {\printtext[#1dateparen]{\csuse{print#1date}}} + {}% + } + {\iffieldint{#2year} + {\ifnumcomp{\thefield{#1year}}{>}{\thefield{#2year}} + {\setcounter{currentrealdatediff}{\thefield{#1year}}% + \addtocounter{currentrealdatediff}{-\thefield{#2year}}} + {\setcounter{currentrealdatediff}{\thefield{#2year}}% + \addtocounter{currentrealdatediff}{-\thefield{#1year}}} + \ifnumcomp{\value{currentrealdatediff}}{>}{\value{minrealdatediff}} + {\printtext[#1dateparen]{\csuse{print#1date}}} + {}% + }% + {}% + }% + } + {\iffieldundef{#1year} + {} + {\printtext[#1dateparen]{\csuse{print#1date}}}}% } -\newcommand{\daterealdatedelim}{\addspace} +\newcommand*{\daterealdatedelim}{\addspace} \newbibmacro*{bibliographydate}{% \ifpositionlabeldate{label} {\ifnewspaper @@ -1526,14 +1690,14 @@ {\printtext[missingfield]{\midsentence\printfield{pubstate}}}}% {\printdate}% \ifbibextrayear - {\printfield{extrayear}} + {\printfield{extradate}} {}% }% \ifeditionsuperscript{postdate} {\usebibmacro{editionsuperscript}} {}% \setunit{\daterealdatedelim}% - \usebibmacro{extendeddate}{real}}}} + \usebibmacro{extendeddate}{real}{}}}} \newbibmacro*{origdate}{% \printtext{% \midsentence% @@ -1541,11 +1705,220 @@ {\printtext[missingfield]{\bibstring{nodate}}} {\printorigdate}% \setunit*{\daterealdatedelim} - \usebibmacro{extendeddate}{origreal}% + \usebibmacro{extendeddate}{origreal}{orig}% }} -\xpatchbibmacro{addendum+pubstate}{\printfield{pubstate}}{}{}{} -\DeclareFieldFormat*{realdateparen}{\mkbibbrackets{#1}} -\DeclareFieldFormat*{origrealdateparen}{\mkbibbrackets{#1}} +\xpatchbibmacro{addendum+pubstate}{\printfield{pubstate}}{} + {}{Patching bibmacro 'addendum+pubstate' failed} +\DeclareFieldFormat*{realdateparens}{\mkbibbrackets{#1}} +\DeclareFieldFormat*{origrealdateparens}{\mkbibbrackets{#1}} +\renewrobustcmd*{\bibdaterangesep}{\bibrangedash} +\newrobustcmd*{\bibdatesubseqesep}{\slash} + +\newrobustcmd*{\bibdaterangesepx}[1]{% + \ifboolexpr{test {\iffieldint{#1year}} and test {\iffieldint{#1endyear}}} + {\ifnumequal{\thefield{#1endyear}-\thefield{#1year}}{1} + {\bibdatesubseqesep} + {\bibdaterangesep}} + {\bibdaterangesep}} + \renewrobustcmd*{\mkdaterangefull}[2]{% + \begingroup + \blx@metadateinfo{#2}% + \iffieldundef{#2year} + {} + {\datecircaprint + \printtext[#2date]{% + % Such a season component can only come from an ISO8601 season which replaces + % a normal month so if it exists, we know that a normal date print is ruled out + \iffieldundef{#2season} + {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}% + % Optionally print the time after the date + \blx@printtime{#2}{}} + {\csuse{mkbibseasondate#1}{#2year}{#2season}}% + \dateuncertainprint + \dateeraprint{#2year}% + \iffieldundef{#2endyear} + {} + {\iffieldequalstr{#2endyear}{} + {\mbox{\bibdaterangesep}} + {\bibdaterangesepx{#2}% + \enddatecircaprint + \iffieldundef{#2season} + {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% + % Optionally print the time after the date + \blx@printtime{#2}{end}} + {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}% + \enddateuncertainprint + \dateeraprint{#2endyear}}}}}% + \endgroup} +\renewrobustcmd*{\mkdaterangetrunc}[2]{% + \begingroup + \blx@metadateinfo{#2}% + \iffieldundef{#2year} + {} + {\datecircaprint + \printtext[#2date]{% + % Such a season component can only come from an ISO8601 season which replaces + % a normal month so if it exists, we know that a normal date print is ruled out + \iffieldundef{#2season} + {\iffieldsequal{#2year}{#2endyear} + {\iffieldsequal{#2month}{#2endmonth} + {\csuse{mkbibdate#1}{}{}{#2day}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}} + {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}% + \iffieldsequal{#2dateera}{#2enddateera}{} + {\dateeraprint{#2year}}}} + {\iffieldsequal{#2year}{#2endyear} + {\csuse{mkbibseasondate#1}{}{#2season}} + {\csuse{mkbibseasondate#1}{#2year}{#2season}% + \iffieldsequal{#2dateera}{#2enddateera}{} + {\dateeraprint{#2year}}}}% + \dateuncertainprint + \iffieldundef{#2endyear} + {} + {\iffieldequalstr{#2endyear}{} + {\mbox{\bibdaterangesep}} + {\bibdaterangesepx{#2}% + \enddatecircaprint + \iffieldundef{#2season} + {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}} + {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}% + \enddateuncertainprint + \dateeraprint{#2endyear}}}}}% + \endgroup} +\renewrobustcmd*{\mkdaterangefullextra}[2]{% + \begingroup + \blx@metadateinfo{#2}% + \iffieldundef{#2year} + {} + {\datecircaprint + \printtext[#2date]{% + \printtext{% + % Such a season component can only come from an ISO8601 season which replaces + % a normal month so if it exists, we know that a normal date print is ruled out + \iffieldundef{#2season} + {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}% + % Optionally print the time after the date + \blx@printtime{#2}{}} + {\csuse{mkbibseasondate#1}{#2year}{#2season}}% + \dateuncertainprint + \dateeraprint{#2year}% + \iffieldundef{#2endyear} + {\printfield{extradate}} + {\iffieldequalstr{#2endyear}{} + {\printfield{extradate}% + \printtext{\mbox{\bibdaterangesep}}} + {\printtext{% + \bibdaterangesepx{#2}% + \enddatecircaprint + \iffieldundef{#2season} + {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% + % Optionally print the time after the date + \blx@printtime{#2}{end}} + {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}}% + \printfield{extradate}% + \enddateuncertainprint + \dateeraprint{#2endyear}}}}}}% + \endgroup} +\renewrobustcmd*{\mkdaterangetruncextra}[2]{% + \begingroup + \blx@metadateinfo{#2}% + \iffieldundef{#2year} + {} + {\datecircaprint + \printtext[#2date]{% + \printtext{% + % Such a season component can only come from an ISO8601 season which replaces + % a normal month so if it exists, we know that a normal date print is ruled out + \iffieldundef{#2season} + {\iffieldsequal{#2year}{#2endyear} + {\iffieldsequal{#2month}{#2endmonth} + {\csuse{mkbibdate#1}{}{}{#2day}} + {\csuse{mkbibdate#1}{}{#2month}{#2day}}} + {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}% + \iffieldsequal{#2dateera}{#2enddateera}{} + {\dateeraprint{#2year}}}} + {\iffieldsequal{#2year}{#2endyear} + {\csuse{mkbibseasondate#1}{}{#2season}} + {\csuse{mkbibseasondate#1}{#2year}{#2season}% + \iffieldsequal{#2dateera}{#2enddateera}{} + {\dateeraprint{#2year}}}}% + \dateuncertainprint + \iffieldundef{#2endyear} + {\printfield{extradate}} + {\iffieldequalstr{#2endyear}{} + {\printfield{extradate}% + \printtext{\mbox{\bibdaterangesep}}} + {\printtext{% + \bibdaterangesepx{#2}% + \enddatecircaprint + \iffieldundef{#2season} + {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}} + {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}}% + \printfield{extradate}% + \enddateuncertainprint + \dateeraprint{#2endyear}}}}}}% + \endgroup} +\renewrobustcmd*{\mkdaterangeymd}[1]{% + \begingroup + \blx@metadateinfo{#1}% + \iffieldundef{#1year} + {} + {\datecircaprint + \printtext[#1date]{% + % Such a season component can only come from an ISO8601 season which replaces + % a normal month so if it exists, we know that a normal date print is ruled out + \iffieldundef{#1season} + {\blx@ymddate{#1}{}% + % Optionally print the time after the date + \blx@printtime{#1}{}} + {\csuse{mkbibseasondateshort}{#1year}{#1season}}% + \dateuncertainprint + \dateeraprint{#1year}% + \iffieldundef{#1endyear} + {} + {\iffieldequalstr{#1endyear}{} + {\mbox{\bibdaterangesep}} + {\bibdaterangesepx{#1}% + \enddatecircaprint + \iffieldundef{#1season} + {\blx@ymddate{#1}{end}% + % Optionally print the time after the date + \blx@printtime{#1}{end}} + {\csuse{mkbibseasondateshort}{#1endyear}{#1endseason}}% + \enddateuncertainprint + \dateeraprint{#1endyear}}}}}% + \endgroup} +\renewrobustcmd*{\mkdaterangeymdextra}[1]{% + \begingroup + \blx@metadateinfo{#1}% + \iffieldundef{#1year} + {} + {\datecircaprint + \printtext[#1date]{% + % Such a season component can only come from an ISO8601 season which replaces + % a normal month so if it exists, we know that a normal date print is ruled out + \iffieldundef{#1season} + {\blx@ymddate[extradate]{#1}{}% + % Optionally print the time after the date + \blx@printtime{#1}{}} + {\csuse{mkbibseasondateshort}{#1year}{#1season}}% + \dateuncertainprint + \dateeraprint{#1year}% + \iffieldundef{#1endyear} + {} + {\iffieldequalstr{#1endyear}{} + {\mbox{\bibdaterangesep}} + {\printtext{% + \bibdaterangesepx{#1}% + \enddatecircaprint + \iffieldundef{#1season} + {\blx@ymddate{#1}{end}% + % Optionally print the time after the date + \blx@printtime{#1}{end}} + {\csuse{mkbibseasondateshort}{#1endyear}{#1endseason}}}% + \enddateuncertainprint + \dateeraprint{#1endyear}}}}}% + \endgroup} \DeclareBibliographyOption{giveninitligatures}[{Chr, Ch, Fr, IJ, Ll, Ph, Sch, St, Th}]{% \let\blxarch@giveninitligatures\@empty% \forcsvlist{\listadd\blxarch@giveninitligatures}{#1}% @@ -1709,16 +2082,34 @@ \DeclareBibliographyOption{preservelastauthor}[true]{% \settoggle{archbool:preservelastauthor}{#1}} \ExecuteBibliographyOptions{preservelastauthor} -\DeclareFieldFormat*{authortype}{\mkbibparens{#1}} +\newcommand*{\mkbibandothers}[1]{#1} +\renewbibmacro*{name:andothers}{% + \ifboolexpr{ + test {\ifnumequal{\value{listcount}}{\value{liststop}}} + and + test \ifmorenames + } + {\ifnumgreater{\value{liststop}}{1} + {\finalandcomma} + {}% + \printdelim{andothersdelim}\bibstring[\mkbibandothers]{andothers}}% + {}} +\newbibmacro*{name:andothersgenitive}{% + \ifboolexpr{ + test {\ifnumequal{\value{listcount}}{\value{liststop}}} + and + test \ifmorenames + } + {\ifnumgreater{\value{liststop}}{1} + {\finalandcomma} + {}% + \printdelim{andothersdelim}\bibstring[\mkbibandothers]{genitiveandothers}% + \let\blxarch@namepartfamily\@empty} + {}% +} +\DeclareFieldAlias{authortype}{editortype} \DeclareFieldFormat*{editortype}{\mkbibparens{#1}} -\renewbibmacro*{translator+othersstrg}{% - \ifboolexpr{ - test {\ifnumgreater{\value{translator}}{1}} - or - test {\ifandothers{translator}} - } - {\printtext[editortype]{\bibstring{translators}}} - {\printtext[editortype]{\bibstring{translator}}}} +\DeclareFieldAlias{translatortype}{editortype} \blxarch@newcounter{preservelastauthorloop}{1} \newbibmacro*{names:truncate}[1]{% \ifboolexpr{ @@ -1761,38 +2152,92 @@ {}% \ifpositionlabeldate{label} {\setunit{\daterealdatedelim}% - \usebibmacro{extendeddate}{real}} + \usebibmacro{extendeddate}{real}{}} {}}}} \DeclareListFormat*{labeldateparens}{#1} \DeclareDelimFormat{authortypedelim,editortypedelim,translatortypedelim}{\addspace} -\newcommand{\finalnameellipsis}{\addspace\dots\space} -\xpatchbibmacro{author}{\printnames{author}}{% - \ifidemincitation - {\printtext{% - \bibstring{idem\thefield{gender}}}} - {\usebibmacro{sortnamelist}{author}}}{}{} -\xpatchbibmacro{author}{\usebibmacro{date+extradate}}{\usebibmacro{labeldate+edition}}{}{} -\xpatchbibmacro{bbx:editor}{\printnames{editor}}{% - \ifidemincitation - {\printtext{% - \bibstring{idem\thefield{gender}}}} - {\usebibmacro{sortnamelist}{editor}}}{}{} -\xpatchbibmacro{bbx:translator}{\printnames{translator}}{% - \ifidemincitation - {\printtext{% - \bibstring{idem\thefield{gender}}}} - {\usebibmacro{sortnamelist}{translator}}}{}{} -\xpatchbibmacro{bbx:editor}{\usebibmacro{date+extradate}}{\usebibmacro{labeldate+edition}}{}{} -\xpatchbibmacro{bbx:translator}{\usebibmacro{date+extradate}}{\usebibmacro{labeldate+edition}}{}{} +\newcommand*{\finalnameellipsis}{\addspace\textellipsis\space} \renewbibmacro*{editor+others}{% \usebibmacro{editor}% } \renewbibmacro*{translator+others}{% \usebibmacro{translator}% } -\renewcommand{\multicitedelim}{\addspace\textendash\space} -\newcommand\strongcitedelim{\addperiod\space\textendash\space} -\renewcommand{\compcitedelim}{\addsemicolon\space} +\newrobustcmd*{\DefineGenitiveApostropheChars}[2]{% + \DefineBibliographyExtras{#1}{% + \let\blxarch@genitiveapostrophechars\@empty% + \forcsvlist{\listadd\blxarch@genitiveapostrophechars}{#2}% +}} +\newrobustcmd*{\DeclareGenitiveApostropheChars}[1]{% + \DeclareBibliographyExtras{% + \let\blxarch@genitiveapostrophechars\@empty% + \forcsvlist{\listadd\blxarch@genitiveapostrophechars}{#1}% +}} +\newtoggle{archbool:genitiveapostrophe} +\newbibmacro*{genitive}[1]{% + \ifdefvoid{#1} + {} + {\togglefalse{archbool:genitiveapostrophe}% + \fullexpandarg% + \StrRemoveBraces{#1}[\blxarch@nobraces]% + \renewcommand*{\do}[1]{% + \IfEndWith{\blxarch@nobraces}{##1} + {\toggletrue{archbool:genitiveapostrophe}\listbreak} + {}% + }% + \dolistloop{\blxarch@genitiveapostrophechars}% + \iftoggle{archbool:genitiveapostrophe} + {\bibstring{genitiveapostrophe}} + {\bibstring{genitives}}% + }% +} +\DeclareNameFormat{labelname:poss}{% Based on labelname from biblatex.def + \let\blxarch@namepartfamily\namepartfamily% + \ifcase\value{uniquename}% + \usebibmacro{name:family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}% + \or + \ifuseprefix + {\usebibmacro{name:given-family}{\namepartfamily}{\blxarch@ligatureinitchars{\namepartgiven}}{\namepartprefix}{\namepartsuffixi}} + {\usebibmacro{name:given-family}{\namepartfamily}{\blxarch@ligatureinitchars{\namepartgiven}}{\namepartprefixi}{\namepartsuffixi}}% + \or + \usebibmacro{name:given-family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}% + \fi + \usebibmacro{name:andothersgenitive}% + \ifnumequal{\value{listcount}}{\value{liststop}}{\usebibmacro{genitive}{\blxarch@namepartfamily}}{}} +\DeclareFieldFormat{shorthand:poss}{% + \ifnameundef{labelname}{#1\def\blxarch@genitivecheck{#1}\usebibmacro{genitive}{\blxarch@genitivecheck}}{}} +\DeclareFieldFormat{citetitle:poss}{#1\def\blxarch@genitivecheck{#1}\usebibmacro{genitive}{\blxarch@genitivecheck}} +\DeclareFieldFormat{label:poss}{#1\def\blxarch@genitivecheck{#1}\usebibmacro{genitive}{\blxarch@genitivecheck}} +\newrobustcmd*{\posscitealias}{% + \AtNextCite{% + \DeclareNameAlias{labelname}{labelname:poss}% + \DeclareFieldAlias{shorthand}{shorthand:poss}% + \DeclareFieldAlias{citetitle}{citetitle:poss}% + \DeclareFieldAlias{label}{label:poss}}} +\newrobustcmd*{\posscite}{% + \posscitealias% + \textcite} +\newrobustcmd*{\Posscite}{\bibsentence\posscite} +\newrobustcmd*{\posscites}{% + \posscitealias% + \textcites} +\newrobustcmd*{\Posscites}{\bibsentence\posscites} +\renewcommand*{\multicitedelim}{\addspace\textendash\space} +\newcommand*\strongcitedelim{\addperiod\space\textendash\space} +\renewcommand*{\compcitedelim}{\addsemicolon\space} +\newtoggle{archbool:citeshortin} +\DeclareBibliographyOption[boolean]{citeshortin}[true]{% + \settoggle{archbool:citeshortin}{#1}% + \ifboolexpr{ + togl {archbool:citeshortin} + and + not test {\ifcsdef{blxarch@fork@verbose}} + } +{\blxarch@errmsg{option 'citeshortin=true' only in verbose styles}} +{}% +} +\ExecuteBibliographyOptions{citeshortin=false} +\DeclareFieldFormat*{citetitle}{#1} \DeclareLabeldate{% \field{date} \field{pubstate} @@ -1804,7 +2249,7 @@ \field{editor} \field{translator} } -\renewcommand{\labelnamepunct}{\unspace\addcolon\space} +\renewcommand*{\labelnamepunct}{\unspace\addcolon\space} \newcommand{\ifseenote}[2]{#2} \newtoggle{archbool:uselabeltitle} \DeclareEntryOption{uselabeltitle}[false]{% @@ -1853,10 +2298,10 @@ \DeclareBibliographyOption{noseries}[false]{% \settoggle{archbool:noseries}{#1}} \ExecuteBibliographyOptions{noseries} -\newcommand{\seriespunct}{\addperiod\space} -\newcommand{\noseriespunct}{\seriespunct} -\newcommand{\seriesnumberdelim}{\addspace} -\newcommand{\subnumberseriesdelim}{\addspace=\space} +\newcommand*{\seriespunct}{\addperiod\space} +\newcommand*{\noseriespunct}{\seriespunct} +\newcommand*{\seriesnumberdelim}{\addspace} +\newcommand*{\subnumberseriesdelim}{\addspace=\space} \renewbibmacro*{series+number}{% \iffieldundef{series} {} @@ -1888,33 +2333,53 @@ }% }% \xpatchbibdriver{book}{usebibmacro {series+number}\newunit} - {usebibmacro{series+number}}{}{} + {usebibmacro{series+number}} +{}{Patching driver 'book' failed (5)} \xpatchbibdriver{inbook}{usebibmacro {series+number}\newunit} - {usebibmacro{series+number}}{}{} + {usebibmacro{series+number}} +{}{Patching driver 'inbook' failed (4)} \DeclareFieldFormat[book,inbook]{volume}{\addspace#1} -\renewcommand{\labelnamepunct}{\adddot\space} +\renewcommand*{\labelnamepunct}{\adddot\space} \urlstyle{same} \DeclareFieldFormat*{url}{\bibstring{urlfrom}\addcolon\space\url{#1}} -\renewcommand{\finalnamedelim}{\addcomma\addspace} +\renewcommand*{\finalnamedelim}{\addcomma\addspace} \DeclareListFormat*{language}{} -\DeclareFieldFormat*{citetitle}{#1} \newcommand{\printgiveninitligatureslist}{% - \renewcommand{\do}[1]{\space##1} + \renewcommand*{\do}[1]{\space##1} \dolistloop{\@blxarch@list@add@ligatures}} +\newrobustcmd*{\SuppressAdditiveLbxSuffixes}{% + \let\blx@lng@suff\@empty} \edef\blxarch@style@ay{authoryear-archaeology (generic)} \edef\blxarch@style@ayc{authoryear-comp-archaeology (generic)} \edef\blxarch@style@ayi{authoryear-ibid-archaeology (generic)} \edef\blxarch@style@ayic{authoryear-icomp-archaeology (generic)} +\edef\blxarch@style@numc{numeric-comp-archaeology (generic)} +\edef\blxarch@style@v{verbose-archaeology (generic)} \edef\blxarch@style@vi{verbose-ibid-archaeology (generic)} \edef\blxarch@style@vttwo{verbose-trad2note-archaeology (generic)} +\edef\blxarch@style@dguf@info{Deutsche Gesellschaft f\"ur Ur- und Fr\"uhgeschichte} +\edef\blxarch@style@dguf{\blxarch@style@dguf@info\space[obsolete \RN{2}]} +\edef\blxarch@style@dgufalt{\blxarch@style@dguf@info\space[obsolete \RN{1}]} +\edef\blxarch@style@dgufapa{\blxarch@style@dguf@info\space(APA)} +\edef\blxarch@style@mpk@info{Mitteilungen der Pr\"ahistorischen Kommission der \"Osterreichischen Akadademie der Wissenschaften} +\edef\blxarch@style@mpk{\blxarch@style@mpk@info\space[obsolete]} +\edef\blxarch@style@mpkoeaw{\blxarch@style@mpk@info\space[current]} +\edef\blxarch@style@rgk{R\"omisch-Germanische Kommission} +\edef\blxarch@style@rgkverbose{\blxarch@style@rgk\space(geisteswissenschaftlich)} +\edef\blxarch@style@rgkinline{\blxarch@style@rgk\space(naturwissenschaftlich)} +\edef\blxarch@style@rgknumeric{\blxarch@style@rgk\space(numerisch)} +\edef\blxarch@style@rgzm{R\"omisch-Germanisches Zentralmuseum Mainz} +\edef\blxarch@style@rgzminline{\blxarch@style@rgzm\space(naturwissenschaftlich)} +\edef\blxarch@style@rgzmnumeric{\blxarch@style@rgzm\space(numerisch)} +\edef\blxarch@style@rgzmverbose{\blxarch@style@rgzm\space(geisteswissenschaftlich)} +\edef\blxarch@style@muenster{Ur- und Fr\"uhgeschichtliche Arch\"aologie M\"unster} +\edef\blxarch@style@muensterverbose{\blxarch@style@muenster\space(geisteswissenschaftlich)} +\edef\blxarch@style@muensternumeric{\blxarch@style@muenster\space(numerisch)} +\edef\blxarch@style@muensterinline{\blxarch@style@muenster\space(naturwissenschaftlich)} \edef\blxarch@style@aefkw{\"Agyptologische Forschungsst\"atte f\"ur Kulturwissenschaft (\"AFKW)} \edef\blxarch@style@afwl{Ausgrabungen und Funde in Westfalen-Lippe} \edef\blxarch@style@amit{Arch\"aologische Berichte aus Iran und Turan (AMIT)} \edef\blxarch@style@archa{Archaeologia Austriaca (ArchA)} -\edef\blxarch@style@dai{Deutsches Arch\"aologisches Institut} -\edef\blxarch@style@dguf{Deutsche Gesellschaft f\"ur Ur- und Fr\"uhgeschichte} -\edef\blxarch@style@dgufalt{\blxarch@style@dguf\space[obsolete]} -\edef\blxarch@style@dgufapa{\blxarch@style@dguf\space(APA)} \edef\blxarch@style@eaz{Ethnographisch-Arch\"aologische Zeitschrift (EAZ)} \edef\blxarch@style@eazalt{\blxarch@style@eaz\space[obsolete]} \edef\blxarch@style@foe{Fundberichte aus \"Osterreich (F\"O)} @@ -1922,18 +2387,8 @@ \edef\blxarch@style@jbkrneuss{Jahrbuch f\"ur den Rhein-Kreis Neuss} \edef\blxarch@style@karl{Karl. Das kulturelle Schachmagazin} \edef\blxarch@style@maja{M\"unchner Arbeitskreis Junge Aegyptologie (MAJA)} -\edef\blxarch@style@mpk{Mitteilung der Pr\"ahistorischen Kommission} -\edef\blxarch@style@muenster{Ur- und Fr\"uhgeschichtliche Arch\"aologie M\"unster} -\edef\blxarch@style@muensterverbose{\blxarch@style@muenster\space(geisteswissenschaftlich)} -\edef\blxarch@style@muensterinline{\blxarch@style@muenster\space(naturwissenschaftlich)} \edef\blxarch@style@nnu{Nachrichten aus Niedersachsens Urgeschichte} \edef\blxarch@style@offa{Offa} -\edef\blxarch@style@rgk{R\"omisch-Germanische Kommission} -\edef\blxarch@style@rgkverbose{\blxarch@style@rgk\space(geisteswissenschaftlich)} -\edef\blxarch@style@rgkinline{\blxarch@style@rgk\space(naturwissenschaftlich)} -\edef\blxarch@style@rgzm{R\"omisch-Germanisches Zentralmuseum Mainz} -\edef\blxarch@style@rgzminline{\blxarch@style@rgzm\space(naturwissenschaftlich)} -\edef\blxarch@style@rgzmverbose{\blxarch@style@rgzm\space(geisteswissenschaftlich)} \edef\blxarch@style@sak{Studien zur Alt\"agyptischen Kultur} \edef\blxarch@style@volkskunde{Zeitschrift f\"ur Volkskunde} \edef\blxarch@style@zaak{Zeitschrift f\"ur Arch\"aologie au\ss ereurop\"aischer Kulturen (ZAAK)} |