0

What I want is that at the end of each chapter it should automatically generate a list of references. Is that possible? and how? (I want to use BibTeX.) Thanks for your help.

Update:

I've added the follwing packages

\usepackage{natbib}
\usepackage{chapterbib}

Then in the Chapter I've added this:

\bibliographystyle{alphadin}        %% Literaturverzeichnis generieren
\bibliography{../bibliography/einfuehrung}

Then I got this:

enter image description here

No ref in text and then I got a whitepage and then this:

enter image description here

What's going wrong? I want a new section for the list of references in each chapter

Update 2:

Main

\documentclass[
  draft=false        % =false: Finale Version; =true: Testversion
  ,paper=a4paper          %% Papierformat A4  %%JW%% ,paper=a4
  ,ngerman           %% Das Dokument ist in neuen deutschen Recht.
  ,numbers=noenddot   % Kein Punkt nach Nummerierung im IV
  ,11pt     %% Schriftgroesse %%JW%% ,fontsize=11pt
  %,BCOR=5mm          %% 5 mm Bindekorrektur beruecksichtigen
  ,listof=totoc      %% Verzeichnisse im Inhaltsverzeichnis 
  ,bibliography=totoc % Literaturverzeichnis im Inhaltsverzeichnis
  ,index=totoc       %% Index im Inhaltsverzeichnis
 ]{book}          

 \usepackage{chapterbib}
 \include{praeambel/praeambel}   

 \begin{document}   
 \frontmatter   
 \cleardoublepage
 \tableofcontents

  \mainmatter   

  \include{content/einfuehrung}

  \end{document}

content/einfuehrung.tex

\chapter{Einleitung}

\section{Erl\"auterung der wichtigsten Konzepte}
 asdasd
 \section{Blubb}
 adasd
 \cite{Lidwin.2010}

 \cleardoublepage
 \bibliographystyle{alphadin}       %% Literaturverzeichnis generieren
 \bibliography{../bibliography/einfuehrung}

..bibliography/einfuerhung

@booklet{Lidwin.2010,
    author = {{L}idwin, {K}urt},
    year = {2010},
    title = {{D}ie {I}nstallation von {L}a{T}e{X} unter {W}indows},
    edition = {1.0},
    language = deutsch,
    publisher = {{HTWG} {K}onstanz},
    institution = {{R}echenzentrum},
    lastchecked = {05.05.2010},
 }

Minimal Example: http://www.file-upload.net/download-11010291/SeminarReaderMinimal.zip.html

  • Welcome to TeX.SX! Package chapterbib should help here – user31729 Oct 30 '15 at 13:23
  • Bib latex does this using something like refsection; I've answered this before somewhere, the title is something like, per-chapter bibliographies – cmhughes Oct 30 '15 at 13:30
  • 1
  • 2
    @Felix: You want many things but do not provide some support from your side ;-) No minimal working document ... – user31729 Oct 30 '15 at 13:35
  • 2
    Please make a complete, small, minimum example, not just snippets – cmhughes Oct 30 '15 at 17:20
1

There are a lot of errors in your code, for example you use the class options for KOMA-Script class scrbook, but your code uses standard book.

Please read the documentation to package chapterbib with texdoc chapterbib from your console/terminal. There you find that you first have to compile the mwe.tex, then use console/terminal to run bibtex mwe-1 and bibtex mwe-2, then compile mwe.tex two times again.

With the following corrected MWE (package filecontents is used to have all files together in one MWE):

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname-1.bib}
@booklet{Lidwin.2010,
  author = {{L}idwin, {K}urt},
  year = {2010},
  title = {{D}ie {I}nstallation von {L}a{T}e{X} unter {W}indows},
  edition = {1.0},
  language = deutsch,
  publisher = {{HTWG} {K}onstanz},
  institution = {{R}echenzentrum},
  url = {http://testurl.de/test},
  lastchecked = {05.05.2010},
}
\end{filecontents*}

\begin{filecontents*}{\jobname-2.bib}
@Book{Goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and 
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
\end{filecontents*}

\begin{filecontents*}{\jobname-1.tex}
\chapter{Einleitung}

\section{Erläuterung der wichtigsten Konzepte}
asdasd
\section{Blubb}
adasd
\cite{Lidwin.2010}

\cleardoublepage
\bibliographystyle{alphadin}       %% Literaturverzeichnis generieren
\bibliography{\jobname-1}
\end{filecontents*}

\begin{filecontents*}{\jobname-2.tex}
\chapter{Einleitung 2}

\section{Erläuterung der wichtigsten Konzepte 2}
asdasd
\section{Blubb 2}
adasd
\cite{Goossens}

\cleardoublepage
\bibliographystyle{alphadin}       %% Literaturverzeichnis generieren
\bibliography{\jobname-2}
\end{filecontents*}


\documentclass[%
  draft=false        % =false: Finale Version; =true: Testversion
 ,paper=a4           % Papierformat A4 
 ,ngerman            % neue deutsche Rechtschreibung
 ,numbers=noenddot   % Kein Punkt nach Nummerierung im IV
 ,fontsize=11pt
%,BCOR=5mm           % 5 mm Bindekorrektur beruecksichtigen
 ,listof=totoc       % Verzeichnisse im Inhaltsverzeichnis 
 ,bibliography=totoc % Literaturverzeichnis im Inhaltsverzeichnis
 ,index=totoc        % Index im Inhaltsverzeichnis
]{scrbook} % book ????? <===============================================

\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[sectionbib]{chapterbib}
\usepackage[ngerman]{babel}


\begin{document}
\frontmatter
%\cleardoublepage
\tableofcontents

\mainmatter   

\include{\jobname-1}
\include{\jobname-2}

\end{document}

you will get the following TOC:

enter image description here

As mentioned in the documentation there are some error messages but the result is okay. I did not try out the hints in the documentation to get rid of the errors ... Please do that by your own.

At last I would suggest to use biblatex, that provides the bibliography per chapter too, but is in my eyes easier to handle and customize ...

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.