Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using the following code. What should I do if I don't want the fixed indent from the left margin of my page? ‎

\documentclass[‎fleqn,oneside‎]{article}‎
‎\usepackage{amsmath}‎
....
\begin{align}
a_1& =b_1+c_1\\
a_2& =b_2+c_2-d_2+e_2
\end{align}
share|improve this question
add comment

5 Answers

up vote 8 down vote accepted

Set the length \mathindent to zero:

\setlength{\mathindent}{0pt}
share|improve this answer
add comment

Using Thorsten's method affects the math indent for the whole page. If that's not what you want I would suggest using the nccmath package for fleqn like this:

\documentclass{article}
\usepackage{nccmath}
\begin{document}
\noindent This is text on the page here.\\
\begin{fleqn}[0pt]
\begin{align*}
a_1 &= b_1+c_1 \\
a_2 &= b_2+c_2-d_2+e_2\\
\end{align*}
\end{fleqn}
This is more text on the page down here.\\
\end{document}
share|improve this answer
1  
Be careful using the nccmath package as I have had several problems using it. See this question for a list of them –  Peter Grill Aug 5 '11 at 4:44
add comment

EDIT: you can regulate that distance by setting \mathindent (to 0pt, for example), with a \setlength\mathindent{<value>}

\documentclass[fleqn]{article}

\usepackage{amsmath}
\setlength\parindent{0pt}

\begin{document}
\hrulefill

\begin{align}
a_1 &= b_1+c_1\\
a_2 &= b_2+c_2-d_2+e_2
\end{align}

\setlength\mathindent{0pt}
\hrulefill

\begin{align}
a_1 &= b_1+c_1\\
a_2 &= b_2+c_2-d_2+e_2
\end{align}

\end{document}
share|improve this answer
add comment

Just to make this complete (I found an easy answer only after a lengthy search): the standard length of \mathindent (in KoMa scrbook class) is <\leftmargini minus \leftmargini>. The rubber part is essential for longer equations.

share|improve this answer
add comment

You have to determine the length \mathindent. See code below for an example.

\documentclass[fleqn]{article}
\usepackage{amsmath}

\setlength{\mathindent}{\parindent}

\begin{document}
  \begin{align}
    a_1 &= b_1+c_1 \\
    a_2 &= b_2+c_2-d_2+e_2
  \end{align}
\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.