todocument

Purpose

Converts the argument to a document it is found in.

Syntax

todocument($group)

Arguments

Takes one required argument which is a reference to a named group a user wants to format.

The function also takes the following optional named parameters:

Parameter

Comments

first:=<numeral>

If the argument is omitted, the parameter is treated as a range of values. Otherwise, it specifies the offset of the start position.

last:=<numeral>

If the argument is omitted, the parameter is treated as a range of values. Otherwise, it specifies the offset of the end position.

separator:=<string>

The user can indicate a custom separator. If it is not specified, default separator "\n\n" is used.

Notes

The parameters first and last may be used independently, without specifying the argument found by a search query.

Returned Value

The returned data type is text.

Examples

todocument(first:=1, last:=2) converts the result to a text fragment within the first two documents.

todocument($m, first:=1, last:=2) converts the result to two documents that follow the document in which the named group $m occurs.

todocument($m, separator:="\n") converts the result to the whole document in which the named group $m occurs, the found arguments are separated by a "\n".