## 2. DITA topic reference

## 2.1. DITA topic menu

When a DITA topic (of any kind) is opened in XMLmind XML Editor, the XML menu becomes the Topic menu and this menu is populated with items which are specific to DITA topics. This reference contains a description of such menu items.

### Table editor

This table editor may be used to edit simpletables as well as CALS tables. Most table editing commands can be repeated by using Edit → Repeat (Ctrl-A).
Note that using this table editor, or simply saving a topic, or checking a topic for validity, guarantees that the cols attribute of a tgroup is up to date. That is, you may forget about the cols attribute, XMLmind XML Editor will always compute it for you.

### Paste plain text as one or more paragraphs or as a table

Paste As
  The entries of this submenu allow to paste the plain text copied to the clipboard, typically using a third-party word processor or spreadsheet, as:
  - one or more paragraphs,
  - OR a pre element,
  - OR one or more list items,
  - OR an itemized list,
  - OR one or more table rows,
  - OR a table.
  The last two menu entries assume that each text line specifies a table row and that, within a text line, the contents of the table cells are separated by tab characters.

  ##### Tip

  If you need to paste the copied text as an ordered list, first paste this text as an itemized list then convert the pasted list to an ordered list using Edit → Convert (Ctrl-T).

  The above menu entries paste elements after the implicitly or explicitly selected element.
  The following entries of this submenu allow to paste the image copied to the clipboard as:
  - image,
  - fig.
  Except for menu entry "image" which replaces the selection or pastes an element at caret position (like Edit → Paste), the other menu entries paste an element after the implicitly or explicitly selected element.

### Indexterm editor

Insert or Edit indexterm
  If the caret is anywhere inside an indexterm element or if a single element or node is explicitly selected anywhere inside an indexterm element, this menu item displays an indexterm editor dialog box allowing to modify this indexterm element.
  Otherwise, this menu item displays an indexterm editor dialog box allowing to create a new indexterm element and then to insert it at caret position.

  ##### Tip

  If some text has been selected, field Term of the dialog box is automatically initialized with the text selection. Therefore the simplest way to create an indexterm element is first to select the term in the body of the document, then invoke Topic → Insert or Edit indexterm and finally click OK.

### Moving elements

Move Up
  Move selected element up, that is, swap it with its preceding sibling node. Requires the element to be explicitly selected.
Move Down
  Move selected element down, that is, swap it with its following sibling node. Requires the element to be explicitly selected.

### Convert Document menu

##### Attention

The items of this menu are all disabled if the document being edited needs to be saved to disk.

Convert to XHTML
Convert to XHTML [one page]
  Converts the document being edited to multi page or single page XHTML 1.0.
Convert to Web Help
  Converts the document being edited to Web Help .
Convert to HTML Help
  Converts the document being edited to a .chm file. This command is disabled on platforms other than Windows.
  Requires:
  1. Download and install Microsoft®'s HTML Help Workshop.
  2. Declare the HTML Help compiler, `hhc.exe`, as the helper application associated to files having a "hhp" extension. This can be specified by using the Preferences dialog box, Helper Applications section.
Convert to Java Help
  Converts the document being edited to a .jar file for use by the Java™ Help system.
  Requires:
  1. Download and install JavaHelp .
  2. Declare the Java™ Help indexer, `jhindexer` (`jhindexer.bat` on Windows), as the helper application associated to files having a "application/x-java-help-index" MIME type. This can be specified by using the Preferences dialog box, Helper Applications section.
Convert to Eclipse Help
  Converts the document being edited to a directory containing various files for use by the Eclipse Help system.
Convert to EPUB
  Converts the document being edited to an .epub file.
Convert to RTF (Word 2000+)
  Converts the document being edited to RTF (Rich Text Format) using. The document generated by this command can be edited and printed using Microsoft® Word 2000 and above.
  Requires downloading and installing the "XMLmind FO Converter XSL-FO processor plug-in " add-on using Options → Install add-ons.
Convert to WordprocessingML (Word 2003+)
  Converts the document being edited to WordprocessingML. The document generated by this command can be edited and printed using Microsoft® Word 2003 and above.
  Same requirements as Convert to RTF.
Convert to Office Open XML (Word 2007+)
  Converts the document being edited to Office Open XML (.docx file) . The document generated by this command can be edited and printed using Microsoft® Word 2007 and above.
  Same requirements as Convert to RTF.
Convert to OpenDocument (OpenOffice.org 2+)
  Converts the document being edited to OpenDocument (.odt file). The document generated by this command can be edited and printed using OpenOffice.org 2.
  Same requirements as Convert to RTF.
Print PostScript
  Convert the document being edited to PostScript® and send the generated file to the chosen printer.
  Requires downloading and installing any of the following add-ons using Options → Install add-ons.
  - Apache FOP 1.x XSL-FO processor plug-in;
  - RenderX XEP XSL-FO processor plug-in (2).
Convert to PDF
  Convert the document being edited to PDF.
  Same requirements as Print PostScript.

## 2.2. DITA topic tool bar

When a DITA topic (of any kind) is opened in XMLmind XML Editor, buttons which are specific to this kind of document are automatically added to the tool bar. This reference contains a description of such buttons.

Button | Description
--- | ---

Toggle i

“Toggle” element i. Next to this toggle is found an arrow button displaying a menu containing additional checkboxes for the following elements: term, cite, tm, tm[reg].

##### Note

The DITA tool bar starts with a number of “text style” toggles. These toggles emulate the behavior of the Bold, Italic, Underline, etc, toggles found in the tool bars of almost all word-processors. More information about text style toggles in "About text style toggles ".
Figure 1. Toggles found at the beginning of the DITA tool bar
In the above screenshot, the caret is inside an i element and the user clicked the arrow button next to a “italic text style” toggle.

Toggle b | “Toggle” element b. Next to this toggle is found an arrow button displaying a menu containing additional checkboxes for the following elements: keyword, uicontrol, option.
Toggle tt | “Toggle” element tt. Next to this toggle is found an arrow button displaying a menu containing additional checkboxes for the following elements: filepath, varname, cmdname, apiname.
Toggle xref | “Toggle” element xref.

Add p

Add a p after node selection or after caret at a location where it is valid to do so and where it makes sense to do so.

##### Note

This command and all the following commands will never add an element inside a p, even it is valid to do so. These commands add elements always after a p. That is, a p element is always considered by these commands as being a plain paragraph and never as being a division.

Add list item | Add a list item of the right type after current list item. For this command to work, suffice to click anywhere inside an sl, ul, ol, dl, choices, substeps, steps, steps-unordered.
Add ul | Add an ul after node selection or after caret at a location where it is valid to do so and where it makes sense to do so (see note).
Add ol | Add an ol after node selection or after caret at a location where it is valid to do so and where it makes sense to do so (see note).
Add dl | Add a dl after node selection or after caret at a location where it is valid to do so and where it makes sense to do so (see note).
Add pre | Displays a menu which allows to add a pre, lines, screen, codeblock or a msgblock after node selection or after caret at a location where it is valid to do so and where it makes sense to do so (see note).
Add table | Displays a menu which allows to add a simpletable or a table after node selection or after caret at a location where it is valid to do so and where it makes sense to do so (see note).

Add image

Displays a menu which allows to

- insert an image at caret position;
- OR add a fig (containing an image) after node selection or after caret at a location where it is valid to do so and where it makes sense to do so (see note).

Insert media object

Displays a menu which allows to insert a “media object” at caret position.

object(audiovideo)
  An object element allowing to add audio or video to your topic.
object(flash)
  An object element allowing to add an Adobe® Flash® animation to your topic.
xref(play)
  An xref element containing <?onclick play()?>.

Last menu item allows to insert an <?onclick?> processing-instruction at caret position or, if an <?onclick?> processing-instruction is selected, to edit it.
More information about the above “media objects” in Section 6.

Add section | Add a section after node selection or after caret at a location where it is valid to do so and where it makes sense to do so (see note).
Browse the DITA reference manual found on the OASIS Web site | Use the Web browser to display the documentation of the element explicitly or implicitly selected. (Contributed by Mark Fletcher.) Requires to be connected to the Internet because the reference manual of DITA elements is found on the OASIS Web site.

## 2.3. DITA topic bindings

When a DITA topic (of any kind) is opened in XMLmind XML Editor, additional keyboard shortcuts and additional drag and drop facilities which are specific to this kind of document are automatically made available to the user. This reference contains a description of such user input/command bindings.

Keyboard shortcut | Description
--- | ---
Enter | Insert a newline character if possible. Otherwise, if caret is at the beginning of a paragraph, list item or a few other kinds of block, insert same block before. Otherwise, if caret is at the end of a block, insert same block after. Otherwise, split block.
Del | Delete selection if any. Otherwise, if caret is at the end of a paragraph, list item or a few other kinds of block, join with following block. Otherwise, delete character following caret.
BackSpace | Delete selection if any. Otherwise, if caret is at the beginning of a paragraph, list item or a few other kinds of block, join with preceding block. Otherwise, delete character preceding caret.
Ctrl-Enter | Add same block after the paragraph, list item or a few other kinds of block which is the ancestor of selected node.
Ctrl+Shift-Enter | Add same block before the paragraph, list item or a few other kinds of block which is the ancestor of selected node.
Ctrl-F1 | Browse the DITA reference manual found on the OASIS Web site

Drop an object.

If the drop occurs above an element having an href attribute other than an image (e.g. an xref), the dropped string is considered to be an URL and is used to change the value of the href attribute.
Note that this kind of drop attempts to relativize the dropped URL against the location of the drop site. For example, if you drop "file://home/john/doc/topic1.dita" onto an xref contained in file "file://home/john/doc/ref/reference2.dita", its href is set to "../topic1.dita".
Elsewhere, normal behaviour which is:

Drop onto an image element
  Considers the dropped string to be the URL or the filename of a graphics file. Displays a dialog box allowing to copy or reference this graphics file for use by the image element.
Drop elsewhere
  If the object being dropped is an URL or an absolute filename, open the corresponding document. Otherwise, paste the dropped text or XML at or after the drop location.

Drag one of the “handles” displayed around an image. (The “handles” are displayed after clicking on the image.) | Resize the image, but always preserve its aspect ratio. Pressing Ctrl (Cmd on the Mac) while dragging the handle allows to distort the image.
Drag a separator found between two table columns. | Resize the table column. More precisely this gives an appropriate proportional width (e.g. <colspec colwidth="3*">) to all table columns.

(1)

(2) | Unlike all the other add-ons, the RenderX XEP XSL-FO processor plug-in is not self-contained. You'll need to download, install and activate RenderX XEP (for example, free Personal Edition ) prior to using the RenderX XEP XSL-FO processor plug-in.