Math & Science ⇒ Aligning equations
Aligning equations
I would like ask you how to set some equation which is written in more lines to the left side.
I should use $math$ but there is problem that a first equation is a bit more on right side (first white space in the paragraph).
When I use align, array, multline, ... all equations are centered in the midle of page.
Thank you very much!
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
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Aligning equations
fleqn
option to the document class and specify \mathindent
to be zero, such as:
Code: Select all
\documentclass[fleqn]{article}
\usepackage{amsmath}
\setlength{\mathindent}{0pt}
Re: Aligning equations
Unfortunately fleqn as a document class doesn't work in TeX Works, but when I use \begin{flalign*} it works very well.
So thank you for recomandation!
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Aligning equations
fleqn
is an option to classes and to amsmath, not a class. It works for me with TeXworks exactly in this way.Yes,
flalign
works too, using &
to push the formula to the left, however fleqn
works document wide also for simple equations.Stefan
Aligning equations
When I useStefan_K wrote:fleqn
is an option to classes and to amsmath, not a class. It works for me with TeXworks exactly in this way.
fleqn
as an option to class - it looks like that:
Code: Select all
\documentclass[fleqn][a4paper,11pt]{article}
\usepackage[czech]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{amsfonts}
\setlength{\mathindent}{0pt}
\begin{document}
...
! LaTeX Error: File `.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
Enter file name:
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Aligning equations
the syntax of the first line is not correct. It should be:
Code: Select all
\documentclass[fleqn,a4paper,11pt]{article}
Re: Aligning equations

One again thank you very much
