]> hydra-www.ietfng.org Git - mcv-academic/commitdiff
Update grant number list and authors on projects. This is a fix for #2.
authoradin <adinriv@gmail.com>
Sun, 9 Sep 2018 17:55:00 +0000 (14:55 -0300)
committeradin <adinriv@gmail.com>
Sun, 9 Sep 2018 17:55:00 +0000 (14:55 -0300)
cv.bbx
cv.dbx

diff --git a/cv.bbx b/cv.bbx
index 9d5ac1bf9d0bf53609727a3f64f52ede46317fb6..417ab19c3f2d90f0c19aee418020f33b94c9d065 100644 (file)
--- a/cv.bbx
+++ b/cv.bbx
 \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}%
     \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 e1f793e5e507a07acaf47df4e79f647eeae4e0e7..3dda38452b4fb97e521342e0854c231038a7fd0a 100644 (file)
--- 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]{