Instead, download a package called fancyvrb. The manual is at http://ctan.org/tex-archive/macros/latex/contrib/fancyvrb/fancyvrb.pdf. For example (and note capital V in Verbatim):

**\begin{Verbatim}[fontsize=\small]**

library(MASS)

function(X, tol = sqrt(.Machine$double.eps)) {

## Generalized Inverse of a Matrix

dnx <- dimnames(X)

if(is.null(dnx)) dnx <- vector("list", 2)

s <- svd(X)

nz <- s$d > tol * s$d[1]

structure(

if(any(nz)) s$v[, nz] %*% (t(s$u[, nz])/s$d[nz]) else X,

dimnames = dnx[2:1])

}

\end{Verbatim}

\end{Verbatim}

To install a LaTeX package (at least in my setup of WinEdt + MikTeX under Windows), do the following:

- Got to MikTeX Package Manager

- Wait for it to update the list of available packages

- Find the one you want to install, and double click on it.

## No comments:

## Post a Comment