diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx index d237fba1534..06d73b16a75 100644 --- a/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx +++ b/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx @@ -831,6 +831,7 @@ \printfield{pubstate}} \newcounter{bbx:relatedcount} +\newcounter{bbx:relatedtotal} \newbibmacro*{related}{% \ifboolexpr{ @@ -840,22 +841,31 @@ } {} {\setcounter{bbx:relatedcount}{0}% + \setcounter{bbx:relatedtotal}{0}% + \def\do##1{\stepcounter{bbx:relatedtotal}}% + \docsvfield{related}% \def\do{% \stepcounter{bbx:relatedcount}% \ifnumgreater{\value{bbx:relatedcount}}{1} {\printtext{\relateddelim}} {}}% - \ifcsundef{abx@macro@related:\strfield{relatedtype}} - {\appto{\do}{\csuse{abx@macro@related:default}}} - {\appto{\do}{\csuse{abx@macro@related:\strfield{relatedtype}}}}% - \ifcsundef{abx@ffd@*@related:\strfield{relatedtype}} - {\def\abx@tempa{related}} - {\def\abx@tempa{related:\strfield{relatedtype}}}% - \printtext[\abx@tempa]{% + \ifbibmacroundef{related:\strfield{relatedtype}} + {\appto{\do}{\usebibmacro{related:default}}} + {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}% + \iffieldformatundef{related:\strfield{relatedtype}} + {\def\bbx@tempa{related}} + {\def\bbx@tempa{related:\strfield{relatedtype}}}% + \printtext[\bbx@tempa]{% \iffieldundef{relatedstring} - {\iffieldbibstring{relatedtype} - {\printtext{\bibstring{\thefield{relatedtype}}\relatedpunct}} - {}} + {\ifboolexpr{ + test {\ifnumgreater{\value{bbx:relatedtotal}}{1}} + and + test {\ifbibxstring{\thefield{relatedtype}s}} + } + {\printtext{\bibstring{\thefield{relatedtype}s}\relatedpunct}} + {\iffieldbibstring{relatedtype} + {\printtext{\bibstring{\thefield{relatedtype}}\relatedpunct}} + {}}} {\iffieldbibstring{relatedstring} {\printtext{\bibstring{\thefield{relatedstring}}\relatedpunct}} {\printtext{\printfield{relatedstring}\relatedpunct}}}% |