shiblon / latex-makefile

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

autogenerated files with eps extension are actually pdf files #154

Closed shiblon closed 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 141

I'm trying to track this down to be a good citizen. :)  I'm still looking into it, and
I'll post more information as I find it.  As things stand right now:

1) My Makefile.ini file has "BUILD_STRATEGY := latex".
2) If I run "make some_file.eps" from a gpi file, and then I run "file some_file.eps",
it reports that it's a "PDF document, version 1.5".
3) If I instead run "make SHELL_DEBUG=1 KEEP_TEMP=1 some_file.eps", I see that the
ps2pdf macro is getting run ("gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite ...").

I'll keep on looking, but now I'm starting to get into deep Make-infested waters. :)

Reported by amcnabb8 on 2011-09-29 20:25:16

shiblon commented 8 years ago
Oh, crap.

I think this has to do with a change I made to the gnuplot output to ensure that fonts
are embedded.  We just need to make sure that that doesn't get called when the default
graphic output is ps.  Shouldn't be too hard, but I'm traveling home from Switzerland
tomorrow, so I can't look at it immediately.

I'm sorry - what a nightmare.  Of course, if you're interested in digging a little
and finding the exact problem, that's also fine :)

Reported by shiblon@google.com on 2011-09-29 20:36:38

shiblon commented 8 years ago
What I don't get is how the following rule can get run with $@ set to a filename with
a .eps suffix:

%.pdf: %.ps %.embed.make

In my naive brain, the value of $@ would have to have a .pdf suffix for this rule to
apply. And this rule is the only place in the whole file where I see make-pdf being
used.

Reported by amcnabb8 on 2011-09-29 21:59:44

shiblon commented 8 years ago
Oh, I see that gs is _also_ getting called in gpi-embed-pdf-fonts, not just in make-pdf.
 I must be getting closer. :)

Reported by amcnabb8 on 2011-09-29 22:17:13

shiblon commented 8 years ago
Okay, I think the attached patch fixes it.  I've tested in both eps mode and pdf mode,
and I've confirmed that it only runs gs in the case of pdf mode.  It's only one line,
but it's always possible I didn't solve it in the way you would.  I think I have commit
access, but I won't use it unless you tell me to.

Reported by amcnabb8 on 2011-09-29 22:41:33


shiblon commented 8 years ago
You do have commit access.  For kicks and grins, go ahead and submit, then we can try
out the code review facilities in codesite.  It's easy to back it out or change it
later, and I won't cut a tarball until it's ready.  Fair enough?

Reported by shiblon on 2011-09-30 08:20:06

shiblon commented 8 years ago
While you're at it, can you fix the "success = 0" bug waiting to happen a couple of
lines below?  In shell, there shouldn't be spaces around the "=".  My bad, and we might
as well fix it in this patch.

Reported by shiblon on 2011-09-30 08:27:50

shiblon commented 8 years ago
The instructions only talk about how to do code reviews with Subversion, and in a short
search, I wasn't able to find any information about whether there's support for Mercurial.
 I guess I'll just push for now, and we'll see what happens.

Reported by amcnabb8 on 2011-09-30 15:28:08

shiblon commented 8 years ago

Reported by shiblon on 2011-10-04 20:18:47