ho-tex / oberdiek

Updating the oberdiek bundle
Other
16 stars 6 forks source link

xmlto pdf fails (Fedora) #40

Open spotrh opened 6 years ago

spotrh commented 6 years ago

This bug has been open in Fedora for several years (see: https://bugzilla.redhat.com/show_bug.cgi?id=949087). Here's how to reproduce it:

  1. Take mini.xml:
<?xml version="1.0" encoding="UTF-8"?>
 <book xml:id="simple_book" xmlns="http://docbook.org/ns/docbook" version="5.0">
   <title>Very simple book</title>
   <chapter xml:id="chapter_1">
     <title>Chapter 1</title>
     <para>Hello world!</para>
     <para>I hope that your day is proceeding <emphasis>splendidly</emphasis>!</para>
   </chapter>
   <chapter xml:id="chapter_2">
     <title>Chapter 2</title>
     <para>Hello again, world!</para>
   </chapter>
 </book>
  1. Run: xmlto --skip-validation pdf mini.xml

  2. Watch it fail:

Note: namesp. cut : stripped namespace before processing           Very simple book
Making portrait pages on letter paper (215.9mmx279.4mm)
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdfxmltex)
 restricted \write18 enabled.
entering extended mode
(./tmp.fo
LaTeX2e <2017-04-15>
Babel <3.9r> and hyphenation patterns for 5 language(s) loaded.
xmltex version: 2002/06/25 v1.9 (Exp):
(/usr/share/texlive/texmf-dist/tex/xmltex/base/xmltex.cfg) 
No File: tmp.cfg (/usr/share/texmf/tex/xmltex/passivetex/fotex.xmt)
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf/tex/xmltex/passivetex/fotex.sty
)
No file tmp.aux.
(/usr/share/texlive/texmf-dist/tex/latex/tipa/t3ptm.fd)
(/usr/share/texlive/texmf-dist/tex/latex/cyrillic/t2acmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd)
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty)
! Undefined control sequence.
<recently read> \AppendGraphicsExtensions 

l.455 \fi

? 
! Emergency stop.
<recently read> \AppendGraphicsExtensions 

l.455 \fi

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on tmp.log.

Other data points: xmlto --skip-validation --with-fop pdf mini.xml works fine.

In the Fedora bug report, it was noticed that commenting out lines 451-456 from epstopdf-base.sty works around this problem, but I am not sure that this fix is valid:

%% \ifETE@prepend
%%   \expandafter\PrependGraphicsExtensions
%% \else
%%   \expandafter\AppendGraphicsExtensions
%% \fi
%% {.eps}
davidcarlisle commented 6 years ago

that's odd your log shows grfext.sty being loaded, and all that does is define the command that you show as being undefined on the next line...... If I try

\documentclass{article}
\usepackage{epstopdf-base}
\begin{document}

\show\AppendGraphicsExtensions

\end{document}

then \AppendGraphicsExtensions is shown as defined.

I don't have the xmlto script, could you add the generated tex from the xml, and I'll debug...

spotrh commented 6 years ago

It doesn't seem like xmlto ever spits out the generated tex in a sane way. I've attached the log that it does generate when I run it with "--noclean". tmp.log

davidcarlisle commented 6 years ago

oh! xmltex:-)

OK so it never writes out normal tex syntax it gets tex to read the xml directly (using a parser I wrote in my youth:(

I'd never recommend xmltex these days but I'll see if I can recreate the issue.

if you can give me the xsl FO XML file that is generated and given to tex that would help, as I could run passivetex on that but do't worry if not, I can probably find a copy of xmlto to test...

On 4 June 2018 at 16:02, Tom Callaway notifications@github.com wrote:

It doesn't seem like xmlto ever spits out the generated tex in a sane way. I've attached the log that it does generate when I run it with "--noclean". tmp.log https://github.com/ho-tex/oberdiek/files/2068781/tmp.log

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ho-tex/oberdiek/issues/40#issuecomment-394386886, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNcAtfvzYb5jw7mngohjp1YRIYha2mkks5t5UwCgaJpZM4UZKkA .

spotrh commented 6 years ago

tmp.fo.txt I had to rename it so that it would attach.