Ubuntu下配置Docbook环境

1、准备环境
  $sudo apt-get install xsltproc
  $sudo apt-get install docbook-xsl
  $sudo apt-get install docbook-defguide

  最后这个就是那本大名鼎鼎的Docbook:The Definitive Guide,装完之后就可以直接在本机浏览器输入http://localhost/doc/docbook-defguide/html/docbook.html来阅读此书了,我们和谐社会不是不能访问docbook.org吗,装完这个就可以本机阅读了,当然,你得装了apache。

  2、将中间那段代码拷贝到vim里面另存为test.xml。相信猜也能猜出是那段吧。
  注意粘贴到vim时格式很容易乱掉,先':set paste'之后再粘贴,粘贴完毕可以输入'gg=G'让vim重新缩进。

  3、执行一下命令生成html文件

  $xsltproc -o test.html /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl test.xml

  执行完毕如无意外就可以在当前文件夹看到test.html,用浏览器打开看看!

原文地址:https://www.cnblogs.com/soc-linux-driver/p/3359594.html