dblatex 忽略 --texstyle 或 -s 命令
我想编写一个asciidoc文档并将其转换为pdf文档。但是,我想使用与默认格式不同的格式样式。为此,我使用 asciidoc 将 txt 文件转换为 docbook,然后尝试使用 dblatex 将生成的 docbook xml 转换为 pdf 文件。 这个想法是为 dblatex 设置特定的 tex 样式以获得所需的 pdf 结果。我复制了现有的 docbook.sty 样式,因为此处推荐做一个小的样式修改。 ./docbook 文件中所做的唯一更改是将 \setlength{\textwidth}{18cm} 更改为 \setlength{\textwidth}{12cm}。但是,当我运行命令
dblatex --texstyle=./docbook.sty test.txt
或命令
dblatex -s ./docbook.sty test.txt
两者都会在样式更改中产生相同的结果:无。我的意思是,无论我对 ./docbook.sty 文件进行哪种修改,这些修改都不会应用于输出。我总是得到相同的结果,即具有默认格式的 pdf。你们知道问题出在哪里吗?
提前致谢。
I want to write an asciidoc document and convert it into a pdf document. However, I want to use a format style different than the default ones. To do so I convert the txt file to docbook using asciidoc and then try to convert the resulting docbook xml to a pdf file using dblatex.
The idea is to set a particular tex style for dblatex to obtain the desired pdf result. I've copied the existing docbook.sty style as it is recommended here to do a small style modification. The only change done in the ./docbook file is \setlength{\textwidth}{18cm} to \setlength{\textwidth}{12cm}. However, when I run the command
dblatex --texstyle=./docbook.sty test.txt
Or the command
dblatex -s ./docbook.sty test.txt
Both produce the same result in the style change: none. I mean, no matter which modification I do to ./docbook.sty file, these modifications are not applied to the output. I obtain always the same result, a pdf with the default formatting. Do you guys have any idea where is the problem?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议:
将 Dblatex docbook.sty 复制到工作目录中的新文件名,该目录“显然是您的”(例如,mydbstyle.sty)。
继续为 --texstyle 选项提供完整或相对路径参数(例如,/path/to/mydbstyle.sty 或 ./mydbstyle.sty)。如果不这样做,则要求 mydbstyle.sty 位于 TEXINPUTS 环境变量(您可能尚未明确设置)枚举的目录中。
在 mydbstyle.sty 中,使用以下指令来初始化您的样式:
<前><代码>\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mydbstyle}[2013/02/15 DocBook 风格]
\RequirePackageWithOptions{文档}
%...
% 这里是你的 LaTeX 命令
将 DocBook 4.5 XML 文件作为参数传递给 Dblatex(在您的示例中,您传递的是 test.txt,这让我不确定是否传递 AsciiDoc 源文件)。
I would recommend:
Copy the Dblatex docbook.sty to a new filename in your working directory which is "obviously yours" (e.g., mydbstyle.sty).
Continue to supply a full or relative path argument to the --texstyle option (e.g., /path/to/mydbstyle.sty or ./mydbstyle.sty). Failing to do so requires that mydbstyle.sty be in a directory enumerated by the TEXINPUTS environment variable (which you likely have not explicitly set).
Within mydbstyle.sty, use the following directives to initialize your style:
Pass a DocBook 4.5 XML file as an argument to Dblatex (in your example you are passing test.txt which makes me uncertain whether you're passing an AsciiDoc source file).