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 7019 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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
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