【发布时间】:2013-07-11 11:51:49
【问题描述】:
我在 Win XP 下使用 DBLaTeX 使用 AsciiDoc 到 PDF 工具链已经有一段时间了,没有(主要)问题。但是,试图让相同的工具链在 Win 7 下工作我遇到了一些问题。我不确定我是否遗漏了一些明显的东西,或者这实际上是 Win 7 的问题。
问题似乎与图像路径有关,因为 pdflatex(与 MikTeX 一起安装)在处理图像元素时会阻塞。现在,我对 DocBook、XSLT、LaTeX 等的知识/理解充其量是很差的。但是,看起来 pdflatex 将.\img\zoso.png 中的\img 和\zoso.png 视为(两个)处理指令。 目录分隔符应该是正斜杠而不是反斜杠吗?
当我查看详细输出时,我看到将 dblatex XSL 样式表应用于源 XML 文档以生成 .rtex 文件作为第一阶段。似乎在这个文件中,目录分隔符实际上是正斜杠(如在源 XML 文件中)。但是,生成的 .tex 文件(我假设它是 pdflatex 转换为 PDF 的源文件)这些正斜杠现在是反斜杠。
我已尝试在下面提供尽可能多的信息,但如果我遗漏了任何重要/有用的信息,我深表歉意。有谁知道如何解决这个问题?提前致谢!
操作系统:
Windows 7 企业版 64 位,SP1
已安装工具:
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 位
命令:
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"
命令输出:
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 文件片段:
<mediaobject>
<imageobject>
<imagedata fileref="./img/zoso.png"/>
</imageobject>
<textobject><phrase>Zoso</phrase></textobject>
</mediaobject>
rtex 文件片段
\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 文件截图:
\begin{center}
\imgexists{.\img\zoso.png}{{\imgevalsize{.\img\zoso.png}{\includegraphics[width=\imgwidth,height=\imgheight,keepaspectratio=true]{.\img\zoso.png}}}}{Zoso}\end{center}
干杯,
会
【问题讨论】: