form3paragraphe: prints or prepares paragraphes from a character vector.

Description Usage Arguments Value Examples

View source: R/f0.rbsb1.code.r

Description

prints or prepares a character string texte as a small formatted text.
Each component is supposed to be a paragraph but the first one can be considered as a title.

Usage

1
2
form3paragraphe(texte, titre=-1, wid=60, fli=NULL, sep=1, jus=1, trunc=TRUE, ed="",
	  ef="", imp=TRUE)

Arguments

texte

The text to print (character vector).

titre

When > -2 indicates that the first component is a title (if not a simple paragraph). Then the value of titre gives the emphasize to put on the title. Notice that the title is not splitted in several lines as are the other components according to 'wid' value.

wid

The width (in characters) without including indentation and frames.

fli

When NULL, the first line of each paragraph (in fact the second if there is a title) is issued as a standard line. If not, fli[1] spaces are added before and the considered width is fli[2] (not including the added spaces). Also this means that your already wrote fli[3] characters on the first line {this last possibility can be used only when there are no title and for the the first component. For instance, a French paragraph will be issued with fli = c(5,wid,0). The possibility of modifying wid for the first line can be of use when adding the name of an item first.

sep

Number of lines separating each paragraph.

jus

Type of justification (1=left, 2=centred, 3=left).

trunc

Must truncation be done when a word is greater than the proposed wid?

ed

Framing at the beginning of each line.

ef

Framing at the end of each line.

imp

Printing is performed and nothing is returned. If FALSE, the character string is returned (including possible new lines)

Value

either nothing or a character string according to imp

Examples

1
2
 rbsb3k("RESET"); # needed only for R checking, to be forgotten
 form3paragraphe(c("My Title", "My important first sentence.", "Last one!"));

rbsb documentation built on May 31, 2017, 1:45 a.m.