The R Project SVN R

Rev

Rev 75924 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 75924 Rev 76497
Line 1... Line 1...
1
% File src/library/tools/man/buildVignettes.Rd
1
% File src/library/tools/man/buildVignettes.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2018 R Core Team
3
% Copyright 1995-2019 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{buildVignettes}
6
\name{buildVignettes}
7
\alias{buildVignettes}
7
\alias{buildVignettes}
8
\alias{pkgVignettes}
8
\alias{pkgVignettes}
9
\title{List and Build Package Vignettes}
9
\title{List and Build Package Vignettes}
10
\description{
10
\description{
11
  Run \code{\link{Sweave}} (or other custom weave function)
11
  Run \code{\link{Sweave}} (or other custom weave function)
12
  and \code{\link{texi2dvi}} on all vignettes
12
  and \code{\link{texi2pdf}} on all vignettes
13
  of a package.
13
  of a package, or list the vignettes.
14
}
14
}
15
\usage{
15
\usage{
16
buildVignettes(package, dir, lib.loc = NULL, quiet = TRUE,
16
buildVignettes(package, dir, lib.loc = NULL, quiet = TRUE,
17
               clean = TRUE, tangle = FALSE, ser_elibs = NULL)
17
               clean = TRUE, tangle = FALSE, ser_elibs = NULL)
18
 
18
 
19
pkgVignettes(package, dir, subdirs = NULL, lib.loc = NULL,
19
pkgVignettes(package, dir, subdirs = NULL, lib.loc = NULL,
20
	     output = FALSE, source = FALSE, check = FALSE)
20
	     output = FALSE, source = FALSE, check = FALSE)
21
}
21
}
22
\arguments{
22
\arguments{
23
  \item{package}{a character string naming an installed package.  If
23
  \item{package}{a character string naming an installed package.
24
    given, vignette source files are by default looked for in
24
    If given, vignette source files are by default looked for in
25
    subdirectory \file{doc}.}
25
    subdirectory \file{doc}.}
26
  \item{dir}{a character string specifying the path to a package's root
26
  \item{dir}{a character string specifying the path to a package's root
27
    source directory.  This subdirectory \file{vignettes} (or if it
27
    source directory. 
28
    does not exist \file{inst/doc}) is searched for vignette source
28
    If given, vignette source files are by default looked for in
29
    files.}
29
    subdirectory \file{vignettes}.}
30
  \item{lib.loc}{a character vector of directory names of \R libraries,
30
  \item{lib.loc}{a character vector of directory names of \R libraries,
31
    or \code{NULL}.  The default value of \code{NULL} corresponds to all
31
    or \code{NULL}.  The default value of \code{NULL} corresponds to all
32
    libraries currently known.  The specified library trees are used to
32
    libraries currently known.  The specified library trees are used to
33
    search for \code{package}.}
33
    search for \code{package}.}
34
  \item{quiet}{logical. Weave and run
34
  \item{quiet}{logical.
35
    \code{\link{texi2pdf}} in quiet mode.}
35
    Weave and run \code{\link{texi2pdf}} in quiet mode.}
36
  \item{clean}{Remove all files generated by the build, even if there
36
  \item{clean}{Remove all files generated by the build, even if there
37
    were copies there before.}
37
    were copies there before.}
-
 
38
  \item{tangle}{logical.
38
  \item{tangle}{logical.  Do tangling as well as weaving.}
39
    Do tangling as well as weaving.}
39
  \item{ser_elibs}{For use from \command{R CMD check}.}
40
  \item{ser_elibs}{For use from \command{R CMD check}.}
40
  \item{subdirs}{a character vector of subdirectories of \code{dir} in which
41
  \item{subdirs}{a character vector of subdirectories of \code{dir} in
41
    to look for vignettes. The first which exists is used.  Defaults to
42
    which to look for vignettes.  The first which exists is used.
42
    \code{"doc"} if \code{package} is supplied, otherwise \code{"vignettes"}.}
43
    Defaults to \code{"doc"} if \code{package} is supplied, otherwise
-
 
44
    \code{"vignettes"}.} 
43
  \item{output}{logical indicating if the output filenames for each
45
  \item{output}{logical indicating if the output filenames for each
44
    vignette should be returned (in component \code{outputs}).}
46
    vignette should be returned (in component \code{outputs}).}
45
  \item{source}{logical indicating if the \emph{tangled} output
47
  \item{source}{logical indicating if the \emph{tangled} output
46
    filenames for each vignette should be returned (in component \code{sources}).}
48
    filenames for each vignette should be returned (in component \code{sources}).}
47
  \item{check}{logical.  If \code{TRUE}, check whether all files that
49
  \item{check}{logical.  If \code{TRUE}, check whether all files that
48
    have vignette-like filenames have an identifiable vignette engine.
50
    have vignette-like filenames have an identifiable vignette engine.
49
    This may be a false positive if a file is not a vignette but has a 
51
    This may be a false positive if a file is not a vignette but has a 
50
    filename matching a pattern defined by one of the vignette engines.} 
52
    filename matching a pattern defined by one of the vignette engines.} 
51
}
53
}
52
\details{
54
\details{
53
  \code{buildVignettes} is used by \command{R CMD build} and \command{R CMD
55
  \code{buildVignettes} is used by \command{R CMD build} and
54
    check} to (re-)build vignette PDFs from their sources. 
56
  \command{R CMD check} to (re-)build vignette outputs from their sources. 
55
    
57
    
56
  As from \R 3.4.1, both of these functions ignore files that are listed in
58
  As from \R 3.4.1, both of these functions ignore files that are listed in
57
  the \file{.Rbuildignore} file in \code{dir}.
59
  the \file{.Rbuildignore} file in \code{dir}.
58
}
60
}
59
\value{
61
\value{
60
  \code{buildVignettes} is called for its side effect of creating the
62
  \code{buildVignettes} is called for its side effect of creating the
61
  PDF versions of all vignettes, and if \code{tangle = TRUE}, 
63
  outputs of all vignettes, and if \code{tangle = TRUE}, 
62
  extracting the \R{} code.
64
  extracting the \R{} code.
63
 
65
 
64
  \code{pkgVignettes} returns an object of class \code{"pkgVignettes"}
66
  \code{pkgVignettes} returns an object of class \code{"pkgVignettes"}
65
  if a vignette directory is found, otherwise \code{NULL}.  
67
  if a vignette directory is found, otherwise \code{NULL}.  
66
}
68
}