\begin{align*} 将公式放在右侧

\begin{align*} 将公式放在右侧

这是我的文件:

\documentclass[12pt]{report}
\usepackage{amsmath}
\usepackage{minted}

\begin{document}    
    \section{Question 1:}   
    We define $m(i,j)$ as the minimum squares resulted from cutting a paper with $i \times j$ dimensions. \\\\
    Therefore: 
    \begin{align*}
      m(0,0) = 0 \\
      m(i,i) = 1 \\   
      m(i,j) = \min(\min\limits_{1 \leq  k < j} m(i,k) + m(i, j -k), \min\limits_{1 \leq  k < i} m(k,j) + m(i-k, j))
    \end{align*}

    \inputminted{python}{squares.py}

\end{document}

我用 pdflatex 对其进行了编译,我不知道为什么输出中的公式会转到右边:

在此处输入图片描述

答案1

尝试这个

\documentclass[12pt]{report}
\usepackage{amsmath}
\usepackage{minted}
\begin{document}    
    \section{Question 1:}   
    We define $m(i,j)$ as the minimum squares resulted from cutting a paper with $i \times j$ dimensions. \\\\
    Therefore: 
    \begin{align*}
      m(0,0) &= 0 \\
      m(i,i) &= 1 \\   
      m(i,j) &= \min(\min\limits_{1 \leq  k < j} m(i,k) + m(i, j -k), \min\limits_{1 \leq  k < i} m(k,j) + m(i-k, j))
    \end{align*}

    \inputminted{python}{squares.py}

\end{document}

相关内容