1

I must admit that I feel a bit stupid at the moment. I am pretty shure that I have seen this on sx already but I don't find it any more since it has been hidden in a comment as far as I remember.

Citing members of a @Set in biblatex with Biber I would like to compress citations similar to normal full entries - see image and MWE below. Going through the biblatex documentation I did not find this point...

Here is what it should look like:

enter image description here

Any input anyone?

MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}
\usepackage[backend=biber,style=numeric-comp,mcite,subentry,sorting=nty,sortsets=true,backref=false]{biblatex}
\usepackage{enumitem}
\usepackage{hyperref}

\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{default}{family-given}
\DeclareFieldFormat{entrysetcount}{\mknumalph{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{Beiglboeck:Koffein,
  author    = {Beiglböck, Wolfgang},
  title     = {Koffein},
  year      = {2016},
  date      = {2016-07-01},
  publisher = {Springer},
  location  = {Berlin, Heidelberg},
  isbn      = {978-3-662-49564-3},
  url       = {https://www.ebook.de/de/product/26446638/wolfgang_beiglboeck_koffein.html},
  ean       = {9783662495643},
}
@Book{fish:drugs,
  mainsubtitle = {Drugs and Society},
  year         = {2006},
  editor       = {Jefferson M. Fish},
  maintitle    = {U.S.~public policy},
  publisher    = {Rowman \& Littlefield Publishers, Inc},
  location     = {Lanham, Maryland},
  isbn         = {0-7425-4245-9},
  sortname     = {Jefferson M. Fish},
  sorttitle    = {U.S. public policy Drugs and Society},
  options      = {dataonly},
}
@Set{set:fish:drugs,
  entryset     = {fish:drugs:gable:alt,fish:drugs:cleveland:use,fish:drugs:evans:intro},
  options      = {multivolumehead=fish:drugs},
}
@Inbook{fish:drugs:evans:intro,
  crossref   = {fish:drugs},
  author     = {Richard M. Evans and Stanley Neustadter},
  chapter    = {6},
  title      = {Legalization: An Introduction},
  pages      = {129-148},
  sorttitle  = {06 Legalization: An Introduction},
  options    = {dataonly},
}
@Inbook{fish:drugs:cleveland:use,
  crossref   = {fish:drugs},
  author     = {Mary M. Cleveland},
  chapter    = {9a},
  title      = {Use, 'Abuse', Adverse Health Effects, and Addiction},
  pages      = {197-200},
  sorttitle  = {09 Use, Abuse, Adverse Health Effects, and Addiction},
  options    = {dataonly},
}
@Inbook{fish:drugs:gable:alt,
  crossref   = {fish:drugs},
  author     = {Robert S. Gable},
  chapter    = {7},
  title      = {Acute Toxicity of Drugs versus Regulatory Status},
  pages      = {149-161},
  sorttitle  = {07 Acute Toxicity of Drugs versus Regulatory Status},
}
@Book{A,
  author      = {René Goscinny and Albert Uderzo},
  maintitle   = {Asterix und Obelix},
  year        = {1959--2018},
  publisher   = {Dargaud},
  location    = {Paris},
  volumes     = {99},
  options     = {dataonly},
}
@Set{set:A,
  entryset    = {A:V1,A:V2,A:V3,A:V4,A:V5,A:V6},
  options     = {multivolumehead=A},
}
@Book{A:V1,
  crossref    = {A},
  title       = {Asterix der Gallier},
  sorttitle   = {Goscinny Rene Uderzo Albert Asterix und Obelix 01},
  year        = {1959},
  isbn        = {1234567890123},
  volume      = {1},
}
@Book{A:V2,
  crossref    = {A},
  title       = {Asterix und Kleopatra},
  sorttitle   = {Goscinny Rene Uderzo Albert Asterix und Obelix 02},
  year        = {1968},
  isbn        = {2345678901234},
  volume      = {2},
}
@Book{A:V3,
  crossref    = {A},
  title       = {Asterix als Gladiator},
  sorttitle   = {Goscinny Rene Uderzo Albert Asterix und Obelix 03},
  year        = {1969},
  isbn        = {3456789012345},
  volume      = {3},
}
@Book{A:V4,
  crossref    = {A},
  title       = {Der Kampf der Häuptlinge},
  sorttitle   = {Goscinny Rene Uderzo Albert Asterix und Obelix 04},
  year        = {1969},
  isbn        = {4567890123456},
  volume      = {4},
}
@Book{A:V5,
  crossref    = {A},
  title       = {Die goldene Sichel},
  sorttitle   = {Goscinny Rene Uderzo Albert Asterix und Obelix 05},
  year        = {1970},
  isbn        = {5678901234567},
  volume      = {5},
}
@Book{A:V6,
  crossref    = {A},
  title       = {Tour de France},
  sorttitle   = {Goscinny Rene Uderzo Albert Asterix und Obelix 06},
  year        = {1970},
  isbn        = {6789012345678},
  volume      = {6},
}
@Book{DHS:base,
  editor    = {{Deutsche Hauptstelle für Suchtfragen e.~V.}},
  sortname  = {{Deutsche Hauptstelle für Suchtfragen}},
  year      = {2017},
  url       = {www.dhs.de},
  urldate   = {2018-04-30},
  maintitle = {Suchtmedizinische Reihe},
  options   = {dataonly},
}
@Book{DHS:nik,
  crossref  = {DHS:base},
  title     = {Tabakabhängigkeit},
  sorttitle = {Deutsche Hauptstelle für Suchtfragen Suchtmedizinische Reihe 01},
  volume    = {1},
  isbn      = {978-3-937587-00-4},
}
@Book{DHS:alk,
  crossref  = {DHS:base},
  title     = {Alkoholabhängigkeit},
  sorttitle = {Deutsche Hauptstelle für Suchtfragen Suchtmedizinische Reihe 02},
  volume    = {2},
  isbn      = {978-3-937587-01-1},
}
@Book{DHS:drogen,
  crossref  = {DHS:base},
  title     = {Drogenabhängigkeit},
  sorttitle = {Deutsche Hauptstelle für Suchtfragen Suchtmedizinische Reihe 04},
  volume    = {4},
  isbn      = {978-3-937587-03-5},
}
@Set{DHS:SMR,
  crossref  = {DHS:base},
  entryset  = {DHS:alk,DHS:nik,DHS:drogen},
  options   = {multivolumehead=DHS:base},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}\parindent=0pt\relax\parskip=2ex\relax
\nocite{*}

Cleveland\supercite{fish:drugs:cleveland:use} writes some hard stuff.

Be adviced that after heavy stuff like this\msupercite{Beiglboeck:Koffein,DHS:SMR,set:fish:drugs} you should relax\supercite{A:V2,A:V3,A:V4,A:V6} a bit, were the last citation should look like the hard coded variants\textsuperscript{4b-d,f} or.\textsuperscript{4b-d,4f}

\printbibliography
\end{document}
AndiW
  • 786
  • 1
    Does https://tex.stackexchange.com/q/416444/35864 help? – moewe Jan 16 '19 at 14:07
  • @moewe Like always you're my hero - that was the question I did not find anymore. Perfect. And it works. Can you post it as an answer so I can accept it? thx and big hugs... – AndiW Jan 16 '19 at 14:14
  • BTW: There may be some rough edges with that solution. There must be a reason why I abandoned including this in biblatex-ext ... or maybe it was just that the code is so complicated. If you find an issue with the code, just ask a new question. – moewe Jan 16 '19 at 14:18
  • @moewe yep - that's perfectly ok since it in fact is a duplicate.... – AndiW Jan 16 '19 at 14:18
  • @moewe I'll have to check and understand the solution provided and I'll keep an eye on side effects and possible issues... – AndiW Jan 16 '19 at 14:19
  • Interestingly there seems to be a difference between the definition of a @set in the bibfile and via \defbibentryset. While the second does work for the combination of members of different sets the first does not. The previous set block has to be terminated via \ifdef{\cbx@lastnumber}{\iffieldequals{labelnumber}{\cbx@lastnumber}{}{\usebibmacro{cite:dump}\ifnumgreater{\value{cbx@tempcntb}}{-1}{\multicitedelim\usebibmacro{cite:init}}{}}}{}% as the very first command in \renewbibmacro*{cite:comp:inset} from https://tex.stackexchange.com/q/416444/35864. – AndiW Jan 17 '19 at 00:14
  • 1
    A very similar check is already present (maybe it is faulty, I didn't check the entire logic). Can you ask a new question with an example that reproduces the undesirable behaviour, so I can have a closer look, please? (Of course you can immediately answer with your solution and accept that later, but I would like to see exactly what goes wrong in my code and fix it.) If you don't want to write a question, send me the example via mail, you can find my address in the biblatex-ext documentation. – moewe Jan 17 '19 at 09:57

0 Answers0