Package: xfig
Version: 1:3.2.5-rel-2
2008/5/22 Loïc Grenié <[EMAIL PROTECTED]>:
Hi,
I find pspdftex a very useful export option for Xfig. Unfortunately it
does not work for me because it does not take into account
the "special" flag for text. I've followed the code flow and I think the
reason is that the languages used for the "ps" and "pdf" part
are respectively "eps" and "pdf" while they should be "pstex"
and "pdftex".
I've found that this patch helps (me) a lot because it uses "pstex"
and "pdftex" instead of "eps" and "pdf". In addition I've done some
minor code cleanup. Looking at earlier bug fixes of xfig, I understand
that adding a "-b 0" option to the fig2dev commands might be useful,
but I don't know.
I took the liberty to write to B. V. Smith directly about this bug
including the attached patch.
Thank you,
Loïc Grenié
diff -u xfig-3.2.5-rel.orig/u_print.c xfig-3.2.5-rel/u_print.c
--- xfig-3.2.5-rel.orig/u_print.c 2006-02-24 21:18:11.000000000 +0100
+++ xfig-3.2.5-rel/u_print.c 2008-05-22 16:57:31.000000000 +0200
@@ -228,7 +228,9 @@
real_lang = "eps";
/* if lang is pspdf, call first with just "eps" */
- if (!strncmp(lang, "pspdf", 5))
+ if (!strncmp(lang, "pspdftex", 8))
+ real_lang = "pstex";
+ else if (!strncmp(lang, "pspdf", 5))
real_lang = "eps";
/* if binary CGM, real language is cgm */
@@ -334,7 +336,7 @@
strcat(prcmd, tmpcmd);
} else if (!strcmp(lang,"pspdftex")) {
/* first generate postscript then PDF. */
- sprintf(tmpcmd, "-n %s", outfile);
+ sprintf(tmpcmd, "-n %s", name);
strcat(prcmd, tmpcmd);
if (backgrnd[0]) {
@@ -349,15 +351,14 @@
strcat(prcmd,tmp_name);
/* make it suitable for pstex. */
- strsub(prcmd,"pspdftex","pstex",tmpcmd,0);
+ strcpy(tmpcmd, prcmd);
strcat(tmpcmd,".eps");
(void) exec_prcmd(tmpcmd, "EXPORT of PostScript part");
/* make it suitable for pdftex. */
- strsub(prcmd,"eps","pdf",tmpcmd,0);
- strsub(tmpcmd,"pspdftex","pdftex",prcmd,0);
- strcat(prcmd,".pdf");
- (void) exec_prcmd(prcmd, "EXPORT of PDF part");
+ strsub(prcmd,"pstex","pdftex",tmpcmd,0);
+ strcat(tmpcmd,".pdf");
+ (void) exec_prcmd(tmpcmd, "EXPORT of PDF part");
/* and then the tex code. */
#ifdef I18N
diff -u xfig-3.2.5-rel.orig/w_library.c xfig-3.2.5-rel/w_library.c
--- xfig-3.2.5-rel.orig/w_library.c 2006-04-03 18:27:30.000000000 +0200
+++ xfig-3.2.5-rel/w_library.c 2008-05-22 14:52:52.000000000 +0200
@@ -1029,6 +1029,7 @@
Widget menu, entry;
#ifndef XAW3D1_5E
Widget submenu;
+#else
char submenu_name[200];
#endif /* XAW3D1_5E */
char menu_name[200];