1 USING: help.markup help.syntax documents ;
5 { $values { "loc" "a pair of integers" } { "document" document } { "elt" "an element" } { "newloc" "a pair of integers" } }
6 { $contract "Outputs the location of the first occurrence of the element prior to " { $snippet "loc" } "." } ;
8 { prev-elt next-elt } related-words
11 { $values { "loc" "a pair of integers" } { "document" document } { "elt" "an element" } { "newloc" "a pair of integers" } }
12 { $contract "Outputs the location of the first occurrence of the element following " { $snippet "loc" } "." } ;
15 { $class-description "An element representing a single character." } ;
18 { $class-description "An element representing a single word. The " { $link prev-elt } " and " { $link next-elt } " words return the location of the beginning and the end of the word at the current location." } ;
20 { one-word-elt word-elt } related-words
23 { $class-description "An element representing a single word. The " { $link prev-elt } " and " { $link next-elt } " words return the location of the previous and next word from the current location." } ;
26 { $class-description "An element representing a single line. The " { $link prev-elt } " and " { $link next-elt } " words return the location of the beginning and the end of the line at the current location." } ;
28 { one-line-elt line-elt } related-words
31 { $class-description "An element representing a single line. The " { $link prev-elt } " and " { $link next-elt } " words return the location of the previous and next line from the current location." } ;
34 { $class-description "An element representing the entire document. The " { $link prev-elt } " word outputs the start of the document and the " { $link next-elt } " word outputs the end of the document." } ;
36 ARTICLE: "documents.elements" "Document elements"
37 "Document elements, defined in the " { $vocab-link "documents.elements" } " vocabulary, overlay a hierarchy of structure on top of the flat sequence of characters presented by the document."
39 "The different types of document elements correspond to the standard editing taxonomy:"
48 "New locations can be created out of existing ones by finding the start or end of a document element nearest to a given location."
54 ABOUT: "documents.elements"