Description Usage Arguments Value Author(s) See Also Examples
The function produces code that LaTeX is able to typeset.
1 2 3 4 5 6 7 8 9 |
object |
either an object of class character which should be cleaned for printing in
LaTeX environments or an object of class |
pkgs |
character vector (optional). Specify specific packages here to show
information on these (instead of all attached packages). See
|
locale |
logical (default = FALSE). Show information on locale. |
base.pkgs |
logical (default = FALSE). Show information on base packages. |
other.pkgs |
logical (default = TRUE). Show information on currently attached
packages. If |
namespace.pkgs |
logical (default = FALSE). Show information on packages whose namespaces are currently loaded but not attached. |
citations |
logical (default = TRUE). Should citations for all packages be added? BibTeX is used for storing the citations. |
citecommand |
Specify LaTeX-command for citation here. Curly brackets are added
internally. Note that |
file |
Specify path to BibTeX file where citations should be saved. If
|
append |
logical (default = FALSE). Should citations be added to an existing BibTeX file (if existing) or should old BibTeX files be overwritten? |
... |
additional arguments. Currently not used. |
A character string with special markup is returned: The output is
printed with LaTeX style syntax highlighting to be used
e.g. in Sweave chunks with results=tex
.
Benjamin Hofner, based on code from package xtable, bibtex and package utils. See source code for documentation.
toLatex
. For details on toLatex.sessionInfo
see
also sessionInfo
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | txt <- "Price: <= 500$ & additional goodies"
toLatex(txt)
############################################################
## session info for automatic inclusion in reports
info <- toLatex(sessionInfo())
info
## extract first part (the Latex part)
toLatex(info)
## extract second part (the BibTeX part)
toBibtex(info)
############################################################
## usual usage scenario
## Do not run the following code automatically as it needs
## write access to the current working directory.
## This code (without removing the file) could for example
## be included in a LaTeX chunk of your Sweave or knitr
## report.
## Not run: getwd() ## location where write access is needed
toLatex(sessionInfo(), file = "packages.bib")
file.remove("packages.bib")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.