+\subsection{Mathematical arrays}\r
+\label{sec:mathematical-arrays}\r
+\r
+Mathematical arrays (as compared to data arrays) can be printed\r
+correctly by declaring the class as \code{xtableMatharray}.\r
+<<matharraydata>>=\r
+V <- matrix(c(1.140380e-03, 3.010497e-05, 7.334879e-05,\r
+ 3.010497e-05, 3.320683e-04, -5.284854e-05,\r
+ 7.334879e-05, -5.284854e-05, 3.520928e-04), nrow = 3)\r
+V\r
+class(V) <- c("xtableMatharray")\r
+class(V)\r
+xtbl <- print(xtable(V, display = rep("E", 4)))\r
+@ %def\r
+\r
+Then \code{xtbl} can be used in an expression such as\r
+$V=\left[\Sexpr{xtbl}\right]$, produced by\r
+\begin{lstlisting}\r
+V=\left[\Sexp||r{xtbl}\right]. \r
+\end{lstlisting}\r
+\r
+\r
+An alternative display can be created using the \texttt{digits}\r
+argument. If \code{xtbl} is defined instead according to\r
+\r
+<<altmatharray, results = 'hide'>>=\r
+xtbl <- print(xtable(V, digits = 6))\r
+@ %def \r
+then we get\\\r
+$V=\left[\Sexpr{paste(print(xtable(V, digits = 6)))}\right].$ \r