Math & ScienceProblem with equations on left side.

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

Problem with equations on left side.

Post by Cham »

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 :

Code: Select all

\documentclass[11pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\begin{document}
\section*{Title}

Blabla bla bla bla.

\medskip

\begin{enumerate}
	\item Blabla bla :
		\begin{equation*}
			x^2 - a x = 0.
		\end{equation*}
		\hfill Answer :  $x = \tfrac{5}{6}$
	\medskip
	\item Solve these :
		\medskip
		\begin{enumerate}
			\item
				\begin{flalign*}
					2 x + y &= 4, \\[6pt]
					x - 2 y &= -\, 3.
				\end{flalign*}
				\hfill Answer :  $x = 1$ and $y = 2$
			\medskip
			\item
				\begin{flalign*}
					3 x - 2 y &= -\, 7, \\[6pt]
					-\, 2 x + 3 y &= 3.
				\end{flalign*}
				\hfill Answer :  $x = -\, 3$ and $y = -\, 1$
		\end{enumerate}
\end{enumerate}
\end{document}
Preview :
leftside.jpg
leftside.jpg (16.42 KiB) Viewed 6873 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 ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Problem with equations on left side.

Post by Cham »

Doh ! I just refound the solution, to what was already a solved issue before. Just add a & at the end of some equations :

Code: Select all

\documentclass[11pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\begin{document}
\section*{Title}
 
Blabla bla bla bla.
 
\medskip
 
\begin{enumerate}
	\item Blabla bla :
		\begin{equation*}
			x^2 - a x = 0.
		\end{equation*}
		\hfill Answer :  $x = \tfrac{5}{6}$
	\medskip
	\item Solve these :
		\medskip
		\begin{enumerate}
			\item
				\begin{flalign*}
					2 x + y &= 4, & \\[6pt]
					x - 2 y &= -\, 3.
				\end{flalign*}
				\hfill Answer :  $x = 1$ and $y = 2$
			\medskip
			\item
				\begin{flalign*}
					3 x - 2 y &= -\, 7, & \\[6pt]
					-\, 2 x + 3 y &= 3.
				\end{flalign*}
				\hfill Answer :  $x = -\, 3$ and $y = -\, 1$
		\end{enumerate}
\end{enumerate}
\end{document}
Post Reply