Error in latex and cant open the PDF

  • Context: LaTeX 
  • Thread starter Thread starter farbodf
  • Start date Start date
  • Tags Tags
    Error Latex Pdf
Click For Summary
SUMMARY

The discussion addresses an error encountered while compiling a LaTeX document using MiKTeX 2.9, specifically the inability to locate the index file, which prevents the generation of a PDF. The solution involves ensuring the inclusion of the \makeindex command before the \begin{document} line in the .tex file. Users must also run LaTeX to create the .idx file, followed by executing makeindex to generate the .ind file. Finally, running LaTeX again will produce the complete document with the index.

PREREQUISITES
  • Familiarity with LaTeX document preparation
  • Understanding of MiKTeX 2.9 installation and usage
  • Knowledge of the \usepackage{makeidx} command
  • Basic command line operations for running LaTeX and makeindex
NEXT STEPS
  • Learn how to properly configure LaTeX documents for indexing
  • Research the usage of the makeindex tool in LaTeX
  • Explore advanced LaTeX packages for document management
  • Investigate troubleshooting common LaTeX compilation errors
USEFUL FOR

This discussion is beneficial for LaTeX users, document authors, and researchers who need to compile documents with indexes, particularly those using MiKTeX for their LaTeX processing.

farbodf
Messages
1
Reaction score
0
when i want to compile this error appear and it cannot open the PDF



could't find input index file: C:\users\farbod\Desktop\1f\1f\PAPER L nor C:\Users\farbod\Desktop\1f\1f\PAPER L.idx.Usage: C:\Program Files (x86)\MiKTeX
2.9\miktex\bin\makeindex.exe [-ilqrcgLT] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...]
 
Physics news on Phys.org
farbodf said:
when i want to compile this error appear and it cannot open the PDF



could't find input index file: C:\users\farbod\Desktop\1f\1f\PAPER L nor C:\Users\farbod\Desktop\1f\1f\PAPER L.idx.Usage: C:\Program Files (x86)\MiKTeX
2.9\miktex\bin\makeindex.exe [-ilqrcgLT] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...]

This is a PDF file you have created or downloaded? Are you using Acrobat or some other program?
 
I guess the paper includes an index, but you don't have the index file, so you need to create it.

If your .tex file contains
Code:
\usepackage{makeidx}
add the line
Code:
\makeindex
Just BEFORE the \begin{document}.
You may find the makeindex line is in the file but commented out with a %.

Yes, I do mean put \makeindex BEFORE \begin{document}. If you put it AFTER \begin{document}, it won't work.

Then run LaTeX again and it should create the .idx file.
Then run makeindex to make the index. That should create a .ind file
Then run LaTeX agan to create the paper and the index.

Actually, it's OK to leave the "makeindex" line in the .tex file all the time, but it means you re-create the index file every time you run the code through LaTeX, and that wastes time if you are working with a big .tex file.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 2 ·
Replies
2
Views
5K