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 have two .bib file with a selection of references in each.

I would like to print out these references in the same document with diffeent section headings with the numbering of references in each section starting from 1. My first attempt is below: This gives the correct section headings but puts TEST1.bib references in both with no TEST2.bib references...Where am I going wrong? I am using TexMaker to compile.

\documentclass{article}
\usepackage{titlesec}
\usepackage{hyperref}
\usepackage{multibib}
\begin{document}
\nocite{*}
\begingroup
\section*{Section 1}
\renewcommand{\section}[2]{}
\bibliographystyle{plain}
\bibliography{TEST1}
\endgroup
\begingroup
\section*{Section 2}
\renewcommand{\section}[2]{}
\bibliographystyle{plain}
\bibliography{TEST2}
\endgroup
\end{document}
share|improve this question
add comment

3 Answers

This is how it is done:

\documentclass{article}
\usepackage[resetlabels]{multibib}
\newcites{journal,conference}{{Section--1},{Section--2}}

\begin{document}
\nocitejournal{*}
\bibliographystylejournal{plain}
\bibliographyjournal{xampl}        %% use TEST1 here
%    
\nociteconference{*}
\bibliographystyleconference{plain}
\bibliographyconference{doi}       %% use TEST2 here
\end{document}

enter image description here

enter image description here

To process this, the commands should be executed as below:

pdflatex myfile   %% assuming that the above code is saved as myfile.tex
bibtex journal
bibtex conference
pdflatex myfile
pdflatex myfile

Some editors have algorithms (like winedt) which do all these by themselves. If not the above commands should be executed from the same folder as the myfile.tex file.

share|improve this answer
    
When running bibtex i get an error saying there is no \bibstyle command found in the .aux file? and no \citation commands and I still only get Test1 references? –  user2772383 Sep 25 '13 at 10:39
    
@user2772383 you have to execute bibtex on journal.aux and conference.aux. –  Harish Kumar Sep 25 '13 at 11:52
add comment

That's actually a very simple thing to accomplish, biblatex provides support for that out-of-the-box using the \refsection environment.

\usepackage[sorting=none, backend=biber]{biblatex}
\addbibresource{mybib.bib}

\section{Section One}
\begin{refsection} % open refsection environment 

    Some Text here \cite{Author1999}

    % This here prints your bibliography
    \printbibliography[heading=subbibliography]
\end{refsection}

\section{Next Section}
% repeat

If you need more details, check out the bibtex documentation, it even provides examples.

share|improve this answer
add comment

You can also use bibunits package to add multiple bibliographies.

\usepackage{bibunits}

\begin{document}

\begin{bibunit}[plain]
Some Content here!
\putbib[mybib]
\end{bibunit}

\begin{bibunit}[plain]
Some Content here!
\putbib[mybib]
\end{bibunit}

However, you will need to run bibtex with different arguments to process new bibliography files bu1.aux, bu2.aux, etc.

share|improve this answer
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.