Sfairadora

  • Reference Guide

set_pformat

set_pformat(rtxt, rpf)
set_pformat(rtxt, par, rpf)
rtxt_var <- set_cformat(rpf)
rtxt_var <- set_cformat(par, rpf)
The functions set the rpf paragraph format to one or all paragraphs of a text. The previous format of the characters is removed altogether and replaced with the specified one. The first two versions of the function return the modified text, while the parameter rtxt is left unchanged. The other two variants take a variable or data item rtxt_var, which they modify in place. If the parameter par is specified, it contains the index of the paragraph to be changed. In that case, only the format of the specified paragraph is altered. If the paragraph index is not specified, all the paragraphs in the text are affected.
Example:
rtxt <- set_pformat(0, rpf_align(ALIGN_CENTER) |
rpf_flow_keep_with_next(BIT_1));
The example centers the first paragraph and forces it to be placed on the same page with the next paragraph.

Parameters

rtxt
The text in which the format is to be set (the type Rich_text).
rtxt_var
The variable (an l-value of the type Rich_text), containing the text in which the format is to be set.
par
The index of the paragraph in which the format is to be set. The paragraphs are indexed from 0. If the index is negative or beyond the end of the text, an error is returned.
rpf
The paragraph format to be set (the type Rich_text).

Return Value

The first two versions return the modified text (Rich_text). The other return the l-value referring to the variable containing the modified text.

See Also