1

As stated in the title, I miss the 'In:' before the journal title. Here is my code:

\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}

\usepackage[german, english]{babel}
\usepackage{abstract}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[bottom]{footmisc}
\renewcommand*\footnoterule{}

\usepackage[
  backend=biber,
  isbn = false,
  doi = false,
  url = false,
  style = authoryear,
    ]
{biblatex}

\renewcommand{\postnotedelim}{\addcolon\addspace}

\DeclareFieldFormat{postnote}{#1}

\renewcommand{\labelnamepunct}{\addcolon\addspace}

\AtEveryBibitem{\clearfield{edition}}

\AtEveryBibitem{\clearfield{pagetotal}}

\AtEveryBibitem{\clearfield{series}}

\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{citetitle}{#1\isdot}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1\isdot}

\DeclareFieldFormat{location}{#1\addslash} %um / zwischen Orte zu setzen

\DeclareFieldFormat{pages}{#1}

\renewcommand{\multinamedelim}{\addspace\&\space} 
\renewcommand{\finalnamedelim}{\multinamedelim}

\DefineBibliographyStrings{german}{%
  andothers = {et\addabbrvspace al\adddot},
  editors = {Hgg\adddot},
}


% kein Komma zwischen Namen und (Hrsg.)
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\makeatletter
\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
        \setunit{\printdelim{editortypedelim}}%
        \usebibmacro{bbx:savehash}}%
     \usebibmacro{#1}%
     \clearname{editor}%
     \setunit{\printdelim{nameyeardelim}}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \setunit*{\printdelim{nonameyeardelim}}}%
  \usebibmacro{date+extrayear}}
\makeatother


%Schriftenreihen in (=)
\renewbibmacro*{series+number}{%
  \iffieldundef{series}
    {}
    {\printtext[parens]{%
       \printtext{=\addspace}%
       \printfield{series}%
       \setunit*{\addcomma\space}%
       \printfield{number}%
       \printtext{\addperiod}}
       \nopunct}}

\renewbibmacro{in:}{In:}


% Herausgeber vor Titel des Sammelbandes
\renewbibmacro*{in:}{%
  \printtext{\bibstring{in}}%
  \printunit{\intitlepunct}%
  \ifentrytype{incollection}{%
    \ifnameundef{bookauthor}
       {\ifnameundef{editor}
          {\ifnameundef{translator}
             {}
             {\printnames{translator}%
              \setunit{\addspace}%
              \usebibmacro{translator+othersstrg}%
              \clearname{translator}}}
          {\printnames{editor}%
           \setunit{\addspace}%
           \usebibmacro{editor+othersstrg}%
           \clearname{editor}}}
        {\ifnamesequal{author}{bookauthor}
           {}
           {\printnames{bookauthor}%
            \clearname{bookauthor}}}}%
    {}%
  \newunit\newblock}

%bei Journals die Heftnummer in () nach der Jahreszahlnummer
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\renewbibmacro*{series+number}{%
  \iffieldundef{series}
    {}
    {\printtext[parens]{%
     \printtext{=\addspace}%
     \printfield{series}%
     \setunit*{\addcomma\space}%
     \printfield{number}%
     \printtext{\addperiod}}
     \nopunct}}


\renewbibmacro*{in:}{
  \ifentrytype{incollection}{%
  \DeclareNameAlias{editor}{first-last}
  \printtext{In:}
  \ifnameundef{editor}
    {}
    {\printnames{editor}%
     \addspace 
     \usebibmacro{editorstrg}
     \setunit{\addcomma\addspace}% 
    }%
  \usebibmacro{maintitle+booktitle}
  \clearfield{maintitle}
  \clearfield{booktitle}
  \clearfield{volume}
  \clearfield{part}
  \clearname{editor}
  }
  {}%
}





\bibliography{test.bib}


\begin{document}
\title{Literaturliste}

\author{}
\date{}
\maketitle


\nocite{chomsky_noam_knowledge_1975}
\nocite{lenneberg1969explaining}
\nocite{pfau_roland_manual_2012}

\nocite{senghas2005language}

\pagebreak

\printbibliography
\end{document}
  • 2
    You have two redefinitions of in: It seems like you want only the first one, delete the second redefinition. – moewe Dec 2 '17 at 17:44
  • 1
    Actually, three. – gusbrs Dec 2 '17 at 17:53
  • 2
    You have three instances of \renewbibmacro{in:}. Each of them overrides the previous, so only the last one is actually doing anything. – gusbrs Dec 2 '17 at 19:16
  • 2
    And your last definition essentially says that in case the entrytype is incollection do this and that, otherwise do nothing. So it is no wonder that your articles are missing the In:. – gusbrs Dec 2 '17 at 19:19
  • 1
    Oh yes, I missed the first redefinition of in:. Remove the line \renewbibmacro{in:}{In:} as well as the last instance of \renewbibmacro*{in:}{ in you MWE. You should be left with only one \renewbibmacro*{in:} that does the right thing. – moewe Dec 2 '17 at 20:28
3

You have several (three) redefinitions of the in: bibmacro that all do different things. Since the preamble is read sequentially, it is the last definition that 'wins' and is used throughout the document.

From your description, I guess you want the second redefinition.

You can delete the first redefinition

\renewbibmacro{in:}{In:}

and the last redefinition (which could also cause unwanted space to appear in the bibliography)

\renewbibmacro*{in:}{
  \ifentrytype{incollection}{%
  \DeclareNameAlias{editor}{first-last}
  \printtext{In:}
  \ifnameundef{editor}
    {}
    {\printnames{editor}%
     \addspace 
     \usebibmacro{editorstrg}
     \setunit{\addcomma\addspace}% 
    }%
  \usebibmacro{maintitle+booktitle}
  \clearfield{maintitle}
  \clearfield{booktitle}
  \clearfield{volume}
  \clearfield{part}
  \clearname{editor}
  }
  {}%
}

So that the only redefintion of in: left in your document is the second one:

\renewbibmacro*{in:}{%
  \printtext{\bibstring{in}}%
  \printunit{\intitlepunct}%
  \ifentrytype{incollection}{%
    \ifnameundef{bookauthor}
       {\ifnameundef{editor}
          {\ifnameundef{translator}
             {}
             {\printnames{translator}%
              \setunit{\addspace}%
              \usebibmacro{translator+othersstrg}%
              \clearname{translator}}}
          {\printnames{editor}%
           \setunit{\addspace}%
           \usebibmacro{editor+othersstrg}%
           \clearname{editor}}}
        {\ifnamesequal{author}{bookauthor}
           {}
           {\printnames{bookauthor}%
            \clearname{bookauthor}}}}%
    {}%
  \newunit\newblock}

With a modern version of biblatex (>=3.8) you will not need the redefinition of bbx:editor, the two lines before that will be sufficient.

You also have two redefinitions of series+number, but they both do the same thing. They will never be used, however, since you explicitly delete the series field in \AtEveryBibitem.

I have also modernised a few other bits of code.

\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}

\usepackage[german, english]{babel}
\usepackage{abstract}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[bottom]{footmisc}
\renewcommand*\footnoterule{}

\usepackage[
  backend=biber,
  isbn = false,
  doi = false,
  url = false,
  style = authoryear,
    ]
{biblatex}

\renewcommand{\postnotedelim}{\addcolon\addspace}
\DeclareFieldFormat{postnote}{#1}

\renewcommand{\labelnamepunct}{\addcolon\addspace}
\AtEveryBibitem{%
  \clearfield{edition}%
  \clearfield{pagetotal}%
  \clearfield{series}%<----- Do you really want this?
}

\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{citetitle}{#1\isdot}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1\isdot}

\DeclareDelimFormat{multilistdelim}{\addslash}
\DeclareDelimAlias{finallistdelim}{multilistdelim}

\DeclareFieldFormat{pages}{#1}

\DeclareDelimFormat{multinamedelim}{\addspace\&\space} 
\DeclareDelimAlias{finalnamedelim}{multinamedelim}

\DefineBibliographyStrings{german}{%
  andothers = {et\addabbrvspace al\adddot},
  editors = {Hgg\adddot},
}


% kein Komma zwischen Namen und (Hrsg.)
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}

% Herausgeber vor Titel des Sammelbandes
\renewbibmacro*{in:}{%
  \printtext{\bibstring{in}}%
  \printunit{\intitlepunct}%
  \ifentrytype{incollection}{%
    \ifnameundef{bookauthor}
       {\ifnameundef{editor}
          {\ifnameundef{translator}
             {}
             {\printnames{translator}%
              \setunit{\addspace}%
              \usebibmacro{translator+othersstrg}%
              \clearname{translator}}}
          {\printnames{editor}%
           \setunit{\addspace}%
           \usebibmacro{editor+othersstrg}%
           \clearname{editor}}}
        {\ifnamesequal{author}{bookauthor}
           {}
           {\printnames{bookauthor}%
            \clearname{bookauthor}}}}%
    {}%
  \newunit\newblock}

%bei Journals die Heftnummer in () nach der Jahreszahlnummer
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\renewbibmacro*{series+number}{%
  \iffieldundef{series}
    {}
    {\printtext[parens]{%
        \printtext{=\addspace}%
        \printfield{series}%
        \setunit*{\addcomma\space}%
        \printfield{number}%
        \printtext{\addperiod}}%
     \nopunct}}

\bibliography{biblatex-examples.bib}

\begin{document}
\nocite{sigfridsson,worman,companion,aksin,nussbaum,geer,cicero}

\printbibliography
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.