I'm writing a text and everything was fine but today two files named "Main.out.ps" and "Main.dvi" appeared in my main folder. My problem is that in the Main.pdf my images that I inserted using \ includegraphics disappeared.

I suspect the two files you mention have something to do with it. Since it is my thesis I am using a lot of packages, and I don't know if any package does not allow \graphicx to work correctly.

Im using this:

\usepackage{lipsum} % Lorem Ipsum dummy text
\usepackage[top=1in, left=1.25in, right=1.25in, bottom=1in]{geometry} % Tamaño de papel y margen
\titleformat{\chapter} % Config titlesec
    {\Large\bfseries}   % 
    {\huge \thechapter} % 
    {20pt}              % 
    {\huge}             % 
\usepackage[es-tabla,es-nodecimaldot]{babel} \usepackage{amsmath}
\usepackage{ifthen} % \if \then \else

Is is possible that one of these packages prevents \graphicx from working well?

! LaTeX Error: File `fig2' not found.See the LaTeX manual or LaTeX Companion for explanation.Type H for immediate help.... \includegraphics{fig2}

The message says this, but the image called fig2 is in the folder

  • 2
    Welcome to tex.sx! Could you add more details, please? It is probable that you have simply changed the compilation output from PDF into PostScript, but we may only guess... Commented Dec 23, 2021 at 0:45
  • 1
    a .dvi file is the output from latex, to get pdf you were probably using pdflatex. In either case included graphics will not simply disappear with no warning, you should show any messages from the log file Commented Dec 23, 2021 at 1:19
  • Not related but you have loaded babel twice. In addition a good idea is try to create a Minimal Working Example that shows your problem Commented Dec 29, 2021 at 1:40

1 Answer 1


Investigating a bit on the subject it seems that the problem was with the operating system (linux), I moved the project to overleaf and it compiled perfectly

  • 1
    That makes no sense as overleaf is also using Linux. 9lus overleaf uses pdflatex by default
    – daleif
    Commented Jan 5, 2022 at 6:49
  • I can not find another explanation, I ran it on another machine with texmaker on Windows and also compiled. I see many choose to copy paste the code into a new .tex, in my case I moved to overleaf. Commented Jan 5, 2022 at 7:07
  • Then it is important to know exactly what latex you installed. Plus noone uses PS or dvi anymore
    – daleif
    Commented Jan 5, 2022 at 7:08
  • 1
    Sounds like a possible path an/or permissions issue. Check your logs.
    – Ingmar
    Commented Jan 5, 2022 at 8:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .