0

I am trying to Change the position of the year inside my bibliography. Here is a MWE

%%%%% Dokumentenklasse mit verschiedenen Attributen
\documentclass[a4paper,12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{csquotes}
\usepackage
[citestyle=authoryear-icomp,
bibstyle=numeric, sorting=nyt ,maxbibnames=9,maxcitenames=2,uniquelist=false, backend=biber,
doi=false,isbn=false,url=false,
uniquename=false, date=year, giveninits=true]
{biblatex}
\usepackage{filecontents}

\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}

\DefineBibliographyStrings{ngerman}{andothers={et\addabbrvspace al\adddot}} 

%Remove Dot and Add Space
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
%  \setunit*{\adddot}% DELETED
 % \setunit*{\addnbspace}% NEW (optional); there's also \addnbthinspace
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

\renewbibmacro{in:}{}



\begin{filecontents}{\jobname.bib}
@article{cgood1980,
    Author = {Charles Goodwin},
    Journal = {Sociological Inquiry},
    Number = {3-4},
    Pages = {272-302},
    Title = {Restarts, pauses, and the achievement of a state of mutual gaze at turn-beginning},
    Volume = 50,
    Year = 1980,
}
@article{mgood1980,
    Author = {Marjorie Harness Goodwin},
    Journal = {Sociological Inquiry},
    Pages = {303-317},
    Title = {Processes of mutual monitoring implicated in the production of description sequences},
    Volume = 50,
    Year = 1980,
}
\end{filecontents}
\addbibresource{\jobname.bib} 

\begin{document}
\parencite{cgood1980,mgood1980}
\printbibliography
\end{document}

The current year is behind the title, but it should be listed after the authors and without brackets. I tried several methods of previous oosts, but without sucess.

rook1996
  • 289
  • What exactly are you trying to do? Do you want a author-year citation with numbered bibliography or do you want a numbered citation style with just the year a bit moved to the front? If you have citestyle=authoryear-icomp, a numeric bibliography makes little to no sense since the numbers have no connection to anything useful in the document. – moewe Aug 20 '18 at 19:53
  • I want the author-year text citatoin with numbered bibliography. To the latter one I just need to numerate the literature. Do you have any idea how I can change the position of the year ? – rook1996 Aug 20 '18 at 20:22

1 Answers1

1

As it turns out you seem to want the full authoryear experience, you just want to additionally number the entries in the bibliography.

In that scenario the numbers in the bibliography do not correspond to anything useful in the document, so they can be created on the fly with a simple enumerate.

\defbibenvironment{bibliography}
  {\setlength{\leftmargin}{\bibhang}%
   \setlength{\itemindent}{-\leftmargin}%
   \setlength{\labelsep}{\biblabelsep}%
   \setlength{\itemsep}{\bibitemsep}%
   \setlength{\parsep}{\bibparsep}%
   \begin{enumerate}}
  {\end{enumerate}}
  {\item}

In total

\documentclass[a4paper,12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{csquotes}
\usepackage[backend=biber,
  style=authoryear-icomp,
  maxbibnames=9, maxcitenames=2,
  uniquelist=false, uniquename=false,
  giveninits=true,
  date=year,
  doi=false,isbn=false,url=false,
]{biblatex}


\defbibenvironment{bibliography}
  {\setlength{\leftmargin}{\bibhang}%
   \setlength{\itemindent}{-\leftmargin}%
   \setlength{\labelsep}{\biblabelsep}%
   \setlength{\itemsep}{\bibitemsep}%
   \setlength{\parsep}{\bibparsep}%
   \begin{enumerate}}
  {\end{enumerate}}

\DeclareNameAlias{default}{family-given}
\DeclareNameAlias{sortname}{default}

\DefineBibliographyStrings{ngerman}{andothers={et\addabbrvspace al\adddot}} 

%Remove Dot and Add Space
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
%  \setunit*{\adddot}% DELETED
 % \setunit*{\addnbspace}% NEW (optional); there's also \addnbthinspace
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

\renewbibmacro{in:}{}

\begin{filecontents}{\jobname.bib}
@article{cgood1980,
    Author  = {Charles Goodwin},
    Journal = {Sociological Inquiry},
    Number  = {3-4},
    Pages   = {272-302},
    Title   = {Restarts, pauses, and the achievement of a state of mutual gaze at turn-beginning},
    Volume  = 50,
    Year    = 1980,
}
@article{mgood1980,
    Author  = {Marjorie Harness Goodwin},
    Journal = {Sociological Inquiry},
    Pages   = {303-317},
    Title   = {Processes of mutual monitoring implicated in the production of description sequences},
    Volume  = 50,
    Year    = 1980,
}
\end{filecontents}
\addbibresource{\jobname.bib} 

\begin{document}
\parencite{cgood1980,mgood1980}
\printbibliography
\end{document}

Two bibliography entries in standard authoryear format, just with added number.

If you wanted to really use the numeric citations, I would suggest my answer to Combining style numeric with style authoryear in BibLaTeX instead, where we load authoryear as bibliography style and then \input{numeric.bbx} (note that this work because of the modular structure of the standard bibliography styles, it need not work for arbitrary combinations of styles).

moewe
  • 175,683