yochju / latex-makefile

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

Support for png2eps #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi.

Since we stick to the dvi->ps->pdf production chain, we need a way to
include 'non-eps' image files. I found out the png2eps
(http://www.henlich.de/png2eps) script which works very fine for me. I thus
added a png->eps automatic convertion in the Makefile (very simple !).

The issue I see is that png2eps is depending on several other packages,
which are less standard than, for example, fig2dev is.

This hack definitly helps me producing pdf files from latex since I can
include png files with on-the-fly convertion.

Cheers,
Thomas 

Original issue reported on code.google.com by lavergne...@gmail.com on 17 Mar 2009 at 10:50

Attachments:

GoogleCodeExporter commented 9 years ago
Hi. That's not a defect but an 'enhancement'. Turns out I do not know how to use
Google's issue tracking system :-/

Original comment by lavergne...@gmail.com on 17 Mar 2009 at 10:51

GoogleCodeExporter commented 9 years ago
This is a nice, simple, clean patch.  I wonder if you've ever tried ImageMagick,
though?  You can just call "convert myfile.png myfile.eps" and it works.  
ImageMagick
is a very standard set of tools on *nix, so it might be a bit more palatable to
include that instead.

Thoughts?  It's certainly worth trying on your end, if you don't mind. 
Alternatively, if you can send me a png and a corresponding eps, I can do a 
little
checking to verify that the quality is equally good with ImageMagick.

Original comment by shiblon on 18 Mar 2009 at 10:52

GoogleCodeExporter commented 9 years ago
I have never been convinced by the imagemagigk convertion to eps. But that is 
correct
I never tried and tweak the flags. I attach 3 files to this comment: mk.png is 
the
original PNG file and 2 eps files that were obtained, one with png2eps.sh and 
the
other via imagemagick's convert. I clearly prefer the one from png2eps... 

Original comment by lavergne...@gmail.com on 19 Mar 2009 at 12:09

Attachments:

GoogleCodeExporter commented 9 years ago
I have created an alternative patch that does the right thing without requiring 
both
NetPBM *and* the shell script png2eps to be installed (the only requirement now 
is
NetPBM).  You are right about the image quality - I couldn't get ImageMagick to 
do
anything that looked good, but going through NetPBM made very pretty output 
(which is
what png2eps.sh does anyway).

The new functionality is available in r49 - see the diff between r48 and r49 for
details on how I did it (the real patch includes documentation, fixes for 
detecting
files to be cleaned when .png files are around, the use of several NetPBM steps 
to do
the conversion, and proper handling of grayscale conversion when requested).

This should be available in version 2.1.25 when the package is uploaded - check 
the
main page for that soon!

Original comment by shiblon on 27 Mar 2009 at 1:26

GoogleCodeExporter commented 9 years ago
If this actually works for you, would you mind letting me know?  Marking the 
issue
"Verified" would do that, too :)

Original comment by shiblon on 5 May 2009 at 1:30

GoogleCodeExporter commented 9 years ago
I did give it a try and it did work. Good job.

The size of the eps file was not the same as the one from the original 
png2eps.sh but
that is not a big issue, I just had to adapt some LaTeX margins. I do not know 
how to
turn this issue to "Verified".

Cheers

Original comment by lavergne...@gmail.com on 6 May 2009 at 7:19

GoogleCodeExporter commented 9 years ago
(once you enter a comment, there's a status field that shows up below - 
clicking on
it gives you "verified" as an option, among others - I'll do it after I'm 
convinced
that it's really fixed)

So, this isn't really fixed yet if you're still having issues.  I'm reopening 
the
issue as "Started".

What kinds of size problems are you having?  What LaTeX command are you using to
include the images?

Original comment by shiblon on 6 May 2009 at 3:36

GoogleCodeExporter commented 9 years ago
Marking "Verified", since no further problems were reported.

Original comment by shiblon on 19 Nov 2009 at 6:44

GoogleCodeExporter commented 9 years ago
This embedded png2eps simply rocks and is the main feature enabling me to use 
your
Makefile in my documents. Thanks!

Original comment by lavergne...@gmail.com on 19 Nov 2009 at 8:05

GoogleCodeExporter commented 9 years ago
Kind words - thanks!   I'm glad it worked out for you.

Original comment by shiblon on 19 Nov 2009 at 8:07