diff --git a/lbol.tex b/lbol.tex index 144a123..a829743 100644 --- a/lbol.tex +++ b/lbol.tex @@ -883,17 +883,17 @@ You can typeset matrices and other similar objects using an \texttt{array} envir \begin{itemize}[noitemsep] \item \texttt{array} can only be used in a math environment. - \item You must declare the number and alignment of the columns by using \verb+\begin{array}{crl}+. In this instance, we are declaring one centered column, one right-aligned column, and one left-aligned column. + \item You must declare the number and alignment of the columns by using something like this:\vspace{0.5em} \\ \vspace{0.5em} \verb+\begin{array}{crl}+ \\ In this instance, we are declaring one centered column, one right-aligned column, and one left-aligned column. \end{itemize} In the example below, I've chose animal names to make the column alignment more explicit. -\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, framesep=3mm, breaklines=true, label=array Example] +\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, framesep=3mm, breaklines=true, label=\fbox{array Example}] \[ Zoo~animals = \left\{ \begin{array}{crl} lion & hippopotamus & gnu \\ elephant & zebra & kangaroo \\ -bear & camel & wallaby +bear & camel & naked~mole~rats \end{array}\right\} \] \end{Verbatim} @@ -902,10 +902,12 @@ bear & camel & wallaby Zoo~animals = \left\{ \begin{array}{crl} lion & hippopotamus & gnu \\ elephant & zebra & kangaroo \\ -bear & camel & wallaby +bear & camel & naked~mole~rats \end{array}\right\} \] +\paragraph{Note:} Because the \texttt{array} environment is designed for math applications, rather than a text application like our example, I had to use a $\sim$ to add the spaces in ``naked mole rats''. + If the built-in \texttt{array} environment cannot do all that you want, use the \texttt{amsmath} package and its \texttt{matrix} environment, which provides more options. \section{Special Math Environments}