[tex-live] Inclusion of large eps files with dvipdfm

Akira Kakuto kakuto at fsci.fuk.kindai.ac.jp
Fri Jun 22 16:19:53 CEST 2007


> > I would like to hear your opinions about the Ghostscript options that
> > should be used in dvipdfm(x)'s config file for inclusion of eps files.
> 
> dvipdfmx works substantially different and much better than dvipdfm. One
> should try to check if all these problems persist in dvipdfmx, and if
> not suggest to use this instead of ancient dvipdfm. If gs works in
> standard eps/crop mode it should be just right.

[related problem]
dvipdfm, as dvipdfmx, tries to include a MetaPost-made eps
directly without the help of Ghostscript.
However the output format of the new ( > 0.9 ) MetaPost
is changed. Thus dvipdfm fails to check that an eps is
made by MetaPost. The following are borrowed from dvipdfmx:

Best,
Akira

--- mpost.c.orig	Wed Jan 18 06:41:52 2006
+++ mpost.c	Fri Jun 22 20:19:31 2007
@@ -42,17 +42,21 @@
 
 int check_for_mp (FILE *image_file) 
 {
+  int i;
+  int n = 0;
   rewind (image_file);
   /* For now, this is an exact test that must be passed, character for
      character */
   mfgets (work_buffer, WORK_BUFFER_SIZE, image_file);
   if (strncmp (work_buffer, "%!PS", 4))
     return 0;
-  mfgets (work_buffer, WORK_BUFFER_SIZE, image_file);
-  if (strncmp (work_buffer, "%%BoundingBox", strlen("%%BoundingBox")))
-    return 0;
-  mfgets (work_buffer, WORK_BUFFER_SIZE, image_file);
-  if (strncmp (work_buffer, "%%Creator: MetaPost", strlen("%%Creator: MetaPost")))
+  for(i=0; i < 10; i++) {
+    mfgets (work_buffer, WORK_BUFFER_SIZE, image_file);
+    if(strncmp(work_buffer, "%%Creator: MetaPost", strlen("%%Creator: MetaPost"))
+               == 0)
+      n++;
+  }
+  if(n == 0)
     return 0;
   return 1;
 }


More information about the tex-live mailing list