\ProvidesFile{gost-authoryear.cbx} [2013/04/03\space v0.8\space biblatex-gost styles] \ExecuteBibliographyOptions{dashed=false,citetracker=constrict,loccittracker=constrict, singletitle=false,labelyear,labeltitleyear,uniquename=init, uniquelist,ibidtracker=constrict,pagetracker,sortcites,autocite=inline, citeisbn,citeurl,citedoi,citeeprint} \providecommand*{\mkibid}[1]{#1} \newbool{cbx:parens} \newbool{cbx:loccit} \DeclareBibliographyOption{ibidpage}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{loccittracker=constrict}} {\ExecuteBibliographyOptions{loccittracker=false}}} \renewcommand*{\postnotedelim}{\addcomma\addspace} \renewcommand*{\nameyeardelim}{\addcomma\addspace} \renewcommand*{\compcitedelim}{\addsemicolon\space} \renewcommand*{\bibleftparen}{\blx@postpunct\ifcitation{[\bibsentence}{(}} \renewcommand*{\bibrightparen}{\blx@postpunct\ifcitation{]}{)}\midsentence} % changing the language of citation \gpreto\blx@hook@citekey{% \ifdef\abx@field@hyphenation {\ifdef\blx@thelangenv {\edef\blx@temp@langenv{\noexpand\csname\blx@thelangenv\endcsname% {\abx@field@hyphenation}}% \blx@temp@langenv} {}}% {}} \apptocmd{\blx@citeprint}{% \ifdef\abx@field@hyphenation {\ifdef\blx@thelangenv {\csname end\blx@thelangenv\endcsname} {}}% {}% }{}{\blx@err@patch{citeprint command}} \DeclareFieldFormat*{citetitle}{\mkbibemph{#1}} \DeclareFieldFormat{extratitleyear}{\mknumalph{#1}} \DeclareFieldFormat{citeheading}{#1} \newbibmacro*{cite}{% \iffieldundef{shorthand} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\iffieldundef{heading} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} {\ifnameundef{labelname} {\usebibmacro{cite:label+volume+parts}{bibhyperref}% \setunit{\nameyeardelim}% \usebibmacro{cite:labelyear+extras}{bibhyperref}} {\usebibmacro{cite:labelname+volume+parts}{bibhyperref}}% \usebibmacro{cite:reinit}} {\iffieldequals{namehash}{\cbx@lasthash} {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} {\setunit{\addcomma}% \usebibmacro{cite:extrayear}} {\setunit{\compcitedelim}% \usebibmacro{cite:labelyear+extras}{bibhyperref}% \savefield{labelyear}{\cbx@lastyear}}} {\ifsingletitle {\usebibmacro{cite:labelname+volume+parts}{bibhyperref}} {\usebibmacro{cite:labelname+volume+parts}{}% \setunit{\nameyeardelim}% \usebibmacro{cite:labelyear+extras}{bibhyperref}% \savefield{labelyear}{\cbx@lastyear}}% \savefield{namehash}{\cbx@lasthash}}}} {\usebibmacro{cite:heading}{bibhyperref}% % \iffieldundef{labelyear} % {} % {\setunit{\nameyeardelim}% % \usebibmacro{cite:labelyear+extras}{bibhyperref}} \usebibmacro{cite:reinit}}}}% {\usebibmacro{cite:shorthand}% \usebibmacro{cite:reinit}}% \setunit{\multicitedelim}} \newbibmacro*{cite:labelname+volume+parts}[1]{% \printtext[#1]{\printnames{labelname}}% \setunit*{\addcomma\space}% %\usebibmacro{volume+parts}{\setunit*{\addcomma\space}}% } \newbibmacro*{cite:label+volume+parts}[1]{% \iffieldundef{label} {\ifsingletitle {\printtext[#1]{\printfield[citetitle]{labeltitle}}} {\printfield[citetitle]{labeltitle}}} {\printtext[#1]{\printfield{label}}}% \setunit*{\addcomma\space}% %\usebibmacro{volume+parts}{\setunit*{\addcomma\space}}% } \newbibmacro*{cite:labelyear+extras}[1]{% \ifsingletitle {} {\iffieldundef{labelyear} {} {\printtext[#1]{% \printfield{labelyear}% \usebibmacro{cite:extras}}}}} \newbibmacro*{cite:init}{% \global\boolfalse{cbx:loccit}% \ifnumless{\value{multicitecount}}{2} {\global\boolfalse{cbx:parens}% \global\undef\cbx@lasthash \global\undef\cbx@lastyear} {\iffieldundef{prenote} {} {\global\undef\cbx@lasthash \global\undef\cbx@lastyear}}} \newbibmacro*{cite:reinit}{% \global\undef\cbx@lasthash \global\undef\cbx@lastyear} \newbibmacro*{citeyear}{% \iffieldundef{shorthand} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\iffieldundef{labelyear} {\usebibmacro{cite:label}% \usebibmacro{cite:reinit}} {\iffieldequals{namehash}{\cbx@lasthash} {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} {\setunit{\addcomma}% \usebibmacro{cite:extrayear}} {\setunit{\compcitedelim}% \usebibmacro{cite:labelyear+extrayear}% \savefield{labelyear}{\cbx@lastyear}}} {\usebibmacro{cite:labelyear+extrayear}% \savefield{namehash}{\cbx@lasthash}% \savefield{labelyear}{\cbx@lastyear}}}}} {\usebibmacro{cite:shorthand}% \usebibmacro{cite:reinit}}% \setunit{\multicitedelim}} \newbibmacro*{textcite}{% \iffieldequals{namehash}{\cbx@lasthash} {\iffieldundef{shorthand} {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} {\setunit{\addcomma}% \usebibmacro{cite:extrayear}} {\setunit{\compcitedelim}% \usebibmacro{cite:labelyear+extrayear}% \savefield{labelyear}{\cbx@lastyear}}} {\setunit{\compcitedelim}% \usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}} {\ifnameundef{labelname} {\iffieldundef{shorthand} {\usebibmacro{cite:label}% \setunit{% \global\booltrue{cbx:parens}% \addspace\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\usebibmacro{cite:labelyear+extrayear}}} {\usebibmacro{cite:shorthand}}} {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% \addspace\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% \iffieldundef{shorthand} {\iffieldundef{labelyear} {\usebibmacro{cite:label}} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\usebibmacro{cite:labelyear+extrayear}}}% \savefield{labelyear}{\cbx@lastyear}} {\usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}% \savefield{namehash}{\cbx@lasthash}}}% \setunit{% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% \multicitedelim}} \newbibmacro*{cite:heading}[1]{% \printtext[#1]{\printfield[citeheading]{heading}}} \newbibmacro*{cite:shorthand}{% \printtext[bibhyperref]{\printfield{shorthand}}} \newbibmacro*{cite:label}{% \iffieldundef{label} {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}} {\printtext[bibhyperref]{\printfield{label}}}} \newbibmacro*{cite:labelyear+extrayear}{% \iffieldundef{labelyear} {} {\printtext[bibhyperref]{% \printfield{labelyear}% \printfield{extrayear}}}} \newbibmacro*{cite:extrayear}{% \iffieldundef{extrayear} {} {\printtext[bibhyperref]{\printfield{extrayear}}}} \newbibmacro*{cite:ibid}{% \printtext[bibhyperref]{\bibstring[\mkibid]{ibidem}}% \ifloccit {\global\booltrue{cbx:loccit}} {}} \newbibmacro*{cite:postnote}{% \ifbool{cbx:loccit} {} {\usebibmacro{postnote}}} \newbibmacro*{textcite:postnote}{% \ifbool{cbx:loccit} {} {\usebibmacro{postnote}}% \ifthenelse{\value{multicitecount}=\value{multicitetotal}} {\setunit{}% \printtext{% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}}} {\setunit{% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% \multicitedelim}}} \DeclareCiteCommand{\cite} {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand*{\cite} {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{citeyear}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand{\parencite}[\mkbibparens] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand*{\parencite}[\mkbibparens] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{citeyear}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand{\footcite}[\mkbibfootnote] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand{\textcite} {\usebibmacro{cite:init}} {\usebibmacro{citeindex}% \usebibmacro{textcite}} {} {\usebibmacro{textcite:postnote}} \DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}} \DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\setunit{\multicitedelim}} \DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}{\setunit{\multicitedelim}} \DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]{\footcitetext}{\setunit{\multicitedelim}} \DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote]{\smartcite} {\setunit{\multicitedelim}} \DeclareMultiCiteCommand{\textcites}{\textcite}{} \endinput