fontspec Package | R Documentation |
Define a LaTeXPackage for the LaTeX fontspec package.
fontspecPackage(font=NULL, name=font)
font |
The name of a font to use as the main font. See details. |
name |
The name of the resulting package. |
This function creates a "LaTeXpackage"
object
that provides support for the LaTeX fontspec package.
The font
argument provides some convenience for setting the main
font to be used. The font
can be the common name of
a system font or a complete path to the font file.
For more complex situations, fontspec commands can be added to
the LaTeX code that is sent to functions like
author
and grid.latex
(see the Examples).
A predefined package, with no main font defined, is pre-registered
under the name "fontspec"
.
A "LaTeXpackage"
object.
Paul Murrell
cat(author("test", packages="fontspec"), sep="\n")
cat(author("test", packages=fontspecPackage(font="Courier")), sep="\n")
tex <- "\\setmainfont{fontname.ttf}[Path=/path/to/font/]\ntest"
cat(author(tex, packages="fontspec"), sep="\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.