\HeaderA{checkingBookSources}{Formatting and standardization checks on book chapters}{checkingBookSources}
\aliasA{.RbcBook1Files}{checkingBookSources}{.RbcBook1Files}
\aliasA{checkPackage}{checkingBookSources}{checkPackage}
\aliasA{checkRnw}{checkingBookSources}{checkRnw}
\aliasA{checkVerbatim}{checkingBookSources}{checkVerbatim}
\keyword{misc}{checkingBookSources}
\begin{Description}\relax
Formatting and standardization checks on book chapters
\end{Description}
\begin{Usage}
\begin{verbatim}

checkVerbatim(files = .RbcBook1Files(ext=".tex"),
               maxc = 70,
              which = "both",
            verbose = TRUE)

checkRnw(files = .RbcBook1Files(),
       verbose = TRUE, stopOnError=FALSE)

checkPackage(files = .RbcBook1Files(ext=".Rnw"),
           verbose = TRUE)

.RbcBook1Files(ext=".Rnw")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{files}] character vector with names (and path) of chapter source
files
\item[\code{ext}] character of length 1. File name extension. \code{.Rnw}
(the default) and \code{.tex} should be the most important cases.
\item[\code{maxc}] integer of length 1. Maximal number of characters in a
verbatim line. All lines exceeding this limit will be reported in
the return value of this function.
\item[\code{which}] character of length 1. 'Sinput' will look at \code{Sinput}
environments, 'Soutput' at \code{Soutput} environments, 'both' at
both.
\item[\code{verbose}] Logical.
\item[\code{stopOnError}] Logical. If FALSE, first error found will lead to
stop. If TRUE, try to continue checking.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{checkVerbatimLines} sees whether all verbatim lines have length
at most \code{maxc}.

\code{checkPackage} finds all the occurences of \bsl{}Rpackage{...}
in the text, checks whether the package is known, and returns a named
list will all occurences of the packages.
\end{Details}
\begin{Value}
For \code{checkVerbatimLines} and \code{checkSetup}, a data frame
with one row for each offending line and various columns
describing it.

For \code{.RbcBook1Files}, a character vector.
\end{Value}
\begin{Author}\relax
Wolfgang Huber <huber@ebi.ac.uk>
\end{Author}
\begin{Examples}
\begin{ExampleCode}
  f = tempfile()
  zap = function(n) paste(formatC(1:n, width=2), collapse=" ")
  writeLines(c("*begin{Sinput}", zap(20), zap(30), "*end{Sinput}"), con=f)
  checkVerbatim(files=f)
\end{ExampleCode}
\end{Examples}

