]> hydra-www.ietfng.org Git - mcv-academic/commitdiff
Add maxyears option to control the maximum amount of years to display on the entries
authoradin <adin@ic.unicamp.br>
Tue, 7 Apr 2020 16:09:59 +0000 (13:09 -0300)
committeradin <adin@ic.unicamp.br>
Tue, 7 Apr 2020 16:09:59 +0000 (13:09 -0300)
academic.sty
cv-banking.bbx

index 612f7def55826fb4562cc6c0cb2fc021afdcd982..ada6dd61c92256eb63ff04648694e1416ce1616f 100644 (file)
 % Definitions
 %-------------------------------------------------------------------------------
 
-%switches for information
+%% Switches for information
 \newif\ifdetails\detailsfalse
 \newif\if@citeall
 
+%% Counters
+% count the list of years on the dates
+\newcounter{maxyears}
+
 %-------------------------------------------------------------------------------
 % Options
 %-------------------------------------------------------------------------------
@@ -37,6 +41,8 @@
   style/.store in=\@load@style,
   style/.default=academic,
   %
+  maxyears/.code={\setcounter{maxyears}{#1}},
+  %
   % unknown keys are assumed to be options to be passed to the biblatex package
   .unknown/.code={\edef\unknown@packageoptions{\unknown@packageoptions,\pgfkeyscurrentname=#1}},
 }
@@ -47,6 +53,7 @@
   % put defaults here
   citeall,
   details = false,
+  maxyears = 3,
 }
 
 % process options key-value
index e1825c39172317be93157c957331118d5ef9bc82..3ec3170ddd977a668d9db897ff497d6f0d848c37 100644 (file)
@@ -27,7 +27,7 @@
 \DeclareBibliographyDriver{cventry}{%
   \usebibmacro{begentry}%
   \usebibmacro{cventry}%
-  {\usebibmacro{dates}[-\value{liststop}]}%
+  {\usebibmacro{dates}[-\value{maxyears}]}%
   {%
     \ifnameundef{author}{}{\usebibmacro{author}\newunitpunct}%
     \printmlfield{title}%