My bibliography needs to show the edition behind the year for @collection and @incollection like this:
Kuckartz, U. (2018⁴): Qualitative Inhaltsanalyse: Methoden, Praxis, Computerunterstützung. Weinheim: Beltz
Ryen, A. (2016⁴): Research ethics and qualitative research. In: Silverman, D. (ed.): Qualitative research. Los Angeles: Sage, 31-46.
I already found several posts that deal with similar issues which I tried to adapt, e.g.:
- Print the edition as an apex/superscript after the year in
- BibLaTeX: Edition as superscript in front of year, but year after author(s)
I managed to get the edition as a superscript behind the year and inside parentheses. However, there is a space before and after the year.
MWE with the adapted code from the two linked posts:
\documentclass[]{scrartcl}
\usepackage{filecontents}
\usepackage[
backend=biber,
style=ext-authoryear,
innamebeforetitle=true,
sorting=nyt,
giveninits=true,
citestyle= authoryear-icomp,
ibidpage=true,
maxbibnames=99,
maxcitenames=2,
uniquelist=false,
isbn=false,
doi=true,
dashed=false
]{biblatex}
%Edition as superscript
\renewbibmacro{edition}{}
\DeclareFieldFormat{superedition}{\textsuperscript{#1}}
\newbibmacro{superedition}{%
\iffieldnums{edition}
{\printfield[superedition]{edition}}
{\printfield{edition}%
\setunit{\addspace}}}
%Year^Edition within parentheses
\renewbibmacro*{date+extradate}{
\iffieldundef{labelyear}
{}
{\printtext[parens]{
\iflabeldateisdate
{\printdateextra}
{\printlabeldateextra}
\iffieldnum{edition}
{\printfield[superedition]{edition}%
\global\clearfield{edition}}
{}}}}
\begin{filecontents}{\jobname.bib}
@book{kuckartz_qualitative_2018,
location = {Weinheim},
edition = {4},
title = {Qualitative Inhaltsanalyse: Methoden, Praxis, Computerunterstützung},
publisher = {Beltz},
author = {Kuckartz, Udo},
date = {2018},}
@incollection{ryen_research_2016,
location = {Los Angeles},
edition = {4},
title = {Research ethics and qualitative research},
pages = {31--46},
booktitle = {Qualitative research},
publisher = {Sage},
author = {Ryen, Anne},
editor = {Silverman, David},
date = {2016},}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
I already removed all other modifications to see, if one of them is the reason for the additional spaces, but I sill got the spaces before and after YEAR. I have the feeling that I should modify something about \pubdatedelim but I could be mistaken because nothing I tried worked.
In case it is helpful for the answer, below is also the full code, including the other modifications of the bibliography:
\documentclass[]{scrartcl}
\usepackage{filecontents}
\usepackage[
backend=biber,
style=ext-authoryear,
innamebeforetitle=true,
sorting=nyt,
giveninits=true,
citestyle= authoryear-icomp,
ibidpage=true,
maxbibnames=99,
maxcitenames=2,
uniquelist=false,
isbn=false,
doi=true,
dashed=false
]{biblatex}
%%% Modifications that work as intended %%%%
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}} %Small caps for author/editor last name
\DeclareFieldFormat*{title}{#1} %Title without emphasis
\DeclareFieldFormat*{booktitle}{#1} %Booktitle without emphasis
\DeclareFieldFormat*{journaltitle}{#1} %Journaltitle without emphasis
\DeclareDelimFormat[bib,biblist,parencite]{multinamedelim}{\addsemicolon\space} % use semicolon to seperate authors in bibliography and citation in text
\DeclareDelimFormat[bib,biblist,parencite]{finalnamedelim}{\space\&\space} % use & to seperate last author/editor in bibliography
\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addcolon\space} % use colon to seperate (Year) and Title
\DeclareDelimFormat[textcite, parencite]{postnotedelim}{\addcolon\space} % use colon to seperate Year and page in citation
%%% Authors and Editors as Family-Given, except last author/editor:
\DeclareNameFormat{family-given/given-family/last}{%
\ifboolexpr{test {\ifnumless{\value{listcount}}{\value{listtotal}}} or test {\ifnumequal{\value{listcount}}{1}}}
{\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\ifboolexpe{%
test {\ifdefvoid\namepartgiven}
and
test {\ifdefvoid\namepartprefix}}
{}
{\usebibmacro{name:revsdelim}}}
{\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}
\DeclareNameAlias{sortname}{family-given/given-family/last}
\DeclareNameAlias{ineditor}{sortname}
%%%% Volume (Issue) for @article
\renewcommand*{\volnumdelim}{\space} %Removes dot between volume and issue
\DeclareFieldFormat[article]{number}{(#1)} %Parentheses around Issue
%%% Remove p. and pp.
\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{volcitepages}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}
%Substitute Ed by with (ed.)
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldAlias{translatortype}{editortype}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
%%% Edition as superscript -- space before and after YEAR is yet to be removed %%%
%Edition as superscript
\renewbibmacro*{edition}{}
\DeclareFieldFormat{superedition}{\textsuperscript{#1}}
\newbibmacro*{superedition}{%
\iffieldnums{edition}
{\printfield[superedition]{edition}}
{\printfield{edition}%
\setunit{\addspace}}}
%Year^Edition within parentheses
\renewbibmacro*{date+extradate}{
\iffieldundef{labelyear}
{}
{\printtext[parens]{
\iflabeldateisdate
{\printdateextra}
{\printlabeldateextra}
\iffieldnum{edition}
{\printfield[superedition]{edition}%
\global\clearfield{edition}}
{}}}}
\begin{filecontents}{\jobname.bib}
@book{kuckartz_qualitative_2018,
location = {Weinheim},
edition = {4},
title = {Qualitative Inhaltsanalyse: Methoden, Praxis, Computerunterstützung},
publisher = {Beltz},
author = {Kuckartz, Udo},
date = {2018},}
@incollection{ryen_research_2016,
location = {Los Angeles},
edition = {4},
title = {Research ethics and qualitative research},
pages = {31--46},
booktitle = {Qualitative research},
publisher = {Sage},
author = {Ryen, Anne},
editor = {Silverman, David},
date = {2016},}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
