latex_preamble outputs/returns command definition LaTeX commands to be put in the preamble of vignettes.

latex_preamble(
  PACKAGE,
  R = TRUE,
  CRAN = TRUE,
  Bioconductor = TRUE,
  GEO = TRUE,
  ArrayExpress = TRUE,
  biblatex = FALSE,
  only = FALSE,
  file = ""
)

latex_bibliography(PACKAGE, file = "")

Arguments

PACKAGE

package name

R

logical that indicate if general R commands should be added (e.g. package names, inline R code format commands)

CRAN

logical that indicate if general CRAN commands should be added (e.g. CRAN package citations)

Bioconductor

logical that indicate if general Bioconductor commands should be added (e.g. Bioc package citations)

GEO

logical that indicate if general GEOmnibus commands should be added (e.g. urls to GEO datasets)

ArrayExpress

logical that indicate if general ArrayExpress commands should be added (e.g. urls to ArrayExpress datasets)

biblatex

logical that indicates if a \bibliography command should be added to include references from the package's REFERENCES.bib file.

only

a logical that indicates if the only the commands whose dedicated argument is not missing should be considered.

file

connection where to print. If NULL the result is returned silently.

Details

Argument PACKAGE is not required for latex_preamble, but must be correctly specified to ensure biblatex=TRUE generates the correct bibliography command.

Functions

  • latex_bibliography: latex_bibliography prints or return a LaTeX command that includes a package bibliography file if it exists.

Examples

latex_preamble()
#> %%%% PKGMAKER COMMANDS %%%%%% #> \usepackage{xspace} #> #> % R #> \let\proglang=\textit #> \let\code=\texttt #> \providecommand{\Rcode}{\code} #> \providecommand{\pkgname}[1]{\textit{#1}\xspace} #> \providecommand{\Rpkg}[1]{\pkgname{#1} package\xspace} #> \providecommand{\citepkg}[1]{\cite{#1}} #> #> % CRAN #> \providecommand{\CRANurl}[1]{\url{https://cran.r-project.org/package=#1}} #> %% CRANpkg #> \makeatletter #> \def\CRANpkg{\@ifstar\@CRANpkg\@@CRANpkg} #> \def\@CRANpkg#1{\href{https://cran.r-project.org/package=#1}{\pkgname{#1}}\footnote{\CRANurl{#1}}} #> \def\@@CRANpkg#1{\href{https://cran.r-project.org/package=#1}{\pkgname{#1}} package\footnote{\CRANurl{#1}}} #> \makeatother #> %% citeCRANpkg #> \makeatletter #> \def\citeCRANpkg{\@ifstar\@citeCRANpkg\@@citeCRANpkg} #> \def\@citeCRANpkg#1{\CRANpkg{#1}\cite*{Rpackage:#1}} #> \def\@@citeCRANpkg#1{\CRANpkg{#1}~\cite{Rpackage:#1}} #> \makeatother #> \providecommand{\CRANnmf}{\href{https://cran.r-project.org/package=NMF}{CRAN}} #> \providecommand{\CRANnmfURL}{\url{https://cran.r-project.org/package=NMF}} #> #> % Bioconductor #> \providecommand{\BioCurl}[1]{\url{http://www.bioconductor.org/packages/release/bioc/html/#1.html}} #> \providecommand{\BioCpkg}[1]{\href{http://www.bioconductor.org/packages/release/bioc/html/#1.html}{\pkgname{#1}} package\footnote{\BioCurl{#1}}} #> \providecommand{\citeBioCpkg}[1]{\BioCpkg{#1}~\cite{Rpackage:#1}} #> % Bioconductor annotation #> \providecommand{\BioCAnnurl}[1]{\url{http://www.bioconductor.org/packages/release/data/annotation/html/#1.html}} #> \providecommand{\BioCAnnpkg}[1]{\href{http://www.bioconductor.org/packages/release/data/annotation/html/#1.html}{\Rcode{#1}} annotation package\footnote{\BioCAnnurl{#1}}} #> \providecommand{\citeBioCAnnpkg}[1]{\BioCAnnpkg{#1}~\cite{Rpackage:#1}} #> #> % GEO #> \providecommand{\GEOurl}[1]{\href{http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=#1}{#1}\xspace} #> \providecommand{\GEOhref}[1]{\GEOurl{#1}\footnote{\url{http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=#1}}} #> #> % ArrayExpress #> \providecommand{\ArrayExpressurl}[1]{\href{http://www.ebi.ac.uk/arrayexpress/experiments/#1}{#1}\xspace} #> \providecommand{\ArrayExpresshref}[1]{\ArrayExpressurl{#1}\footnote{\url{http://www.ebi.ac.uk/arrayexpress/experiments/#1}}} #> #> %%%% END: PKGMAKER COMMANDS %%%%%%
latex_preamble(R=TRUE, only=TRUE)
#> %%%% PKGMAKER COMMANDS %%%%%% #> \usepackage{xspace} #> #> % R #> \let\proglang=\textit #> \let\code=\texttt #> \providecommand{\Rcode}{\code} #> \providecommand{\pkgname}[1]{\textit{#1}\xspace} #> \providecommand{\Rpkg}[1]{\pkgname{#1} package\xspace} #> \providecommand{\citepkg}[1]{\cite{#1}} #> #> %%%% END: PKGMAKER COMMANDS %%%%%%
latex_preamble(R=FALSE, CRAN=FALSE, GEO=FALSE)
#> %%%% PKGMAKER COMMANDS %%%%%% #> \usepackage{xspace} #> #> % Bioconductor #> \providecommand{\BioCurl}[1]{\url{http://www.bioconductor.org/packages/release/bioc/html/#1.html}} #> \providecommand{\BioCpkg}[1]{\href{http://www.bioconductor.org/packages/release/bioc/html/#1.html}{\pkgname{#1}} package\footnote{\BioCurl{#1}}} #> \providecommand{\citeBioCpkg}[1]{\BioCpkg{#1}~\cite{Rpackage:#1}} #> % Bioconductor annotation #> \providecommand{\BioCAnnurl}[1]{\url{http://www.bioconductor.org/packages/release/data/annotation/html/#1.html}} #> \providecommand{\BioCAnnpkg}[1]{\href{http://www.bioconductor.org/packages/release/data/annotation/html/#1.html}{\Rcode{#1}} annotation package\footnote{\BioCAnnurl{#1}}} #> \providecommand{\citeBioCAnnpkg}[1]{\BioCAnnpkg{#1}~\cite{Rpackage:#1}} #> #> % ArrayExpress #> \providecommand{\ArrayExpressurl}[1]{\href{http://www.ebi.ac.uk/arrayexpress/experiments/#1}{#1}\xspace} #> \providecommand{\ArrayExpresshref}[1]{\ArrayExpressurl{#1}\footnote{\url{http://www.ebi.ac.uk/arrayexpress/experiments/#1}}} #> #> %%%% END: PKGMAKER COMMANDS %%%%%%
latex_preamble(GEO=TRUE, only=TRUE)
#> %%%% PKGMAKER COMMANDS %%%%%% #> \usepackage{xspace} #> #> % GEO #> \providecommand{\GEOurl}[1]{\href{http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=#1}{#1}\xspace} #> \providecommand{\GEOhref}[1]{\GEOurl{#1}\footnote{\url{http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=#1}}} #> #> %%%% END: PKGMAKER COMMANDS %%%%%%