From: adin Date: Tue, 7 Apr 2020 16:09:59 +0000 (-0300) Subject: Add maxyears option to control the maximum amount of years to display on the entries X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=c19b216d164a49b90f831af090fa3c06ef7b1d32;p=mcv-academic Add maxyears option to control the maximum amount of years to display on the entries --- diff --git a/academic.sty b/academic.sty index 612f7de..ada6dd6 100644 --- a/academic.sty +++ b/academic.sty @@ -10,10 +10,14 @@ % 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 diff --git a/cv-banking.bbx b/cv-banking.bbx index e1825c3..3ec3170 100644 --- a/cv-banking.bbx +++ b/cv-banking.bbx @@ -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}%