如何调整投影仪中的矩阵方程的大小?

如何调整投影仪中的矩阵方程的大小?

我该如何调整这个方程的大小以使其适合?我在 Google 上搜索了例子,但没有找到。

--鲍勃

\documentclass[11pt]{beamer}
\usetheme{Warsaw}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,adjustbox,mathtools}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\begin{document}

\begin{frame}
\frametitle{LU Factorization of A}
\begin{equation}
\mathbf{LU} = \begin{pmatrix} \nonumber
\gamma_1   \\
-1  & \gamma_2  \\
    &  -1  & \gamma_3  \\
    &        & \ddots & \ddots \\
    &        &        &  -1 & \gamma_{N-2}  \\
    &        &        &          & -1 & \gamma_{N-1}  \\    
\end{pmatrix}
\begin{pmatrix}
1  & \delta_1            \\
   & 1        & \delta_2 \\
   &          & 1        & \delta_3 \\
   &          &          &  \ddots & \ddots \\
   &          &          &         & 1     & \delta_{N-2} \\
   &          &          &         &       &  1
\end{pmatrix}
\end{equation}
which is represented as
\begin{align} \label{eqn:nonlinear2term}
\gamma_1 &= 2+r  \nonumber \\ 
\gamma_i &= 2+r-1/\gamma_{i-1},  \hspace{2mm} i=2, \dots ,N-1.
\end{align}
\end{frame}

\end{document}

答案1

您可以使用\resizebox缩放方程。请记住在缩放后重新进入数学模式。

\documentclass[11pt]{beamer}
\usetheme{Warsaw}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,adjustbox,mathtools}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\begin{document}

    \begin{frame}
        \frametitle{LU Factorization of A}
        \begin{equation}
        \resizebox{\textwidth}{!}{$\displaystyle
        \mathbf{LU} = \begin{pmatrix} \nonumber
        \gamma_1   \\
        -1  & \gamma_2  \\
        &  -1  & \gamma_3  \\
        &        & \ddots & \ddots \\
        &        &        &  -1 & \gamma_{N-2}  \\
        &        &        &          & -1 & \gamma_{N-1}  \\    
        \end{pmatrix}
        \begin{pmatrix}
        1  & \delta_1            \\
        & 1        & \delta_2 \\
        &          & 1        & \delta_3 \\
        &          &          &  \ddots & \ddots \\
        &          &          &         & 1     & \delta_{N-2} \\
        &          &          &         &       &  1
        \end{pmatrix}
        $}
        \end{equation}
        which is represented as
        \begin{align} \label{eqn:nonlinear2term}
        \gamma_1 &= 2+r  \nonumber \\ 
        \gamma_i &= 2+r-1/\gamma_{i-1},  \hspace{2mm} i=2, \dots ,N-1.
        \end{align}
    \end{frame}

\end{document}

在此处输入图片描述

答案2

您还可以玩arraycolsep

\documentclass[11pt]{beamer}
\usetheme{Warsaw}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,adjustbox,mathtools}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\begin{document}

\begin{frame}
\frametitle{LU Factorization of A}
\begin{equation}\setlength\arraycolsep{3.25pt}
\mathbf{LU} = \begin{pmatrix} \nonumber
\gamma_1 \\
-1 & \gamma_2 \\
    & -1 & \gamma_3 \\
    & & \ddots & \ddots \\
    & & & -1 & \gamma_{N-2} \\
    & & & & -1 & \gamma_{N-1} \\
\end{pmatrix}
\begin{pmatrix}
1 & \delta_1 \\
   & 1 & \delta_2 \\
   & & 1 & \delta_3 \\
   & & & \ddots & \ddots \\
   & & & & 1 & \delta_{N-2} \\
   & & & & & 1
\end{pmatrix}
\end{equation}
which is represented as
\begin{align} \label{eqn:nonlinear2term}
\gamma_1 &= 2+r \nonumber \\
\gamma_i &= 2+r-1/\gamma_{i-1}, \hspace{2mm} i=2, \dots ,N-1.
\end{align}
\end{frame}



    \begin{frame}
        \frametitle{LU Factorization of A}
        \begin{equation}
        \resizebox{\textwidth}{!}{$\displaystyle
        \mathbf{LU} = \begin{pmatrix} \nonumber
        \gamma_1 \\
        -1 & \gamma_2 \\
        & -1 & \gamma_3 \\
        & & \ddots & \ddots \\
        & & & -1 & \gamma_{N-2} \\
        & & & & -1 & \gamma_{N-1} \\
        \end{pmatrix}
        \begin{pmatrix}
        1 & \delta_1 \\
        & 1 & \delta_2 \\
        & & 1 & \delta_3 \\
        & & & \ddots & \ddots \\
        & & & & 1 & \delta_{N-2} \\
        & & & & & 1
        \end{pmatrix}
        $}
        \end{equation}
        which is represented as
        \begin{align} \label{eqn:nonlinear2term}
        \gamma_1 &= 2+r \nonumber \\
        \gamma_i &= 2+r-1/\gamma_{i-1}, \hspace{2mm} i=2, \dots ,N-1.
        \end{align}
    \end{frame}

\end{document} 

在此处输入图片描述

相关内容