- Project tools
- How do I...
|Over 500 more tools...
To specify that a document uses this grammar,
place the following attributes in the root element. For example, here is the
root element of this section:
<title> User's Guide </title>
The formal grammar of Slacker's Docbook is written in W3C XML Schema Description language.
It is based on the unofficial Docbook 4.4 xsd.
If you use a modern XML editor such as jEdit
(with the XML plugin), you can take advantage of W3C XML Schemas. You
can see detailed error messages and completion assistance popups to help you
learn the language faster.
If you downloaded Slacker's Docbook to your local machine, you can take
advantage of the provided OASIS catalog file. Your
editor can use this file and no longer need to grab the schema from the network.
Table A.1 is a table listing the elements of
Slacker's docbook. In addition to these, you can use any tag
in Docbook 4.4.
Table A.1. Slacker's Docbook Elements
|| <ulink url="urlref">
|| <emphasis role="bold">
Includes an image, inserting a
<mediaobject><imageobject><imagedata> in its place. The value
of the fileref attribute is unchanged, and if a relative path,
the referenced file is copied into the destination directory, relative to
the generated file.
Further, if the output format is PS, any PNG files are automatically converted
into EPS using the
convert program, which comes with imagemagick.
Other attributes, such as
scalefit are passed to the <imagedata>.
srcFile is assumed to be a relative path from this document
to a source code example. The example can be trimmed
through the use of
segIdRef, an optional attribute, is a reference to a named
//start id=segId snippet in the included file. This way,
you can have different-named snippets included from different examples.
modestr, an optional attribute, can be:
cpp - included as code example with C++/QML/Java style comments,
with some callout processing. (no linewrap). Equivalent to
code - included as example Python/Perl/Shellscript comments
text - included as an example text file with
This tag includes srcFile at preprocess time,
and inserts its contents inside an <example><programlisting>.
Since each <example> should have an
id attribute, it is
recommended you also supply an
id="idAttr" to the
<include>, which will get passed onto the generated <example>.
Each srcFile is linked from the
generated HTML example, and is also copied into the build directory
so that the relative URL still works, and the generated files can be
more easily packaged for distribution.
If the optional
allfiles attribute is specified,
then all of the sibling files of the included
src file will also be
copied (non-recursively) into the build directory, to provide a "complete"
|| Expanded to <listitem><para> except when
inside a <pb> element.
|| "parabullet" -
mapped to <orderedlist> when "slides" condition is true.
Add child <li> elements around each major idea or sentence.
When slides condition is not true, a <pb> is rendered as a single
<para>, and all the <li> tags inside the <pb> are removed.