|
|
DocBook tags in OpenOffice.orgContents
For the following instructions to work, ensure that the DocBook stylesheets have been enabled. See the User Guide if this has not already been done. Currently the stylesheets only support <article> and <chapter> as top-level elements. The Stylist and Navigator also need to be displayed:
1. Top-Level ElementsTo import an existing Article or ChapterIn the File Open dialog select the appropriate DocBook filter (Article or Chapter) in the File Type combo-box. An existing DocBook document can then be imported to OpenOffice.org. To export an Article or Chapter
Similarly, in the File Save As dialog select the appropriate DocBook filter in the File Type combo-box. Creating an Article or ChapterIt is possible to create and save a new DocBook document in OpenOffice.org.
2. Meta InformationThe info sections currently supported match the top-level elements: <articleinfo> and <chapterinfo> Creating an ArticleinfoThe ArticleInfo can contain the meta information about the Article, such as author details and copyright.
3. Nested ElementsEarly in the DocBook project there were difficulties mapping nested DocBook XML elements to the internal OpenOffice.org XML format. An example of how nested tags are now supported is the menuchoice element that can contain several guimenu elements.
NOTE: This is the initial fix for the problem of nesting DocBook XML tags in OpenOffice.org. The main purpose was to retain the information on a round-trip import and export of a DocBook document. It is not ideally suited to creating DocBook content in OpenOffice.org. Nesting Guimenus and Guimenuitem inside a Menuchoice
OpenOffice.org bookmarks with reserved names are used to represent the parent element when nesting tags. The convention used is to follow the element name by an underscore and a number. The first element in the document will be numbered 0 (e.g. menuchoice_0) and subsequent elements of the same type will increment this number (e.g. menuchoice_1 menuchoice_2 etc.). For another example of how to use nested tags, see Meta Information where an Authorgroup is used to contain Author's. 4. In-Line ElementsDocBook in-line elements are, in general, mapped to OpenOffice.org Custom Styles. The following instructions show how to create a DocBook subscript element.
5. SectionsInitially the DocBook project used OpenOffice.org sections to enforce the nesting of DocBook sections. Feedback has shown that authors wish to use the common word processing styles such as Heading1, Heading2, etc. The following instructions describe how to create a <sect1> that contains a <sect2>
6. Tables
Formal and Informal DocBook tables are represented by a standard OpenOffice.org tables.
An <informaltable> is constructed in the same fashion as the formal table above, the only difference is that the table Caption is not specified. 7. ListsThe various DocBook lists are represented by custom and standard OpenOffice.org list styles. Creating a Varlist containing Varlistentrys
Creating an Orderedlist containing Listitems
Creating an Unorderedlist containing Listitems
8. LinksThe different methods of linking available in DocBook are supported in OpenOffice.org How to create a Footnote
How to create a Note
How to create an Xref
There is support for <xref> with a linkend attribute. If the element to be referenced does not already have an id attribute then an id can be created with an OpenOffice.org cross-reference.
Link, Ulink and OlinkThe filter has round trip support for importing and exporting DocBook links. 9. Graphics
How to create a MediaObjectTBD 10. IndexHow to create an Indexterm
NOTE: After discussions with authors the decision was made to only support simplified indexterms in the future. Few authors use spanning indexterms with startofrange and endofrange values or reference elements with a zone attribute. How to create an IndexAt present it is not possible to create a DocBook index in OpenOffice.org. However, the import and export filters should retain any index tags in an existing DocBook document. |


