4.2. Examples

Compared to PSGML mode there are only couple of commands that you need. This speeds up writing with Emacs considerably, which means you can concentrate more on the content of your article.

4.2.1. Commands

To create a tag, type < and then type the keyword. To complete the keyword, press Ctrl-Ret, then add the last >. To close a tag, type </.

[Important]Important

When you open a document that doesn't have a DOCTYPE declaration at the top of the file, you will get this message and tag completion won't work because nXML will not know what format you are writing.

To load the schema, type Ctrl-c, then Ctrl-s and navigate to /usr/share/emacs/site-lisp/nxml-mode/schema/ and load docbook.rnc. Emacs will then prompt you to save it in the current working directory.

[Tip]Tip

The commands already discussed are the only differences between using Emacs with PSGML mode and Emacs with nXML mode. You will still need to use all the same commands as discussed in Section 3.5, “Basic Emacs Commands”.