merge 288774 336069
tags 288774 + confirmed patch pending
thanks

On Wed, 05 Jan 2005, Gilles Siu wrote:

> Package: transfig
> Version: 3.2.5-alpha5-2

> When I try to generate ps/latex combined files (.pstex and .pstex_t
> files), text with "special" flag containing math symbols (for
> instance $\pi$) change into "mn$\pi$" (formatted in latex). In fact,
> the .pstex_t file is different from outputs of previous versions
> (see the .dvi file). Basically, there is a lack of some headers.

> I am using Debian GNU/Linux 3.1, kernel 2.6.5 (independent from the kernel 
> version). And it works correctly with Debian GNU/Linux 3.0.

On Thu, 27 Oct 2005, Bernhard R. Link wrote:

> Package: transfig
> Version: 1:3.2.5-alpha5-2
> Severity: normal
> 
> And .pstex_t file generated by xfig contains code
> like:
> 
> \begingroup\makeatletter\ifx\SetFigFont\undefined%%
> \gdef\SetFigFont#1#2#3#4#5{%%
> 
> While woody's version (and looking into sarge's fig2dev binary
> perhaps also this under some circumstances) emits a definition
> of SetFigFont with fewer arguments.
> 
> Thus a LaTeX file including two different of those variant
> will give very funny results, because it will use the
> old variant definition.
> 
> I think it should really either redefine it or at
> change its name whenever the content of that definition changes.

Thank you both for the bug reports and the great explanation of this
bug.  I still don't understand why the woody version creates the non
NFSS version of SetFigFont, but tried it out myself on a woody system
and can reproduce this problem here.

So I created a little patch, which renames \SetFigFont to
\SetFigFontNFSS if NFSS is enabled.  With this patch it is possible to
use pstex_t files generated by woody transfig and the new one in
parallel.

I'll upload a fixed version soon.

Ciao

        Roland

#! /bin/sh /usr/share/dpatch/dpatch-run
## 11_SetFigFont-params.dpatch by Roland Rosenfeld <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Rename TeX macro \SetFigFont to \SetFigFontNFSS if NFSS ist defined.
## DP: this should work around problems of users using PSTEX files generated
## DP: by old and by new fig2dev in the same document.

@DPATCH@
diff -urNad transfig~/fig2dev/dev/genepic.c transfig/fig2dev/dev/genepic.c
--- transfig~/fig2dev/dev/genepic.c
+++ transfig/fig2dev/dev/genepic.c
@@ -1227,10 +1227,10 @@
 
 #ifdef NFSS
     if ( FontSizeOnly )
-       fprintf(tfp, "{\\SetFigFont{%d}{%.1f}",
+       fprintf(tfp, "{\\SetFigFontNFSS{%d}{%.1f}",
                texsize, baselineskip );
     else
-       fprintf(tfp, "{\\SetFigFont{%d}{%.1f}{%s}{%s}{%s}",
+       fprintf(tfp, "{\\SetFigFontNFSS{%d}{%.1f}{%s}{%s}{%s}",
                texsize, baselineskip,
                TEXFAMILY(text->font),TEXSERIES(text->font),
                TEXSHAPE(text->font));
diff -urNad transfig~/fig2dev/dev/genmp.c transfig/fig2dev/dev/genmp.c
--- transfig~/fig2dev/dev/genmp.c
+++ transfig/fig2dev/dev/genmp.c
@@ -1273,7 +1273,7 @@
     /* not default font: set the font and font size. */
     if (! isdefaultfont (t->flags, t->font)) {
 #ifdef NFSS
-       fprintf(tfp,"       \\SetFigFont{%d}{%.1f}{%s}{%s}{%s}%%\n",
+       fprintf(tfp,"       \\SetFigFontNFSS{%d}{%.1f}{%s}{%s}{%s}%%\n",
                texsize, baselineskip,
                TEXFAMILY(t->font),TEXSERIES(t->font),TEXSHAPE(t->font));
 #else
diff -urNad transfig~/fig2dev/dev/genpictex.c transfig/fig2dev/dev/genpictex.c
--- transfig~/fig2dev/dev/genpictex.c
+++ transfig/fig2dev/dev/genpictex.c
@@ -637,7 +637,7 @@
          baselineskip = (texsize * 1.2);
 
 #ifdef NFSS
-         fprintf(tfp, "\\put{\\SetFigFont{%d}{%.1f}{%s}{%s}{%s}",
+         fprintf(tfp, "\\put{\\SetFigFontNFSS{%d}{%.1f}{%s}{%s}{%s}",
                                 texsize, baselineskip,
                                 
TEXFAMILY(t->font),TEXSERIES(t->font),TEXSHAPE(t->font));
 #else
diff -urNad transfig~/fig2dev/dev/setfigfont.c transfig/fig2dev/dev/setfigfont.c
--- transfig~/fig2dev/dev/setfigfont.c
+++ transfig/fig2dev/dev/setfigfont.c
@@ -36,15 +36,15 @@
 
     if ( FontSizeOnly )
        fprintf(tfp, "%%\n\
-\\begingroup\\makeatletter\\ifx\\SetFigFont\\undefined%%\n\
-\\gdef\\SetFigFont#1#2{%%\n\
+\\begingroup\\makeatletter\\ifx\\SetFigFontNFSS\\undefined%%\n\
+\\gdef\\SetFigFontNFSS#1#2{%%\n\
   \\fontsize{#1}{#2pt}%%\n\
   \\selectfont}%%\n\
 \\fi\\endgroup%%\n");
     else
        fprintf(tfp, "%%\n\
-\\begingroup\\makeatletter\\ifx\\SetFigFont\\undefined%%\n\
-\\gdef\\SetFigFont#1#2#3#4#5{%%\n\
+\\begingroup\\makeatletter\\ifx\\SetFigFontNFSS\\undefined%%\n\
+\\gdef\\SetFigFontNFSS#1#2#3#4#5{%%\n\
   [EMAIL PROTECTED]
   \\fontfamily{#3}\\fontseries{#4}\\fontshape{#5}%%\n\
   \\selectfont}%%\n\

Reply via email to