\ProvidesFile{gost-authoryear.bbx} [2015/05/02\space v1.3\space biblatex-gost styles] \RequireBibliographyStyle{gost-standard} \DeclareBibliographyOption{mergedate}[true]{% \ifcsdef{bbx@opt@mergedate@#1} {\csuse{bbx@opt@mergedate@#1}} {\PackageError{biblatex} {Invalid option 'mergedate=#1'} {Valid values are 'maximum', 'compact', 'basic', 'minimum',\MessageBreak 'goststrict', 'gostletter', 'gostlabel', 'true' (=compact), and 'false'.}}} \providebibmacro*{date+extrayear}{} \providebibmacro*{authoryearlabel}{} \newbibmacro*{cite:date+extras}[1]{% \ifsingletitle {} {\iffieldundef{year} {} {\printtext[#1]{% \printdate% \usebibmacro{cite:extras}}}}} \newbibmacro*{cite:extras}{% \ifnameundef{labelname}% if there is labelname, extrayear disambiguation is enough {\printfield{extratitleyear}} {\printfield{extrayear}}} \providebibmacro*{labeltitle}{} \newlength{\labelauthoryearsep} \def\bbx@opt@mergedate@true{\bbx@opt@mergedate@compact} \def\bbx@opt@mergedate@maximum{% \renewbibmacro*{date+extrayear}{% \ifsingletitle {} {\iffieldundef{year} {} {\printtext[parens]{% \ifentrytype{article} {\printfield{issue}% \setunit*{\addspace}} {}% \usebibmacro{cite:date+extras}{}% \clearfield{month}% \clearfield{day}}}}}% %\renewcommand*{\labelnamepunct}{\newunitpunct} \renewbibmacro*{jour:volume+parts+issuetitle}{% \printfield{volume}% \setunit*{\addcomma\space}% \printfield{number}% \iffieldundef{issuetitle} {} {\setunit{\addcolon\space}% \printfield{issuetitle}}}% \renewbibmacro*{date}{\ifsingletitle{\printdate}{}}% \renewbibmacro*{year}{\ifsingletitle{\printfield{year}}{}}% \renewbibmacro*{jour:date}{% \ifsingletitle {\usebibmacro{year}% \newunit\newblock \mkbibdatelong{}{month}{day}} {}}% \renewbibmacro*{labeltitle}{% \iffieldundef{label} {\ifsingletitle {} {\iffieldundef{shorttitle} {\iffieldundef{maintitle} {\printfield{title}} {\printfield[title]{maintitle}}}% {\printfield[title]{shorttitle}}}} {\printfield{label}}} \renewbibmacro*{authoryearlabel}{}% \setlength{\labelauthoryearsep}{0pt}% } \def\bbx@opt@mergedate@compact{% \renewbibmacro*{date+extrayear}{% \usebibmacro{cite:date+extras}{parens}}% %\renewcommand*{\labelnamepunct}{\newunitpunct} \renewbibmacro*{date}{\ifsingletitle{\printdate}{}}% \renewbibmacro*{year}{\ifsingletitle{\printfield{year}}{}}% \renewbibmacro*{jour:date}{% \ifsingletitle {\usebibmacro{year}% \newunit\newblock \mkbibdatelong{}{month}{day}} {}}% \renewbibmacro*{labeltitle}{% \iffieldundef{label} {\ifsingletitle {} {\iffieldundef{shorttitle} {\iffieldundef{maintitle} {\printfield{title}} {\printfield[title]{maintitle}}}% {\printfield[title]{shorttitle}}}} {\printfield{label}}} \renewbibmacro*{authoryearlabel}{}% \setlength{\labelauthoryearsep}{0pt}% } \def\bbx@opt@mergedate@basic{% \renewbibmacro*{date+extrayear}{% \usebibmacro{cite:labelyear+extras}{parens}}% %\renewcommand*{\labelnamepunct}{\newunitpunct} \renewbibmacro*{date}{% \ifsingletitle {\printdate} {\iffieldundef{month} {} {\printdate}}}% \renewbibmacro*{year}{\printfield{year}}% \renewbibmacro*{labeltitle}{% \iffieldundef{label} {\ifsingletitle {} {\iffieldundef{shorttitle} {\iffieldundef{maintitle} {\printfield{title}} {\printfield[title]{maintitle}}}% {\printfield[title]{shorttitle}}}} {\printfield{label}}} \renewbibmacro*{authoryearlabel}{}% \setlength{\labelauthoryearsep}{0pt}% } \def\bbx@opt@mergedate@minimum{% \renewbibmacro*{date+extrayear}{% \usebibmacro{cite:labelyear+extras}{parens}}% %\renewcommand*{\labelnamepunct}{\newunitpunct} \renewbibmacro*{date}{% \ifsingletitle {\printdate} {\ifboolexpr{ test {\iffieldundef{month}} and test {\iffieldundef{extrayear}} } {} {\printdate}}}% \renewbibmacro*{year}{\printfield{year}}% \renewbibmacro*{labeltitle}{% \iffieldundef{label} {\ifsingletitle {} {\iffieldundef{shorttitle} {\iffieldundef{maintitle} {\printfield{title}} {\printfield[title]{maintitle}}}% {\printfield[title]{shorttitle}}}} {\printfield{label}}} \renewbibmacro*{authoryearlabel}{}% \setlength{\labelauthoryearsep}{0pt}% } \def\bbx@opt@mergedate@false{% \renewbibmacro*{date+extrayear}{% \usebibmacro{cite:labelyear+extras}{parens}}% %\renewcommand*{\labelnamepunct}{\newunitpunct} \renewbibmacro*{date}{\printdate}% \renewbibmacro*{year}{\printfield{year}}% \renewbibmacro*{labeltitle}{% \iffieldundef{label} {\ifsingletitle {} {\iffieldundef{shorttitle} {\iffieldundef{maintitle} {\printfield{title}} {\printfield[title]{maintitle}}}% {\printfield[title]{shorttitle}}}} {\printfield{label}}} \renewbibmacro*{authoryearlabel}{}% \setlength{\labelauthoryearsep}{0pt}% } \def\bbx@opt@mergedate@goststrict{% \renewbibmacro*{date+extrayear}{}% \renewbibmacro*{date}{\printdate}% \renewbibmacro*{year}{\printfield{year}}% \renewbibmacro*{labeltitle}{}% \DeclareFieldFormat{extrayear}{% \PackageWarning{biblatex-gost}{% Citation \thefield{entrykey} is not unique}}% \DeclareFieldFormat{extratitleyear}{% \PackageWarning{biblatex-gost}{% Citation \thefield{entrykey} is not unique}}% \ExecuteBibliographyOptions{singletitle}% \renewbibmacro*{authoryearlabel}{}% \setlength{\labelauthoryearsep}{0pt}% } \def\bbx@opt@mergedate@gostletter{% \renewbibmacro*{date+extrayear}{}% \renewbibmacro*{date}{\printdate\usebibmacro{cite:extras}}% \renewbibmacro*{year}{\printfield{year}\usebibmacro{cite:extras}}% \renewbibmacro*{labeltitle}{}% \renewbibmacro*{authoryearlabel}{}% \setlength{\labelauthoryearsep}{0pt}% } \def\bbx@opt@mergedate@gostlabel{% \renewbibmacro*{date+extrayear}{}% \renewbibmacro*{date}{\printdate}% \renewbibmacro*{year}{\printfield{year}}% \renewbibmacro*{labeltitle}{}% \renewbibmacro*{heading}{}% \renewbibmacro*{authoryearlabel}{% \mkbibbrackets{% \iffieldundef{heading} {\iffieldundef{shorthand} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} {\ifnameundef{labelname} {\usebibmacro{cite:label+volume+parts}{}% \setunit{\nameyeardelim}% \usebibmacro{cite:labelyear+extras}{}} {\usebibmacro{cite:labelname+volume+parts}{}}} {\usebibmacro{cite:labelname+volume+parts}{}% \setunit{\nameyeardelim}% \usebibmacro{cite:labelyear+extras}{}}} {\printfield{shorthand}}} {\usebibmacro{cite:heading}{}}}}% \setlength{\biblabelsep}{.5em}% \setlength{\labelauthoryearsep}{\biblabelsep}% } \ExecuteBibliographyOptions{labeldate,labeltitleyear,sorting=nyt,pagetracker,mergedate=gostletter, bibisbn,biburl,bibdoi,bibeprint} \DeclareFieldFormat{shorthandwidth}{#1} \setlength{\bibitemsep}{0pt} \defbibenvironment{bibliography} {\list {\usebibmacro{authoryearlabel}} {\setlength{\leftmargin}{\bibhang}% \setlength{\labelwidth}{0pt} \setlength{\labelsep}{\labelauthoryearsep}% \setlength{\itemindent}{-\leftmargin} \addtolength{\itemindent}{\labelsep} \setlength{\itemsep}{\bibitemsep}% \setlength{\parsep}{\bibparsep}}} {\endlist} {\item} \defbibenvironment{shorthands} {\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} {\item} \renewbibmacro*{author}{% \ifboolexpr{ test \ifuseauthor and not test {\ifnameundef{author}} } {\usebibmacro{bbx:dashcheck} {\bibnamedash} {\printnames{author}% \setunit{\addcomma\space}% \usebibmacro{bbx:savehash}}% \usebibmacro{authorstrg}% \setunit*{\addspace}} {\global\undef\bbx@lasthash% \usebibmacro{labeltitle}% \setunit*{\addspace}}% \usebibmacro{date+extrayear}} \renewbibmacro*{editor}{% \usebibmacro{bbx:editor}{editorstrg}} \renewbibmacro*{editor+others}{% \usebibmacro{bbx:editor}{editor+othersstrg}} \renewbibmacro*{bbx:editor}[1]{% \ifboolexpr{ test \ifuseeditor and not test {\ifnameundef{editor}} } {\usebibmacro{bbx:dashcheck} {\bibnamedash} {\printnames{editor}% \setunit{\addcomma\space}% \usebibmacro{bbx:savehash}}% \usebibmacro{#1}% \clearname{editor}% \setunit*{\addspace}}% {\global\undef\bbx@lasthash% \usebibmacro{labeltitle}% \setunit*{\addspace}}% \usebibmacro{date+extrayear}} \renewbibmacro*{translator}{% \usebibmacro{bbx:translator}{translatorstrg}} \renewbibmacro*{translator+others}{% \usebibmacro{bbx:translator}{translator+othersstrg}} \renewbibmacro*{bbx:translator}[1]{% \ifboolexpr{ test \ifusetranslator and not test {\ifnameundef{translator}} } {\usebibmacro{bbx:dashcheck} {\bibnamedash} {\printnames{translator}% \setunit{\addcomma\space}% \usebibmacro{bbx:savehash}}% \usebibmacro{#1}% \clearname{translator}% \setunit*{\addspace}}% {\global\undef\bbx@lasthash% \usebibmacro{labeltitle}% \setunit*{\addspace}}% \usebibmacro{date+extrayear}} \endinput