yochju / latex-makefile

Automatically exported from code.google.com/p/latex-makefile
Other
0 stars 0 forks source link

Broken support for eps.gz files #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Chris,

Makefile version 2.2.0-rc15 doesn't compile a document from sources containing 
gzip'ed eps files:
------------------------------------------------------------------
bash-3.2$ make -f Makefile.2.2.0-rc15
NOTE: You may ignore warnings about the following files:

     foo.d

Makefile.2.2.0-rc15:2554: foo.d: No such file or directory
= foo.tex --> foo.d foo.dvi.1st.make (0-1) =
make: stat: bar.eps'\ not\ found.\ See\ the\ LaTeX\ manual\ or\ LaTeX\ 
Companion\ for\ explanation.\ Type\ H\ <return>\ for\ immediate\ help.\ ...\ 
l.8\ \includegraphics[width=\textwidth]{bar.eps}\ Try\ typing\ <return>\ to\ 
proceed.\ If\ that\ doesn't\ work,\ type\ X\ <return>\ to\ quit.\ .gpi.d: File 
name too long
make: *** No rule to make target `bar.eps'\\\', needed by `foo.d'.  Stop.
------------------------------------------------------------------

Source files and output files are attached.

System:
------------
bash-3.2$ uname -a
Linux optimus.lexas 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 
x86_64 x86_64 GNU/Linux

Regards,
Slavik

Original issue reported on code.google.com by viatches...@gmail.com on 26 Apr 2011 at 7:29

Attachments:

GoogleCodeExporter commented 9 years ago
OK - a couple of things that I noticed right away:

1) In 2.2.x, pdflatex is the default, so .eps files are *not understood*.  You 
can't \includegraphics{something.eps}.  Instead, do \includegraphics{something} 
 (no extension, will assume things like pdf, jpg, etc.) and pdflatex will try 
to find something.pdf, which the makefile knows how to build from 
something.eps.gz.

2) There is a log parsing bug, and I'm going to fix that.  However, in this 
case the outcome will be an error that you are missing a file, not a working 
compilation.

I'll post again here when it's fixed.  Meanwhile, try the bare include (no .eps 
extension).

Original comment by shiblon on 27 Apr 2011 at 1:41

GoogleCodeExporter commented 9 years ago
Whoops - I just noticed that you are using the latex BUILD_STRATEGY setting.  
So, ignore what I said about bare includes (although those really ought to 
work.  Sigh).

Original comment by shiblon on 27 Apr 2011 at 1:45

GoogleCodeExporter commented 9 years ago
Give the attached a whirl and let me know if it fixes your issue (it works on 
my system).  Then I'll upload this new fix.

You should still be able to compile specifying the .eps extension, but you can 
also remove it, which will make you more forward compatible with pdflatex, 
should you choose to use it later.

The changes are in re48a3da39295 if you want to have a look.

Original comment by shiblon on 27 Apr 2011 at 2:56

Attachments:

GoogleCodeExporter commented 9 years ago
That was quick! Thank you for the fix.

I compiled the source files successfully with BUILD_STRATEGY=latex and the eps 
extension in the \includegraphics command.
If the extension is removed and I still have BUILD_STRATEGY=latex, compilation 
fails:
-----------------------------------------------------------
bash-3.2$ make
NOTE: You may ignore warnings about the following files:

     foo.d

Makefile:2597: foo.d: No such file or directory
= foo.tex --> foo.d foo.dvi.1st.make (0-1) =
make: *** No rule to make target `bar.eps.bb', needed by `foo.d'.  Stop.
-----------------------------------------------------------
I don't consider it a problem, though. The extension of the included file 
simply can be adjusted according to the value of BUILD_STRATEGY.

I tried the new version of the Makefile with the beamer style and the 
compilation failed. I probably should have started a new issue on the 
tracker... Anyways, the source files and the log file are attached. Although 
make fails to build the beamer document, typing "make" twice does the job.

Thanks!

Original comment by viatches...@gmail.com on 27 Apr 2011 at 4:16

Attachments:

GoogleCodeExporter commented 9 years ago
Changing status to "Started" to continue working on this.

I was able to get a bounding box created by doing the following, by the way 
(you can try this in your Makefile.ini if you're feeling brave):

%.eps.bb: %.eps
        sed -e '/^%%EndComments/{' -e 'd' -e 'q' -e '}' -e '/^%%/p' -e 'd' $< > $@

I'm not at all sure about the beamer issue.   I'll look into that.

Original comment by shiblon on 27 Apr 2011 at 6:39

GoogleCodeExporter commented 9 years ago
Thank you, the trick with "%.eps.bb: %.eps" rule in Makefile.ini works!

Original comment by viatches...@gmail.com on 27 Apr 2011 at 7:57

GoogleCodeExporter commented 9 years ago
I have added the eps.bb trick to the makefile, now.  I am currently looking at 
the beamer problem.

Original comment by shiblon on 9 May 2011 at 8:43

GoogleCodeExporter commented 9 years ago
OK - I looked at your make output (for beamer), and it appears that there is 
something amiss in your source file.  I can't really tell from looking at that 
output, though.

Would you mind terribly if I closed this and we opened another issue for the 
beamer stuff?  We can then attach logs, etc. there and the confusion will be a 
little less.  :-)

Original comment by shiblon on 9 May 2011 at 8:44

GoogleCodeExporter commented 9 years ago
Sure, lets close this issue and I will open a new beamer-related.

Original comment by viatches...@gmail.com on 9 May 2011 at 8:54