From: adin Date: Sun, 9 Sep 2018 17:55:00 +0000 (-0300) Subject: Update grant number list and authors on projects. This is a fix for #2. X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=15a7e1ace39b8fdcd663385d25d0dd6f6e245948;p=mcv-academic Update grant number list and authors on projects. This is a fix for #2. --- diff --git a/cv.bbx b/cv.bbx index 9d5ac1b..417ab19 100644 --- a/cv.bbx +++ b/cv.bbx @@ -71,9 +71,15 @@ \DeclareBibliographyDriver{project}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \printmlfield{role}% - \newunit% - % \setunit*{\addperiod\space}% + \ifnameundef{author}% + % if no author is given, print only the role + {\printmlfield{role}\newunit}% + {% else, print the author and the role in parenthesis, if the latter exists + \usebibmacro{author} + \ifmlfieldundef{role}{}% + {\mkbibparens{\printmlfield{role}}}% + \newunit% + }% \printmlfield{title}% \newunit% \usebibmacro{funding-project}% @@ -133,13 +139,15 @@ \fi% } } + \DeclareListFormat[project]{number}{% \ifnumequal{\value{listcount}}{1}{% \ifnumgreater{\value{liststop}}{1}% - {Nos.}{No.}% - }{} + {\bibstring{grantnums}}{\bibstring{grantnum}}% + \addnbspace + }{}% \usebibmacro{list:delim}{#1}% - #1\isdot + #1\isdot% \usebibmacro{list:andothers}% } diff --git a/cv.dbx b/cv.dbx index e1f793e..3dda384 100644 --- a/cv.dbx +++ b/cv.dbx @@ -3,7 +3,7 @@ \DeclareLocalizedDatamodelFields[type=field, datatype=literal]{level, period, title, organization, country, description, funding, role, note} \DeclareDatamodelFields[type=list, datatype=literal]{ - number + number% } \DeclareDatamodelFields[type=field, datatype=datepart]{