Error in latex and cant open the PDF

In summary, there was an error in compiling the PDF as the index file could not be found. The solution is to add the line \makeindex before \begin{document} and then run makeindex to create the index file. It is recommended to leave the "makeindex" line in the .tex file to save time when working with a large file.
  • #1
farbodf
1
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
  • #2
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?
 
  • #3
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.
 

What does "Error in latex and cant open the PDF" mean?

This error message indicates that there was a problem with compiling a latex document, resulting in a PDF file that cannot be opened.

What are some common causes of this error?

The error can be caused by various issues such as missing packages or files, incorrect formatting or syntax, or conflicts between different latex packages.

How can I troubleshoot this error?

The first step is to check the log file generated during the compilation process for any specific error messages. It is also helpful to review the latex code for any potential errors or missing components.

How can I fix this error?

The solution will depend on the specific cause of the error. It may involve installing missing packages, correcting formatting or syntax errors, or finding alternative ways to achieve the desired result.

Is there a way to prevent this error from occurring?

To prevent this error, it is important to carefully review and test latex code before compiling. Keeping packages and files up-to-date and avoiding conflicting packages can also help avoid this error.

Similar threads

  • Programming and Computer Science
Replies
2
Views
5K
Back
Top