lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @IncludeGraphic eps file problem


From: Efraim Yawitz
Subject: Re: @IncludeGraphic eps file problem
Date: Sun, 1 Jul 2001 01:36:50 -0700 (PDT)


On Thu, 28 Jun 2001, Dan Wamba wrote:

> Hi,
> 
> I am writing my first (larger) Lout document and I
> have tried to include an eps graphic file into it.
> Lout compiled the file tacitly, but GhostView
> complained:
> 
> Unrecoverable error: undefined in b4_Inc_state
> 
> and stopped interpreting the ps file before the page
> with the eps figure included. I have tried to replace
> my eps file with su_crest from the doc directory and
> it worked ok - the crest appeared.
> 
> I have no idea what can be wrong with my eps file,
> because GV displays it well - if opened as stand alone
> eps. The eps file is in Unix format.
> 
> I would appreciate any ideas - what should I try? Are
> there people having similar problems?
> 
> Thank You
> Daniel

Interestingly enough, I found the variable b4_Inc_state defined in some
.ps files produced by a2ps (by doing grep 'b4' *.ps) that I had lying
around, and it seems to have been copied there from some sample code from
Adobe. Maybe the program that produced your eps had already prepared it
somehow for inclusion, and this is conflicting with lout's method of
including eps?

Here's the code from the a2ps stuff:

% EPSF import as in the Red Book
/BeginInclude {
  /b4_Inc_state save def                % Save state for cleanup
  /dict_count countdictstack def        % Count objects on dict stack
  /op_count count 1 sub def             % Count objects on operand stack 
  userdict begin
    0 setgray 0 setlinecap
    1 setlinewidth 0 setlinejoin
    10 setmiterlimit [ ] 0 setdash newpath
    gs_languagelevel 1 ne {
      false setstrokeadjust false setoverprint 
    } if
} bind def

/EndInclude {
  count op_count sub { pos } repeat     % Clean up stacks
  countdictstack dict_count sub { end } repeat
  b4_Inc_state restore
} bind def

/BeginEPSF {
  BeginInclude
  /showpage { } def
} bind def

/EndEPSF {
  EndInclude
} bind def

Hope this is helpful.

Ephraim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]