Editing Text
- Last UpdatedDec 09, 2025
- 2 minute read
Editing a text attribute is achieved through use of the EDTEXT command, which gives a simple case-sensitive, string exchange facility operating on the attribute in question (see below).
The EDTEXT command takes the general forms:
|
EDT text_type number string_1 string_2 |
|
|
text_type |
is the text attribute in question, which can be any Draft text attribute, including the name attributes OSFN and BSFN. If text_type is not specified, BTEX is assumed. |
|
number |
is the order of occurrence of string_1 within the target string. If this is omitted then the first occurrence, is assumed, if a value of 0 is specified then all occurrences of string_1 are processed (that means, replaced by string_2). |
Several editing instructions may be given in the same command line. The command
EDT text_type APP string
will append the given string to the specified text attribute.
The different syntax options of the EDTEXT command are illustrated by the examples given below.
|
Target string: ‘The dog, the cat and the rabbit were in the garden’ |
||
|
EDT ’the’ ’that’ |
(change first occurrence of ‘the’ to ‘that’) |
|
|
gives: |
’The dog, that cat and the rabbit were in the garden’ |
|
|
EDT ’the rabbit’ ’Dolores’ |
||
|
gives: |
’The dog, the cat and Dolores were in the garden’ |
|
|
EDT 2 ’the’ ’that’ |
(change second occurrence of ‘the’ to ‘that’) |
|
|
gives: |
’The dog, the cat and that rabbit were in the garden’ |
|
|
EDT 0 ’the’ ’that’ |
(change all occurrences of ‘the’ to ‘that’) |
|
|
gives: |
’The dog, that cat and that rabbit were in that garden’ |
|
|
EDT ’dog’ ’horse’ ’at’ ’ow’ 3 ’the’ my’ |
||
|
gives: |
’The horse, the cow and the rabbit were in my garden’ |
|
|
EDT ’fox’ ’fish’ |
(no change, ‘fox’ is not found) |
|
|
EDT PLTX 3 ’we’ ’a’ |
(attribute PLTX would be altered, if found) |
|
|
EDT OSFN ’A3’ ’A4’ |
(OSFN would be altered, if found) |
|
|
EDT DATE ’1990’ ’1991’ |
(DATE would be altered, if found) |
|
Note: When editing intelligent text the intelligent text code itself must be specified, not the ‘resultant’ text.