Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Here's the code I have and here's the system of equation it creates which is not working as desired. Do you know how I can fix it?

\item For what value of $b$ would the following system fo equations have an infinite number of solutions?\hfill
$$\begin{align*} 
3x+5y &=  27 \\ 
12x+20y &=  3b
\end{align*}$$
    \begin{enumerate}
    \item $9$   
    \item $27$ 
    \item $36$
    \item $81$ 
    \item $126$             
    \end{enumerate}

enter image description here

share|improve this question
3  
Don't add the outer $$s, then you'll be fine. Also see Why is \[\] preferable to $$? for when a display math block is needed. –  Werner May 20 at 20:09

3 Answers 3

The package systeme is very handy for typesetting systems of equations. Note how not just the = symbol but also the variables x and y and the symbol + are aligned nicely without requiring any special user inputs (see the comment in my code).

enter image description here

\documentclass{article}
\usepackage{systeme} % see http://www.ctan.org/tex-archive/macros/generic/systeme
\begin{document}
\begin{enumerate}
\item For what value of $b$ would the following system of equations 
   have an infinite number of solutions?
\[
\sysdelim..  % no delimiter symbols on either side
\systeme{
   5y+3x =  27 , % it will be automatically reordered as 3x+5y = 27
   12x+20y =  3b}
\]
    \begin{enumerate}
    \item 9   
    \item 27 
    \item 36
    \item 81 
    \item 126             
    \end{enumerate}
\end{enumerate}
\end{document}
share|improve this answer
1  
@MoneyOrientedProgrammer - Thanks for the edit. –  Mico May 21 at 5:20
    
Thanks for accepting my edit. :-) –  stalking is prohibited May 21 at 5:21

The align* environment (as well as align) is already a math environment, so you don't need to go into math mode before using align*. In fact, align* can not be used in math mode, but the "inner" math environments such as aligned can be.

enter image description here

References:

Code:

\documentclass{article}

\usepackage{amsmath}
\usepackage{enumitem}

\begin{document}
\begin{enumerate}
    \item[55.] For what value of $b$ would the following system of equations have an infinite number of solutions?
        \begin{align*} 
             3x+ 5y &=  27 \\ 
            12x+20y &=  3b
        \end{align*}
        \begin{enumerate}
            \item $9$   
            \item $27$ 
            \item $36$
            \item $81$ 
            \item $126$             
        \end{enumerate}
\end{enumerate}
\end{document}
share|improve this answer
    
Did you test your code? When I am testing it , it doesn't become the same as yours! –  Mona Jalal May 20 at 21:12
    
@MonaJalal: Yes I did. The image is the output of the code as posted. Did you try the code exactly as I posted, or did you try it in your real use case? Perhaps you are using different packages, or have some custom settings? There is a reason why it is recommended that you post a fully compilable MWE including \documentclass and the appropriate reproduces the problem. Please provide more details and then perhaps we can figure out the problem. –  Peter Grill May 20 at 21:44

A suggestion to improve the below solution, unsing in-line enumerate* environment from the enumitem package, and empheq (that loads amsmath) to have a left brace before the system of equations:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{heuristica}
\usepackage[overload]{empheq}
\usepackage[inline, shortlabels]{enumitem}

\begin{document}

\begin{enumerate}[start = 55]
\item For what value of $b$ would the following system fo equations have an infinite number of solutions?
\begin{align*}[left = \empheqlbrace]
3x+5y &= 27 \\
12x+20y &= 3b
\end{align*}
    \begin{enumerate*}[afterlabel = ~~, itemjoin = {\hspace{1.5em}} ]
    \item $9$
    \item $27$
    \item $36$
    \item $81$
    \item $126$.
    \end{enumerate*}
\end{enumerate}

\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.