Package: fig2ps
Version: 1.3.2-1
Severity: normal
Tags: patch

I am using --input to include several \def commands that are used in my
figures. My first attempt failed with the error

! Undefined control sequence.
<recently read> \includegraphics

l.7 \includegraphics
                    {sim-real-switch.fig2ps.tmp.ps}%


Using keep and doing a diff between ./sim-real-switch.fig2ps.tmp.tex
with and without --input I found this:


$ diff sim-real-switch.fig2ps.tmp.tex-with-input
sim-real-switch.fig2ps.tmp.tex-without-input
2c2,6
< \input{include-def.tex}
---
> \usepackage[english]{babel}
> \usepackage[latin1]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{amsmath}
> \usepackage{graphics}


fig2ps is using packages but expects the user to include them in the
--input=file. You should either 

1) provide a template input file in /usr/share/doc (with a pointer to it
from the man page) which is good because it gives the user control over
what is included
or
2) modify fig2ps it include all needed packages which is good because if
fig2ps where to change the --input=file would not need to be modified
or
3) do something fancy such as a new option to make including these
packages in $header optional when --input is used or reading the
--input=file to decide what to do

I'm in favor of 2) and have include a patch. Not sure what is up with
@add vs @_add and not stopping to find out or reading the --input=file
to decide what to do

I'm in favor of 2) and have include a patch. Not sure what is up with
@add vs @_add and not stopping to find out.




*** fig2ps-orig Mon Nov  8 04:58:18 2004
--- /usr/bin/fig2ps     Mon May  9 23:53:57 2005
***************
*** 310,316 ****
        }
  
        # adds the add packages, (Teteph...)
!       foreach(@Add) {
            if(/\[(\S+)\](\S+)/)
            {
                $header .=  "\\usepackage[$1]{$2}\n";
--- 310,316 ----
        }
  
        # adds the add packages, (Teteph...)
!       foreach(@Packages,@Add) {
            if(/\[(\S+)\](\S+)/)
            {
                $header .=  "\\usepackage[$1]{$2}\n";
***************
*** 318,326 ****
            else {
                my @_add = split ':';
                my $pack = pop @_add;
!               if(@add> 0)
                {
!                   $header.= "\\usepackage[".join(',',@add)."]{$pack}\n";
                }
                else 
                {
--- 318,326 ----
            else {
                my @_add = split ':';
                my $pack = pop @_add;
!               if(@_add> 0)
                {
!                   $header.= "\\usepackage[".join(',',@_add)."]{$pack}\n";
                }
                else 
                {




-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages fig2ps depends on:
ii  perl-base               5.8.4-5          The Pathologically Eclectic Rubbis
ii  tetex-base              2.0.2c-1         Basic library files of teTeX
ii  tetex-bin               2.0.2-23         The teTeX binary files
ii  transfig                1:3.2.5-alpha5-2 Utilities for converting XFig figu

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to