This theme element is an alternative to ggplot2::element_text()
for producing labels from LaTeX fragments.
Both hjust
and vjust
can be character values:
one of "left"
, "bbleft"
, "centre"
,
"center"
, "right"
, "bbright"
for horizontal
justification; and one of "bottom"
, "baseline"
,
"centre"
, "center"
, or "top"
for
vertical justification.
element_latex(family=NULL,
fontface=NULL,
colour=NULL,
size=NULL,
hjust=NULL, vjust=NULL,
angle=NULL,
lineheight=NULL,
color=NULL,
margin=NULL,
width=NULL,
packages=NULL,
engine=getOption("xdvir.engine"),
rotate_margins=FALSE,
inherit.blank=FALSE)
An element_latex
object that can be used in place of
element_text
in ggplot2 theme specifications
The default font family.
The default font face.
The default text colour.
The deafult font size.
Horizontal justification. Typically in \([0, 1]\), but see Details.)
Vertical justification. Typically in \([0, 1]\), but see Details.)
Angle (in \([0, 360]\))
The deafult lineheight.
The margin around the text.
Either NA
or a numeric value or a unit
specifying the width for typesetting. NA
means the natural width of
the label.
The LaTeX packages to be used.
May be the name of a LaTeX package (character) or a
"LaTeXpackage"
object.
The TeX engine that should be used to render the LaTeX.
May be the name of a TeX engine (character)
or a "TeXengine"
object.
Whether margins should follow the orientation of the text.
Should this element inherit the existence of an
element_blank
among its parents? If TRUE
the existence of
a blank element among its parents will cause this element to be blank as
well. If FALSE
any blank parent element will be ignored when
calculating final element state.