ReporteRs (version 0.5.2)

textProperties: Text formating properties

Description

Create an object that describes text formating properties.

Usage

textProperties(color = "black", font.size = getOption("ReporteRs-fontsize"),
  font.weight = "normal", font.style = "normal", underlined = FALSE,
  font.family = getOption("ReporteRs-default-font"),
  vertical.align = "baseline")

Arguments

color

single character value specifying font color. (default to black)

font.size

single integer value specifying font size in pixel. (default to 10)

font.weight

single character value specifying font weight (expected value is normal or bold). (default to normal)

font.style

single character value specifying font style (expected value is normal or italic). (default to normal)

underlined

single logical value specifying if the font is underlined (default to FALSE).

font.family

single character value specifying font name (it has to be an existing font in the OS). (default to Arial).

vertical.align

single character value specifying font vertical alignments. Expected value is one of the following : default 'baseline' or 'subscript' or 'superscript'

See Also

docx

Examples

Run this code
# NOT RUN {
#START_TAG_TEST
# Create a new document
doc = docx( title = "title" )

text = pot( value = "Hello Word"
		, format = textProperties(color="red"
				, font.size = 12
				, font.weight = "bold"
				, font.style = "italic"
				, underlined = TRUE
				, font.family = "Courier New"
		)
) + " is rich"
doc <- addParagraph(doc, set_of_paragraphs(text), "Normal")

writeDoc( doc, "textProperties_example.docx" )
#STOP_TAG_TEST
# }

Run the code above in your browser using DataCamp Workspace