1

\includegraphics is not working with texlive. The minimal code included in the file "test.tex" is the following

\documentclass[]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\begin{document}
\includegraphics{electro1.eps}
\end{document}

(electro1.eps is present in the directory).

Compiling the file "test.tex" I get the error

$latex test.tex 
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14> (./article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (./inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def
(/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.dfu))) (./graphicx.sty
(./keyval.sty) (./graphics.sty (./trig.sty) (./graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def)))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
(./test.aux))
Runaway argument?
"electro1.eps" \edef \Gin@ext {\Gin@sepdefault \filename@ext }\ifx \Gin@ext \ET
C.
! File ended while scanning use of \@tempa.
<inserted text> 
                \par 
<*> test.tex
            
?

The log file does not give more information.

I have purged all the texlive installation and reinstalled it but nothing changes.

I am running Linux Mint 20 Ulyana with Linux 5.4.0-48-generic kernel. The texlive-base version is 2019.20200218-1.

Help greatly appreciated!

3
  • Why aris inputinc, graphicx, key-val, graphics etc coming from the same folder? Please test in a folder which nly contains your tex file and the eps such that you're using the package versions from your installation
    – daleif
    Oct 31 '20 at 12:15
  • You're right! These .sty files were already in the folder I was using (I uploaded it from a colleague). I was messing up different versions of latex. Thanks!
    – Bruno
    Oct 31 '20 at 12:22
  • And now you know another tool to use for debugging things like this.
    – daleif
    Oct 31 '20 at 12:23
0

Latex first creates a dvi and then pdf file. This does not work with include graphics. One has to set compile command to pdf chain or pdflatex. Please try this, it works for me:

\begin{figure}
    \input{sin.tex}
    \includegraphics[width=0.4\textwidth]{r.jpg}
    \includegraphics[scale=0.5]{circle.eps}
\end{figure}

You can remove sin.tex and r.jpg from the list

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.