0

I'm a Latex noob and having troubles switching my bib style from "authoryear-ibid" to "authoryear-comp". When I change the style, nothing seems to work anymore and I don't know why.

Here is my test.tex:

\documentclass[12pt,a4paper,oneside]{scrartcl}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage[left=3.0cm,right=2.0cm,top=3.0cm,bottom=2.5cm]{geometry}            
\usepackage{setspace}
\renewcommand{\baselinestretch}{1.5}
\usepackage[utf8]{inputenc}                                                                                       
\usepackage[ngerman]{babel}                                                                                    
\usepackage[T1]{fontenc}            
\usepackage{mathptmx}
\setkomafont{disposition}{\bfseries}                                                                            
\usepackage{url}    
\newcommand*\oldurlbreaks{}
\let\oldurlbreaks=\UrlBreaks
\renewcommand{\UrlBreaks}{\oldurlbreaks\do\a\do\b\do\c\do\d\do\e%
\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q%
\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\?\do\&}                                                                          
\urlstyle{same}

\usepackage{graphicx}

\usepackage[titles]{tocloft} \renewcommand{\contentsname}{Table of contents} \renewcommand{\cftsecfont}{\normalfont\bfseries}% titles in bold \renewcommand{\cftsecpagefont}{\normalfont\bfseries}% page numbers in bold \renewcommand{\cftdotsep}{1} \renewcommand{\cftsecleader}{\bfseries\cftdotfill{\cftsecdotsep}}% dot leaders in bold

\usepackage[labelfont=bf, justification=centering, font={small,bf}{caption}
\newcommand{\source}[1]{\hfill \footnotesize Quelle: {#1}} \renewcommand{\cftfigpresnum}{Abb.~} \renewcommand{\cftfigaftersnum}{:} \renewcommand{\cfttabpresnum}{Tab.~} \renewcommand{\cfttabaftersnum}{:} \newlength{\fignumw}\settowidth{\fignumw}{\bfseries\sffamily Abbildung~99} \newlength{\tabnumw}\settowidth{\tabnumw}{\bfseries\sffamily Tabelle~99}

\setlength{\cftfignumwidth}{\fignumw} \setlength{\cfttabnumwidth}{\tabnumw}

\usepackage{tabularx}
\usepackage{multirow}
\usepackage{booktabs}
\setlength\parindent{0pt} %Absatz \usepackage{csquotes}

\usepackage[backend=biber, style=authoryear-comp, autocite=footnote, urldate =comp, url=false]{biblatex} %literatur

% Schrägstrich als Trennzeichen zwischen AutorInnen \renewcommand{\multinamedelim}{\addslash} \renewcommand{\finalnamedelim}{\addslash}

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

\setlength\bibitemsep{1.5\itemsep} \DefineBibliographyStrings{ngerman}{% urlseen = {Zugriffsdatum:}} \newbibmacro*{cite:labelyear+extrayear:paren}{% \iffieldundef{labelyear} {} {\printtext[parens]{\usebibmacro{cite:labelyear+extrayear}}}}

\renewbibmacro*{cite}{% \global\boolfalse{cbx:loccit}% \iffieldundef{shorthand} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} {\usebibmacro{cite:label}% \setunit{\addspace}} {\printnames{labelname}% \setunit{\nameyeardelim}}% \usebibmacro{cite:labelyear+extrayear:paren}}} {\usebibmacro{cite:shorthand}}}

\addbibresource{lit.bib}

\begin{filecontents}{lit.bib} @Online{bmbf, author = {Bundesministerium\hspace{2pt}für\hspace{2pt}Bildung\hspace{2pt}und\hspace{2pt}Forschung}, journal = {Bundesministerium für Bildung und Forschung - BMBF Digitale Zukunft}, month = jan, title = {Förderung von Datentreuhandmodellen - BMBF digitale zukunft}, url = {https://www.bildung-forschung.digital/digitalezukunft/de/wissen/forschungsdaten/datentreuhandmodelle/foerderung-von-datentreuhandmodellen}, urldate = {2022-03-20}, year = {2021}, }, @Article{datenzugang, author = {Richter,Frederick}, title = {DATENZUGANG, DATENTEILUNG,DATENTREUHAND Neue Instrumente der Datenpolitik}, year = {2020}, url = {https://stiftungdatenschutz.org/fileadmin/Redaktion/Presse/24_BvD-News_2020-3_web.pdf}, }, @Online{dwa, author = {Deutsche\hspace{2pt}Vereinigung\hspace{2pt}für\hspace{2pt}Wasserwirtsc\hspace{2pt}, Abwasser\hspace{2pt}und Abfall e. V. (DWA)}, title = {Geodaten in der Wasserwirtschaft}, url = {https://de.dwa.de/de/presseinformationen-volltext/geodaten-in-der-wasserwirtschaft.html}, urldate = {2022-02-24}, year = {o.,J.}, } \end{filecontents}

%\usepackage{hyperref}                                              %für Hyperlinks
\usepackage[printonlyused]{acronym}
\usepackage[titletoc,title]{appendix}                                       %für Anhänge    
\usepackage{pdfpages}

%%%% Dokument
\begin{document}

\includepdf{Deckblatt}
\cleardoubleemptypage

\pagenumbering{Roman} % Römischen Ziffern

 \clearpage
 \setcounter{page}{2}

 %%%% Verzeichnisse aufrufen

 %Aufruf Inhaltsverzeichnis
  \tableofcontents
  \newpage
 %Aufruf Abbildungsverzeichnis
 \listoffigures 
  \newpage
 %Aufruf Tabellenverzeichnis
  \listoftables
 \newpage

  %%%% Abkürzungsverzeichnis
  \addsec{Abkürzungsverzeichnis}
 \input{Kapitel/Abk}
 \newpage

 %%%% Beginn der Arbeit
 \pagenumbering{arabic} % Umstellung auf Arabische Ziffern
  \section{Einleitung}
 BlablablBLa bla \autocite[Vgl.]{dwa}, blBLa. \autocite[Vgl.][10]{ datenzugang}
 blabla \autocite[Vgl.]{dwa} 
 blalbla.\autocite[Vgl.]{bmbf} 


  \newpage
   \printbibliography
   \end{document}

The error I get looks like this:

enter image description here

I don't know what to do anymore, I hope somebody here can help me.

  • Not related to the question, but note that there are warnings along the line of Class scrartcl Warning: Usage of package `tocbibind' together with a KOMA-Script class is not recommended. and Class scrartcl Warning: Usage of package `tocloft' together with a KOMA-Script class is not recommended. (The warnings are actually much longer and suggest replacements for these packages). ... – moewe Jun 05 '22 at 21:19
  • ... The preamble is fairly hard to parse because is loads packages in different groups in different places. I suggest you first load all required packages (but only the required packages) and then the remaining preamble code. Make sure that you actually need all the packages you load and all the code you have in there. (The indentation in this example is also a bit confusing for me. But maybe that's just me. If it works for you, there is no reason to change that.) – moewe Jun 05 '22 at 21:22

1 Answers1

1

Your redefinition of the cite macro (the code starting with \renewbibmacro*{cite}) is specifically tailored to style=authoryear-ibid, (in fact it is tailored to an outdated version of that style). If you change the style that definition is not guaranteed to work and in your case even causes errors.

As far as I can tell the code is supposed to add parentheses around the year in the footnote citations. That is much easier (and style-independent) with biblatex-ext (see Parentheses around year, "normal number" in footnote and a word before footnote for example).

A minimal example of just the bibliography/citation setup

\documentclass[12pt,a4paper,oneside]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{csquotes}

\usepackage[ backend=biber, style=ext-authoryear-comp, autocite=footnote, urldate=comp, url=false, ]{biblatex}

\DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen}

\DeclareDelimFormat{multinamedelim}{\addslash} \DeclareDelimAlias{finalnamedelim}{multinamedelim}

\DefineBibliographyStrings{ngerman}{ andothers = {et,al\adddot}, urlseen = {Zugriffsdatum}, } \DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\addcolon\space#1}}

\addbibresource{biblatex-examples.bib}

\begin{document} BlablablBLa bla \autocite[Vgl.][]{sigfridsson}, blBLa. \autocite[Vgl.][10]{worman} blabla \autocite[Vgl.][]{geer} blalbla.\autocite[Vgl.][]{sigfridsson}

\printbibliography \end{document}

1 Vgl. Sigfridsson/Ryde (1998).
2 Vgl. Worman (2002), S. 10.
3 Vgl. Geer (1985).
4 Vgl. Sigfridsson/Ryde (1998).

moewe
  • 175,683