Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What I want is the following:
I have a tex file with several \sections, each with their own bibliography at the end and their own bib file. In every section several entries of the bib file are \cited BUT I also show all local bibliography entries at the end of each section.
At the end of the file is a global bibliography that shows all entries of all local bibliographies.

I already tried different packages, e.g. bibunitsand chapterbib (Link to both can be found here). The problem is not to generate multiple bibliographies in one document, but the labeling.

The label of a local bibliography entry has to be the same as the one in the global bibliography. The packages I tried do show me local and global bibliographies, but use different labels. The last part is puzzling to me, because the bibunits documentation talks about an option labelstoglobalaux that should do just that.
As a sidenote, I use a modified plainnat.bst with alpha.bst labels, i.e. entries are labeled with initial of author name and year and entries with the same author and year get an character added to the label. (In the MWE I use alpha.bst) I do not want numbered labels.

This is my MWE with the bibunit package:

\documentclass{article}  
\usepackage[utf8]{inputenc} % Umlaut etc.  
\usepackage{amssymb}  
\usepackage{hyperref} % Link  
\usepackage[labelstoglobalaux,globalcitecopy]{bibunits} % seperate bibliographies  

\begin{document}  
\nocite{*} % to cite global bibliography

% local bibliographies
\begin{bibunit}[alpha]
\nocite{*}
\putbib[biblio-test1]
\end{bibunit}

\begin{bibunit}[alpha]
\nocite{*}
\putbib[biblio-test2]
\end{bibunit}

% global bibliography
\bibliographystyle{alpha}
\bibliography{biblio-test_all}

\end{document}

and the three bib files

biblio-test1:

@phdthesis{222,
    author = {Author, Frank},
    title = {{A long title: Number 2}},
    school = {University T},
    year = {2011},
    pages = {III, 193},
    type={Dissertation},
    }

@phdthesis{333,
    author = {Author, Frank},
    title = {{A long title: number 3}},
    school = {University T},
    year = {2011},
    pages = {93},
    type={Dissertation},
    }

@inproceedings{123,
    author = {Bauthor, Bauth and Cauthor, Cauth},
    title = {{This is the title}},
    series = {A lovely series},
    volume = {109},
    booktitle = {A Long booktitel},
    editor = {Editor, Ed and Beditor, Bed},
    publisher = {Big Publisher},
    address = {City},
    year = {2010},
    pages = {746--851},
    }

biblio-test2:

@book{573,
    author = {Name, N.},
    title = {{An introduction to something interesting}},
    pages = {9},
    publisher = {Big important company},
    address = {Hillcity},
    year = {2005},
    series = {Lecture notes},
    volume = {27/2005},
    url = {http://www.google.com/doodles/},
    }


@phdthesis{222,
    author = {Author, Frank},
    title = {{A long title: Number 2}},
    school = {University T},
    year = {2011},
    pages = {III, 193},
    type={Dissertation},
    }

@phdthesis{111,
    author = {Author, Frank},
    title = {{A long title: Number 1}},
    school = {University T},
    year = {2011},
    pages = {978},
    type={Dissertation},
    }

@phdthesis{233,
    author = {Author, Frank},
    title = {{Some other title}},
    school = {University T},
    year = {2009},
    pages = {3},
    type={Dissertation},
    }

biblio-test_all contains entries of biblio-test1 and biblio-test2 without additional entries.

What I get in the end: Three bibliographies with local labels each, e.g. entry222 is in one bibliograhy [Aut11a] in another [Aut11b].

Help, or ideas will be much appreciated!

EDIT 1: I compile
- latex biblio-test
- bibtex biblio-test (to get the global bibliographie)
- bibtex bu1
- bibtex bu2
- latex biblio-test
- latex biblio-test

EDIT 2: I have several bib files, because the bib files are generated for every \section through a program and have up to one hundred entries each.
I could put them in one files and call every section bibliography using \nocite{...} and I could then write a script that copies every section bibliography entry into \nocite. However, I tried using only one bib file and call those entries I need with \nocite*{...}. But: The labeling is still not global*. So until now, I haven't found a reason not to use seperate files.

*When I then cite entries in a bibunit, the global label is used in the citation, but the local one is used in the bibliography.

share|improve this question
    
Welcome to TeX.SE! Thanks for posting a detailed MWE. Quick question: Why do you have separate bib files for each sectioning unit? By forcing BibTeX to deal with several bib files, it can't figure out that some of the entries in the various bib files are repeated. –  Mico Mar 29 '12 at 13:35
    
Thanks for the welcome! Answered question in entry, because I thought it would be important for all. –  JJB Mar 29 '12 at 15:12
    
Would you also work with biblatex? –  Marco Daniel Apr 9 '12 at 9:25

1 Answer 1

Here's a biblatex solution that satisfies your main requirement -- a combination of local bibliographies and a global one, with congruent local/global entry labels. However, instead of individual .bib files for each section I use a global file including special keywords fields to indicate an entry's affiliation with one or several sections.

\documentclass{article}

\usepackage[style=alphabetic]{biblatex}

\defbibheading{subbibforsec}[\refname\ for section~\thesection]{%
    \subsection*{#1}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  keywords = {foo,bar},
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02x,
  keywords = {foo},
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{B02y,
  keywords = {bar},
  author = {Buthor, B.},
  year = {2002},
  title = {Bravissimo},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\section{Foo}

Some text \autocite{B02x}.

\printbibliography[heading=subbibforsec,keyword=foo]

\section{Bar}

Some text \autocite{B02y}.

\printbibliography[heading=subbibforsec,keyword=bar]

\printbibliography

\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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