diff options
author | Karl Berry <karl@freefriends.org> | 2014-02-16 23:14:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-02-16 23:14:29 +0000 |
commit | ba4b016c440ad55acf1438f0dbe4e33a262a9640 (patch) | |
tree | 521f01e06b23abb9832ae64bd1451f5ae3cc7462 /Master/texmf-dist/tex/latex/biblatex-gost/gost-standard.bbx | |
parent | 06cb33c105d29fb7a1a104a11c4c866ce6d6c48f (diff) |
biblatex-gost
git-svn-id: svn://tug.org/texlive/trunk@32980 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-gost/gost-standard.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-gost/gost-standard.bbx | 257 |
1 files changed, 186 insertions, 71 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-gost/gost-standard.bbx b/Master/texmf-dist/tex/latex/biblatex-gost/gost-standard.bbx index b018733c05e..7f8654348b3 100644 --- a/Master/texmf-dist/tex/latex/biblatex-gost/gost-standard.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-gost/gost-standard.bbx @@ -1,10 +1,10 @@ \ProvidesFile{gost-standard.bbx} -[2013/11/30\space v0.9.2\space biblatex-gost styles] +[2014/02/15\space v1.0\space biblatex-gost styles] -\def\bbx@gost@date{2013/11/30} -\def\bbx@gost@version{0.9.2} +\def\bbx@gost@date{2014/02/15} +\def\bbx@gost@version{1.0} -\@ifpackagelater{biblatex}{2013/11/25} +\@ifpackagelater{biblatex}{2013/11/21} {} {\PackageError{biblatex} {Outdated 'biblatex' package} @@ -371,7 +371,9 @@ \usebibmacro{author/translator+others}% \setunit*{\labelnamepunct}% \usebibmacro{title}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% \usebibmacro{credits}% @@ -379,7 +381,7 @@ \usebibmacro{bytranslator+others}% \setunit{\space}% \iffieldundef{journaltitle} % no journaltitle means electronic publication - {\newunit} + {\usebibmacro{doi+eprint+url+note}} {\usebibmacro{//}% \usebibmacro{cbx:bookibid:check} {\bibsentence\printtext{% @@ -394,7 +396,7 @@ \newunit\newblock \usebibmacro{chapter+pages}} {\usebibmacro{journal}% - \setunit{\respdelim}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{jour:credits}% \setunit*{\resppunct}% \usebibmacro{byeditor}% @@ -415,11 +417,11 @@ \newunit\newblock \usebibmacro{issn}% \newunit\newblock}% - \usebibmacro{doi+eprint+url+note}% - \newunit\newblock - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock - \usebibmacro{pageref}}% + \usebibmacro{doi+eprint+url+note}}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% \newunit\newblock \usebibmacro{related:init}% \usebibmacro{related}% @@ -433,7 +435,9 @@ \usebibmacro{author/editor+others/translator+others}% \setunit*{\labelnamepunct}% \usebibmacro{maintitle+volumes+parts+title}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% \usebibmacro{credits}% @@ -478,7 +482,9 @@ \usebibmacro{title}% \setunit{\subtitlepunct}% \printfield{type}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% \usebibmacro{credits}% @@ -513,7 +519,9 @@ \usebibmacro{editor+others}% \setunit*{\labelnamepunct}% \usebibmacro{maintitle+volumes+parts+title}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{credits}% \setunit*{\resppunct}% \usebibmacro{byeditor}% @@ -554,7 +562,9 @@ \usebibmacro{author/translator+others}% \setunit*{\labelnamepunct}% \usebibmacro{title}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% \usebibmacro{credits}% @@ -575,7 +585,9 @@ \newunit\newblock \usebibmacro{chapter+pages}} {\usebibmacro{maintitle+volumes+parts+booktitle}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{book:translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{book:byauthor}% \setunit*{\resppunct}% \usebibmacro{book:credits}% @@ -616,7 +628,9 @@ \usebibmacro{author/translator+others}% \setunit*{\labelnamepunct}% \usebibmacro{title}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% \usebibmacro{credits}% @@ -637,7 +651,9 @@ \newunit\newblock \usebibmacro{chapter+pages}} {\usebibmacro{maintitle+volumes+parts+booktitle}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{book:translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{book:credits}% \setunit*{\resppunct}% \usebibmacro{book:byeditor}% @@ -676,7 +692,9 @@ \usebibmacro{author/translator+others}% \setunit*{\labelnamepunct}% \usebibmacro{title}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% \usebibmacro{credits}% @@ -699,7 +717,9 @@ {\usebibmacro{maintitle+volumes+parts+booktitle}% \newunit \usebibmacro{event+venue+date}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{book:translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{book:credits}% \setunit*{\resppunct}% \usebibmacro{book:byeditor}% @@ -738,11 +758,16 @@ \usebibmacro{title}% \setunit{\subtitlepunct}% \printfield{type}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% - \printlist{organization}% - \setunit*{\resppunct}% + \iflistundef{organization} + {} + {\setrespdelim% + \printlist{organization}% + \setunit*{\resppunct}}% \usebibmacro{credits}% \setunit*{\resppunct}% \usebibmacro{byeditor}% @@ -784,7 +809,9 @@ \usebibmacro{title}% \setunit{\subtitlepunct}% \printfield{type}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% \usebibmacro{credits}% @@ -815,11 +842,16 @@ \usebibmacro{author/editor}% \setunit*{\labelnamepunct}% \usebibmacro{title}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% - \printlist{organization}% - \setunit*{\resppunct}% + \iflistundef{organization} + {} + {\setrespdelim% + \printlist{organization}% + \setunit*{\resppunct}}% \usebibmacro{credits}% \setunit*{\resppunct}% \usebibmacro{byeditor}% @@ -864,15 +896,21 @@ \printlist[][-\value{listtotal}]{location}}% \setunit{\addcolondelim}% \printfield{ipc}% - \setunit{\respdelim}% - \printnames[byauthor]{author}% - \iffieldundef{authortype} + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- + \ifnameundef{author} {} - {\setunit*{\addspace}% - \printfield[parens]{authortype}}% - \setunit*{\addsemicolondelim}% - \usebibmacro{byholder}% - \setunit*{\addsemicolondelim}% + {\setrespdelim% + \printnames[byauthor]{author}% + \iffieldundef{authortype} + {} + {\setunit*{\addspace}% + \printfield[parens]{authortype}}% + \setunit*{\addsemicolondelim}}% + \ifnameundef{holder} + {} + {\setrespdelim% + \usebibmacro{byholder}% + \setunit*{\addsemicolondelim}}% \usebibmacro{credits}% \newunit\newblock \printfield{reqnumber}% @@ -913,7 +951,9 @@ \usebibmacro{editor}% \setunit*{\labelnamepunct}% \usebibmacro{title} - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{credits}% \setunit*{\resppunct}% \usebibmacro{byeditor}% @@ -952,7 +992,9 @@ \usebibmacro{maintitle+volumes+parts+title}% \newunit \usebibmacro{event+venue+date}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{credits}% \setunit*{\resppunct}% \usebibmacro{byeditor}% @@ -993,11 +1035,16 @@ \usebibmacro{title}% \setunit{\subtitlepunct}% \printfield{type}% - \setunit{\respdelim}% + \setunit{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% - \printlist[semicolondelim]{institution}% - \setunit*{\resppunct}% + \iflistundef{institution} + {} + {\setrespdelim% + \printlist[semicolondelim]{institution}% + \setunit*{\resppunct}}% \usebibmacro{credits}% \newunit\newblock \printfield{version}% @@ -1061,7 +1108,9 @@ \usebibmacro{author}% \setunit*{\labelnamepunct}% \usebibmacro{title}% - \setunit{\respdelim}% + \setunit*{\addcolondelim}% + \usebibmacro{translation}% + \def\bbx@gost@respdelim{\setunit{\respdelim}}% ----- Resp starts ----- \usebibmacro{byauthor}% \setunit*{\resppunct}% \usebibmacro{credits}% @@ -1338,12 +1387,15 @@ {#3}} \newbibmacro*{credits}{% - \usebibmacro{checkbooklist}{credits} - {\printlist[semicolondelim]{credits}% - \savelist{credits}{\savedclearedcredits}% - \clearlist{credits}% - } - {}} + \iflistundef{credits} + {} + {\usebibmacro{checkbooklist}{credits} + {\setrespdelim% + \printlist[semicolondelim]{credits}% + \savelist{credits}{\savedclearedcredits}% + \clearlist{credits}% + } + {}}} \renewbibmacro*{byeditor+othersstrg}[1]{% \iffieldundef{#1type} @@ -1378,13 +1430,14 @@ \renewbibmacro*{byeditor}{% \ifnameundef{editor} {} - {\usebibmacro{byeditor+othersstrg}{editor}% - \setunit{\addspace}% - \printnames[byeditor]{editor}% - \savename{editor}{\savedclearededitor}% - \clearname{editor}% - \setunit*{\resppunct}% - \usebibmacro{byeditorx}}} + {\setrespdelim% + \usebibmacro{byeditor+othersstrg}{editor}% + \setunit{\addspace}% + \printnames[byeditor]{editor}% + \savename{editor}{\savedclearededitor}% + \clearname{editor}% + \setunit*{\resppunct}% + \usebibmacro{byeditorx}}} \renewbibmacro*{bytranslator+others}{% \ifnameundef{translator} @@ -1411,7 +1464,8 @@ not test {\blx@gost@iflangsequal{origlanguage}{bookoriglanguage}} ) } - {\usebibmacro{bytranslator+othersstrg}% + {\setrespdelim% + \usebibmacro{bytranslator+othersstrg}% \setunit*{\addspace}% \printnames[bytranslator]{translator}% \savename{translator}{\savedclearedtranslator}% @@ -1477,11 +1531,37 @@ \clearname{afterword}} {}} +\newbibmacro*{with+}[1]{% + \ifnameundef{#1} + {} + {\setrespdelim% + \bibstring{with#1}% + \setunit{\addspace}% + \printnames[with#1]{#1}}} + +\renewbibmacro*{withcommentator}{% + \usebibmacro{with+}{commentator}} + +\renewbibmacro*{withannotator}{% + \usebibmacro{with+}{annotator}} + +\renewbibmacro*{withintroduction}{% + \usebibmacro{with+}{introduction}} + +\renewbibmacro*{withforeword}{% + \usebibmacro{with+}{foreword}} + +\renewbibmacro*{withafterword}{% + \usebibmacro{with+}{afterword}} + % book:... macros \newbibmacro*{book:credits}{% - \printlist[semicolondelim]{bookcredits}% - \clearlist{bookcredits}% + \iflistundef{credits} + {} + {\setrespdelim% + \printlist[semicolondelim]{bookcredits}% + \clearlist{bookcredits}}% } \newbibmacro*{book:byeditor+othersstrg}[1]{% @@ -1517,18 +1597,20 @@ \newbibmacro*{book:byeditor}{% \ifnameundef{editor} {} - {\usebibmacro{book:byeditor+othersstrg}{editor}% - \setunit{\addspace}% - \printnames[byeditor]{editor}% - \savename{editor}{\savedclearededitor}% - \clearname{editor}% - \setunit*{\resppunct}% - \usebibmacro{book:byeditorx}}} + {\setrespdelim% + \usebibmacro{book:byeditor+othersstrg}{editor}% + \setunit{\addspace}% + \printnames[byeditor]{editor}% + \savename{editor}{\savedclearededitor}% + \clearname{editor}% + \setunit*{\resppunct}% + \usebibmacro{book:byeditorx}}} \newbibmacro*{book:bytranslator+others}{% \ifnameundef{booktranslator} {} - {\usebibmacro{book:bytranslator+othersstrg}% + {\setrespdelim% + \usebibmacro{book:bytranslator+othersstrg}% \setunit{\addspace}% \printnames[bytranslator]{booktranslator}% \clearname{booktranslator}% @@ -1584,7 +1666,8 @@ \newbibmacro*{book:with+}[1]{% \ifnameundef{book#1} {} - {\bibstring{with#1}% + {\setrespdelim% + \bibstring{with#1}% \setunit{\addspace}% \printnames[with#1]{book#1}}} @@ -1631,8 +1714,11 @@ } \newbibmacro*{jour:credits}{% - \printlist[semicolondelim]{journalcredits}% - \clearlist{journalcredits}% + \iflistundef{credits} + {} + {\setrespdelim% + \printlist[semicolondelim]{journalcredits}% + \clearlist{journalcredits}}% } % processing volumes, books, parts, issues in the specified order @@ -1704,6 +1790,31 @@ \setunit{\addcolondelim}% \printfield{booktitleaddon}} +\newbibmacro*{translation}{% + \ifnameundef{translator} + {\ifnameundef{booktranslator} + {\iffieldundef{origlanguage} + {} + {\bibstring{bytranslator}% + \clearfield{origlanguage}}} + {}}% + {}} + +\newbibmacro*{book:translation}{% + \ifnameundef{booktranslator} + {\iffieldundef{bookoriglanguage} + {} + {% temporarily redefining commands used in the bibstring + \savecommand\lbx@lfromlang% + \savecommand\lbx@sfromlang% + \renewcommand*{\lbx@lfromlang}{\lbx@gost@lfromlang{bookoriglanguage}}% + \renewcommand*{\lbx@sfromlang}{\lbx@gost@sfromlang{bookoriglanguage}}% + \bibstring{bytranslator}% + \restorecommand\lbx@lfromlang% + \restorecommand\lbx@sfromlang% + \clearfield{bookoriglanguage}}} + {}} + \renewbibmacro*{maintitle}{% \ifboolexpr{ test {\iffieldundef{maintitle}} @@ -1817,7 +1928,8 @@ test {\ifnameundef{author}} } {} - {\printnames[byauthor]{author}}} + {\setrespdelim% + \printnames[byauthor]{author}}} \newbibmacro*{book:byauthor}{% \ifboolexpr{ @@ -1829,7 +1941,8 @@ ) } {} - {\printnames[byauthor]{bookauthor}}} + {\setrespdelim% + \printnames[byauthor]{bookauthor}}} \renewbibmacro*{name:andothers}{% \ifboolexpr{ @@ -1969,6 +2082,8 @@ \newbibmacro*{heading}{% \printfield{heading}} +\newcommand*{\setrespdelim}{\bbx@gost@respdelim\def\bbx@gost@respdelim{}} + % Related field \newcounter{bbx:relatedcount} |