Rev 85872 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/tools/man/buildVignette.Rd% Part of the R package, https://www.R-project.org% Copyright 1995-2019 R Core Team% Distributed under GPL 2 or later\name{buildVignette}\alias{buildVignette}\title{Build One Vignette}\description{Run \code{\link{Sweave}} (or other custom weave function),\code{\link{texi2pdf}}, and/or \code{\link{Stangle}}(or other custom tangle function) on one vignette.This is the workhorse of \command{R CMD Sweave}.}\usage{buildVignette(file, dir = ".", weave = TRUE, latex = TRUE, tangle = TRUE,quiet = TRUE, clean = TRUE, keep = character(),engine = NULL, buildPkg = NULL, encoding, ...)}\arguments{\item{file}{character; the vignette source file.}\item{dir}{character; the working directory in which the intermediate andoutput files will be produced.}\item{weave}{logical; should weave be run?}\item{latex}{logical; should \link{texi2pdf} be run if weaving produces a \file{.tex} file?}\item{tangle}{logical; should tangle be run?}\item{quiet}{logical; run in quiet mode?}\item{clean}{logical; whether to remove some newly created, oftenintermediate, files. See details below.}\item{keep}{a list of file names to keep in any case when cleaning. Notethat \dQuote{target} files are kept anyway.}\item{engine}{\code{NULL} or character; name of vignette engine touse. Overrides any \samp{\\VignetteEngine\{\}} markup in the vignette.}\item{buildPkg}{\code{NULL} or a character vector; optional packagesin which to find the vignette engine.}\item{encoding}{the encoding to assume for the file. If notspecified, it will be read if possible from the file's contents.Note that if the vignette is part of a package,\code{\link{buildVignettes}} reads the package's encoding from the\file{DESCRIPTION} file but this function does not.}\item{...}{Additional arguments passed to weave and tangle.}}\details{This function determines the vignette engine for the vignette (default\code{utils::Sweave}), then weaves and/or tangles the vignette usingthat engine. Finally, if \code{clean} is \code{TRUE}, newly createdintermediate files (non \dQuote{targets}, where these depend on the engine,etc, and not any in \code{keep}) will be deleted. If \code{clean} is\code{NA}, and \code{weave} is true, newly created intermediate outputfiles (e.g., \file{.tex}) will not be deleted even if a \file{.pdf}file has been produced from them.If \code{buildPkg} is specified, those packages will be loaded beforethe vignette is processed and will be used as the default packages inthe search for a vignette engine, but an explicitly specified packagein the vignette source (e.g., using\samp{\\VignetteEngine\{utils::Sweave\}} to specify the \code{Sweave}engine in the \pkg{utils} package) will override it. In contrast, ifthe \code{engine} argument is given, it will override the vignettesource.}\value{A character vector naming the files that have been produced.}\author{\I{Henrik Bengtsson} and Duncan Murdoch}\seealso{\code{\link{buildVignettes}} for building all vignettes in a package.}\keyword{documentation}