Chinaunix首页 | 论坛 | 博客
  • 博客访问: 196767
  • 博文数量: 71
  • 博客积分: 3135
  • 博客等级: 中校
  • 技术积分: 740
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-23 13:29
文章分类

全部博文(71)

文章存档

2012年(3)

2011年(1)

2010年(7)

2009年(3)

2008年(15)

2007年(24)

2006年(18)

我的朋友

分类: LINUX

2008-03-20 11:49:12

关于docbook的介绍请搜相关文档,此处目的为安装和使用。
一,安装(debian系统下,其它系统请下载相应源码编译安装):
    $>apt-get install xsltproc  //处理xml文件的程序,生成html
    $>apt-get install docbook-xsl  //样式
    $>xsltproc -o test.html /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl test.xml //这是把test.xml编译生成test.html

自动编号:
分页
xsltproc --stringparam  section.autolabel 1 --stringparam  section.label.includes.component.label 1 --stringparam html.stylesheet docbook.css /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/html/chunk.xsl debian.xml>debian.html
不分页
xsltproc --stringparam  section.autolabel 1 --stringparam  section.label.includes.component.label 1 --stringparam html.stylesheet docbook.css /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/html/docbook.xsl debian.xml>debian.html


二,测试:
test.xml的内容为以下,请用上面的命令编译:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "">
<book>
    <bookinfo>
        <title>DocBook 学习</title>
        <author>
            <othername>jsli</othername>
        </author>
    </bookinfo>
    <chapter>
        <title>step</title>
        <sect1>next</sect1>
    </chapter>
    <chapter>
        <title>...</title>
        <sect1>...</sect1>
    </chapter>
</book>

几秒钟后将生成test.html文件。

三,一些学习docbook的文档:

四,生成pdf文档

第一步:用xsltproc程序生成file.fo文件。首先安装
       apt-get install libpaperg
       xsltproc -o me.fo /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl debguide.xml

阅读(3521) | 评论(0) | 转发(0) |
0

上一篇:awn on xfce4

下一篇:相对论

给主人留下些什么吧!~~