Editing
⇤ ← Revision 1 as of 2008-08-31 13:04:29
Size: 5017
Comment: dumping from DocumentationTeam/Contribute
|
Size: 3455
Comment: simplifying
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
This page describes the format used by the DocumentationTeam for the system documentation, ''docbook xml''. = Introduction = The Official Documentation in Ubuntu is written in Docbook XML. This is a simple language, like html. This page details how to edit files in the Documentation Team repository. Gedit is one of the text editors that you can use to edit these files. Before you start, you need to get the files, so follow the instructions on [[DocumentationTeam/Repository]]. |
This page describes how to edit the system documentation, and in particular introduces you to the format used by the DocumentationTeam for the system documentation, ''Doc``Book XML''. We assume that you have already downloaded one of the branches which stores the system documentation. If not, visit the [[DocumentationTeam/SystemDocumentation/Repository|Repository]] page. |
Line 55: | Line 49: |
= Marking Section Status = | = Checking your changes = |
Line 57: | Line 51: |
To help keep track of what we are doing in the documents we mark the status of items and leave messages of what we are doing. This information is collected into the 'Project Status Reports' found on the [[DocumentationTeam/Projects]] page. The first thing to know about this is how to mark an item status. To mark item status '''add the 'status' attribute ''' to any of the following elements: {{{<chapter>}}}, {{{<sect1>}}}, {{{<sect2>}}}, {{{<sect3>}}}, {{{<sect4>}}}, {{{<sect5>}}}. The value of the 'status' attribute is, well, its status. Valid state values include: * status="'''help'''" = Help Wanted * status="'''writing'''" = In Progress * status="'''review'''" = Awaiting Review * status="'''reviewing'''" = In Review * status="'''complete'''" = Finished To add a message add an {{{<authorblurb>}}} block after the {{{<title>}}} element containing a {{{<para>}}} with your name and a short message. Here is an example:: {{{ <chapter id="chp-admin-serv-nntp" status="writing"> <title>News Servers</title> <authorblurb> <para>Sean Wheller: adding theoretical introduction</para> </authorblurb> <para>body of doc content continues here</para> </chapter> }}} To build the status pages, run {{{make status}}}. This will build the status reports in your working copy under {{{build/status}}}. There are two formats: XML and HTML. The reports can therefore be viewed under Yelp or a Web Browser. = Submitting your changes = For more information on how to contribute your changes, see the [[DocumentationTeam/Repository]] page. |
For more information on how to contribute your changes, see the '''[[DocumentationTeam/SystemDocumentation/Checking|Checking]]''' page. |
This page describes how to edit the system documentation, and in particular introduces you to the format used by the DocumentationTeam for the system documentation, DocBook XML. We assume that you have already downloaded one of the branches which stores the system documentation. If not, visit the Repository page.
A look at DocBook
Try editing a file in one of the docteam branches (for example ~/ubuntu/about-ubuntu/C/about-ubuntu.xml, which is the DocBook source of the About Ubuntu document). It starts with something like:
<?xml version="1.0." encoding "UTF-8"?>
That's called the xml declaration, and is found at the beginning of any XML file. DocBook is a dialect of XML, so it must have that starting line.
Then there's something like this:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ <!ENTITY % globalent SYSTEM "../../../libs/global.ent"> %globalent; <!ENTITY % cdo-C SYSTEM "../../../libs/cdo-C.ent"> %cdo-C; <!ENTITY % gnome-menus-C SYSTEM "../../libs/gnome-menus-C.ent"> %gnome-menus-C; <!ENTITY language "&EnglishAmerican;"> <!ENTITY language "en"> ]>
This is called the Document Type Declaration: basically it says that this xml file must conform to the rules of the Docbook DTD version 4.3.
The rest is the XML tree. XML files are made of elements, which contain elements, which contain sub-elements, and so on. DocBook is just a dialect of XML, so it follows the same structure.
In the case of the about-ubuntu document, you can see a <article> which contains many <sect1> which contain many <para>. It makes some sense. Some longer documents use <book> rather than <article>, like the Internet document. These also have several <chapter> tags.
The top-level element that contains all the rest is called the root element, and in About Ubuntu it is called <article>.
Scroll down slowly, reading the names of the xml elements: you can see that the elements are a semantic nomenclature that defines the role of the text.
For more details about the tags which are found in docbook xml documents, see the Docbook Tags page.
Some modifications
Now try to add some text: find a <para> element and type something in it, then save. You'll have changed an existing paragraph. You can easily review text and correct typos and spelling this way.
You can add a new paragraph by adding a new <para> element next to some other. For many other similar kinds of editing, you can easily guess how DocBook works just by looking at what has been written already, as you probably noticed even before reading these lines.
For more complicated things, the Docteam Mailing List is there for you.
There is some information on using gEdit for docbook/xml at https://help.ubuntu.com/community/gedit.
Checking your changes
For more information on how to contribute your changes, see the Checking page.
DocumentationTeam/SystemDocumentation/Editing (last edited 2014-07-02 21:59:08 by xdsl-83-150-81-40)