Quanta is widely recognized as the most advanced free software web development environment. But a lot of people do not know that Quanta is a friendly editor for all SGML and XML documents (and therefore for docbook).
Quanta offers features like syntax highlighting, tag autocompletion, autoclosing and code folding. But lately, the developers have been adding features specific for docbook, and ironing out the last remaining bugs. Here we try to show you why it is a good idea to use Quanta as your docbook editor.
A screenshot of Quanta's main window
Below you can find more information about some other interesting features available for DocBook editing: the document structure sidebar, the tag editor sidebar, the entities autocompletion, the documentation sidebar and the DocBook toolbar (complete with table and list wizards, ui elements, admonitions, KDE tools and other standard tags, and present in versions starting from Quanta 3.4).
The docbook toolbar offer easy access to the most common docbook tags and to Kommander dialogs. Just hover the mouse over a toolbar button to know what tag it adds, or what action it performs.
If you open a KDE docbook document, the KDE docbook toolbar should be loaded automatically. If you are starting from scratch, choose the -> menu item, and select one of the KDE docbook DTEPs to load the toolbars.
A screenshot of Quanta's DocBook toolbar
A few Kommander dialogs were created specifically to support KDE documentation writers.
You can check your docbook file using the checkXML button
from the Tools toolbar. It is a front
end to the checkXML
command line utility. The errors in the docbook file will be displayed in the
Messages sidebar, in the bottom part of Quanta's
main window. No output usually means no errors. If you find the list of
errors is too big, do not panic: fix the first one, save the file, and run
checkXML again.
To process the docbook into html files, (and view them), use the
meinproc
button (on the Tools toolbar). It is also a front end to
a command line utility, in this case, meinproc.
Wizards: dialogs to generate docbook markup for
lists,
tables and
images.
A screenshot of Quanta's docbook table wizard
Depending on the version of some XML utilities used by Quanta, the
checkXML and
meinproc scripts
can present bugs. Starting from the KDE 3.4.2 release, these bugs
should not appear anymore. If you have problems using an older release, (in
special if Konqueror is not starting up when using the
meinproc script or there is no output when using the
checkXML script), you can get and install the
updated docbook
scripts from kde-files.org to solve these issues.
The tag or attributes editor is located on the right sidebar, and it shows the available attributes for the tag which is currently being edited. The tag editor helps you to edit the attributes for the current tag: just click on the Value column of any attribute to edit it.
A screenshot of Quanta's attribute editor sidebar
Another useful feature is the documentation sidebar, which allows you to download and use documentation packages as offline reference. This very guide you are reading is available offline browsing, using Quanta's documentation sidebar. Just grab and install the KDE Doc Primer documentation package. The documentation sidebar is on the right side of the main window.
A screenshot of Quanta's documentation sidebar, showing the KDE Doc Primer
Quanta offers autocompletion for entities. However, this feature is hardly useful without the KDE entities definitions. To generate the entities list for KDE, follow the procedure below:
The entities autocompletion feature suffered from known bugs up to the 3.4.1 release. However, these bugs should be fixed now, starting from Quanta 3.4.2.
Procedure 4.3. Generating and installing the entities.tag
file
Open Quanta. Choose the -> menu item.
Now, we have to select the right dtd file to convert.
On the dialog, select the KDE installation folder (usually
/usr
or
/opt/kde3
. The dtd file we want is named
kdex.dtd
under
share/apps/ksgmltools2/customization/dtd/
.
Select it and press . A new Document Type Editing
Package (DTEP) for kdex will be created.
If you don't know which is the KDE installation folder, enter
on a terminal application. The output of this command is the KDE installation folder. To find out which is the KDE configuration folder ($
kde-config --prefix
KDEHOME
, needed later) enter the command
below:
$
kde-config --localprefix
Now that you have converted the dtd, you can use it directly,
by choosing the -> and selecting the
kdex dtd. But the best solution is to install the
entities.tag
file for use with the KDE
docbook dtds, so that you can use both the KDE docbook toolbars and entities
autocompletion.
Copy the entities.tag
file from the
kdex
dtep folder to the
kde-docbook-4.1.2
dtep
folder. These folders are under
KDEHOME/share/apps/quanta/dtep
, where
KDEHOME
is the folder that contains your
KDE settings and application data (usually
~/.kde
).
You can copy the entities.tag
file to the right location by
entering the following command in a console application:
$
cp `kde-config --localprefix`/share/apps/quanta/dtep/kdex/entities.tag \ `kde-config --localprefix`/share/apps/quanta/dtep/kde-docbook-4.1.2/entities.tag
Restart Quanta.
A screenshot of Quanta's entities auto-completion feature
Finally, the document structure displays the logical representation of your document. Click an element with the left mouse button to move the cursor to the element's position in the document. Click an element with the right mouse button to display a menu with commands that deal with navigating and updating the document structure sidebar.
A screenshot of Quanta's document structure sidebar
Quanta is part of the kdewebdev module, which is released as part of KDE. Binary packages are available for the majority of the distributions. Quanta can be easily extended to support custom scripts, toolbars and documentation sidebars. For more information, check the application handbook.