Question

I have been using an AsciiDoc to PDF tool chain using DBLaTeX under Win XP for a while with no (major) issues. However, trying to get the same tool chain to work under Win 7 I'm having some problems. I'm not sure if I am missing something obvious, or if it is in fact a Win 7 problem.

The issue appears to be with image paths, in that pdflatex (installed with MikTeX) chokes when processing image elements. Now, my knowledge/understanding of DocBook, XSLT, LaTeX etc. is poor at best. However, it looks like pdflatex is treating the \img and \zoso.png in .\img\zoso.png as (two) processing instructions. Should the directory separators be forward slashes instead of back slashes?

When I look at the verbose output, I see the dblatex XSL stylesheets are applied to the source XML document to produce a .rtex file as a first stage. Seems in this file, directory separators are in fact forward slashes (as in the source XML file). However, the resulting .tex file (which I assume is the source for pdflatex to convert to PDF) those forward slashes are now backslashes.

I've tried to provide as much info as possible below, but apologies if I missed anything crucial/useful. Does anyone have any ideas how to solve this issue? Thanks in advance!

OS:
Windows 7 Enterprise 64-bit, SP1

Tools installed:
AsciiDoc: 8.6.8
Python: 2.7.5
dblatex: 0.3.4
libxml2: 2.7.8
libxslt: 1.1.26
iconv: 1.9.2
zlib: 1.2.5
MiKTeX: 2.9 64-bit

Command:

python C:/bin/Python27\scripts\dblatex --verbose --texinputs="C:/bin/Python27/share/dblatex/latex/contrib/db2latex" --xsl-user="C:/bin/Python27/share/dblatex/latex/contrib/db2latex/param-db2latex-sa.xsl" --texstyle="db2latex-sa" --param toc.section.depth=3 --param doc.section.depth=3 --param draft.mode=yes "C:\bin\asciidoc-custom\install-test\cf-sa-asciidoc-customisation_test.xml"

Commands output:

Build the book set list...
xsltproc -o c:\users\wstubben\appdata\local\temp\tmpemvwua\doclist.txt --xinclude --xincludestyle doclist.xsl C:\bin\asciidoc-custom\install-test\cf-sa-asciidoc-customisation_test.xml
Build the listings...
xsltproc -o c:\users\wstubben\appdata\local\temp\tmpemvwua\listings.xml --xinclude --xincludestyle --param current.dir 'C:\bin\asciidoc-custom\install-test' C:\bin\Python27\share\dblatex\xsl\common\mklistings.xsl C:\bin\asciidoc-custom\install-test\cf-sa-asciidoc-customisation_test.xml xsltproc -o cf-sa-asciidoc-customisation_test.rtex --xinclude --xincludestyle --param current.dir 'C:\bin\asciidoc-custom\install-test' --param listings.xml 'c:\users\wstubben\appdata\local\temp\tmpemvwua\listings.xml' c:\users\wstubben\appdata\local\temp\tmpemvwua\custom.xsl C:\bin\asciidoc-custom\install-test\cf-sa-asciidoc-customisation_test.xml
XSLT stylesheets DocBook - LaTeX 2e (0.3.4)
===================================================
Build cf-sa-asciidoc-customisation_test.pdf
built-in module pdftex registered
no support found for ifxetex
no support found for fontspec
no support found for xltxtra
no support found for fontenc
no support found for inputenc
no support found for fancybox
built-in module makeidx registered
no support found for db2latex-sa
building additional files...
checking if compiling is necessary...
the output file doesn't exist
pdflatex -interaction=batchmode cf-sa-asciidoc-customisation_test.tex
pdflatex: No connection could be made because the target machine actively refused it.
pdflatex: Data: connect failed in tcp_connect()
pdflatex failed
c:\users\wstubben\appdata\local\temp\tmpemvwua\cf-sa-asciidoc-customisation_test.tex:115: Undefined control sequence \img.
c:\users\wstubben\appdata\local\temp\tmpemvwua\cf-sa-asciidoc-customisation_test.tex:115: leading text: ...spectratio=true]{.\img\zoso.png}}}}{Zoso}
c:\users\wstubben\appdata\local\temp\tmpemvwua\cf-sa-asciidoc-customisation_test.tex:115: Undefined control sequence \zoso.
c:\users\wstubben\appdata\local\temp\tmpemvwua\cf-sa-asciidoc-customisation_test.tex:115: leading text: ...spectratio=true]{.\img\zoso.png}}}}{Zoso}
c:\users\wstubben\appdata\local\temp\tmpemvwua\cf-sa-asciidoc-customisation_test.tex:115: Undefined control sequence \img.
c:\users\wstubben\appdata\local\temp\tmpemvwua\cf-sa-asciidoc-customisation_test.tex:115: leading text: ...spectratio=true]{.\img\zoso.png}}}}{Zoso}
c:\users\wstubben\appdata\local\temp\tmpemvwua\cf-sa-asciidoc-customisation_test.tex:115: Undefined control sequence \zoso.
c:\users\wstubben\appdata\local\temp\tmpemvwua\cf-sa-asciidoc-customisation_test.tex:115: leading text: ...spectratio=true]{.\img\zoso.png}}}}{Zoso}
Unexpected error occured
Error: pdflatex compilation failed

XML file snip:

<mediaobject>
  <imageobject>
  <imagedata fileref="./img/zoso.png"/>
  </imageobject>
  <textobject><phrase>Zoso</phrase></textobject>
</mediaobject>

rtex file snip

\begin{center}
\imgexists{./img/zoso.png}{{\imgevalsize{./img/zoso.png}{\includegraphics[width=imgwidth,height=\imgheight,keepaspectratio=true]{./img/zoso.png}}}}{ͰtZosoͱt}\end{center}

tex file snip:

\begin{center}
\imgexists{.\img\zoso.png}{{\imgevalsize{.\img\zoso.png}{\includegraphics[width=\imgwidth,height=\imgheight,keepaspectratio=true]{.\img\zoso.png}}}}{Zoso}\end{center}

Cheers,
Will

Was it helpful?

Solution

After a lot of testing I found the issue is with the version of dblatex installed, or more specifically the version of dbtexmf that is installed with it. Installing version 0.3 of dblatex (instead of the latest, currently 0.3.4) solved the issue.

Hope that helps someone who has the same issue.

Cheers,
Will

OTHER TIPS

Yes; most TeX implementations (all I know of on Windows) will glady handle "/" as a path separator; but "\" is always treated as backslash and as such starts a TeX command.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top