Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 224937 - app-text/xmlto cannot generate pdf
Summary: app-text/xmlto cannot generate pdf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 2 votes (vote)
Assignee: Gentoo SGML project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-04 20:12 UTC by Peter Simons
Modified: 2009-05-24 17:18 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Simons 2008-06-04 20:12:40 UTC
My attempts to convert an XML docbook file to PDF with xmlto have been unsuccessful. At first, the 'xmlto' script complained about a missing program called pdfxmltex. I found an ebuild for a tool of that name (dev-tex/xmltex) and emerged it (maybe that should be a dependency?), but apparently xmltex is incomplete, because now I get this error:

$ xmlto pdf fastcgi.xml 
Making portrait pages on A4 paper (210mmx297mm)
This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5)
entering extended mode
(./tmp.fo
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
xmltex version: 2002/06/25 v1.9 (Exp):
(/usr/share/texmf/tex/xmltex/xmltex.cfg) 
No File: tmp.cfg

! LaTeX Error: File `fotex.xmt' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: xmt)

Enter file name: 
! Emergency stop.
<read *> 
         
l.1 ...djustment="disregard-shifts" language="en">
                                                  <fo:layout-master-set><fo:...

No pages of output.
Transcript written on tmp.log.

Indeed, the xmltex.cfg file mentions fotex.xmt, but the file is not included in the distribution.

Does anyone have an idea how to remedy the situation?

Reproducible: Always
Comment 1 Peter Simons 2008-06-04 20:30:07 UTC
One more piece of information: xmlto depends on passivetex for PDF generation, too. After emerging that package as well, I get another error:

$ xmlto pdf foo.xml 
Making portrait pages on A4 paper (210mmx297mm)
This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5)
entering extended mode
(./tmp.fo
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
xmltex version: 2002/06/25 v1.9 (Exp):
(/usr/share/texmf/tex/xmltex/xmltex.cfg) 
No File: tmp.cfg (/usr/share/texmf/tex/passivetex/fotex.xmt)
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/passivetex/fotex.sty
)
No file tmp.aux.
(/usr/share/texmf/tex/latex/cyrillic/t2acmr.fd)
(/usr/share/texmf/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf/tex/latex/psnfss/t1ptm.fd)
No file tmp.out.
No file tmp.out.
INFO: Using normal, i.e. nonfrench-spacing in document
(/usr/share/texmf/tex/latex/psnfss/t1phv.fd)

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.211 ..." hyphenation-remain-character-count="2">
                                                  FastCGI -- The Forgotten T...

? 
! Emergency stop.
 ...                                              
                                                  
l.211 ..." hyphenation-remain-character-count="2">
                                                  FastCGI -- The Forgotten T...

No pages of output.
Transcript written on tmp.log.


I don't know what that means, but it looks like it might very well be a problem in xmlto, not in the installation. Any advice is appreciated. 

Last but not least: xmlto is available in version 0.0.20. Renaming the ebuild is all there is to it in order to upgrade.
Comment 2 Markus Wolff 2008-06-19 11:39:27 UTC
app-text/passivetex consists fotex.xmt
Comment 3 Arthur Spitzer 2009-05-09 14:42:25 UTC
Hi,

I think xmlto would require a dependancy of the xml useflag in texlive, or so. This will insert xmltex and passivetex. 
But the above mentioned error 

.." hyphenation-remain-character-count="2">

still remains. Has somebody resolved it in the meantime? I found a really old bug-report in Lauchpad with the same error, but no resolution: 
https://bugs.launchpad.net/xmlto/+bug/33033
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2009-05-22 12:48:50 UTC
Should be fixed with 0.0.22
Comment 5 Michał Kiedrowicz 2009-05-24 17:18:24 UTC
! LaTeX Error: File `fotex.xmt' not found.

Yep, this problem is solved.

.." hyphenation-remain-character-count="2">

However, this problem is still present. After inspecting the issue I found out that xmlto messes with USE_BACKEND variable. In file "usr/share/xmlto/format/docbook/pdf" backends defaults to FOP:

$ head -n 2 /usr/share/xmlto/format/docbook/pdf 
case "$USE_BACKEND" in
DEFAULT|FOP)

but after creating fo and when converting from fo to pdf USE_BACKEND defaults to DBLATEX:

$ head -n 2 /usr/share/xmlto/format/fo/pdf 
case "$USE_BACKEND" in
DEFAULT|DBLATEX)

Using xmlto --with-fop option I was able to create PDF without errors. I couldn't test dblatex because it's not in portage. (there is an ebuild submited in bug 129368)

I guess this is not gentoo issue. It should be reported upstream.