\HeaderA{ps.options}{Auxiliary Function to Set/View Defaults for Arguments of postscript}{ps.options}
\aliasA{setEPS}{ps.options}{setEPS}
\aliasA{setPS}{ps.options}{setPS}
\keyword{device}{ps.options}
\begin{Description}\relax
The auxiliary function \code{ps.options} can be used to set or view
(if called without arguments) the default values for some of the
arguments to \code{\LinkA{postscript}{postscript}}.

\code{ps.options} needs to be called before calling \code{postscript},
and the default values it sets can be overridden by supplying
arguments to \code{postscript}.
\end{Description}
\begin{Usage}
\begin{verbatim}
ps.options(..., reset = FALSE, override.check = FALSE)

setEPS(...)
setPS(...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] arguments \code{onefile}, \code{family}, \code{title},
\code{fonts},
\code{encoding}, \code{bg}, \code{fg}, \code{width}, \code{height},
\code{horizontal}, \code{pointsize},  \code{paper},
\code{pagecentre}, \code{print.it}, \code{command} and
\code{colormodel} can be supplied.  \code{onefile},
\code{horizontal} and \code{paper} are \emph{ignored}
for \code{setEPS} and \code{setPS}.
\item[\code{reset}] logical: should the defaults be reset to their
\sQuote{factory-fresh} values?
\item[\code{override.check}] logical argument passed to
\code{\LinkA{check.options}{check.options}}.  See the Examples.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
If both \code{reset = TRUE} and \code{...} are supplied the defaults
are first reset to the \sQuote{factory-fresh} values and then the new
values are applied.

For backwards compatibility argument \code{append} is accepted but
ignored with a warning.

\code{setEPS} and \code{setPS} are wrappers to set defaults
appropriate for figures for inclusion in documents (the default size
is 7 inches square unless \code{width} or \code{height} is supplied)
and for spooling to a PostScript printer respectively.  For historical
reasons the latter is the ultimate default.
\end{Details}
\begin{Value}
A named list of all the previous defaults.  If \code{...} or
\code{reset = TRUE} is supplied the result has the visibility flag
turned off.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{postscript}{postscript}}, \code{\LinkA{pdf.options}{pdf.options}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
ps.options(bg = "pink")
utils::str(ps.options())

### ---- error checking of arguments: ----
ps.options(width=0:12, onefile=0, bg=pi)
# override the check for 'width', but not 'bg':
ps.options(width=0:12, bg=pi, override.check = c(TRUE,FALSE))
utils::str(ps.options())
ps.options(reset = TRUE) # back to factory-fresh
\end{ExampleCode}
\end{Examples}

