LaTeX forum ⇒ Math & ScienceProblem with equations on left side. Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
User avatar
Cham
Posts: 894
Joined: Sat Apr 02, 2011 4:06 pm

Problem with equations on left side.

Postby Cham » Fri May 25, 2018 3:46 pm

I'm having a problem in trying to flush left some aligned equations in this small document. Here's a MWE code to play with :
  1. \documentclass[11pt]{scrartcl}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{amsmath}
  4. \begin{document}
  5. \section*{Title}
  6.  
  7. Blabla bla bla bla.
  8.  
  9. \medskip
  10.  
  11. \begin{enumerate}
  12. \item Blabla bla :
  13. \begin{equation*}
  14. x^2 - a x = 0.
  15. \end{equation*}
  16. \hfill Answer : $x = \tfrac{5}{6}$
  17. \medskip
  18. \item Solve these :
  19. \medskip
  20. \begin{enumerate}
  21. \item
  22. \begin{flalign*}
  23. 2 x + y &= 4, \\[6pt]
  24. x - 2 y &= -\, 3.
  25. \end{flalign*}
  26. \hfill Answer : $x = 1$ and $y = 2$
  27. \medskip
  28. \item
  29. \begin{flalign*}
  30. 3 x - 2 y &= -\, 7, \\[6pt]
  31. -\, 2 x + 3 y &= 3.
  32. \end{flalign*}
  33. \hfill Answer : $x = -\, 3$ and $y = -\, 1$
  34. \end{enumerate}
  35. \end{enumerate}
  36. \end{document}


Preview :
leftside.jpg
leftside.jpg (16.42 KiB) Viewed 245 times


As shown in red above, I need to place the aligned equations on the left side, without changing the first equation (centered). The "flalign" environment doesn't seem to work here, why ? How to do that, without adding the option fleqn to the document class ?

User avatar
Cham
Posts: 894
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Fri May 25, 2018 5:15 pm

Doh ! I just refound the solution, to what was already a solved issue before. Just add a & at the end of some equations :
  1. \documentclass[11pt]{scrartcl}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{amsmath}
  4. \begin{document}
  5. \section*{Title}
  6.  
  7. Blabla bla bla bla.
  8.  
  9. \medskip
  10.  
  11. \begin{enumerate}
  12. \item Blabla bla :
  13. \begin{equation*}
  14. x^2 - a x = 0.
  15. \end{equation*}
  16. \hfill Answer : $x = \tfrac{5}{6}$
  17. \medskip
  18. \item Solve these :
  19. \medskip
  20. \begin{enumerate}
  21. \item
  22. \begin{flalign*}
  23. 2 x + y &= 4, & \\[6pt]
  24. x - 2 y &= -\, 3.
  25. \end{flalign*}
  26. \hfill Answer : $x = 1$ and $y = 2$
  27. \medskip
  28. \item
  29. \begin{flalign*}
  30. 3 x - 2 y &= -\, 7, & \\[6pt]
  31. -\, 2 x + 3 y &= 3.
  32. \end{flalign*}
  33. \hfill Answer : $x = -\, 3$ and $y = -\, 1$
  34. \end{enumerate}
  35. \end{enumerate}
  36. \end{document}


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests