1

The question is in the title of the question itself. I have the following code. What I need is to align each equation by the equal sign and start the first equation of each system at the same level as the \item. Any help is much appreciated.

\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}
8
  • You can use cases.
    – Sigur
    Apr 17, 2020 at 2:09
  • @Sigur, thank you. Could you please elaborate the use of \cases{ }. I have used that for stepwise functions but not for system of equations.
    – Quantas
    Apr 17, 2020 at 2:23
  • Do you want braces on the left or just the equations?
    – Sigur
    Apr 17, 2020 at 2:33
  • 1
    So, like this? \item $\begin{aligned}[t]4x-3y=10\\8x-y=10\end{aligned}$
    – Sigur
    Apr 17, 2020 at 2:55
  • 1
    Or \item $\begin{aligned}[t]&4x-3y=10\\&8x-y=10\end{aligned}$ if you want to align to left.
    – Sigur
    Apr 17, 2020 at 2:56

2 Answers 2

1

You can use flalign* from mathtools, or aligned in equations. From your code :

\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}

Results

0

Hm, if I understood your question correctly, than you are after for following:

enter image description here

In this case instead of using enumerate in two columns environment it is better to use tasks package:

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .