Ceci est une ancienne révision du document !


Comment obtenir plusieurs bibliographies dans un document?

Plusieurs extensions traitent ce sujet. Certaines d'entre elles utilisent la structure du document pour générer les bibliographies, ce qui permet par exemple d'obtenir une bibliographie par chapitre, par section… Ces cas de liaison à la structure du document sont traités dans la question « Comment obtenir des bibliographies séparées par chapitre ? ».

Avec les commandes de base

Il est possible d'avoir plusieurs environnements thebibliography dans un document. La méthode « sans BibTeX » fonctionne donc sans aucun problème.

Par contre, avec BibTeX, seule une unique commande bibliography peut être utilisée puisqu'il n'y a qu'un fichier .aux généré par la compilation. Il existe cependant des extensions permettant de contourner cette limitation, qui vont donc s'efforcer de créer différents fichiers .aux.

Avec l'extension “multibbl”

FIXME Traduire.

The multibbl package offers a very simple interface: you use a command \newbibliography to define a bibliography “tag”. The package redefines the other bibliography commands so that each time you use any one of them, you give it the tag for the bibliography where you want the citations to appear. The \bibliography command itself also takes a further extra argument that says what title to use for the resulting section or chapter (i.e., it patches \refname and \bibname in a babel-safe way). So one might write:

\usepackage{multibbl}
\newbibliography{bk}
\bibliographystyle{bk}{alpha}
\newbibliography{art}
\bibliographystyle{art}{plain}
...
\cite[pp.~23--25]{bk}{milne:pooh-corner}
...
\cite{art}{einstein:1905}
...
\bibliography{bk}{book-bib}{References to books}
\bibliography{art}{art-bib}{References to articles}

(Note that the optional argument of \cite appears before the new tag argument, and that the \bibliography commands may list more than one bib file — indeed all \bibliography commands may list the same set of files.)

The \bibliography data goes into files whose names are <tag-name>.aux, so you will need to run

bibtex bk
bibtex art

after the first run of LaTeX, to get the citations in the correct place.

Avec l'extension “multibib”

L'extension multibib est quelque peu complémentaire aux précédents : il permet de découper « la » bibliographie en plusieurs bibliographies différentes. Si par exemple, dans un document, on veut séparer les livres cités des articles cités et créer deux listes distinctes, ce package est notre ami. Voici un exemple rapide :

\documentclass{report}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{multibib}
 
\begin{document}
\newcites{alg}{Bibliographies "algorithmes"}
\newcites{geo}{Bibliographie "géométrie"}
 
\chapter{Algorithmes.}
Présentation d'algorithmes. 
\citealg{toto} \nocitealg{*}
 
\chapter{Géométrie.}
Texte sur la géométrie. 
\citegeo{titi}
 
\bibliographystylealg{plain}
\bibliographyalg{algo}      %% charge algo.bib
 
\bibliographystylegeo{alpha}
\bibliographygeo{geometrie} %% charge geometrie.bib
\end{document}

FIXME Traduire.

The multibib package allows you to define a series of “additional topics”, each of which comes with its own series of bibliography commands. So one might write:

\usepackage{multibib}
\newcites{bk,art}%
         {References from books,%
          References from articles}
\bibliographystylebk{alpha}
\bibliographystyleart{plain}
...
\citebk[pp.~23--25]{milne:pooh-corner}
...
\citeart{einstein:1905}
...
\bibliographybk{book-bib}
\bibliographyart{art-bib}

Again, as for multibbl, any \bibliography… command may scan any list of bib files.

BibTeX processing with multibib is much like that with multibbl; with the above example, one needs:

bibtex bk
bibtex art

Note that, unlike multibbl, multibib allows a simple, unmodified bibliography (as well as the “topic” ones).

Avec les extensions “bibtopic” et “placeins”

Les extensions bibtopic et placeins permettent aussi de découper la bibliographie en différentes sections. L'exemple qui suit montre la séparation entre une bibliographie papier et une bibliographie \emph{Web}. La commande btPrintAll est l'équivalent de nocite*, elle permet de citer toutes les références du fichier bib.

  \documentclass{report}
  \usepackage[latin1]{inputenc}
  \usepackage[T1]{fontenc}
  \usepackage[above,section]{placeins}
  \usepackage{bibtopic}
 
  \begin{document}
  \chapter{Bibliographie}
 
  \begin{btSect}[plain]{biblio}
    \section{Références bibliographiques}
    \btPrintAll
  \end{btSect}
 
  \begin{btSect}[plain]{webiblio}
    \section{Références Internet}
    \btPrintAll
  \end{btSect}
  \end{document}

FIXME Traduire.

The bibtopic package allows you separately to cite several different bibliographies. At the appropriate place in your document, you put a sequence of btSect environments (each of which specifies a bibliography database to scan) to typeset the separate bibliographies. Thus, one might have a file diss.tex containing:

\usepackage{bibtopic}
\bibliographystyle{alpha}
...
\cite[pp.~23--25]{milne:pooh-corner}
...
\cite{einstein:1905}
...
\begin{btSect}{book-bib}
\section{References from books}
\btPrintCited
\end{btSect}
\begin{btSect}[plain]{art-bib}
\section{References from articles}
\btPrintCited
\end{btSect}

Note the different way of specifying a bibliographystyle: if you want a different style for a particular bibliography, you may give it as an optional argument to the btSect environment.

Processing with BibTeX, in this case, uses aux files whose names are derived from the name of the base document. So in this example you need to say:

bibtex diss1
bibtex diss2

There is also a command \btPrintNotCited, which gives the rest of the content of the database (if nothing has been cited from the database, this is equivalent to LaTeX standard \nocite{*}).

However, the real difference from multibbl and multibib is that selection of what appears in each bibliography section is determined in bibtopic by what's in the bib files.

Avec l'extension “splitbib”

L'extension splitbib adopte une approche totalement différente. Un environnement category placé dans le préambule de votre document vous permet de définir une catégorie de références pour lesquelles vous souhaitez une bibliographie distincte. Dans chaque environnement, vous listez les clés mises dans la commande \cite que vous voulez voir listées dans cette catégorie. La commande \bibliography (ou, plus précisément, l'environnement thebibliography qu'elle utilise) va trier les clés comme demandé et les clés non mentionnées dans un environnement category apparaissent dans une catégorie « divers » créée lors de ce tri.

Un exemple de code apparaît dans la documentation de l'extension.


Source: Multiple bibliographies?

3_composition/annexes/bibliographie/gerer_plusieurs_bibliographies.1636198200.txt.gz · Dernière modification : 2021/11/06 11:30 de yannick.tanguy
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0