shiblon / latex-makefile

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

BUILD-STRATEGY := latex / fails to make .ps file with vers. 2.2.1-alpha6 #152

Closed shiblon closed 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 139

I discovered this issue at the same time as another issue with vers. 2.2.1-alpha6,
(http://code.google.com/p/latex-makefile/issues/detail?id=138) -- not sure if they
are related or not.

This issue also appears with BUILD-STRATEGY := latex, and not pdflatex.  For this issue,
there is a very simple source file, my_latex.tex, and a .eps graphics file, foo.eps,
but this time, the 'draft' option is used, such as:
\documentclass[draft]{article}.

After the command: 'make my_latex', the .dvi file is built correctly, and the .dvi
file shows the bounding box of the .eps graphic as it is supposed to do.  Then, when
the .ps file is being built, make terminates with the error:

Makefile:2758: *** unterminated call to function `call': missing `)'.  Stop.

I checked the code in the Makefile after line 2758, and it appeared that all the parentheses
were balanced, so I'm puzzled!

Thank you very much!  For the time being, I am using 2.2.1-alpha6 for the first build
to get the nomenclature files right, then switch to 2.2.0 if I need to build a .ps
file.

-Chas

Reported by charles.hewgley4 on 2011-08-09 02:58:04

shiblon commented 8 years ago
Try the attached.  Change is r5e74159776e5 and builds on the change for issue 151 (so
it contains both fixes).

Reported by shiblon on 2011-08-09 16:31:52


shiblon commented 8 years ago
Still have a problem creating the .ps file, although I think I've narrowed it down to
a minor error with the dvips call.

After the command 'make my_latex', the .dvi file is still built correctly with the
graphic.  Then come some error messages:

= my_latex.dvi --> my_latex.ps =
This is dvips(k) 5.99 Copyright 2010 Radical Eye Software (www.radicaleye.com)
dvips: Missing DVI file argument (or -f).
dvips: Try --help for more information.
mv: cannot stat `my_latex.ps.temp': No such file or directory
= my_latex.ps --> my_latex.pdf =
rm my_latex.paper.make my_latex.embed.make my_latex.beamer.make

I took a look at the SHELL_DEBUG listing, and the call to dvips was:

dvips -z -o my_latex.ps.temp -t my_latex.dvi

Looks like that option -t (paper size) was either missing its argument, or perhaps
shouldn't be there at all.  The Makefile seems to put this in based on an if statement,
but I haven't figured out the details.  I manually invoked dvips and omitted the -t
option, and dvips then seemed to run fine.

Thanks again for all your work!
-Chas

Reported by charles.hewgley4 on 2011-08-10 04:44:06

shiblon commented 8 years ago
Aha.   Wow, it's amazing how code can rot over time when it isn't exercised (I never
personally use the latex strategy anymore, so it doesn't make me itch and I don't often
scratch it).

I believe that the attached will fix your issues.  Please let me know!

The change is in r20c78b7c435d in case you want to see the diff.

Reported by shiblon on 2011-08-10 13:46:54


shiblon commented 8 years ago
This last fix did the trick!  The postscript file is now built properly, and then the
.pdf is created from that as it should be.

I have started to use strategy "latex" a little more lately after I had an issue with
submitting papers to a conference website this summer.  The paper submission website
had an "Adobe document verifier" step, and it marked as failed the documents I was
trying to upload that had been compiled with pdflatex, but marked as passed documents
that had been done with dvips and then into pdf... not sure why, perhaps due to some
Adobe silliness... anyway, thanks again for your continued efforts!!

Reported by charles.hewgley4 on 2011-08-10 16:56:20

shiblon commented 8 years ago
So, the fix works!  I'll mark this as verified.

Regarding the adobe document verifier:

I had a similar issue with the adobe document verifier earlier this year.  I thought
I had fixed all of those issues, but obviously missed something.  I wonder if there
is a way that we can test the output against it?

The problem I was having was with embedded fonts, which I believe has been completely
resolved (I was able to submit my paper).  But, there may be other issues, and I'd
love to know about them so we can tackle them, as well.  Probably best in a separate
issue, though.

Is it something you can reproduce, or was it a one-time access thing?

Reported by shiblon on 2011-08-10 17:03:06

shiblon commented 8 years ago
Well, the submission site was called "ScholarOne Manuscript Central" but I had to log
in to that from the conference website -- it was an American Institute of Aeronautics
and Astronautics (AIAA) conference in May... I just now was poking around the AIAA
site, and they've shut down the manuscript site for conferences in the past, and looks
like the only way to try is to go through the whole conference paper submission process
for another conference.

I'm bound to submit another paper to an AIAA conference sometime again in the next
year -- next time I'll plan to try again uploading a .pdf produced with the Makefile
and pdflatex at that time, and file an issue and provide the example document if it
doesn't work.

The document I was uploading in May did use Times font instead of Computer Modern,
through \usepackage{mathptmx} and \usepackage[T1]{fontenc} for font encoding... not
sure if those might have been the source of problems...

Reported by charles.hewgley4 on 2011-08-10 18:19:59

shiblon commented 8 years ago
It may be that one of your included graphics was not embedding fonts when converting
to PDF.  That was my problem: gnuplot doesn't have a font embedding option for generating
pdf files, so I had to fiddle with the makefile to ensure that it rewrote the pdf with
embedding after graphic file creation.   Messy.

This is, in general, a problem with pdflatex - it just includes other pdfs that you
specify without looking at them.  The dvips pipeline, however, does not have this problem,
because font embedding is done after all of the postscript files have basically been
inlined into the main document.  Then we run ps2pdf (actually, I run gs directly with
a bunch of crazy parameters) and get global font embedding.

Either way - I'm not retiring the latex-dvi-ps-pdf pipeline, since it has many useful
features (psfrag, anyone?), so I'm thrilled that you're submitting bugs for the latex
build strategy.  :-)

Reported by shiblon on 2011-08-10 18:24:54