Je cherche à créer un index des auteurs dans ma thèse. Malheureusement, quand un auteur est cité dans une note en bas de page, il n'est présent dans l'index.

Ainsi : comment ajouter automatiquement un auteur présent dans une note en bas de page dans notre index ?

Voici un ECM qui illustre le problème :

Ouvrir dans l'éditeur Overleaf
\documentclass[a4paper,french]{article}

\begin{filecontents}{bib.bib}
@article{Foo2035,
  author = {Foop, Beck},
  journal = {Journal},
  year = {2010},
  title = {Title},
  doi = {doi},
}
@article{Foo2034,
  author = {Foot, Lise},
  journal = {Journal},
  year = {2010},
  title = {Title},
  doi = {doi},
}
}\end{filecontents}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\usepackage{textcomp}

\usepackage[backend=biber,
style=apa, 
indexing=cite,
sortlocale=fr_FR, 
maxnames=15,
]{biblatex}
\DeclareLanguageMapping{french}{french-apa}%La bibliographie est en APA français
\usepackage{apalike}%La bibliographie est en APA
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamelast}% La bibliographie est en français

\addbibresource{bib.bib}

\DeclareUnicodeCharacter{00A0}{ }

\usepackage[babel=true]{csquotes}

\usepackage[makeindex]{splitidx}
\renewbibmacro*{citeindex}{%
  \ifboolexpr{ test {\ifciteindex} and not test {\iffootnote} }
    {\indexnames{author}}{}}\makeindex

\usepackage{babel}

\begin{document}

\cite{Foo2035} pensait aux oiseaux quand il écrivait son livre\footnote{Comme le disait \textcite{Foo2034} les oiseaux sont importants.}

\printbibliography
 \printindex
\end{document}

Dans l'exemple suivant Beck Foop est indexé, mais pas Lise Foot.

Posée 28 Sep '17, 14:33

florentgio's gravatar image

florentgio
147511
Taux d'acceptation : 66%

Modifiée 29 Sep '17, 00:57

Pathe's gravatar image

Pathe ♦♦
7.4k28196245

2

Il suffit de supprimer and not test {\iffootnote}

(28 Sep '17, 23:01) touhami touhami's gravatar image

Merci pour cette réponse qui permet de retarder mon inexorable chute de cheveux: ça fonctionne parfaitement.

Il faudrait — et je ne sais pas le faire — ériger votre commentaire en réponse pour indiquer que le problème est résolu.

(29 Sep '17, 13:04) florentgio florentgio's gravatar image

Il suffit de supprimer and not test {\iffootnote} de

Ouvrir dans l'éditeur Overleaf
\renewbibmacro*{citeindex}{%
  \ifboolexpr{ test {\ifciteindex} and not test {\iffootnote} }
    {\indexnames{author}}{}}

MWE

Ouvrir dans l'éditeur Overleaf
\documentclass[a4paper,french]{article}

\begin{filecontents}{bib.bib}
@article{Foo2035,
  author = {Foop, Beck},
  journal = {Journal},
  year = {2010},
  title = {Title},
  doi = {doi},
}
@article{Foo2034,
  author = {Foot, Lise},
  journal = {Journal},
  year = {2010},
  title = {Title},
  doi = {doi},
}
}\end{filecontents}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\usepackage{textcomp}

\usepackage[backend=biber,
style=apa, 
indexing=cite,
sortlocale=fr_FR, 
maxnames=15,
]{biblatex}
\DeclareLanguageMapping{french}{french-apa}%La bibliographie est en APA français
\usepackage{apalike}%La bibliographie est en APA
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamelast}% La bibliographie est en français

\addbibresource{bib.bib}

\DeclareUnicodeCharacter{00A0}{ }

\usepackage[babel=true]{csquotes}

\usepackage[makeindex]{splitidx}
\renewbibmacro*{citeindex}{%
  \ifboolexpr{ test {\ifciteindex} }
    {\indexnames{author}}{}}
\makeindex

\usepackage{babel}

\begin{document}

\cite{Foo2035} pensait aux oiseaux quand il écrivait son livre\footnote{Comme le disait \textcite{Foo2034} les oiseaux sont importants.}

\printbibliography
 \printindex
\end{document}
Lien permanent

Publiée 29 Sep '17, 13:16

touhami's gravatar image

touhami
9.7k410
Taux d'acceptation : 51%

Modifiée 29 Sep '17, 13:16

Votre réponse
(dés)activer l'aperçu

Suivre cette question

Par courriel :

Une fois que vous serez enregistré, vous pourrez souscrire à n'importe quelle mise à jour ici

Par flux RSS :

Réponses

Réponses et commentaires

Bases de Markdown

  • *italique* ou _italique_
  • **gras** ou __gras__
  • Lien ::[texte](http://url.com/ "Titre ")
  • Image : ?![alt texte](/path/img.jpg "Titre ")
  • Liste numérotée : 1. Foo 2. Bar
  • Pour ajouter un passage à la ligne, ajoutez deux espaces à l'endroit où vous souhaitez que la ligne commence.
  • Les balises HTML de base sont également prises en charge.