Graphics, Figures & TablesTake formula to the left (not centered)

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
MakezHD
Posts: 10
Joined: Thu Jan 21, 2016 8:19 pm

Take formula to the left (not centered)

Post by MakezHD »

I have a formula (using cases) centered and I want to take it to the left, but I don't know how to do it. Could someone help me? Thanks.

Image

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Take formula to the left (not centered)

Post by Johannes_B »

Please post a minimal working example as text (code), not an image. Please follow the link for instructions.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Take formula to the left (not centered)

Post by Stefan Kottwitz »

Hi,

please take a look at your last question and the answer: function by parts help. Johannes already said, please copy & paste your code here, don't show an image. If a reader wants to help and test and improve your code, he has to type everything what he sees in your image! Post text (code), so it can be copied, and even used in the online compiler.

Stefan
LaTeX.org admin
MakezHD
Posts: 10
Joined: Thu Jan 21, 2016 8:19 pm

Take formula to the left (not centered)

Post by MakezHD »

Code: Select all

 \\
1)\[ f(x,y) =
\begin{cases}
xy\dfrac{x^2-y^2}{x^2+y^2} & \left(x,y\right) \neq \left(0,0\right)\\
0 & \left(x,y\right) = \left(0,0\right)
\end{cases}
\; , \; D_{12}f(0,0) \neq D_{21}f(0,0).
\]
\\
There you go
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Take formula to the left (not centered)

Post by Stefan Kottwitz »

  • For flushed left equations, add the class option fleqn.
    For left equation numbers, add the class option leqno.
  • Use an equation environment instead of \[ ... \] if you would like to have numbers.
  • The \\ before and after the formula are not good, they cause errors.
Complete sample:

Code: Select all

\documentclass[fleqn,leqno]{article}
\usepackage{amsmath}
\setlength{\mathindent}{0pt}
\begin{document}
\begin{equation}
  f(x,y) =
    \begin{cases}
      xy\dfrac{x^2-y^2}{x^2+y^2} & \left(x,y\right) \neq \left(0,0\right)\\
      0 & \left(x,y\right) = \left(0,0\right)
    \end{cases}
  \; , \; D_{12}f(0,0) \neq D_{21}f(0,0).
\end{equation}
\end{document}
Also for questions it would be good to take a minute more and to post a compilable Infominimal working example, as I did with the solution here. So with preamble.

Stefan
LaTeX.org admin
Post Reply