2

this is my first time with LaTeX and i'm a little bit in trouble with bibliography. Is it possible with my set up to cite and make a bibliography as follows:

...Some text (author's lastname and year, p. XX) with books and for online resources this one(title and year).

Bibliography

Books

author (year). title publisher adress ISBN

Links

title (year). author URL

i want to cite like in my example and my bibliography should sort links and books with it's own headlines. Here is my setup :

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage[round]{natbib}
\usepackage[left=3.5cm,right=1.5cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{setspace}
\usepackage{listings}
\usepackage{color}
\usepackage{hyperref}  
\onehalfspacing
\setkomafont{disposition}{\rmfamily\bfseries}

\setcitestyle{aysep={}}

\begin{document}

%===================== Inhaltsverzeichnis ===================%
\thispagestyle{empty}
\cleardoublepage
\tableofcontents
\newpage

%======================== Inhalt =========================%
\section{Überschrift}
\subsection{Unterüberschrift}

\cite*[S. 48]{schuermann2015}
\cite*[S. 48]{hetzel2016}
\cite*[S. 48]{wolf2015}
\cite*[S. 48]{cremer2015}
\citep{Tho98w}

%===================Literaturverzeichnis =========================%
\newpage
\addcontentsline{toc}{section}{Literatur}
\bibliographystyle{plainnat}
\bibliography{Bibliothek}

\end{document}

and my .bib file

@BOOK{schuermann2015,
    AUTHOR="Tim Schürmann",
    YEAR=2015,
    TITLE="WordPress 4 komplett: Das Kompendium für Websites \& Blogs",
    PUBLISHER="O'Reilly Verlag",
    ADDRESS="Köln",
    NOTE="ISBN: 978-3-95561-854-4"
}

@BOOK{hetzel2016,
    AUTHOR="Alexander Hetzel",
    YEAR=2016,
    TITLE="WordPress 4: Das umfassende Handbuch",
    PUBLISHER="Rheinwerk Verlag",
    ADDRESS="Bonn",
    NOTE="ISBN: 978-3-8362-3943-1"
}

@BOOK{wolf2015,
    AUTHOR="Jürgen Wolf",
    YEAR=2015,
    TITLE="HTML5 und CSS3: Das umfassende Handbuch",
    PUBLISHER="Rheinwerk Verlag",
    ADDRESS="Bonn",
    NOTE="ISBN: 978-3-8362-2885-5"
}

@BOOK{cremer2015,
    AUTHOR="Gino Cremer",
    YEAR=2015,
    TITLE="Das WordPress Praxishandbuch",
    PUBLISHER="Franzis Verlag",
    ADDRESS="München",
    NOTE="ISBN: 978-3-645-60379-9"
}

@MISC{Tho98w,
    Title = "Author",
    Author = "Statistical power analysis software",
    HOWPUBLISHED = "URL: \url{ http://www.forestry.ubc.ca/conservation/power/}",
    YEARr = 1998,
    NOTE ="(besucht am 19.05.2016)"
}
2
  • Thank you. As i said it's my first time using LaTeX and i don't know whats required. I've made a quick search and i think i have to download the biblatex package and install it. But i don't have a clue how to set it up. I'm using Texmaker 4.5 May 20, 2016 at 7:00

1 Answer 1

2

In your code you have several problems, some related to KOMA-Script (class scrartcl), some with your bibliography.

Let's start with KOMA-Script:

  • Your line \addcontentsline{toc}{section}{Literatur} can you delete, use better the KOMA-Script class option bibliography=totoc, instead.
  • Change the class options to the way they are used in KOMA-Script. See the changes I did in the following MWE.
  • Use better \clearpage instead of \newpage.
  • I deleted all packages you loaded in your code which are not neccessary for this problem.

Changings for the bibliography:

  • I added biblatex (and csquotes to avoid a warning)
  • I deleted package natbib, but added a commented option for biblatex for natbib
  • I used package filecontents to have bib file and TeX file in one compilable code (If you use MWE.tex as file name, the \jobname changes to MWE).
  • With \DeclareCiteCommand{\cite} I changed only the \cite command to use () as you want (\mkbibparens does this)
  • With \printbibheading%[title={Literaturverzeichnis}] the main title for the bibliography is printed. If you want to change it, delete the % and change Literaturverzeichnis to what you need.
  • With \printbibliography[type=book,heading=subbibliography,title={Bücher}] the part of bibliography containing only the cited books.

The changed MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{schuermann2015,
    AUTHOR="Tim Schürmann",
    YEAR=2015,
    TITLE="WordPress 4 komplett: Das Kompendium für Websites \& Blogs",
    PUBLISHER="O'Reilly Verlag",
    ADDRESS="Köln",
    NOTE="ISBN: 978-3-95561-854-4",
}
@BOOK{hetzel2016,
    AUTHOR="Alexander Hetzel",
    YEAR=2016,
    TITLE="WordPress 4: Das umfassende Handbuch",
    PUBLISHER="Rheinwerk Verlag",
    ADDRESS="Bonn",
    NOTE="ISBN: 978-3-8362-3943-1",
}
@BOOK{wolf2015,
    AUTHOR="Jürgen Wolf",
    YEAR=2015,
    TITLE="HTML5 und CSS3: Das umfassende Handbuch",
    PUBLISHER="Rheinwerk Verlag",
    ADDRESS="Bonn",
    NOTE="ISBN: 978-3-8362-2885-5",
}
@BOOK{cremer2015,
    AUTHOR="Gino Cremer",
    YEAR=2015,
    TITLE="Das WordPress Praxishandbuch",
    PUBLISHER="Franzis Verlag",
    ADDRESS="München",
    NOTE="ISBN: 978-3-645-60379-9",
}
@MISC{Tho98w,
    Title = "Author",
    Author = "Statistical power analysis software",
    HOWPUBLISHED = "URL: \url{ http://www.forestry.ubc.ca/conservation/power/}",
    YEAR = 1998,
    NOTE ="(besucht am 19.05.2016)",
}
\end{filecontents*}


\documentclass[%
  fontsize=12pt,
  paper=a4,
  bibliography=totoc, % Bibliography in TOC, numbered with =totocnumbered
  ngerman
]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[left=3.5cm,right=1.5cm,top=2.5cm,bottom=2.5cm]{geometry}

\usepackage{csquotes}
\usepackage[%
  backend=biber, % bibtex biber
  defernumbers=true,
% natbib=true,
  style=authoryear, % authoryear-comp, authoryear-icomp,
]{biblatex}
\addbibresource{\jobname.bib}
\renewcommand*{\labelnamepunct}{\addperiod\space}
\renewcommand*{\newunitpunct}{\space}
\renewcommand*{\finentrypunct}{}                  % no punct after entry

\DeclareCiteCommand{\cite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}\usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\usepackage{setspace}
\usepackage{hyperref}

\onehalfspacing


\begin{document}

%===================== Inhaltsverzeichnis ===================%
\thispagestyle{empty}
%\cleardoublepage
\tableofcontents

%======================== Inhalt =========================%
\section{Überschrift}
\subsection{Unterüberschrift}

Text~\cite[S.~48]{schuermann2015} Text 
\cite[S.~48]{hetzel2016}
\cite[S.~48]{wolf2015}
\cite[S.~48]{cremer2015}
\cite{Tho98w}

%===================Literaturverzeichnis =========================%
%\clearpage
\printbibheading%[title={Literaturverzeichnis}]
\printbibliography[type=book,heading=subbibliography,title={Bücher}]
\printbibliography[type=misc,heading=subbibliography,title={Online}]

\end{document}

results in this pdf:

enter image description here

1
  • thanks a lot and your code looks pretty good. it should be working in my opinion but when executing biber i get the Warning: Found biblatex control file version 3.1, expected version 2.9 ... Do i have to downgrade biblatex ? because wheater bibers process is exited normaly the PDFLaTeX causes a lot of errors and warnings which i believe have the same problem May 23, 2016 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .