Creating a document

Creating a document is done by selecting the customary File|New FileNew menu item. This displays a dialog box allowing to choose a document template.

The File|New dialog box

Each document template has a name and belongs to a category loosely corresponding to a document type: DITA (groups topic, map, bookmap and ditaval), DocBook (that is, DocBook v4+), DocBook v5+ and XHTML.

Let's suppose you want to create a DocBook 5 article. Here's what you'll see at first:

Newly created article

The little squares are text placeholders. That is, each little square represents an empty text node. When the caret is inside such placeholder, you can directly type some text.

You can move the caret inside a text node, whether empty or not, by clicking on it or by pressing Tab or Shift-Tab. Tab moves the caret to the following text node. Shift-Tab moves the caret to the preceding text node.

These tag-less placeholders do not convey any meaningful information, so how can you understand what you see? The answer is: look at the node path bar. The node path bar shows you which XML node is selected and which are its ancestor elements.

The node path bar

In the above screenshot, the caret is located inside a text node (#text) contained in a para element, itself contained in a section element, itself contained in an article element.

Because the caret is contained in some text found in a para element, this para element is said to be implicitly selected. Editing commands such as Copy icon EditCopy, Cut icon EditCut, Replace icon EditReplace, etc, will all act on this para element. This can be surprising because there is no visual clue that something is selected.

The node path bar also allows to explicitly select an XML node. Click in the node path bar on "#text" or on the name of an element, for example "section", and you'll select the corresponding text node or element. When you do this, you have explicitly selected the XML node and in such case, a red box is drawn around it.

Explicitly selected section
Watch the screencast Watch the screencast

Related productivity tips

related productivity tip Custom document templates