ReporteRs (version 0.8.6)

textProperties: Text formatting properties

Description

Create a textProperties object that describes text formatting 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", shading.color)
"print"(x, ...)
"as.character"(x, ...)
"chprop"(object, color, font.size, font.weight, font.style, underlined, font.family, vertical.align, shading.color, ...)

Arguments

color
font color - a single character value specifying a valid color (e.g. "#000000" or "black").
font.size
font size (in point) - 0 or positive integer value.
font.weight
single character value specifying font weight (expected value is normal or bold).
font.style
single character value specifying font style (expected value is normal or italic).
underlined
single logical value specifying if the font is underlined.
font.family
single character value specifying font name (it has to be an existing font in the OS).
vertical.align
single character value specifying font vertical alignments. Expected value is one of the following : default 'baseline' or 'subscript' or 'superscript'
shading.color
shading color - a single character value specifying a valid color (e.g. "#000000" or "black").
x
textProperties object to print
...
further arguments - not used
object
textProperties object to update

Value

a textProperties object

Details

Default values are:
  • color "black"
  • font.size getOption("ReporteRs-fontsize")
  • font.weight "normal"
  • font.style "normal"
  • underlined FALSE
  • font.family getOption("ReporteRs-default-font")
  • vertical.align "baseline"

Get a modified version of a textProperties with chprop.

See Also

pot, alterFlexTable, shortcut_properties

Examples

Run this code
# textProperties examples -------
textProperties( font.size = 12 )

textProperties(color="red", 
  font.weight = "bold", 
  font.style = "italic",  
  underlined = TRUE
)

textProperties( shading.color = "red" )
print( textProperties (color="red", font.size = 12) )

# chprop usage example ------
textProp = textProperties()

textProp01 = chprop( textProp, color = "red" )
textProp02 = chprop( textProp, font.size = 12 )
textProp03 = chprop( textProp, font.weight = "bold" )
textProp04 = chprop( textProp, font.style = "italic" )
textProp05 = chprop( textProp, underlined = TRUE )
## Not run: 
# textProp06 = chprop( textProp, font.family = "Arial" )
# ## End(Not run)
textProp07 = chprop( textProp, vertical.align = "superscript" )

textProp08 = chprop( textProp, font.size = 12, 
	font.weight = "bold", shading.color = "red" )

Run the code above in your browser using DataCamp Workspace