Bug 366451 - Passivetex does not process DocBook EPS imagedata
Passivetex does not process DocBook EPS imagedata
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: passivetex (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-05 03:35 EST by W. Michael Petullo
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-28 17:49:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
DocBook XML containing a EPS imagedata (769 bytes, text/xml)
2007-11-05 03:35 EST, W. Michael Petullo
no flags Details
EPS file referenced by DocBook XML (5.40 KB, image/x-eps)
2007-11-05 03:37 EST, W. Michael Petullo
no flags Details

  None (edit)
Description W. Michael Petullo 2007-11-05 03:35:23 EST
Description of problem:
I am trying to process DocBook imagedata using passivetex. The process fails.

Version-Release number of selected component (if applicable):
passivetex-1.25-5.1.1

How reproducible:
Everytime.

Steps to Reproduce:
rocess the attached DocBook XML using "xmlto pdf book.xml"
  
Actual results:
[...]
LaTeX Font Warning: Font shape `U/wasy/m/n' in size <12.44159> not available
(Font)              size <12> substituted on input line 317.


LaTeX Font Warning: Font shape `U/stmry/m/n' in size <12.44159> not available
(Font)              size <12> substituted on input line 317.


Error: pdfxmltex (file attack.pdf): cannot find image file
 ==> Fatal error occurred, the output PDF file is not finished!


Expected results:


Additional info:
Things work fine if the imagedata is of the PNG or PDF formats.
Comment 1 W. Michael Petullo 2007-11-05 03:35:23 EST
Created attachment 247781 [details]
DocBook XML containing a EPS imagedata
Comment 2 W. Michael Petullo 2007-11-05 03:37:47 EST
Created attachment 247791 [details]
EPS file referenced by DocBook XML
Comment 3 Ondrej Vasik 2007-11-28 04:37:21 EST
Thanks for report - but as is written on PassiveTeX upstream
pages(http://www.tei-c.org.uk/Software/passivetex/) - that program doesn't cover
all XSL FO . PassiveTeX upstream is dead - at least it seems to be - no new
versions for ~3 years . I'm now working on xmlto version with fop support(based
on patch in #147472) - to have some new option in cases where passivetex is not
able to handle FO file. Anyway - I will try to find solution for those two
reports - and if it will be easy to fix, I will try to do it.
In that case - if you try to use xmlto fo epsbook.xml , and then xmlto pdf
epsbook.fo (basically generating pdf in two steps) - error message you will get
will be validating error - so validator recognizes block with image and
fo:external-graphic as invalid one.
Comment 4 Ondrej Vasik 2007-11-28 17:49:27 EST
Well... got it running, but I think it would be better to keep it without the fix.
Steps to fix:
1) You need to set "shell_escape = 1" in texmf.cnf configuration file
(/usr/share/texmf/web2c/texmf.cnf on my machine)
2) In fotex.sty you will have to rewrite one line
(fotex.sty is located in /usr/share/texmf/tex/xmltex/passivetex/)
at the end of file
\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`epstopdf #1}}
has to be replaced by
\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`epstopdf \FOsrcname}}
because xmlto is running in /tmp/ and #1 is only file name - therefore it will
fail to find it.
3) Now your xml will be transformed to pdf by xmlto correctly - but .pdf file
will stay in dir of .eps file anyway

Work-around:
run epstopdf <filename>.eps , this will create pdf from eps and use pdf link in
xml document(or keep eps in your xml, but have transformed pdf in same dir).
This way is recommended by some sources I read. In fact passivetex is doing the
same - after you will do the steps to fix, passivetex will run shellcommand
epstopdf <filename>.eps and will create pdf automatically.

Because of that shell_escape = 1 in cnf file - which is potentially dangerous
thing - I would like to close it as WONTFIX, because so far there is no other
way how to handle eps with passivetex and workaround is IMHO sufficient, because
it is doing same thing as possible fix.

Note You need to log in before you can comment on or make changes to this bug.