This chapter covers the following topics:
Using DocBook macros for Emacs
Editing XML/DocBook Files with the Vim Editor
Integrating the spell checker aspell into jEdit
Most editors allow you to write or record macros that you can use for
automatically inserting “skeletons” for complex XML
constructs as illustrated by Example B.1, “A varlistentry
Element”.
varlistentry
Element #<varlistentry> <term></term> <listitem> <para></para> </listitem> </varlistentry>
DAPS comes with macros for the Emacs editor that can be used to add
DocBook elements, such as listitem
,
figure
, or indexterm
. The macros are
stored in docbook_macros.el
and are added to your
system during the installation of DAPS. They require that you use one
of Emacs' main XML editing modes, either nxml
or
psgml
.
To load the DocBook macros, open your Emacs customization file
(~/.emacs
or ~/.gnu-emacs
).
Insert the following line:
(load "/usr/share/emacs/site-lisp/docbook_macros.el" t t)
Save the Emacs customization file and restart Emacs.
For an overview of the available macros and their usage, refer to http://en.opensuse.org/openSUSE:Documentation_Emacs_Docbook_Macros.
Find information about on https://github.com/tbazant/xml-vim.
If you do not want to run daps spellcheck
from the
command line, you can also integrate aspell (plus a custom
dictionary, if needed) into your XML editor, so that spelling is
checked “on the fly” during editing. Consult your editor's
documentation on how to integrate a custom dictionary. If you use
jEdit, follow the instructions in
Procedure B.2, “Integrating aspell into jEdit”.
Install and activate the plug-in for spell checking:
Start jEdit and select
› .If the
plug-in is not already installed, install and activate it.Close and restart jEdit.
Configure the plug-in as follows:
Select
› .In the left navigation pane, select
› .
Set en_US
.
If the desired dictionary does not appear in the drop-down box, install the respective aspell dictionary for the language and click
.In the left navigation pane, switch to
› .In the table, activate the
entry and click next to it.In the
, activate the following entries:NULL
COMMENT1
LITERAL1
In the left navigation pane, switch to
› .Set the path to the
. Select .To use an additional custom aspell dictionary, specify the path to it in the text box below
:--extra-dicts=PATH_TO_CUSTOM_DICT
For example:
--extra-dicts=/home/tux/custom_aspell.rws
Save your settings in the plug-in options dialog by pressing
or .To perform a spell check during editing, select
› › (or use the key combination assigned to that menu item).