]> hydra-www.ietfng.org Git - mcv-academic/commitdiff
Patch the date range source map
authoradin <adinriv@gmail.com>
Sun, 4 Sep 2016 22:33:52 +0000 (19:33 -0300)
committeradin <adinriv@gmail.com>
Sun, 4 Sep 2016 22:33:52 +0000 (19:33 -0300)
moderncvstyleacademic.sty

index 27413ee71cc2453f4e84c10e433e04fcc620952c..16ce39a42794d73ac1d5db1ca128d844c298017b 100755 (executable)
 \RequirePackage[backend=biber, citestyle=numeric-comp, bibstyle=multiple-dm, sorting=ymdtn, maxbibnames=99, defernumbers=true, giveninits=true, sortcites]{biblatex}
 
 % Patch endyears that are not declared
+% http://tex.stackexchange.com/a/327884/7561
 \DeclareSourcemap{
   \maps[datatype=bibtex]{
     \map{
-      \step[fieldsource=year]
-      \step[fieldset=endyear, origfieldval]
+      \step[fieldsource=date, match=\regexp{\A([0-9]{4}-[0-9]{2}-[0-9]{2})\Z}, replace=\regexp{$1/$1}]
+      \step[fieldsource=date, match=\regexp{\A([0-9]{4}-[0-9]{2})\Z}, replace=\regexp{$1/$1}]
+      \step[fieldsource=date, match=\regexp{\A([0-9]{4})\Z}, replace=\regexp{$1/$1}]
     }
   }
 }