FreeBSD 文档计划新手入门读本 | ||
---|---|---|
上一页 | 附录 A. Examples |
This section assumes that you have installed the software listed in the textproc/docproj port, either by hand, or by using the port. Further, it is assumed that your software is installed in subdirectories under /usr/local/, and the directory where binaries have been installed is in your PATH. Adjust the paths as necessary for your system.
例 A-3. Converting DocBook to HTML (one large file)
% jade -V nochunks \ -c /usr/local/share/sgml/docbook/dsssl/modular/catalog \ -c /usr/local/share/sgml/docbook/catalog \ -c /usr/local/share/sgml/jade/catalog \ -d /usr/local/share/sgml/docbook/dsssl/modular/html/docbook.dsl \ -t sgml file.sgml > file.html
例 A-4. Converting DocBook to HTML (several small files)
% jade \ -c /usr/local/share/sgml/docbook/dsssl/modular/catalog \ -c /usr/local/share/sgml/docbook/catalog \ -c /usr/local/share/sgml/jade/catalog \ -d /usr/local/share/sgml/docbook/dsssl/modular/html/docbook.dsl \ -t sgml file.sgml
This example may still only generate one HTML file, depending on the structure of the document you are processing, and the stylesheet's rules for splitting output.
例 A-5. Converting DocBook to Postscript
The source SGML file must be converted to a TeX file.
% jade -Vtex-backend \ -c /usr/local/share/sgml/docbook/dsssl/modular/catalog \ -c /usr/local/share/sgml/docbook/catalog \ -c /usr/local/share/sgml/jade/catalog \ -d /usr/local/share/sgml/docbook/dsssl/modular/print/docbook.dsl \ -t tex file.sgml
The generated .tex file must now be run through tex, specifying the &jadetex macro package.
% tex "&jadetex" file.tex
You have to run tex at least three times. The first run processes the document, and determines areas of the document which are referenced from other parts of the document, for use in indexing, and so on.
Do not be alarmed if you see warning messages such as LaTeX Warning: Reference `136' on page 5 undefined on input line 728. at this point.
The second run reprocesses the document now that certain pieces of information are known (such as the document's page length). This allows index entries and other cross-references to be fixed up.
The third pass performs any final cleanup necessary.
The output from this stage will be file.dvi.
Finally, run dvips to convert the .dvi file to Postscript.
% dvips -o file.ps file.dvi
例 A-6. Converting DocBook to PDF
The first part of this process is identical to that when converting DocBook to Postscript, using the same jade command line (例 A-5).
When the .tex file has been generated you run pdfTeX. However, use the &pdfjadetex macro package instead.
% pdftex "&pdfjadetex" file.tex
Again, run this command three times.
This will generate file.pdf, which does not need to be processed any further.
本文档和其它文档可从这里下载:ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.
如果对于FreeBSD有问题,请先阅读文档,如不能解决再联系<questions@FreeBSD.org>.
关于本文档的问题请发信联系 <doc@FreeBSD.org>.