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.

I'm using LaTeX + BibTeX to write my dissertation. I have one separate .tex file for each chapter. And I'll generate one bibliography for each chapter. But all the references are from the same file (main.bib).

So, there are many situations in which different chapters will cite the same reference. Thus, one reference can appear more than once in the bibliographies of the whole dissertation (but in different chapters). I'd like to use back references from the hyperref package. I'm just wondering whether it would be possible to do so?

% chapter 1
Bibliography
[1]. A and B, Nature, 1991. 15, 20.
...

% chapter 2
Bibliography
...
[3]. A and B, Nature, 1991. 55, 67.
...
share|improve this question
    
I think the answer is no. If you have just one main.bib file, then from the example you've provided, in Chapter 2 you will get the page numbers 15 and 20 being back-referenced as well. –  yCalleecharan Nov 26 '11 at 6:13
    
I'm just too lazy (sorry) to read the 219 pages documentation of mirror.informatik.uni-mannheim.de/pub/mirrors/tex-archive/help/… but maybe that package can help you. –  Stephen Nov 26 '11 at 10:13
2  
The package biblatex is the best way. The documentation is very long but in section 3.10.3 Multiple Bibliographies you find an example which explains the syntax. I don't want to copy and paste the solution. –  Marco Daniel Nov 26 '11 at 10:29
1  
possible duplicate of Section Bibliographies –  Marco Daniel Nov 26 '11 at 10:31
2  
@Mico: That's the reason the word possible is used ;-). The next one -- biblatex is a package which also works with the bibtex. Up to now nobody knows what the op uses. –  Marco Daniel Nov 26 '11 at 13:06
show 3 more comments

2 Answers 2

You may want to try using the chapterbib package. (There's also the bibunits package, but since you state that your chapters are contained in separate .tex files, it may be easiest to proceed with the chapterbib package.) This package is designed to create bibliographies separately for each chapter, regardless of the number of bib files you have.

The following MWE demonstrates the usage of this package with a very basic setup. It loads the packages natbib, chapterbib, hyperref, and backref as well as the bibliography style file plainnat.bst. The file demo.bib contains:

@article{abadir:1993a,
    author       = "Karim M. Abadir",
    title        = "{OLS} bias in a nonstationary autoregression",
    journal      = "Econometric Theory",
    year         = 1993,
    volume       = 9,
    number       = 1,
    pages        = "81--93"
}

The "chapter" files demo-1.tex, demo-2.tex, and demo-3.tex each contain (they're identical):

\chapter{Hello}  
\citet{abadir:1993a}\clearpage\citet{abadir:1993a}
\bibliographystyle{plainnat}
\bibliography{demo}

(Note that each chapter issues two citation calls.) The overall driver file, demo.tex, contains:

\documentclass{book}
\usepackage{natbib,chapterbib,hyperref,backref}
\begin{document}
\include{demo-1}
\include{demo-2}
\include{demo-3}
\end{document}

Run (pdf)latex twice on demo.tex; run bibtex once each on demo1.tex, demo2.tex, and demo3.tex; and run (pdf)latex twice more on demo.tex. The compiled document, demo.pdf, should contain 11 pages (4 pages each for chapters 1 and 2, and 3 pages for chapter 3). The typeset bibliography of chapter 3, on page 11, looks like this:

enter image description here

The back references for the bibliographies of chapters 1 and 2 should be "pages 1, 2" and "pages 5, 6", respectively.

You can, of course, adjust the appearance of the back references; see the manual of the backref package for details.

share|improve this answer
    
The OP has specified that he/she wants to use hyperrefs back-referencing feature. Given this post at texhax describing some incompatibilities between back-referencing and the chapterbib package, it would be better if you added a MWE which demonstrates that your proposed solutions work. –  lockstep Nov 26 '11 at 13:17
1  
@lockstep: Please see the attached MWE. Given that the post you reference is more than two years old, it's (maybe?) not a surprise that whatever bugs surfaced back then seem to have been fumigated. :-) –  Mico Nov 26 '11 at 14:42
add comment

The following solution is based on biblatex and provides what you want: It uses the biblatex concept of segments (see §3.5.4 of the biblatex manual) to define a context for citation tracking. By the refsegment=chapter class option every chapter becomes a segment on its own; at the end of each chapter the segment-specific bibliography is printed; at the end of the document a chapter with the full bibliography is printed. All this works well with back-references, for which biblatex provides built-in support by a dedicated class option.

C1

C2

Full

The only (possible) issue might be that the back-references are always complete. This means that if you cite a source in both, Chapter 1 and Chapter 2, the back-ref list of the Chapter 1 bibliography will also contain the entry for the respective page in Chapter 2.

\documentclass{book}

\usepackage[defernums=true, hyperref, backref, refsegment=chapter]{biblatex}
% Define typesetting of references heading
\defbibheading{references}[References]{% 
  \section*{#1}% 
  \markboth{#1}{#1}%
}

% Define typesetting of bibliography heading
\defbibheading{bibliography}[Complete Bibliography]{% 
  % define as above if you want to have this numbered as well:
  \chapter*{#1}%
  \addcontentsline{toc}{chapter}{#1}
  \markboth{#1}{#1}%
}


% The filtecontent package is just used to create an example .bib-File
% automatically out of the following (for the MWE)
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
}
\end{filecontents}

% The bibtex database to use (mybib for mybib.bib)
\bibliography{\jobname}


\begin{document}

\tableofcontents
\cleardoublepage

\chapter{First Chapter}

Some more text \autocite{A01,B02}.

% print the segment-specific bibliography (using the references style 
% defined above for the heading
\printbibliography[heading=references,segment=\therefsegment]

\chapter{Second Chapter}

Some text \autocite{A01,C03}.

\printbibliography[heading=references,segment=\therefsegment]

\end{refsegment}

% print the full bibliography (using the bibliography style 
% defined above for the heading above
\printbibliography[heading=bibliography]

\end{document}
share|improve this answer
    
I think the problem is that he would like to have back references only of the specific chapter he is in, not the other ones (before or after). Your solution, IMHO, does not tackle that particulat issue. –  Martigan Nov 30 '11 at 12:27
    
@Martigan: Hm... in that case one could try to track the page range of each chapter (zref?) and use that information to customize the processing of the biblatex-internal pageref field that holds the backref pages: \DeclareListFormat{pageref}{ print only pages within chapter range }. Any takers? I am currently not able to invest the time to test this. –  Daniel Nov 30 '11 at 13:20
add comment

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.