Montaggio dell'array nel proiettore

Sep 25 2020

Voglio adattare l'array alla larghezza della mia diapositiva.

\documentclass[aspectratio=169,xcolor=table]{beamer}
\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
\definecolor{myblue}{rgb}{0.0, 0.30, 0.60}
\newcommand\x[1]{\color{myblue}{\mathbf{#1}}}
\newcommand\y[1]{\color{lava}{\mathbf{#1}}}
\usefonttheme{serif}
\begin{document}


\begin{frame}{Matrix Inverses}

\underline{Understanding Elementary Matrices}
\begin{itemize}
\item if $\mathbf{A}= \left[ \begin{array}{rrrr} a & b & c \\ d &e &f \\ g & h & i \\ \end{array}\right],$ then $\ldots$
\item[]

$ \mathbf{E}_1\mathbf{A}=\setlength\arraycolsep{4pt} \left[ \begin{array}{rrrr} \underline{ 1}\rlap{\underline{~~~~}} & \underline{0} \rlap{\underline{~~~~}} & \underline{ 0} \\ 0 & 1 & 0 \\ \x{ -4} & \x{\ 0} &\x 1 \\ \end{array} \right] \left[ \begin{array}{rrrr} a & b & c \\ d &e &f \\ g & h & i \\ \end{array}\right]= \onslide<2->{\hspace{-3em} \renewcommand\arraystretch{0.25} \left[ \begin{array}{llllll} \pause 1\times a \pause +0 \times d \pause +0 \times g & =\y a & \pause 1\times b \pause +0 \times e \pause +1\times h \pause &=\y b & \pause 1\times c \pause +0 \times f \pause +0 \times i \pause & =\y c \pause \\ \pause 0 \times a \pause +1 \times d \pause +0 \times g & =\y d & \pause 0 \times b \pause +1 \times e \pause +0\times h \pause & =\y e & \pause 0 \times c \pause +1 \times f \pause +0\times i \pause& =\y h \pause \\ \pause \x{-4} \times a \pause + \x{0} \times d \pause + \x{1}\times g & =\y{-4a+g} & \pause \x{-4} \times b \pause + \x{0} \times e \pause +\x{1} \times h \pause & =\y{-4b+h} & \pause \x{-4}\times c \pause + \x{0} \times f \pause +\x{1} \times i \pause & =\y{-4c+i}\pause \\ \end{array}\right]} $
\end{itemize}
\end{frame}
\end{document}

Risposte

1 Mico Sep 25 2020 at 16:57

Al fine di ottenere la matrice 3x3 di misura della diapositiva, ritengo è necessario impostare i parametri di lunghezza \arraycolsep, \medmuskipe \thickmuskipdi chiudere o uguale a zero. O quello o riduci la dimensione del carattere. Penso che ridurre i parametri di lunghezza per avvicinarsi allo zero sia il minore di due mali.

Lo screenshot seguente mostra l'output della 37a e ultima pagina del documento. Osserva che ho cambiato il layout dell'array da lllllla rlrlrl.

\documentclass[aspectratio=169,xcolor=table]{beamer}
\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
\definecolor{myblue}{rgb}{0.0, 0.30, 0.60}
\newcommand\x[1]{\textcolor{myblue}{\mathbf{#1}}}
\newcommand\y[1]{\textcolor{lava}{\mathbf{#1}}}
\usefonttheme{serif}

\usepackage{mathtools} % for 'bmatrix*' env.
\begin{document}

\begin{frame}[t]{Matrix Inverses}

\underline{Understanding Elementary Matrices}

\bigskip
If $\mathbf{A}= \begin{bmatrix*}[r] a & b & c \\ d & e & f \\ \,g & h & i \end{bmatrix*}$, then $\ldots$

\bigskip

$\mathbf{E}_1\mathbf{A}= \begin{bmatrix*}[r] \underline{1} \rlap{\underline{~~~~}} & \underline{0} \rlap{\underline{~~~~}} & \underline{0} \\ 0 & 1 & 0 \\ \x{-4} & \x{0} & \x 1 \end{bmatrix*} \begin{bmatrix*}[r] a & b & c \\ d & e & f \\ \,g & h & i \end{bmatrix*}= $

\medskip

\onslide<2->{\hspace*{-2em}
\setlength\arraycolsep{1pt}
\medmuskip=0mu  % spacing around binary operators
\thickmuskip0mu % spacing around relational operators
$\left[\begin{array}{@{} rlrlrl @{}} \pause 1 \times a \pause +0 \times d \pause +0 \times g \pause &= \kern2pt \y a & \pause 1 \times b \pause +0 \times e \pause +0 \times h \pause &= \kern2pt \y b & \pause 1 \times c \pause +0 \times f \pause +0 \times i \pause &= \kern2pt \y c \\ \pause 0 \times a \pause +1 \times d \pause +0 \times g \pause &= \kern2pt \y d & \pause 0 \times b \pause +1 \times e \pause +0 \times h \pause &= \kern2pt \y e & \pause 0 \times c \pause +1 \times f \pause +0 \times i \pause &= \kern2pt \y f \\ \pause \x{-4} \times a \pause + \x{0} \times d \pause +\x{1} \times g \pause &= \kern2pt \y{-4a+g}\kern6pt & \pause \x{-4} \times b \pause + \x{0} \times e \pause +\x{1} \times h \pause &= \kern2pt \y{-4b+h}\kern6pt & \pause \x{-4} \times c \pause + \x{0} \times f \pause +\x{1} \times i \pause &= \kern2pt \y{-4c+i}\kern2pt \end{array}\right]$
}

\end{frame}
\end{document}