From 98c52b7678758008e7e38ab9c89651f04cebbd14 Mon Sep 17 00:00:00 2001 From: Kenneth Odle Date: Mon, 31 Jul 2023 15:55:33 -0400 Subject: [PATCH] =?UTF-8?q?Updated=20=C2=ABalign=C2=BB=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lbol.tex | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lbol.tex b/lbol.tex index bd56e1e..db215c6 100644 --- a/lbol.tex +++ b/lbol.tex @@ -7,6 +7,7 @@ \usepackage{graphicx} \usepackage{kpfonts} \usepackage{float} +\usepackage{longtable} \raggedbottom \usepackage{nicefrac} @@ -849,28 +850,30 @@ 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}{ccl}+. In this instance, we are declaring two centered columns and one left-aligned column. + \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. \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] \[ Zoo~animals = \left\{ \begin{array}{crl} -lion & tiger & gnu \\ +lion & hippopotamus & gnu \\ elephant & zebra & kangaroo \\ bear & camel & wallaby \end{array}\right\} \] \end{Verbatim} - \[ Zoo~animals = \left\{ \begin{array}{crl} -lion & tiger & gnu \\ +lion & hippopotamus & gnu \\ elephant & zebra & kangaroo \\ bear & camel & wallaby \end{array}\right\} \] +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}