Difference between revisions of "Documentation Primer/Manual/DocBook Reference/Prologue"

Jump to: navigation, search
m (1 revision: Moving Docbook Primer from UserBase to TechBase)
Line 1: Line 1:
<languages />

Revision as of 09:05, 1 September 2012

Other languages:
These pages are being transferred from UserBase. Please don't work on them until the transfer is complete, and the old UserBase pages have been removed.

The Prologue

<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
  <!-- Define an entity for your application if it is not part of KDE
       CVS -->
  <!ENTITY <replaceable>kmyapplication</replaceable> "<application>KMyApp</application>">
  <!ENTITY kappname "<replaceable>&kmyapplication;</replaceable>"><!-- replace kmyapplication here
                                            do *not* replace kappname-->
  <!ENTITY package "<replaceable>kde-module</replaceable>"><!-- kdebase, kdeadmin, etc.  Leave
                                     this unchanged if your
                                     application is not maintained in KDE CVS -->
  <!ENTITY % addindex "IGNORE">
  <!ENTITY % English "INCLUDE"> <!-- ONLY If you are writing non-English
                                     original documentation, change
                                     the language here -->

In general, this needs minimal changing from the template. The items you must change are the entities "kappname", "package", and "English".

The entity "kappname" looks like it's redundant (as the comment in the template notes), but it is important. This allows us to use one global text in all documents, and still refer to the specific application by its correct name. So it should be changed to refer to this new entity, but this time you should only change the part in quotes ("&kmyapplication;") as follow:

Example: Setting up the global "kappname" entity

<!ENTITY kappname "&kmyapplication;" -- this only *seems* redundant -->


<!ENTITY kappname "&kate;" -- this only *seems* redundant -->

In short: change any occurrence of "kmyapplication" to the real name of your application. Do not use "kappname" or "kapp" directly in a document yourself.

The entity "package" is used similarly. It allows us to insert a single piece of "boilerplate" text into every document, and have the correct package name inserted when the document is compiled. Use the cvs module name, in lower case, &eg; "kdeedu" or "kdebase".

The entity %addindex; is a toggle. If set to "INCLUDE" a document index will be automatically generated. It is normally set instead to "IGNORE", and should not be changed unless you really do want to generate an index. You can find out more about indexes in References, indexes, and glossaries.

Example: A KDE User Manual Prolog
Here is an example of a completely set up prolog, as it normally looks. This is the prolog from the AMOR documentation
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
  <!ENTITY kappname "&amor;">
  <!ENTITY package "kdetoys">
  <!ENTITY % addindex "IGNORE">
  <!ENTITY % English "INCLUDE">
The entity "English" should be changed to reflect your language, if you are either writing original documentation in another language, or you are translating a document. For KDE the original documentation should always be in English, so you should not need to change this when writing. For informational purposes, the currently supported languages are:
  • Afrikaans
  • British-English
  • Bulgarian
  • Catalan
  • Czech
  • Danish
  • German
  • Greek
  • English
  • Spanish
  • Estonian
  • Finnish
  • Faroese
  • French
  • Hebrew
  • Hungarian
  • Indonesian
  • Italian
  • Japanese
  • Dutch
  • Norwegian (Note, this is only for compatibility, either Norwegian-Bokmal or Norwegian-Nynorsk should be used in preference.)
  • Norwegian-Bokmal
  • Norwegian-Nynorsk
  • Polish
  • Portuguese
  • Brasilian-Portuguese
  • Romanian
  • Russian
  • Slovak
  • Slovenian
  • Serbian
  • Swedish
  • Turkish
  • Ukrainian
  • Walloon
  • Xhosa
  • Continental-Chinese
  • Traditional-Chinese