1
This is my problem: I have two indexes which don't appear, nor in the TOC, nor in the end of my document when I compile my file. My MWE:
\documentclass{book}

    \usepackage{hyperref}
\usepackage[numberedbib,nosectionbib]{apacite}
\usepackage[makeindex]{imakeidx}
\makeindex[name=npr, title=Index des noms cités] 
\makeindex[name=mat, title=Index des matières]

\begin{filecontents}{mybib.bib}
@book{Tufte2002,
 author = {Tufte, Blabla},
 year = {2002},
 title = {A title},

}
\end{filecontents}

\begin{document}

\cite{Tufte2002} \index[npr]{Tufte}\index[mat]{Data}

    \bibnewpage 
{%start grouping
  \doublespacing % <====================================================
  \raggedright 
  \nocite{}
  \bibliographystyle{apacite} 
    \bibliography{mabibliocrc}
}%end grouping

\phantomsection
\cleardoublepage
\printindex[npr] 
\addcontentsline{toc}{chapter}{Index des noms cités}
\printindex[mat]
\addcontentsline{toc}{chapter}{Index des matières}

\end{document}
domi
  • 1,473
  • 1
    Please first of all to never ignore compilation errors. Are you by any chance using overleaf? The command \doublespacing is not defined by default. Removing it makes the example compile for me and it seems to make the two indices. – daleif Apr 04 '21 at 16:54
  • I don't use Overleaf. And removing \doublespacing does not change anything. – domi Apr 04 '21 at 17:06
  • 1
    Then please explain how you compile this example. Which latex installation, which editor. Do you get any errors? Preferably provide the log from a compilation on your side of this exact MWE (with \doublespacing removed) – daleif Apr 04 '21 at 17:15
  • I use Mac Tex 2021 on Mac Os Big Sur with Texpad. This is what I get after compiling: "LaTeX Warning: Citation `Tufte2002' undefined on input line 22. " – domi Apr 04 '21 at 17:43
  • 1
    Please post the log file, don't trust what ever filtered log the editor gives you. When I look in my log after running pdflatex it explicitly states that it is running makeindex as a part of the compilation. – daleif Apr 04 '21 at 17:50
  • I have no problem compiling if I remove \doublespacing and change the bibliography to use mybib.bib. I compile using pdflatex, bibtex, makeindex npr.idx, makeindex mat.idx and finally two runs of pdflatex. – Herb Schulz Apr 04 '21 at 19:34
  • Obviously, it works with TexShop, but not using Texpad. – domi Apr 05 '21 at 08:58
  • 1
    Add \usepackage{setspace} and correct to \bibliography{mybib.bib}. Works fine with pdflatex and lualatex. So the problem lies in the TeXtpad configuration. Could you do the multiple runs required from the command line? – Simon Dispa Apr 05 '21 at 13:21
  • @SimonDispa: setspace is already set. I don't know why, but now it works as usual. Is the message I sent today to the support team for anything in that? Whatever, I won't have to change of text editor! – domi Apr 05 '21 at 14:27

0 Answers0