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
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
add a comment |
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
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 withbiblatex-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
add a comment |
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
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
biblatex biblatex-chicago
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 withbiblatex-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
add a comment |
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 withbiblatex-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
add a comment |
1 Answer
1
active
oldest
votes
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 stylesext-authoryear-ecomp
andext-authoryear-iecomp
with native compression ofextradate
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
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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 stylesext-authoryear-ecomp
andext-authoryear-iecomp
with native compression ofextradate
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
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.
add a comment |
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 stylesext-authoryear-ecomp
andext-authoryear-iecomp
with native compression ofextradate
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
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.
add a comment |
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 stylesext-authoryear-ecomp
andext-authoryear-iecomp
with native compression ofextradate
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
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.
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 stylesext-authoryear-ecomp
andext-authoryear-iecomp
with native compression ofextradate
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
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.
edited 6 mins ago
answered Jul 3 '18 at 10:18
moewemoewe
96.2k10117360
96.2k10117360
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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