在枚举列表中显示方程组的更好形式

在枚举列表中显示方程组的更好形式

问题就在问题本身的标题中。我有以下代码。我需要的是将每个方程用等号对齐,并将每个系统的第一个方程从与\物品。 任何帮助深表感谢。

\documentclass[12pt]{exam}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\usepackage{tcolorbox}
\usepackage{amsmath,amssymb,xcolor}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{enumerate}

\pagestyle{plain}

\usepackage{geometry}
\geometry{%
  letterpaper,
  lmargin=10 mm,
  rmargin=10 mm,
  tmargin=1 cm,
  bmargin=1 cm,
  footskip=9 pt,
  headheight=12 pt}  
\usepackage{titlesec}
\titlelabel{\thetitle.\quad}

\linespread{1.2}

\renewenvironment{solution}{{\bf Solution:}}{\hfill}
\firstpagefooter
  {}
  {}
  {\textbf{[Turn over}}
\runningfooter
  {}
  {Page \thepage\ of \numpages}
  {\ifodd\value{page}
    \ifnum\value{page}<\numpages\textbf{[Turn over}\fi
  \fi}


\begin{document}

\begin{enumerate}  


\item Find all existing solutions to the following linear systems, using the Gaussian elimination method with backward substitution.
\begin{multicols}{2}
\begin{enumerate}[(a)]
\item $4x-3y=10\\
8x-y=10$
\item $-3x+5y=-22\\3x+4y=4\\4x-8y=32$
\item $y+z=6\\3x-y+z=-7\\x+y-3z=-13$
\item $x+2y=0\\x+y=6\\3x-2y=8$
\end{enumerate}
\end{multicols}

\end{enumerate}

\end{document}

答案1

您可以在方程中使用flalign*mathtoolsaligned。从您的代码中:

\documentclass[12pt]{exam}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\usepackage{tcolorbox}
\usepackage{amsmath,amssymb,xcolor}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{enumerate}

\pagestyle{plain}

\usepackage{geometry}
\geometry{%
  letterpaper,
  lmargin=10 mm,
  rmargin=10 mm,
  tmargin=1 cm,
  bmargin=1 cm,
  footskip=9 pt,
  headheight=12 pt}  
\usepackage{titlesec}
\titlelabel{\thetitle.\quad}

\linespread{1.2}

\renewenvironment{solution}{{\bf Solution:}}{\hfill}
\firstpagefooter
  {}
  {}
  {\textbf{[Turn over}}
\runningfooter
  {}
  {Page \thepage\ of \numpages}
  {\ifodd\value{page}
    \ifnum\value{page}<\numpages\textbf{[Turn over}\fi
  \fi}


\begin{document}

\begin{enumerate}  


\item Find all existing solutions to the following linear systems, using the Gaussian elimination method with backward substitution.
\begin{multicols}{2}
\begin{enumerate}[(a)]
\item \begin{flalign*}
        4x-3y & = 10&\\
        8x-y & = 10&
    \end{flalign*}
\item \begin{equation*}
\left\{\begin{aligned}
       -3x+5y &=-22&\\
       3x+4y &=4& \\
       4x-8y&=32&
    \end{aligned}\right.
    \end{equation*}
\item $y+z=6\\3x-y+z=-7\\x+y-3z=-13$
\item $x+2y=0\\x+y=6\\3x-2y=8$
\end{enumerate}
\end{multicols}
\end{enumerate}
\end{document}

结果

答案2

嗯,如果我正确理解了你的问题,那么你需要做的就是:

在此处输入图片描述

enumerate在这种情况下,最好使用tasks包,而不是在两列环境中使用:

\documentclass[12pt]{exam}
\usepackage[margin=10mm,
            footskip=9 pt,
            headheight=12 pt]{geometry}
\usepackage{enumitem}
\setlist[enumerate,1]{leftmargin=*,
                      itemsep=\baselineskip,
                      label={\textbf{\thesection.\arabic*}}
                    }
\usepackage{amsmath, amssymb}

\usepackage{tasks} % <---
\settasks{label=(\alph*),
          label-format=\bfseries,
          label-offset=2em,
          label-align=right,
          before-skip =-0.5ex,
          after-item-skip=\medskipamount
          }

\begin{document}

\section{Section title}
    \begin{enumerate}
\item Find all existing solutions to the following linear systems, using the Gaussian elimination method with backward substitution.
\begin{tasks}(2)
\task $\begin{aligned}[t]
        4x -3 y & = 10  \\
        8x -  y & = 10 
    \end{aligned}$
\task   \par\vspace{-1.3\baselineskip}% <--- this is special case due to use of braces
        $\left\{\begin{aligned}
       -3x + 5y & = -22 \\
        3x + 4y & =   4 \\
        4x - 8y & =  32
                \end{aligned}\right.$
\task $\begin{aligned}[t]
             y +  z & =  6   \\
        3x - y +  z & = -7   \\
         x + y - 3z & =-13
         \end{aligned}$
\task $\begin{aligned}[t]
        x + 2y & = 0 \\
        x +  y & = 6 \\
       3x - 2y & = 8
       \end{aligned}$
\end{tasks}   
    \end{enumerate}
\end{document}

相关内容