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 am preparing a report in LaTeX and I have many references which I intend to put in the Bibliography.

I was wondering if it possible to group the reference based on the topic. I would expect a LaTeX output something like this:

[Section1]

[1] IEEE Standard

[2] Book 1

[Section 2]

[3] Ref 1

[4] Ref 2

This way, it will be useful when we just read the Bibliography part, we can access the References based on the section of our interest rather than going through all the references.

share|improve this question
    
related question: tex.stackexchange.com/questions/26598/… –  matth Apr 12 '12 at 16:08

2 Answers 2

You can use the refsection environment and the section option of \printbibliography to select a reference section. A little example:

\begin{filecontents*}{biblio.bib}
@book{goossens93,
    author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
    title = "The {LaTeX} Companion",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"

}

@article{greenwade93, 
    author = "George D. Greenwade",
    title = "The {C}omprehensive {TeX} {A}rchive {N}etwork ({CTAN})",
    year = "1993",
    journal = "TUGBoat",
    volume = "14",
    number = "3",
    pages = "342--351",
    url=" www.ctan.org"
}

@book{knuth79,
    author = "Donald E. Knuth",
    title = "{TeX} and Metafont, New Directions in Typesetting",
    year = "1979",
    publisher = "American Mathematical Society and Digital Press",
    address = "Stanford"
}

@book{lamport94,
    author = "Leslie Lamport",
    title = "{LaTeX}: A Document Preparation System",
    year = "1994",
    edition = "Second",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}

@misc{patashnik88,
    author = "Oren Patashnik",
    title = "{BibTeX}ing.  Documentation for General {BibTeX} users",
    year = "1988",
    howpublished = "Electronic document accompanying BibTeX
distribution"
}

@techreport{rahtz89,
    author = "Sebastian Rahtz",
    title = "A Survey of {T}e{X} and graphics",
    year = "1989",
    institution = "Department of Electronics and Computer Science",
    address = "University of Southampton, UK",
    number = "CSTR 89-7"
}
\end{filecontents*}
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{biblio.bib}

\defbibheading{subbibliography}{%
  \section*{References for Section~\ref{refsection:\therefsection}}}

\begin{document}
\section{Test Section One}
\begin{refsection}

\cite{goossens93}, \cite{lamport94}, \cite{rahtz89}
\end{refsection}

\section{Test Section Two}

\begin{refsection}
\cite{greenwade93}, \cite{patashnik88}, \cite{knuth79}
\end{refsection}

\printbibliography[section=1,heading=subbibliography]
\printbibliography[section=2,heading=subbibliography]

\end{document}

enter image description here

share|improve this answer
    
don't know where you got the bib items, but the bracing in names is seriously deficient. almost everywhere it should be {T}e{X} or {TeX} and similarly for LaTeX. please fix. –  barbara beeton Sep 24 '11 at 13:27
    
@barbara beeton: fixed. Thanks for pointing out the deficiencies. –  Gonzalo Medina Sep 24 '11 at 15:06

Here is another solution which is more automated:

\documentclass[]{scrreprt}

\usepackage[autostyle]{csquotes}
\usepackage[
    backend=biber,
    % refsection=chapter,
    refsegment=chapter,
    sorting=none,
    style=numeric
]{biblatex}
%\defbibheading{subbibliography}{%
%  \section*{References for Section~\ref{refsection:\therefsection}}}
\defbibheading{subbibliography}{%
  \section*{References for Segment~\ref{refsegment:\therefsection\therefsegment}}}
\addbibresource{biblatex-examples.bib}

\usepackage[]{hyperref}
\hypersetup{
    colorlinks=true,
}

%% ##############################
\begin{document}

\chapter{Introduction}
Lorem ipsum dolor sit amet~\cite{sigfridsson}.

\chapter{Another Chapter}
At vero eos et accusam et justo duo dolores et ea rebum~\cite{kastenholz}.


\chapter{Conclusions}
Cite an author not previously cited~\cite{cicero}.
And then again cite some authoprs cited previously~\cite{kastenholz}.
Note: Alphabetcially, K comes before S.
At vero eos et accusam et justo duo dolores et ea rebum~\cite{sigfridsson}.

%\printbibliography
\printbibheading
% \bibbysection[heading=subbibliography]
\bibbysegment[heading=subbibliography]

\end{document}

It more or less does the same as the answer by Gonzalo Medina, but

  • uses refsegment instead of refsection to ensure unique labels
  • the biblatex option refsegment=chapter automatically marks each \chapter{} as a refsegment
  • \bibbysegment automatically writes a \printbibliography command for each refsegment

biblatex comes with a lot of usage examples, the commands used here were more or less directly copied from 12-references-by-segment.tex

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.