Docbook converts text formats

Source: Internet
Author: User
Docbook provides a system for writing structured documents. It uses SGML/XML to define a series of document elements and can use tools to convert original document source files to various document formats. It is most suitable for writing computer documents and papers. Many open-source software projects use docbook to write their own documents. In my opinion, the advantages of using docbook to write documents are as follows:

* Content and format Separation

When we use word to write a document, in addition to writing the document content, we also need to frequently typeset the document style. As we all know, typography is time-consuming, laborious, and often error-prone.

To use docbook to write a document, you only need to focus on the content of the document. The content and format of the article are separated. Docbook defines document elements such as chapter, section, and table, but how these elements are displayed is controlled by the style sheet (XSL, you do not have to embed typographical information in the document.

This also means that you cannot edit your document in "WYSIWYG" mode. However, you will soon enjoy the separation of content and format, because it not only saves the time for formatting, but also makes the document style more unified. In addition, it is easier to use programs to automatically process documents.
* Output in multiple file formats

When you use docbook to write a document, you only need to write the document once to output it in multiple file formats. There are many free tools to convert docbook documents into HTML, PDF, and other file formats.
* Ease of Version Management

This is one of the main reasons why I chose docbook. Because the docbook document source file is a text file, you can easily use version management tools such as CVS, subversion, and git for version management.

If you do not have the version management function when writing documents in collaboration with many people, it is difficult to know which modifications others have made to the document, let alone trace the history of the document. In a company, you can usually control conflicts by specifying rules. That is, you can decide in advance which chapters you can only change. However, for the open-source world's "big market" development model, it is impossible to avoid conflicts through agreed methods, because it is very important for document version management. This is why many open source project documents use docbook.
* Easy to read

To read the word document, you must install macrosoft word. to read the PDF document, you must install a pdf reader. Imagine that ten years later, when word is not maintained, and you need to read a document written ten years ago using word, what will happen? Yes, you cannot read it. Because the Word documents are in binary format, you must use special programs to read and edit them.

But docbook documents are different. You only need to use a plain text editor to read and edit docbook documents, because it is just a common text file.
* Multi-platform support

On Windows, you can use word to view and edit documents (whether genuine or pirated). But in Linux, how does one view Word documents? Thank God. Now we have open office. In the past, a Word document could not be viewed in Linux, because it is a binary file.

Docbook is a text document. Therefore, you can read and write documents in either Windows or Linux. Most docbook conversion tools are written in Java and support cross-platform running. In this way, you can manage your documents in a unified manner on multiple operating system platforms.
* Multi-language support

Docbook uses the UTF-8 character set, so you can use a multi-language character set in the document. This is important for international cooperation projects.

Several related resources
Http://blog.donews.com/limodou/archive/2004/04/01/9917.aspx
Http://www.study-area.org/tips/docw/docwrite.html
Http://blog.zdnet.com.cn/html/30/422230-2881256.html
Http://www.ibm.com/developerworks/cn/xml/x-fop/index.html

Directly converting from existing HTML to word is not realistic, because HTML contains a lot of mixed content and cannot be converted to other formats simply.
It is better to output an intermediate format, which can clearly express the content of the document and then convert it to other formats.

Docbook output tools in other formats
Http://wiki.docbook.org/topic/DocBookPublishingTools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.