[XeTeX] PSTricks and XeTeX in MiKTeX2.7

Akira Kakuto kakuto at fuk.kindai.ac.jp
Tue May 6 04:54:24 CEST 2008


> Has anyone been able to use pstrick in XeTeX in MiKTeX 2.7?
> If the answers is yes, then can you please state the instructions that you
> used to do it?

(1) Backslash as a directory separator will be a cause of the
    problem. Please try the following changes.
(2) The Ghostscript option -dSAFER in dvipdfmx.cfg may not allow
    to run a file with full path. If this is the case, erase the
    option -dSAFER.

Best,
Akira
 
--- pdfximage.c.orig	Fri Mar 07 19:11:26 2008
+++ pdfximage.c	Tue May 06 11:30:19 2008
@@ -866,7 +866,17 @@
     MESG("pdf_image>>   %s\n", distiller_template);
     MESG("pdf_image>> ...");
   }
-
+#ifdef MIKTEX
+  {
+    char *p;
+    for (p = (char *)filename; *p; p++) {
+      if (*p == '\\') *p = '/';
+    }
+    for (p = (char *)temp; *p; p++) {
+      if (*p == '\\') *p = '/';
+    }
+  }
+#endif
   error = dpx_file_apply_filter(distiller_template, filename, temp);
   if (error) {
     WARN("Image format conversion for \"%s\" failed...", filename);
--- spc_dvips.c.orig	Tue Apr 01 21:06:52 2008
+++ spc_dvips.c	Tue May 06 11:35:50 2008
@@ -537,7 +537,17 @@
     gs_in = 0;
     return  -1;
   }
-
+#ifdef MIKTEX
+  {
+    char *p;
+    for (p = (char *)gs_in; *p; p++) {
+      if (*p == '\\') *p = '/';
+    }
+    for (p = (char *)gs_out; *p; p++) {
+      if (*p == '\\') *p = '/';
+    }
+  }
+#endif
   error = dpx_file_apply_filter(distiller_template, gs_in, gs_out);
   if (error) {
     WARN("Image format conversion for PSTricks failed.");
@@ -614,7 +624,17 @@
       gs_in = 0;
       return  -1;
     }
-
+#ifdef MIKTEX
+    {
+      char *p;
+      for (p = (char *)gs_in; *p; p++) {
+        if (*p == '\\') *p = '/';
+      }
+      for (p = (char *)gs_out; *p; p++) {
+        if (*p == '\\') *p = '/';
+      }
+    }
+#endif
     error = dpx_file_apply_filter(distiller_template, gs_in, gs_out);
     if (error) {
       WARN("Image format conversion for PSTricks failed.");


More information about the XeTeX mailing list