How to compress years 2001a-n in author-date biblatex style?Suppressing em-dashs for recurrent authors and letter suffixes for years when using biblatex-chicagoNo disambiguation of same year, same author citations in biblatex-chicago author-date style while using option csmdate=bothCitations with same first author and date with apa style: no letter generateduse authoryearstyle in biblatex with year label letter for same first authorBiblatex: cite two-author papers as (A & B <date>)Biblatex style for author only and numbered when not uniquebiblatex filter on arbitrary fieldUse : instead of comma with biblatex chicago author-dateBiblatex reference sorting in same-first author, different-year entriesBiblatex ambiguous citations aren't ambiguous - they have different years

Watching something be written to a file live with tail

What is the word for reserving something for yourself before others do?

Why can't I see bouncing of a switch on an oscilloscope?

What typically incentivizes a professor to change jobs to a lower ranking university?

LWC SFDX source push error TypeError: LWC1009: decl.moveTo is not a function

If human space travel is limited by the G force vulnerability, is there a way to counter G forces?

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

Why do I get two different answers for this counting problem?

Why is 150k or 200k jobs considered good when there's 300k+ births a month?

What are these boxed doors outside store fronts in New York?

How to efficiently unroll a matrix by value with numpy?

What would happen to a modern skyscraper if it rains micro blackholes?

What's that red-plus icon near a text?

How do I deal with an unproductive colleague in a small company?

How can bays and straits be determined in a procedurally generated map?

Can I ask the recruiters in my resume to put the reason why I am rejected?

Modeling an IP Address

Why doesn't H₄O²⁺ exist?

Meaning of に in 本当に

Why are electrically insulating heatsinks so rare? Is it just cost?

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

What is a clear way to write a bar that has an extra beat?

What's the point of deactivating Num Lock on login screens?

Has there ever been an airliner design involving reducing generator load by installing solar panels?



How to compress years 2001a-n in author-date biblatex style?


Suppressing em-dashs for recurrent authors and letter suffixes for years when using biblatex-chicagoNo disambiguation of same year, same author citations in biblatex-chicago author-date style while using option csmdate=bothCitations with same first author and date with apa style: no letter generateduse authoryearstyle in biblatex with year label letter for same first authorBiblatex: cite two-author papers as (A & B <date>)Biblatex style for author only and numbered when not uniquebiblatex filter on arbitrary fieldUse : instead of comma with biblatex chicago author-dateBiblatex reference sorting in same-first author, different-year entriesBiblatex ambiguous citations aren't ambiguous - they have different years













1















Is it possible to configure biblatex-chicago to compress a case like
"Karasti et al. 2016a, 2016b, 2016c, 2016d" into "Karasti et al. 2016a-d"? If yes, how?



All the four entries have the same author/year combinations but are actually different publications.



If necessary, am happy to provide MWE.










share|improve this question






















  • Please provide an MWE, yes :)

    – Andreas Storvik Strauman
    Jul 1 '18 at 16:16






  • 2





    Please do provide an MWE. Your question is reasonably clear without one, but it gives us a good place to start and makes sure that we are all talking about the same thing. It should be possible, but it can be really messy with biblatex-chicago. Since you would not comply with Chicago style with these changes anyway, would it be possible to use one of the standard styles (style=authoryear-comp)?

    – moewe
    Jul 1 '18 at 16:16
















1















Is it possible to configure biblatex-chicago to compress a case like
"Karasti et al. 2016a, 2016b, 2016c, 2016d" into "Karasti et al. 2016a-d"? If yes, how?



All the four entries have the same author/year combinations but are actually different publications.



If necessary, am happy to provide MWE.










share|improve this question






















  • Please provide an MWE, yes :)

    – Andreas Storvik Strauman
    Jul 1 '18 at 16:16






  • 2





    Please do provide an MWE. Your question is reasonably clear without one, but it gives us a good place to start and makes sure that we are all talking about the same thing. It should be possible, but it can be really messy with biblatex-chicago. Since you would not comply with Chicago style with these changes anyway, would it be possible to use one of the standard styles (style=authoryear-comp)?

    – moewe
    Jul 1 '18 at 16:16














1












1








1


0






Is it possible to configure biblatex-chicago to compress a case like
"Karasti et al. 2016a, 2016b, 2016c, 2016d" into "Karasti et al. 2016a-d"? If yes, how?



All the four entries have the same author/year combinations but are actually different publications.



If necessary, am happy to provide MWE.










share|improve this question














Is it possible to configure biblatex-chicago to compress a case like
"Karasti et al. 2016a, 2016b, 2016c, 2016d" into "Karasti et al. 2016a-d"? If yes, how?



All the four entries have the same author/year combinations but are actually different publications.



If necessary, am happy to provide MWE.







biblatex biblatex-chicago






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 1 '18 at 16:14









ingliingli

290111




290111












  • Please provide an MWE, yes :)

    – Andreas Storvik Strauman
    Jul 1 '18 at 16:16






  • 2





    Please do provide an MWE. Your question is reasonably clear without one, but it gives us a good place to start and makes sure that we are all talking about the same thing. It should be possible, but it can be really messy with biblatex-chicago. Since you would not comply with Chicago style with these changes anyway, would it be possible to use one of the standard styles (style=authoryear-comp)?

    – moewe
    Jul 1 '18 at 16:16


















  • Please provide an MWE, yes :)

    – Andreas Storvik Strauman
    Jul 1 '18 at 16:16






  • 2





    Please do provide an MWE. Your question is reasonably clear without one, but it gives us a good place to start and makes sure that we are all talking about the same thing. It should be possible, but it can be really messy with biblatex-chicago. Since you would not comply with Chicago style with these changes anyway, would it be possible to use one of the standard styles (style=authoryear-comp)?

    – moewe
    Jul 1 '18 at 16:16

















Please provide an MWE, yes :)

– Andreas Storvik Strauman
Jul 1 '18 at 16:16





Please provide an MWE, yes :)

– Andreas Storvik Strauman
Jul 1 '18 at 16:16




2




2





Please do provide an MWE. Your question is reasonably clear without one, but it gives us a good place to start and makes sure that we are all talking about the same thing. It should be possible, but it can be really messy with biblatex-chicago. Since you would not comply with Chicago style with these changes anyway, would it be possible to use one of the standard styles (style=authoryear-comp)?

– moewe
Jul 1 '18 at 16:16






Please do provide an MWE. Your question is reasonably clear without one, but it gives us a good place to start and makes sure that we are all talking about the same thing. It should be possible, but it can be really messy with biblatex-chicago. Since you would not comply with Chicago style with these changes anyway, would it be possible to use one of the standard styles (style=authoryear-comp)?

– moewe
Jul 1 '18 at 16:16











1 Answer
1






active

oldest

votes


















4














As it turns out this is a bit more complicated than I initially thought. It is possible to sort this out for the standard style authoryear-comp as shown below, but I'm a bit more sceptical about biblatex-chicago.




Since version 0.5 biblatex-ext includes the styles ext-authoryear-ecomp and ext-authoryear-iecomp with native compression of extradate lists based on the code presented here. See commit e1c4116 on GitHub.



documentclass[british]article
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackagebabel
usepackagecsquotes

usepackage[style=ext-authoryear-ecomp, backend=biber]biblatex
addbibresourcebiblatex-examples.bib

usepackagehyperref


begindocument
citesigfridsson

citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

printbibliography
enddocument



The solution is similar to what numeric-comp does. The main problem is that biblatex normally does not know what the next entry is because the items in a list of citations are handled one-by-one with little knowledge of the overall list. So it is not entirely trivial to process a list of citations and decide whether or not to skip over a particular citation because it happens to be the b in a-c.



documentclass[british]article
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackagebabel
usepackagecsquotes

usepackage[style=authoryear-comp, backend=biber]biblatex
addbibresourcebiblatex-examples.bib

usepackagehyperref

makeatletter
newcountercbx@extradatecount

renewbibmacro*cite:init%
ifnumlessvaluemulticitecount2
globalboolfalsecbx:parens%
globalundefcbx@lastkey
globalundefcbx@lasthash
globalundefcbx@lastyear
globalundefcbx@lastextradate
setcountercbx@extradatecount0
iffieldundefprenote

globalundefcbx@lastkey
globalundefcbx@lasthash
globalundefcbx@lastyear
globalundefcbx@lastextradate
setcountercbx@extradatecount0

renewbibmacro*cite:reinit%
globalundefcbx@lastkey
globalundefcbx@lasthash
globalundefcbx@lastyear
globalundefcbx@lastextradate
setcountercbx@extradatecount0

newcommand*extradateonlycompcitedelimaddcomma
newcommand*extradateonlycompciterangedelimbibrangedash


newbibmacro*generic:dump:extradate%
ifundefcbx@lastkey

entrydatacbx@lastkey
ifnumlessvaluecbx@extradatecount1
blx@warning% This should not happen, so warn when it does
Uh-oh!
The extradate compression is quite likelyMessageBreak
wrong for cbx@lastkey%
%
ifnumgreatervaluecbx@extradatecount1
setunitextradateonlycompciterangedelim
setunitextradateonlycompcitedelim%
usebibmacrocite:extradate%
setunitcbx@thiscitedelim%
globalundefcbx@lastkey
setcountercbx@extradatecount0%


newbibmacro*cite:dump:extradate%
defcbx@thiscitedelimmulticitedelim%
usebibmacrogeneric:dump:extradate

newbibmacro*textcite:dump:extradate%
defcbx@thiscitedelim%
ifboolcbx:parens
bibcloseparenglobalboolfalsecbx:parens
%
textcitedelim%
usebibmacrogeneric:dump:extradate

newbibmacro*cite:comp:extradate%
ifnumequalcbx@lastextradate+1thefieldextradate
stepcountercbx@extradatecount%
savefieldentrykeycbx@lastkey
usebibmacrocite:dump:extradate%
setunitextradateonlycompcitedelim%
usebibmacrocite:extradate%
savefieldextradatecbx@lastextradate%


renewbibmacro*cite%
iffieldundefshorthand
ifthenelseifnameundeflabelnameORiffieldundeflabelyear
usebibmacrocite:dump:extradate%
usebibmacrocite:label%
setunitprintdelimnonameyeardelim%
usebibmacrocite:labeldate+extradate%
usebibmacrocite:reinit
iffieldequalsnamehashcbx@lasthash
ifthenelseiffieldequalslabelyearcbx@lastyearAND
(valuemulticitecount=0ORiffieldundefpostnote)
usebibmacrocite:comp:extradate
usebibmacrocite:dump:extradate%
setunitcompcitedelim%
usebibmacrocite:labeldate+extradate%
savefieldlabelyearcbx@lastyear%
savefieldextradatecbx@lastextradate%
setcountercbx@extradatecount0
usebibmacrocite:dump:extradate%
printnameslabelname%
setunitprintdelimnameyeardelim%
usebibmacrocite:labeldate+extradate%
savefieldnamehashcbx@lasthash%
savefieldlabelyearcbx@lastyear%
savefieldextradatecbx@lastextradate%
setcountercbx@extradatecount0
usebibmacrocite:dump:extradate%
usebibmacrocite:shorthand%
usebibmacrocite:reinit%
setunitmulticitedelim

renewbibmacro*textcite%
iffieldequalsnamehashcbx@lasthash
iffieldundefshorthand
ifthenelseiffieldequalslabelyearcbx@lastyearAND
(valuemulticitecount=0ORiffieldundefpostnote)
usebibmacrocite:comp:extradate
usebibmacrotextcite:dump:extradate%
setunitcompcitedelim%
usebibmacrocite:labeldate+extradate%
savefieldlabelyearcbx@lastyear%
savefieldextradatecbx@lastextradate%
setcountercbx@extradatecount0
usebibmacrotextcite:dump:extradate%
setunitcompcitedelim%
usebibmacrocite:shorthand%
globalundefcbx@lastyear
usebibmacrotextcite:dump:extradate%
ifnameundeflabelname
iffieldundefshorthand
usebibmacrocite:label%
setunit%
globalbooltruecbx:parens%
printdelimnonameyeardelimbibopenparen%
ifnumequalvaluecitecount1
usebibmacroprenote
%
usebibmacrocite:labeldate+extradate
usebibmacrocite:shorthand
printnameslabelname%
setunit%
globalbooltruecbx:parens%
printdelimnameyeardelimbibopenparen%
ifnumequalvaluecitecount1
usebibmacroprenote
%
iffieldundefshorthand
iffieldundeflabelyear
usebibmacrocite:label
usebibmacrocite:labeldate+extradate%
savefieldlabelyearcbx@lastyear%
savefieldextradatecbx@lastextradate%
setcountercbx@extradatecount0
usebibmacrocite:shorthand%
globalundefcbx@lastyear%
stepcountertextcitecount%
savefieldnamehashcbx@lasthash%
setunit%
ifboolcbx:parens
bibcloseparenglobalboolfalsecbx:parens
%
textcitedelim

DeclareCiteCommandcite
usebibmacrocite:init%
usebibmacroprenote
usebibmacrociteindex%
usebibmacrocite

usebibmacrocite:dump:extradate%
usebibmacropostnote

DeclareCiteCommand*cite
usebibmacrocite:init%
usebibmacroprenote
usebibmacrociteindex%
usebibmacrociteyear

usebibmacrocite:dump:extradate%
usebibmacropostnote

DeclareCiteCommandparencite[mkbibparens]
usebibmacrocite:init%
usebibmacroprenote
usebibmacrociteindex%
usebibmacrocite

usebibmacrocite:dump:extradate%
usebibmacropostnote

DeclareCiteCommand*parencite[mkbibparens]
usebibmacrocite:init%
usebibmacroprenote
usebibmacrociteindex%
usebibmacrociteyear

usebibmacrocite:dump:extradate%
usebibmacropostnote

DeclareCiteCommandfootcite[mkbibfootnote]
usebibmacrocite:init%
usebibmacroprenote
usebibmacrociteindex%
usebibmacrocite

usebibmacrocite:dump:extradate%
usebibmacropostnote

DeclareCiteCommandfootcitetext[mkbibfootnotetext]
usebibmacrocite:init%
usebibmacroprenote
usebibmacrociteindex%
usebibmacrocite

usebibmacrocite:dump:extradate%
usebibmacropostnote

DeclareCiteCommandsmartcite[iffootnotemkbibparensmkbibfootnote]
usebibmacrocite:init%
usebibmacroprenote
usebibmacrociteindex%
usebibmacrocite

usebibmacrocite:dump:extradate%
usebibmacropostnote

DeclareCiteCommandcbx@textcite
usebibmacrocite:init
usebibmacrociteindex%
usebibmacrotextcite

usebibmacrotextcite:dump:extradate%
usebibmacrotextcite:postnote
makeatother


begindocument
citesigfridsson

citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

citeknuth:ct:b,knuth:ct:c,knuth:ct:d

citeknuth:ct:b,knuth:ct:c,knuth:ct:e

citeknuth:ct:b,knuth:ct:d,knuth:ct:e

citeknuth:ct:c,knuth:ct:d,knuth:ct:e

citeknuth:ct:a,knuth:ct:b,knuth:ct:c


citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

citeaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

citeaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

citeaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

textcitesigfridsson

textciteknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

textciteknuth:ct:b,knuth:ct:c,knuth:ct:d

textciteknuth:ct:b,knuth:ct:c,knuth:ct:e

textciteknuth:ct:b,knuth:ct:d,knuth:ct:e

textciteknuth:ct:c,knuth:ct:d,knuth:ct:e

textciteknuth:ct:a,knuth:ct:b,knuth:ct:c


textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson,worman

textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson,worman

textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson,worman

textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson,worman

printbibliography
enddocument


enter image description here



I would not even want to get started doing that for biblatex-chicago. The style is much more complicated than the already tricky authoryear-comp.
biblatex-chicago's citation code for dates is longer than the entire authoryear-comp.cbx and the code for cite and textcite is again roughly as long. Additionally, the citation format of the CMS does not even omit the years for citations from the same year and the origyear handling makes that complicated on a conceptual level as well.






share|improve this answer

























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "85"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f438805%2fhow-to-compress-years-2001a-n-in-author-date-biblatex-style%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    As it turns out this is a bit more complicated than I initially thought. It is possible to sort this out for the standard style authoryear-comp as shown below, but I'm a bit more sceptical about biblatex-chicago.




    Since version 0.5 biblatex-ext includes the styles ext-authoryear-ecomp and ext-authoryear-iecomp with native compression of extradate lists based on the code presented here. See commit e1c4116 on GitHub.



    documentclass[british]article
    usepackage[T1]fontenc
    usepackage[utf8]inputenc
    usepackagebabel
    usepackagecsquotes

    usepackage[style=ext-authoryear-ecomp, backend=biber]biblatex
    addbibresourcebiblatex-examples.bib

    usepackagehyperref


    begindocument
    citesigfridsson

    citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

    printbibliography
    enddocument



    The solution is similar to what numeric-comp does. The main problem is that biblatex normally does not know what the next entry is because the items in a list of citations are handled one-by-one with little knowledge of the overall list. So it is not entirely trivial to process a list of citations and decide whether or not to skip over a particular citation because it happens to be the b in a-c.



    documentclass[british]article
    usepackage[T1]fontenc
    usepackage[utf8]inputenc
    usepackagebabel
    usepackagecsquotes

    usepackage[style=authoryear-comp, backend=biber]biblatex
    addbibresourcebiblatex-examples.bib

    usepackagehyperref

    makeatletter
    newcountercbx@extradatecount

    renewbibmacro*cite:init%
    ifnumlessvaluemulticitecount2
    globalboolfalsecbx:parens%
    globalundefcbx@lastkey
    globalundefcbx@lasthash
    globalundefcbx@lastyear
    globalundefcbx@lastextradate
    setcountercbx@extradatecount0
    iffieldundefprenote

    globalundefcbx@lastkey
    globalundefcbx@lasthash
    globalundefcbx@lastyear
    globalundefcbx@lastextradate
    setcountercbx@extradatecount0

    renewbibmacro*cite:reinit%
    globalundefcbx@lastkey
    globalundefcbx@lasthash
    globalundefcbx@lastyear
    globalundefcbx@lastextradate
    setcountercbx@extradatecount0

    newcommand*extradateonlycompcitedelimaddcomma
    newcommand*extradateonlycompciterangedelimbibrangedash


    newbibmacro*generic:dump:extradate%
    ifundefcbx@lastkey

    entrydatacbx@lastkey
    ifnumlessvaluecbx@extradatecount1
    blx@warning% This should not happen, so warn when it does
    Uh-oh!
    The extradate compression is quite likelyMessageBreak
    wrong for cbx@lastkey%
    %
    ifnumgreatervaluecbx@extradatecount1
    setunitextradateonlycompciterangedelim
    setunitextradateonlycompcitedelim%
    usebibmacrocite:extradate%
    setunitcbx@thiscitedelim%
    globalundefcbx@lastkey
    setcountercbx@extradatecount0%


    newbibmacro*cite:dump:extradate%
    defcbx@thiscitedelimmulticitedelim%
    usebibmacrogeneric:dump:extradate

    newbibmacro*textcite:dump:extradate%
    defcbx@thiscitedelim%
    ifboolcbx:parens
    bibcloseparenglobalboolfalsecbx:parens
    %
    textcitedelim%
    usebibmacrogeneric:dump:extradate

    newbibmacro*cite:comp:extradate%
    ifnumequalcbx@lastextradate+1thefieldextradate
    stepcountercbx@extradatecount%
    savefieldentrykeycbx@lastkey
    usebibmacrocite:dump:extradate%
    setunitextradateonlycompcitedelim%
    usebibmacrocite:extradate%
    savefieldextradatecbx@lastextradate%


    renewbibmacro*cite%
    iffieldundefshorthand
    ifthenelseifnameundeflabelnameORiffieldundeflabelyear
    usebibmacrocite:dump:extradate%
    usebibmacrocite:label%
    setunitprintdelimnonameyeardelim%
    usebibmacrocite:labeldate+extradate%
    usebibmacrocite:reinit
    iffieldequalsnamehashcbx@lasthash
    ifthenelseiffieldequalslabelyearcbx@lastyearAND
    (valuemulticitecount=0ORiffieldundefpostnote)
    usebibmacrocite:comp:extradate
    usebibmacrocite:dump:extradate%
    setunitcompcitedelim%
    usebibmacrocite:labeldate+extradate%
    savefieldlabelyearcbx@lastyear%
    savefieldextradatecbx@lastextradate%
    setcountercbx@extradatecount0
    usebibmacrocite:dump:extradate%
    printnameslabelname%
    setunitprintdelimnameyeardelim%
    usebibmacrocite:labeldate+extradate%
    savefieldnamehashcbx@lasthash%
    savefieldlabelyearcbx@lastyear%
    savefieldextradatecbx@lastextradate%
    setcountercbx@extradatecount0
    usebibmacrocite:dump:extradate%
    usebibmacrocite:shorthand%
    usebibmacrocite:reinit%
    setunitmulticitedelim

    renewbibmacro*textcite%
    iffieldequalsnamehashcbx@lasthash
    iffieldundefshorthand
    ifthenelseiffieldequalslabelyearcbx@lastyearAND
    (valuemulticitecount=0ORiffieldundefpostnote)
    usebibmacrocite:comp:extradate
    usebibmacrotextcite:dump:extradate%
    setunitcompcitedelim%
    usebibmacrocite:labeldate+extradate%
    savefieldlabelyearcbx@lastyear%
    savefieldextradatecbx@lastextradate%
    setcountercbx@extradatecount0
    usebibmacrotextcite:dump:extradate%
    setunitcompcitedelim%
    usebibmacrocite:shorthand%
    globalundefcbx@lastyear
    usebibmacrotextcite:dump:extradate%
    ifnameundeflabelname
    iffieldundefshorthand
    usebibmacrocite:label%
    setunit%
    globalbooltruecbx:parens%
    printdelimnonameyeardelimbibopenparen%
    ifnumequalvaluecitecount1
    usebibmacroprenote
    %
    usebibmacrocite:labeldate+extradate
    usebibmacrocite:shorthand
    printnameslabelname%
    setunit%
    globalbooltruecbx:parens%
    printdelimnameyeardelimbibopenparen%
    ifnumequalvaluecitecount1
    usebibmacroprenote
    %
    iffieldundefshorthand
    iffieldundeflabelyear
    usebibmacrocite:label
    usebibmacrocite:labeldate+extradate%
    savefieldlabelyearcbx@lastyear%
    savefieldextradatecbx@lastextradate%
    setcountercbx@extradatecount0
    usebibmacrocite:shorthand%
    globalundefcbx@lastyear%
    stepcountertextcitecount%
    savefieldnamehashcbx@lasthash%
    setunit%
    ifboolcbx:parens
    bibcloseparenglobalboolfalsecbx:parens
    %
    textcitedelim

    DeclareCiteCommandcite
    usebibmacrocite:init%
    usebibmacroprenote
    usebibmacrociteindex%
    usebibmacrocite

    usebibmacrocite:dump:extradate%
    usebibmacropostnote

    DeclareCiteCommand*cite
    usebibmacrocite:init%
    usebibmacroprenote
    usebibmacrociteindex%
    usebibmacrociteyear

    usebibmacrocite:dump:extradate%
    usebibmacropostnote

    DeclareCiteCommandparencite[mkbibparens]
    usebibmacrocite:init%
    usebibmacroprenote
    usebibmacrociteindex%
    usebibmacrocite

    usebibmacrocite:dump:extradate%
    usebibmacropostnote

    DeclareCiteCommand*parencite[mkbibparens]
    usebibmacrocite:init%
    usebibmacroprenote
    usebibmacrociteindex%
    usebibmacrociteyear

    usebibmacrocite:dump:extradate%
    usebibmacropostnote

    DeclareCiteCommandfootcite[mkbibfootnote]
    usebibmacrocite:init%
    usebibmacroprenote
    usebibmacrociteindex%
    usebibmacrocite

    usebibmacrocite:dump:extradate%
    usebibmacropostnote

    DeclareCiteCommandfootcitetext[mkbibfootnotetext]
    usebibmacrocite:init%
    usebibmacroprenote
    usebibmacrociteindex%
    usebibmacrocite

    usebibmacrocite:dump:extradate%
    usebibmacropostnote

    DeclareCiteCommandsmartcite[iffootnotemkbibparensmkbibfootnote]
    usebibmacrocite:init%
    usebibmacroprenote
    usebibmacrociteindex%
    usebibmacrocite

    usebibmacrocite:dump:extradate%
    usebibmacropostnote

    DeclareCiteCommandcbx@textcite
    usebibmacrocite:init
    usebibmacrociteindex%
    usebibmacrotextcite

    usebibmacrotextcite:dump:extradate%
    usebibmacrotextcite:postnote
    makeatother


    begindocument
    citesigfridsson

    citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

    citeknuth:ct:b,knuth:ct:c,knuth:ct:d

    citeknuth:ct:b,knuth:ct:c,knuth:ct:e

    citeknuth:ct:b,knuth:ct:d,knuth:ct:e

    citeknuth:ct:c,knuth:ct:d,knuth:ct:e

    citeknuth:ct:a,knuth:ct:b,knuth:ct:c


    citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

    citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

    citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

    citeaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

    citeaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

    citeaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

    textcitesigfridsson

    textciteknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

    textciteknuth:ct:b,knuth:ct:c,knuth:ct:d

    textciteknuth:ct:b,knuth:ct:c,knuth:ct:e

    textciteknuth:ct:b,knuth:ct:d,knuth:ct:e

    textciteknuth:ct:c,knuth:ct:d,knuth:ct:e

    textciteknuth:ct:a,knuth:ct:b,knuth:ct:c


    textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

    textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

    textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

    textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

    textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

    textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

    textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

    textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson,worman

    textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson,worman

    textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson,worman

    textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

    textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson,worman

    printbibliography
    enddocument


    enter image description here



    I would not even want to get started doing that for biblatex-chicago. The style is much more complicated than the already tricky authoryear-comp.
    biblatex-chicago's citation code for dates is longer than the entire authoryear-comp.cbx and the code for cite and textcite is again roughly as long. Additionally, the citation format of the CMS does not even omit the years for citations from the same year and the origyear handling makes that complicated on a conceptual level as well.






    share|improve this answer





























      4














      As it turns out this is a bit more complicated than I initially thought. It is possible to sort this out for the standard style authoryear-comp as shown below, but I'm a bit more sceptical about biblatex-chicago.




      Since version 0.5 biblatex-ext includes the styles ext-authoryear-ecomp and ext-authoryear-iecomp with native compression of extradate lists based on the code presented here. See commit e1c4116 on GitHub.



      documentclass[british]article
      usepackage[T1]fontenc
      usepackage[utf8]inputenc
      usepackagebabel
      usepackagecsquotes

      usepackage[style=ext-authoryear-ecomp, backend=biber]biblatex
      addbibresourcebiblatex-examples.bib

      usepackagehyperref


      begindocument
      citesigfridsson

      citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

      printbibliography
      enddocument



      The solution is similar to what numeric-comp does. The main problem is that biblatex normally does not know what the next entry is because the items in a list of citations are handled one-by-one with little knowledge of the overall list. So it is not entirely trivial to process a list of citations and decide whether or not to skip over a particular citation because it happens to be the b in a-c.



      documentclass[british]article
      usepackage[T1]fontenc
      usepackage[utf8]inputenc
      usepackagebabel
      usepackagecsquotes

      usepackage[style=authoryear-comp, backend=biber]biblatex
      addbibresourcebiblatex-examples.bib

      usepackagehyperref

      makeatletter
      newcountercbx@extradatecount

      renewbibmacro*cite:init%
      ifnumlessvaluemulticitecount2
      globalboolfalsecbx:parens%
      globalundefcbx@lastkey
      globalundefcbx@lasthash
      globalundefcbx@lastyear
      globalundefcbx@lastextradate
      setcountercbx@extradatecount0
      iffieldundefprenote

      globalundefcbx@lastkey
      globalundefcbx@lasthash
      globalundefcbx@lastyear
      globalundefcbx@lastextradate
      setcountercbx@extradatecount0

      renewbibmacro*cite:reinit%
      globalundefcbx@lastkey
      globalundefcbx@lasthash
      globalundefcbx@lastyear
      globalundefcbx@lastextradate
      setcountercbx@extradatecount0

      newcommand*extradateonlycompcitedelimaddcomma
      newcommand*extradateonlycompciterangedelimbibrangedash


      newbibmacro*generic:dump:extradate%
      ifundefcbx@lastkey

      entrydatacbx@lastkey
      ifnumlessvaluecbx@extradatecount1
      blx@warning% This should not happen, so warn when it does
      Uh-oh!
      The extradate compression is quite likelyMessageBreak
      wrong for cbx@lastkey%
      %
      ifnumgreatervaluecbx@extradatecount1
      setunitextradateonlycompciterangedelim
      setunitextradateonlycompcitedelim%
      usebibmacrocite:extradate%
      setunitcbx@thiscitedelim%
      globalundefcbx@lastkey
      setcountercbx@extradatecount0%


      newbibmacro*cite:dump:extradate%
      defcbx@thiscitedelimmulticitedelim%
      usebibmacrogeneric:dump:extradate

      newbibmacro*textcite:dump:extradate%
      defcbx@thiscitedelim%
      ifboolcbx:parens
      bibcloseparenglobalboolfalsecbx:parens
      %
      textcitedelim%
      usebibmacrogeneric:dump:extradate

      newbibmacro*cite:comp:extradate%
      ifnumequalcbx@lastextradate+1thefieldextradate
      stepcountercbx@extradatecount%
      savefieldentrykeycbx@lastkey
      usebibmacrocite:dump:extradate%
      setunitextradateonlycompcitedelim%
      usebibmacrocite:extradate%
      savefieldextradatecbx@lastextradate%


      renewbibmacro*cite%
      iffieldundefshorthand
      ifthenelseifnameundeflabelnameORiffieldundeflabelyear
      usebibmacrocite:dump:extradate%
      usebibmacrocite:label%
      setunitprintdelimnonameyeardelim%
      usebibmacrocite:labeldate+extradate%
      usebibmacrocite:reinit
      iffieldequalsnamehashcbx@lasthash
      ifthenelseiffieldequalslabelyearcbx@lastyearAND
      (valuemulticitecount=0ORiffieldundefpostnote)
      usebibmacrocite:comp:extradate
      usebibmacrocite:dump:extradate%
      setunitcompcitedelim%
      usebibmacrocite:labeldate+extradate%
      savefieldlabelyearcbx@lastyear%
      savefieldextradatecbx@lastextradate%
      setcountercbx@extradatecount0
      usebibmacrocite:dump:extradate%
      printnameslabelname%
      setunitprintdelimnameyeardelim%
      usebibmacrocite:labeldate+extradate%
      savefieldnamehashcbx@lasthash%
      savefieldlabelyearcbx@lastyear%
      savefieldextradatecbx@lastextradate%
      setcountercbx@extradatecount0
      usebibmacrocite:dump:extradate%
      usebibmacrocite:shorthand%
      usebibmacrocite:reinit%
      setunitmulticitedelim

      renewbibmacro*textcite%
      iffieldequalsnamehashcbx@lasthash
      iffieldundefshorthand
      ifthenelseiffieldequalslabelyearcbx@lastyearAND
      (valuemulticitecount=0ORiffieldundefpostnote)
      usebibmacrocite:comp:extradate
      usebibmacrotextcite:dump:extradate%
      setunitcompcitedelim%
      usebibmacrocite:labeldate+extradate%
      savefieldlabelyearcbx@lastyear%
      savefieldextradatecbx@lastextradate%
      setcountercbx@extradatecount0
      usebibmacrotextcite:dump:extradate%
      setunitcompcitedelim%
      usebibmacrocite:shorthand%
      globalundefcbx@lastyear
      usebibmacrotextcite:dump:extradate%
      ifnameundeflabelname
      iffieldundefshorthand
      usebibmacrocite:label%
      setunit%
      globalbooltruecbx:parens%
      printdelimnonameyeardelimbibopenparen%
      ifnumequalvaluecitecount1
      usebibmacroprenote
      %
      usebibmacrocite:labeldate+extradate
      usebibmacrocite:shorthand
      printnameslabelname%
      setunit%
      globalbooltruecbx:parens%
      printdelimnameyeardelimbibopenparen%
      ifnumequalvaluecitecount1
      usebibmacroprenote
      %
      iffieldundefshorthand
      iffieldundeflabelyear
      usebibmacrocite:label
      usebibmacrocite:labeldate+extradate%
      savefieldlabelyearcbx@lastyear%
      savefieldextradatecbx@lastextradate%
      setcountercbx@extradatecount0
      usebibmacrocite:shorthand%
      globalundefcbx@lastyear%
      stepcountertextcitecount%
      savefieldnamehashcbx@lasthash%
      setunit%
      ifboolcbx:parens
      bibcloseparenglobalboolfalsecbx:parens
      %
      textcitedelim

      DeclareCiteCommandcite
      usebibmacrocite:init%
      usebibmacroprenote
      usebibmacrociteindex%
      usebibmacrocite

      usebibmacrocite:dump:extradate%
      usebibmacropostnote

      DeclareCiteCommand*cite
      usebibmacrocite:init%
      usebibmacroprenote
      usebibmacrociteindex%
      usebibmacrociteyear

      usebibmacrocite:dump:extradate%
      usebibmacropostnote

      DeclareCiteCommandparencite[mkbibparens]
      usebibmacrocite:init%
      usebibmacroprenote
      usebibmacrociteindex%
      usebibmacrocite

      usebibmacrocite:dump:extradate%
      usebibmacropostnote

      DeclareCiteCommand*parencite[mkbibparens]
      usebibmacrocite:init%
      usebibmacroprenote
      usebibmacrociteindex%
      usebibmacrociteyear

      usebibmacrocite:dump:extradate%
      usebibmacropostnote

      DeclareCiteCommandfootcite[mkbibfootnote]
      usebibmacrocite:init%
      usebibmacroprenote
      usebibmacrociteindex%
      usebibmacrocite

      usebibmacrocite:dump:extradate%
      usebibmacropostnote

      DeclareCiteCommandfootcitetext[mkbibfootnotetext]
      usebibmacrocite:init%
      usebibmacroprenote
      usebibmacrociteindex%
      usebibmacrocite

      usebibmacrocite:dump:extradate%
      usebibmacropostnote

      DeclareCiteCommandsmartcite[iffootnotemkbibparensmkbibfootnote]
      usebibmacrocite:init%
      usebibmacroprenote
      usebibmacrociteindex%
      usebibmacrocite

      usebibmacrocite:dump:extradate%
      usebibmacropostnote

      DeclareCiteCommandcbx@textcite
      usebibmacrocite:init
      usebibmacrociteindex%
      usebibmacrotextcite

      usebibmacrotextcite:dump:extradate%
      usebibmacrotextcite:postnote
      makeatother


      begindocument
      citesigfridsson

      citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

      citeknuth:ct:b,knuth:ct:c,knuth:ct:d

      citeknuth:ct:b,knuth:ct:c,knuth:ct:e

      citeknuth:ct:b,knuth:ct:d,knuth:ct:e

      citeknuth:ct:c,knuth:ct:d,knuth:ct:e

      citeknuth:ct:a,knuth:ct:b,knuth:ct:c


      citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

      citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

      citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

      citeaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

      citeaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

      citeaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

      textcitesigfridsson

      textciteknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

      textciteknuth:ct:b,knuth:ct:c,knuth:ct:d

      textciteknuth:ct:b,knuth:ct:c,knuth:ct:e

      textciteknuth:ct:b,knuth:ct:d,knuth:ct:e

      textciteknuth:ct:c,knuth:ct:d,knuth:ct:e

      textciteknuth:ct:a,knuth:ct:b,knuth:ct:c


      textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

      textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

      textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

      textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

      textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

      textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

      textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

      textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson,worman

      textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson,worman

      textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson,worman

      textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

      textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson,worman

      printbibliography
      enddocument


      enter image description here



      I would not even want to get started doing that for biblatex-chicago. The style is much more complicated than the already tricky authoryear-comp.
      biblatex-chicago's citation code for dates is longer than the entire authoryear-comp.cbx and the code for cite and textcite is again roughly as long. Additionally, the citation format of the CMS does not even omit the years for citations from the same year and the origyear handling makes that complicated on a conceptual level as well.






      share|improve this answer



























        4












        4








        4







        As it turns out this is a bit more complicated than I initially thought. It is possible to sort this out for the standard style authoryear-comp as shown below, but I'm a bit more sceptical about biblatex-chicago.




        Since version 0.5 biblatex-ext includes the styles ext-authoryear-ecomp and ext-authoryear-iecomp with native compression of extradate lists based on the code presented here. See commit e1c4116 on GitHub.



        documentclass[british]article
        usepackage[T1]fontenc
        usepackage[utf8]inputenc
        usepackagebabel
        usepackagecsquotes

        usepackage[style=ext-authoryear-ecomp, backend=biber]biblatex
        addbibresourcebiblatex-examples.bib

        usepackagehyperref


        begindocument
        citesigfridsson

        citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

        printbibliography
        enddocument



        The solution is similar to what numeric-comp does. The main problem is that biblatex normally does not know what the next entry is because the items in a list of citations are handled one-by-one with little knowledge of the overall list. So it is not entirely trivial to process a list of citations and decide whether or not to skip over a particular citation because it happens to be the b in a-c.



        documentclass[british]article
        usepackage[T1]fontenc
        usepackage[utf8]inputenc
        usepackagebabel
        usepackagecsquotes

        usepackage[style=authoryear-comp, backend=biber]biblatex
        addbibresourcebiblatex-examples.bib

        usepackagehyperref

        makeatletter
        newcountercbx@extradatecount

        renewbibmacro*cite:init%
        ifnumlessvaluemulticitecount2
        globalboolfalsecbx:parens%
        globalundefcbx@lastkey
        globalundefcbx@lasthash
        globalundefcbx@lastyear
        globalundefcbx@lastextradate
        setcountercbx@extradatecount0
        iffieldundefprenote

        globalundefcbx@lastkey
        globalundefcbx@lasthash
        globalundefcbx@lastyear
        globalundefcbx@lastextradate
        setcountercbx@extradatecount0

        renewbibmacro*cite:reinit%
        globalundefcbx@lastkey
        globalundefcbx@lasthash
        globalundefcbx@lastyear
        globalundefcbx@lastextradate
        setcountercbx@extradatecount0

        newcommand*extradateonlycompcitedelimaddcomma
        newcommand*extradateonlycompciterangedelimbibrangedash


        newbibmacro*generic:dump:extradate%
        ifundefcbx@lastkey

        entrydatacbx@lastkey
        ifnumlessvaluecbx@extradatecount1
        blx@warning% This should not happen, so warn when it does
        Uh-oh!
        The extradate compression is quite likelyMessageBreak
        wrong for cbx@lastkey%
        %
        ifnumgreatervaluecbx@extradatecount1
        setunitextradateonlycompciterangedelim
        setunitextradateonlycompcitedelim%
        usebibmacrocite:extradate%
        setunitcbx@thiscitedelim%
        globalundefcbx@lastkey
        setcountercbx@extradatecount0%


        newbibmacro*cite:dump:extradate%
        defcbx@thiscitedelimmulticitedelim%
        usebibmacrogeneric:dump:extradate

        newbibmacro*textcite:dump:extradate%
        defcbx@thiscitedelim%
        ifboolcbx:parens
        bibcloseparenglobalboolfalsecbx:parens
        %
        textcitedelim%
        usebibmacrogeneric:dump:extradate

        newbibmacro*cite:comp:extradate%
        ifnumequalcbx@lastextradate+1thefieldextradate
        stepcountercbx@extradatecount%
        savefieldentrykeycbx@lastkey
        usebibmacrocite:dump:extradate%
        setunitextradateonlycompcitedelim%
        usebibmacrocite:extradate%
        savefieldextradatecbx@lastextradate%


        renewbibmacro*cite%
        iffieldundefshorthand
        ifthenelseifnameundeflabelnameORiffieldundeflabelyear
        usebibmacrocite:dump:extradate%
        usebibmacrocite:label%
        setunitprintdelimnonameyeardelim%
        usebibmacrocite:labeldate+extradate%
        usebibmacrocite:reinit
        iffieldequalsnamehashcbx@lasthash
        ifthenelseiffieldequalslabelyearcbx@lastyearAND
        (valuemulticitecount=0ORiffieldundefpostnote)
        usebibmacrocite:comp:extradate
        usebibmacrocite:dump:extradate%
        setunitcompcitedelim%
        usebibmacrocite:labeldate+extradate%
        savefieldlabelyearcbx@lastyear%
        savefieldextradatecbx@lastextradate%
        setcountercbx@extradatecount0
        usebibmacrocite:dump:extradate%
        printnameslabelname%
        setunitprintdelimnameyeardelim%
        usebibmacrocite:labeldate+extradate%
        savefieldnamehashcbx@lasthash%
        savefieldlabelyearcbx@lastyear%
        savefieldextradatecbx@lastextradate%
        setcountercbx@extradatecount0
        usebibmacrocite:dump:extradate%
        usebibmacrocite:shorthand%
        usebibmacrocite:reinit%
        setunitmulticitedelim

        renewbibmacro*textcite%
        iffieldequalsnamehashcbx@lasthash
        iffieldundefshorthand
        ifthenelseiffieldequalslabelyearcbx@lastyearAND
        (valuemulticitecount=0ORiffieldundefpostnote)
        usebibmacrocite:comp:extradate
        usebibmacrotextcite:dump:extradate%
        setunitcompcitedelim%
        usebibmacrocite:labeldate+extradate%
        savefieldlabelyearcbx@lastyear%
        savefieldextradatecbx@lastextradate%
        setcountercbx@extradatecount0
        usebibmacrotextcite:dump:extradate%
        setunitcompcitedelim%
        usebibmacrocite:shorthand%
        globalundefcbx@lastyear
        usebibmacrotextcite:dump:extradate%
        ifnameundeflabelname
        iffieldundefshorthand
        usebibmacrocite:label%
        setunit%
        globalbooltruecbx:parens%
        printdelimnonameyeardelimbibopenparen%
        ifnumequalvaluecitecount1
        usebibmacroprenote
        %
        usebibmacrocite:labeldate+extradate
        usebibmacrocite:shorthand
        printnameslabelname%
        setunit%
        globalbooltruecbx:parens%
        printdelimnameyeardelimbibopenparen%
        ifnumequalvaluecitecount1
        usebibmacroprenote
        %
        iffieldundefshorthand
        iffieldundeflabelyear
        usebibmacrocite:label
        usebibmacrocite:labeldate+extradate%
        savefieldlabelyearcbx@lastyear%
        savefieldextradatecbx@lastextradate%
        setcountercbx@extradatecount0
        usebibmacrocite:shorthand%
        globalundefcbx@lastyear%
        stepcountertextcitecount%
        savefieldnamehashcbx@lasthash%
        setunit%
        ifboolcbx:parens
        bibcloseparenglobalboolfalsecbx:parens
        %
        textcitedelim

        DeclareCiteCommandcite
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommand*cite
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrociteyear

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandparencite[mkbibparens]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommand*parencite[mkbibparens]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrociteyear

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandfootcite[mkbibfootnote]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandfootcitetext[mkbibfootnotetext]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandsmartcite[iffootnotemkbibparensmkbibfootnote]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandcbx@textcite
        usebibmacrocite:init
        usebibmacrociteindex%
        usebibmacrotextcite

        usebibmacrotextcite:dump:extradate%
        usebibmacrotextcite:postnote
        makeatother


        begindocument
        citesigfridsson

        citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

        citeknuth:ct:b,knuth:ct:c,knuth:ct:d

        citeknuth:ct:b,knuth:ct:c,knuth:ct:e

        citeknuth:ct:b,knuth:ct:d,knuth:ct:e

        citeknuth:ct:c,knuth:ct:d,knuth:ct:e

        citeknuth:ct:a,knuth:ct:b,knuth:ct:c


        citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

        citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

        citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

        citeaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

        citeaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

        citeaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

        textcitesigfridsson

        textciteknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

        textciteknuth:ct:b,knuth:ct:c,knuth:ct:d

        textciteknuth:ct:b,knuth:ct:c,knuth:ct:e

        textciteknuth:ct:b,knuth:ct:d,knuth:ct:e

        textciteknuth:ct:c,knuth:ct:d,knuth:ct:e

        textciteknuth:ct:a,knuth:ct:b,knuth:ct:c


        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

        textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

        textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

        textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson,worman

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson,worman

        textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson,worman

        textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

        textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson,worman

        printbibliography
        enddocument


        enter image description here



        I would not even want to get started doing that for biblatex-chicago. The style is much more complicated than the already tricky authoryear-comp.
        biblatex-chicago's citation code for dates is longer than the entire authoryear-comp.cbx and the code for cite and textcite is again roughly as long. Additionally, the citation format of the CMS does not even omit the years for citations from the same year and the origyear handling makes that complicated on a conceptual level as well.






        share|improve this answer















        As it turns out this is a bit more complicated than I initially thought. It is possible to sort this out for the standard style authoryear-comp as shown below, but I'm a bit more sceptical about biblatex-chicago.




        Since version 0.5 biblatex-ext includes the styles ext-authoryear-ecomp and ext-authoryear-iecomp with native compression of extradate lists based on the code presented here. See commit e1c4116 on GitHub.



        documentclass[british]article
        usepackage[T1]fontenc
        usepackage[utf8]inputenc
        usepackagebabel
        usepackagecsquotes

        usepackage[style=ext-authoryear-ecomp, backend=biber]biblatex
        addbibresourcebiblatex-examples.bib

        usepackagehyperref


        begindocument
        citesigfridsson

        citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

        printbibliography
        enddocument



        The solution is similar to what numeric-comp does. The main problem is that biblatex normally does not know what the next entry is because the items in a list of citations are handled one-by-one with little knowledge of the overall list. So it is not entirely trivial to process a list of citations and decide whether or not to skip over a particular citation because it happens to be the b in a-c.



        documentclass[british]article
        usepackage[T1]fontenc
        usepackage[utf8]inputenc
        usepackagebabel
        usepackagecsquotes

        usepackage[style=authoryear-comp, backend=biber]biblatex
        addbibresourcebiblatex-examples.bib

        usepackagehyperref

        makeatletter
        newcountercbx@extradatecount

        renewbibmacro*cite:init%
        ifnumlessvaluemulticitecount2
        globalboolfalsecbx:parens%
        globalundefcbx@lastkey
        globalundefcbx@lasthash
        globalundefcbx@lastyear
        globalundefcbx@lastextradate
        setcountercbx@extradatecount0
        iffieldundefprenote

        globalundefcbx@lastkey
        globalundefcbx@lasthash
        globalundefcbx@lastyear
        globalundefcbx@lastextradate
        setcountercbx@extradatecount0

        renewbibmacro*cite:reinit%
        globalundefcbx@lastkey
        globalundefcbx@lasthash
        globalundefcbx@lastyear
        globalundefcbx@lastextradate
        setcountercbx@extradatecount0

        newcommand*extradateonlycompcitedelimaddcomma
        newcommand*extradateonlycompciterangedelimbibrangedash


        newbibmacro*generic:dump:extradate%
        ifundefcbx@lastkey

        entrydatacbx@lastkey
        ifnumlessvaluecbx@extradatecount1
        blx@warning% This should not happen, so warn when it does
        Uh-oh!
        The extradate compression is quite likelyMessageBreak
        wrong for cbx@lastkey%
        %
        ifnumgreatervaluecbx@extradatecount1
        setunitextradateonlycompciterangedelim
        setunitextradateonlycompcitedelim%
        usebibmacrocite:extradate%
        setunitcbx@thiscitedelim%
        globalundefcbx@lastkey
        setcountercbx@extradatecount0%


        newbibmacro*cite:dump:extradate%
        defcbx@thiscitedelimmulticitedelim%
        usebibmacrogeneric:dump:extradate

        newbibmacro*textcite:dump:extradate%
        defcbx@thiscitedelim%
        ifboolcbx:parens
        bibcloseparenglobalboolfalsecbx:parens
        %
        textcitedelim%
        usebibmacrogeneric:dump:extradate

        newbibmacro*cite:comp:extradate%
        ifnumequalcbx@lastextradate+1thefieldextradate
        stepcountercbx@extradatecount%
        savefieldentrykeycbx@lastkey
        usebibmacrocite:dump:extradate%
        setunitextradateonlycompcitedelim%
        usebibmacrocite:extradate%
        savefieldextradatecbx@lastextradate%


        renewbibmacro*cite%
        iffieldundefshorthand
        ifthenelseifnameundeflabelnameORiffieldundeflabelyear
        usebibmacrocite:dump:extradate%
        usebibmacrocite:label%
        setunitprintdelimnonameyeardelim%
        usebibmacrocite:labeldate+extradate%
        usebibmacrocite:reinit
        iffieldequalsnamehashcbx@lasthash
        ifthenelseiffieldequalslabelyearcbx@lastyearAND
        (valuemulticitecount=0ORiffieldundefpostnote)
        usebibmacrocite:comp:extradate
        usebibmacrocite:dump:extradate%
        setunitcompcitedelim%
        usebibmacrocite:labeldate+extradate%
        savefieldlabelyearcbx@lastyear%
        savefieldextradatecbx@lastextradate%
        setcountercbx@extradatecount0
        usebibmacrocite:dump:extradate%
        printnameslabelname%
        setunitprintdelimnameyeardelim%
        usebibmacrocite:labeldate+extradate%
        savefieldnamehashcbx@lasthash%
        savefieldlabelyearcbx@lastyear%
        savefieldextradatecbx@lastextradate%
        setcountercbx@extradatecount0
        usebibmacrocite:dump:extradate%
        usebibmacrocite:shorthand%
        usebibmacrocite:reinit%
        setunitmulticitedelim

        renewbibmacro*textcite%
        iffieldequalsnamehashcbx@lasthash
        iffieldundefshorthand
        ifthenelseiffieldequalslabelyearcbx@lastyearAND
        (valuemulticitecount=0ORiffieldundefpostnote)
        usebibmacrocite:comp:extradate
        usebibmacrotextcite:dump:extradate%
        setunitcompcitedelim%
        usebibmacrocite:labeldate+extradate%
        savefieldlabelyearcbx@lastyear%
        savefieldextradatecbx@lastextradate%
        setcountercbx@extradatecount0
        usebibmacrotextcite:dump:extradate%
        setunitcompcitedelim%
        usebibmacrocite:shorthand%
        globalundefcbx@lastyear
        usebibmacrotextcite:dump:extradate%
        ifnameundeflabelname
        iffieldundefshorthand
        usebibmacrocite:label%
        setunit%
        globalbooltruecbx:parens%
        printdelimnonameyeardelimbibopenparen%
        ifnumequalvaluecitecount1
        usebibmacroprenote
        %
        usebibmacrocite:labeldate+extradate
        usebibmacrocite:shorthand
        printnameslabelname%
        setunit%
        globalbooltruecbx:parens%
        printdelimnameyeardelimbibopenparen%
        ifnumequalvaluecitecount1
        usebibmacroprenote
        %
        iffieldundefshorthand
        iffieldundeflabelyear
        usebibmacrocite:label
        usebibmacrocite:labeldate+extradate%
        savefieldlabelyearcbx@lastyear%
        savefieldextradatecbx@lastextradate%
        setcountercbx@extradatecount0
        usebibmacrocite:shorthand%
        globalundefcbx@lastyear%
        stepcountertextcitecount%
        savefieldnamehashcbx@lasthash%
        setunit%
        ifboolcbx:parens
        bibcloseparenglobalboolfalsecbx:parens
        %
        textcitedelim

        DeclareCiteCommandcite
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommand*cite
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrociteyear

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandparencite[mkbibparens]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommand*parencite[mkbibparens]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrociteyear

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandfootcite[mkbibfootnote]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandfootcitetext[mkbibfootnotetext]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandsmartcite[iffootnotemkbibparensmkbibfootnote]
        usebibmacrocite:init%
        usebibmacroprenote
        usebibmacrociteindex%
        usebibmacrocite

        usebibmacrocite:dump:extradate%
        usebibmacropostnote

        DeclareCiteCommandcbx@textcite
        usebibmacrocite:init
        usebibmacrociteindex%
        usebibmacrotextcite

        usebibmacrotextcite:dump:extradate%
        usebibmacrotextcite:postnote
        makeatother


        begindocument
        citesigfridsson

        citeknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

        citeknuth:ct:b,knuth:ct:c,knuth:ct:d

        citeknuth:ct:b,knuth:ct:c,knuth:ct:e

        citeknuth:ct:b,knuth:ct:d,knuth:ct:e

        citeknuth:ct:c,knuth:ct:d,knuth:ct:e

        citeknuth:ct:a,knuth:ct:b,knuth:ct:c


        citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

        citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

        citeaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

        citeaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

        citeaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

        citeaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

        textcitesigfridsson

        textciteknuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e

        textciteknuth:ct:b,knuth:ct:c,knuth:ct:d

        textciteknuth:ct:b,knuth:ct:c,knuth:ct:e

        textciteknuth:ct:b,knuth:ct:d,knuth:ct:e

        textciteknuth:ct:c,knuth:ct:d,knuth:ct:e

        textciteknuth:ct:a,knuth:ct:b,knuth:ct:c


        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson

        textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson

        textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson

        textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:d,sigfridsson,worman

        textciteaksin,knuth:ct:b,knuth:ct:c,knuth:ct:e,sigfridsson,worman

        textciteaksin,knuth:ct:b,knuth:ct:d,knuth:ct:e,sigfridsson,worman

        textciteaksin,knuth:ct:c,knuth:ct:d,knuth:ct:e,sigfridsson,worman

        textciteaksin,knuth:ct:a,knuth:ct:b,knuth:ct:c,sigfridsson,worman

        printbibliography
        enddocument


        enter image description here



        I would not even want to get started doing that for biblatex-chicago. The style is much more complicated than the already tricky authoryear-comp.
        biblatex-chicago's citation code for dates is longer than the entire authoryear-comp.cbx and the code for cite and textcite is again roughly as long. Additionally, the citation format of the CMS does not even omit the years for citations from the same year and the origyear handling makes that complicated on a conceptual level as well.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 6 mins ago

























        answered Jul 3 '18 at 10:18









        moewemoewe

        96.2k10117360




        96.2k10117360



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f438805%2fhow-to-compress-years-2001a-n-in-author-date-biblatex-style%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

            Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"

            Haugesund Nexus externi | Tabula navigationisHaugesund pagina interretialisAmplifica