shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
185 stars 30 forks source link

Problem while including a non existing eps file #143

Closed shiblon closed 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 130

When I try to compile a latex file with a comand includegraphics for an eps file that
doesn't exist, it display the following message:
-------------------------------------------
NOTE: You may ignore warnings about the following files:

     bug.d

Makefile:2556: bug.d: Aucun fichier ou dossier de ce type
= bug.tex --> bug.d bug.dvi.1st.make (0-1) =
bug.d:10: *** séparateur manquant . Arrêt.
-------------------------------------------
And the line 10 in the file is :
-------------------------------------------
tmp.eps' not found. See the LaTeX manual or LaTeX Companion for explanation. Type H
<return> for immediate help. ... l.6 \includegraphics{tmp.eps} Try typing <return>
to proceed. If that doesn't work, type X <return> to quit.
-------------------------------------------
I think that the Makefile should display the latex error message instead, shouldn't
it ?

Thanks anyway for the Makefile. It's brilliant!

Reported by etienne.michon on 2011-05-19 17:59:29


shiblon commented 8 years ago
You are using a slightly old version of the makefile. Can you try the most recent alpha
version and see if that fixes the problem?  This looks familiar to me :)

Reported by shiblon on 2011-05-19 18:05:41

shiblon commented 8 years ago
Indeed, I've another error message:
---------------------
NOTE: You may ignore warnings about the following files:

     bug.d

Makefile:2621: bug.d: Aucun fichier ou dossier de ce type
= bug.tex --> bug.d bug.dvi.1st.make (0-1) =
make: *** Pas de règle pour fabriquer la cible « tmp », nécessaire pour « bug.d ».
Arrêt.
---------------------

Reported by etienne.michon on 2011-05-19 18:11:42

shiblon commented 8 years ago
Aha.  Weird that it didn't give you the proper message.  You should try removing the
.eps from the file name:

\includegraphics{tmp}

I'll look at the errors, but that's what's going on, essentially.  pdflatex doesn't
understand .eps files, and that's what the 2.2 makefile defaults to using.

Meanwhile, I'm accepting this issue, since there is definitely a reporting problem
of some kind.  I'll look into that.

Reported by shiblon on 2011-05-19 19:53:55

shiblon commented 8 years ago
I know that pdflatex doesn't understand eps file but I changed the Makefile to assigned
the value "latex" to the "BUILD_STRATEGY" variable. 

I tried to remove the ".eps" from the filename but it didn't changed anything...

I hope you'll find a solution ;)

Reported by etienne.michon on 2011-05-19 20:08:39

shiblon commented 8 years ago
Ah, okay.  I see.  I'll create a Makefile.ini with that setting and test it against
your example to see what I can do.

Reported by shiblon@google.com on 2011-05-20 18:11:14

shiblon commented 8 years ago
Aha.  I see what's going on.

I am not at all confident that this is something that I can "fix" inside of the makefile.
 Here's what's happening:

- latex runs to generate dependencies, notices that "tmp.eps" is not found, and is
a graphic.  No problem, graphics can be created by source files.  The dependency is
inserted in to the bug.d file.

- Make then restarts, since it depends on bug.d and it has changed.  It loads that,
finds that it depends on tmp.eps, and bails because it can't find any rules to generate
that missing file.

Since this is make doing it, I'm not sure I can output the latex log for it.  The error
message isn't really unclear, but it is jarring when you're used to the nice formatting
:)

The message that "make" gives me is this:

make: *** No rule to make target `tmp', needed by `bug.d'.  Stop.

That seems like a reasonable error to me, so I'll mark this as wontfix (working as
intended).  Feel free to reopen if you disagree. :-)

Reported by shiblon on 2011-05-20 18:43:30