The logical structure (see section 1) does not only describe the hierarchical organization of documents; it also contains non-hierarchical links between elements. Such links, called references, represent references to a section, to a note or to a bibliography. Thot can deal with forward references as well as backward references. The same element can have several references.
References are created in the same way as other elements of the document logical structure by using the ``Insert'' command or the right mouse button (see section 4.3). First use the ``Insert'' menu to create the required reference, then click on the element to be referenced. This element must be of the type required by the reference; a message indicates this type in the Thot window. If the target element does not appear in a window, scroll the document until this element is displayed (see section 3.1). The target element can be chosen in a document other than the one in which the reference is placed, provided that it is of the required type; it is then called an external reference.
By way of example, you can create a reference to a section. First select the character before which you want to insert the reference, then press the right mouse button and choose the entry ``Paragraph_element before TEXT'' then Ref_section. Click with the left mouse button on the section designated by the reference. The section number appears in the text.
In some cases [2], for instance for references to notes, the editor is able to create the reference and the target element simultaneously. In such cases, once the reference type has been chosen, the editor displays a menu with two entries:
For greater visibility, references are displayed in a color different from the rest of the text. However, printing will be black and white. The color of references can be chosen by the user (see section 23.1.3).
External references can be displayed in two different ways depending on whether the document containing the target element is open or not:
References are always printed under their complete form, whether external documents are open or not when issuing the printing command. However, the files containing those documents must be accessible to the editor (the access path must be in the list of document directories of the editor, see sections 7.9 and 23.1.5).
References are maintained by the editor. Thus, if you create a new section after this one, the next section number will be changed as well as the reference to this section: 5.4. Moreover, when the target element of a reference is placed elsewhere with the ``Cut'' and ``Paste'' commands, the references which designate that element are automatically updated. However, you have to modify a reference if you want it to be related to another element.
To do this, first select the references to be modified, then invoke the ``Insert'' menu (see section 4.3.1). In this case, the first entry (``Within selection'') allows the target element to be changed: once you have selected that menu entry, click on the new target element with the left mouse button as for creating a reference (see section 5.1). The new target element can be placed in the same document as the reference or in another document (external reference).
Note that references are typed, i.e. each type of reference must designate an element of a given type. When a reference is modified, it must designate the same element type. If you want the reference to designate an element of a different type, delete the existing reference and create a new one of the required type.
References are bidirectional links (see [Quint92a]). The most direct way of reaching the target element of a reference is by double-clicking on the reference with the left mouse button. The target element is then selected and displayed in all possible views (see section 9). If none of the views is open, one of them is automatically open. It is an easy way for opening a view.
The document in which the target reference is located (external reference) is opened by double-clicking on that reference. This method is a quick way for opening a document.
You can also navigate through references in the reverse way by selecting an element and searching for all references that designate it. Use the ``Reference to'' command from the ``Search'' sub-menu of the ``Edit'' menu. If the selected element or one of its ascendants in the logical structure is the target of at least one reference, this command can be activated. Otherwise, it appears in grey, which means that no reference designates the selected element or its ascendants.
By calling the ``Reference to'' command, you display a form that indicates the type of the target element for which the references are searched. That form contains three buttons:
When all references have been shown, a ``Not found'' message is displayed in the form.
When one reference is found in an unopened external document, a ``Reference within document x'' message is displayed in the form. The ``Open'' button then allows the document to be opened and the reference to be displayed.
When opening a document through a reference by double-clicking on it or by using the ``Reference to'' command, the editor searches the document to be opened in the list of document directories (see section 7.9). If the document is included in another directory, update the list of current directories by using the ``Environment'' menu (see section 7.9.2).
An empty reference is a reference with no target. It is displayed under the form of a question mark in square brackets: [?]. It can be produced when creating a reference or when modifying it if no element of the required type is designated. Deleting a target element can also create an empty reference.
The ``Empty references'' command from the ``Search'' submenu of the ``Edit'' menu enables empty references to be located. This command displays a form which allows you to choose the part of document in which you want to carry out the search (see section 3.8). The ``Confirm'' button initiates the search. Each time it is activated, another empty reference is searched for in the required part. When all empty references have been found, a ``Not found'' message is displayed in the form.