
Re: Questions Re Commentary and Notes RTF Codes
Greetings Gungabout,
Please start here:
https://www.theword.net/docs/tw3-book-module-spec.docHere is a portion copied:
Topics that act as anchors/links – link-topics (version 3.2.1+)
It is possible to have a topic that does not have its own content but instead ‘links’ to another topic. In order to support this, a new content.type has been added called ‘meta’. Topics of this type must:
1. Have the content.type column (in topics table) set to the value ‘meta’.
2. The data in the content table should be a meta record. A meta record is defined as follows:
a. A set of name=value properties, each on a new line (separate by CR+LF)
b. The first line must be meta=_twmgc_ (exactly like that)
For a meta record that points to another topic, the following name/value pairs are used: type=link
id=<linked topic id>
anchor=<bookmark/anchor in linked topic, optional>
Notice: both conditions 1 and 2 above must be true for link-topics to work properly. Inconsistencies in the db will lead to unexpected results.
For example, the data column of the content table for a link-topic should look like this:
meta=_twmgc_
type=link
id=3
anchor=bkm1
In the above example, 3 is the id of the topic this one links to, and anchor an (optional) bookmark/anchor defined in this target topic.
The following rules apply for link-topics:
1. They cannot be created from within theWord: they must be created with direct sql manipulation. This implies that they should be mostly used for non-user modules.
2. All operations that are made to link-topic (e.g. highlighting, content update, verse-ref detection) are internally applied to the linked topic instead. So, in normal conditions, a link-topic (having been created with direct sql manipulation) cannot be changed at all from within theWord (except for 3, see below).
3. When copying link-topics from one module to another (using drag-n-drop) from within theWord, the link-topics are not really copied, instead the actual linked copied content is. Be very careful with this operation since it is the only case in which link-topics are not preserved.
4. When searching, link-topics do not appear in the search results for content-search: instead, their linked topics appear. When searching topic-subjects, then link-topics can/will appear
5. When displaying a link-topic in the Book view, the display is not updated if the current topic is the same with the linked-to topic. If an anchor is defined in the link-topic, the display scrolls appropriately.
6. A bookmark icon appears in the topics-tree for link-topics.
7. Changing module content-type (from rvf to rtf, etc) should have no effect on link-topics.