0

I've configured Texmaker to create the auxiliary files in the \build subfolder. Everything is working fine, except for the index... while compiling the .tex file, the console says:

Process started    
Input index file FILE.idx not found. Usage: makeindex [-ilqrcg] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...]    
system returned with code 1

And of course the index is not being generated in the output .PDF file. I've also added the \build prefix to the "Makeindex" field in the configuration panel of Texmaker (as suggested by Texmaker itself), as you can see in the image below, but it's still not working.

Texmaker configuration

Is there any solution that does not require to manually move the .IDX file from the \build folder to the main folder in order to properly read the index?

Thank you in advance.

  • 1
    I never use a build folder. There is always some tool that don't find its input files. Life is much easier if you leave the files in the current folder. – Ulrike Fischer Feb 04 '23 at 22:32
  • I used a build folder because I need to keep the main folder clean, and because the output .PDF file si larger than 100 MB and it is not possible to upload it to Github (I'm working on a project in collaboration with other people), so I have to manually delete the PDF each time I have to do a commit. Life would be much easier if everything stayed in the build folder... – Trial4life Feb 04 '23 at 22:41
  • 1
    I know that you are doing it "to keep the folder clean". Every week someone ask a question about non-working build folders. But for git there are .gitignore files, or you can use l3build to move everything to a build folder and compile there. That's how the latex documentation in the latex github is build. see e.g. https://tex.stackexchange.com/a/673007/2388 for the previous question ... – Ulrike Fischer Feb 04 '23 at 22:57
  • Just an oddity between screenshot and question text. In the screenshot it says build/%.idx (linux pathway), yet in the text \build (windows pathway) is used. Do you compile in a Linux OS or in a Microsoft OS? They use slash respectively backslash to denote directory pathways. – alchemist Feb 05 '23 at 07:07
  • 1
    Just installed TeXMaker 5.1.3 and did a small test. In the configuration windows it doesn't matter whether you use a slash or backslash to denote a directory path. TeXMaker adapts that to the OS its installed on. Following your question line, I could use the \build folder on my Windows 11 / MikTeX configuration compiling PDFLatex > Makeindex > PDFLatex. The PDF contained the index as required and all files except the .tex were contained in the \buikd folder. – alchemist Feb 05 '23 at 07:54
  • I used the imakeidx package to test your issue. If you don't use that, can you try switching to that package to make your index? – alchemist Feb 05 '23 at 07:56
  • It's still not working properly. I've tryed with both makeindex build/%.idx and makeindex build\%.idx, with no results. I forgot to say that I have two indexes in the document. The first index is the default one, and the other is named "locs". If I press F12 to run makeindex, Texmaker is able to read the main index with both of the configuration (slash or backslash), but in the console Texmaker shows that only the main index is being updated, while it isn't even searching for the locs index.

    While compiling the document though, the console gives error for both of the indexes.

    – Trial4life Feb 05 '23 at 11:01
  • I'm already using imakeidx package. At this point probably the cause of the bug are the multiple indexes. Is it possible to manually specify the location where Texmaker should search for the indexes? – Trial4life Feb 05 '23 at 11:04
  • Okay probably I'm getting closer: I've set Texmaker to run custom commands when compiling. This is what I've input in the confuguration settings: pdflatex -synctex=1 -interaction=nonstopmode %.tex|makeindex build/%.idx|makeindex build/locs.idx|pdflatex -synctex=1 -interaction=nonstopmode %.tex

    It seems to be working (indexes are being read, and do appear in the PDF), however the compiling time is now doubled than with the default compiling options.

    Maybe I should omit the first pdflatex command? In the default configuration, what commands are being launched, amd in which order?

    – Trial4life Feb 05 '23 at 12:51
  • if you use imakeidx and let it call makeindex you should change the options in the package / document to either use the correct path, or not to call makeindex (if your texmaker profile is doing it). It is the same problem as with the biblatex question I linked too: the editor configuration is not the only thing one has to adapt. Packages call tools to and can get confused if you change the default path. – Ulrike Fischer Feb 05 '23 at 13:55
  • Could you tell me where do I have to add the correct path? Where do I find these options in the package / document? – Trial4life Feb 05 '23 at 18:11

0 Answers0