
10. Restructuring documents
10.1. Changing type
To change the type of an existing element, select it and choose the new type in the Insert menu, or in the
Elements tool. You can change that way a numbered list (ol) into an unnumbered list (ul) or a
paragraph into a heading or a list, for instance.
Element types offered by the submenus Information type and Character element of the Insert menu
work as toggles. If you select some plain text and activate one of these commands, the selected text will
be turned into an element of the chosen type. Conversely, if you select an element of a type listed in
these submenus and you activate the corresponding menu item, the element is removed from the
document, but its content is kept.
Tout select a whole element, put the insertion point anywhere within this element and press key F2.
10.2. The transform command
The Transform command from the Tools menu performs complex structure transformations, based on a
language that specifies how a given structural pattern can be transformed into a different structure. For
example, nested lists can be transformed into a table and back again.
10.2.1. Available transformations
The available transformations are defined in the file Amaya/amaya/HTML.trans. Please refer to the
document "Using the HTML.trans file" for a description of the language in which the transformation
rules are written.
Additional transformations may be specified in the HTML.trans file. Some transformations are provided
in the HTML.trans file as examples.
10.2.2. Using the transform command
The Transform command displays a menu that lists all the transformations that can be applied to the
current selection. You just have to choose the transformation you want.
10.3. Inserting a division
You can easily group a set of paragraphs, headings, lists, tables, and so on within a division. To do this,
select the elements you want to group, and then select Division (div) from the Insert menu or use button
in the Elements tool.
10.4. Merging elements
You can merge successive elements, even if they are not at the same level in the document structure, by
using the Backspace and Delete keys. When the insertion point is at the end of an element, use the
Delete key to merge; when it is at the beginning of an element, use the Backspace key. In both cases,
these keys do not delete any characters; instead they merge elements previously separated by a structure
boundary.
Note that when the insertion point is within an element, the Backspace and Delete keys delete the next
or previous character as usual.
10. Restructuring documents
29
Comentários a estes Manuais