我在Win XP下使用AsciiDoc到PDF工具链使用DBLaTeX已经有一段时间了,没有(主要的)问题。然而,试图让相同的工具链在Win 7下工作,我遇到了一些问题。我不确定我是不是错过了一些显而易见的事情,或者这是否是一个7胜的问题。
问题似乎与图像路径有关,因为pdflatex (与MikTeX一起安装)在处理图像元素时会产生瓶颈。现在,我对DocBook、XSLT、LaTeX等的知识/理解最多很差。然而,看起来pdflatex将\img和\zoso.png在.\img\zoso.png中处理为(2)处理指令。目录分隔符应该是正斜杠而不是反斜杠吗?
当我查看详细的输出时,我看到dblatex样式表被应用到源XML文档中,作为第一阶段生成一个.rtex文件。在这个文件中,目录分隔符实际上是正斜杠(如源XML文件)。但是,生成的.tex文件(我认为它是pdflatex转换为PDF的源)--这些正斜杠现在是反斜杠。
我试着在下面提供尽可能多的信息,但是如果我错过了任何重要的/有用的东西,我很抱歉。有没有人知道如何解决这个问题?提前感谢!
OS:
Windows 7企业64位,SP1
安装工具:
AsciiDoc: 8.6.8
Python: 2.7.5
dblatex: 0.3.4
libxml2: 2.7.8
libxslt: 1.1.26
指数: 1.9.2
兹利卜: 1.2.5
MiKTeX: 2.964位
命令:
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 failedXML文件片段:
<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}干杯,
将要
发布于 2013-07-16 14:21:09
经过大量测试后,我发现问题是安装了dblatex的版本,或者更具体地说是与它一起安装的dbtexmf版本。安装0.3 of dblatex (而不是最新的0.3.4)解决了这个问题。
希望这能帮助那些有同样问题的人。
干杯,
将要
发布于 2013-07-12 12:13:09
是的;大多数TeX实现(我在Windows上所知道的)都很乐意将"/“作为路径分隔符处理;但是"\”始终被视为反斜杠,并由此启动一个TeX命令。
https://stackoverflow.com/questions/17592667
复制相似问题