toparagraph

Purpose

Converts the argument to a paragraph it is found in.

Syntax

toparagraph($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

match:=range/arguments

If arguments are discontinuous and they are extracted within several sentences, only these sentences appear in the result. When the optional named parameter match:=range is switched on, the argument is converted to the whole text fragment from the first sentence till the last one.

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 " " (space) 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

toparagraph(first:=1, last:=3) converts the result to the first three paragraphs of the document.

toparagraph($m, first:=-1, last:=1) converts the named group $m to one paragraph before it and one paragraph after it.

toparagraph($m, first:=2, last:=3) converts the named group $m to the second and third paragraphs after it.