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 scrreprt class and I'm having troubles with different behavior of $$ and \[ \]-written equations and equation environment. The problem is that alignment is not the same: $$ equations are centered while equations in equation environment are left aligned.

For example, the following code

Equations:
\begin{equation}\label{nelineq}
f(x)=0
\end{equation}
\begin{equation*}\label{nelineq}
f(x)=0
\end{equation*}
$$
f(x)=0
$$
\[ f(x)=0 \]

produces output

I would like to make all three usages consistent (not yet sure if centered or left aligned).

The question is, how to permanently change default alignments for all three cases? But without use of align or similar environments (dont want to edit all existing equations).

I know that $$ is deprecated, but what about other two methods?

share|improve this question
1  
Which options did you pass to the class call? –  Claudio Fiandrino Oct 1 '13 at 14:03
5  
You have apparently used the fleqn option and so all LaTeX environments shown in your image are flush left already. $$ is not latex syntax and does its own thing. –  David Carlisle Oct 1 '13 at 14:06
8  
$$ is not deprecated it just doesn't work, the most obvious and well documented, aspect of that is that it does not obey fleqn option. –  David Carlisle Oct 1 '13 at 14:07
    
Ok, the fleqn option was turned on.\PassOptionsToPackage{fleqn}{amsmath} % Math environments and more by the AMS \usepackage{amsmath}. Now, at least i can center all equations. –  sivic Oct 1 '13 at 19:07
add comment

1 Answer

up vote 9 down vote accepted

You have apparently used the fleqn option and so all LaTeX environments shown in your image are flush left.

$$ is not latex syntax and does its own thing, it is not deprecated it just doesn't work, the most obvious and well documented, aspect of that is that it does not obey fleqn option.

If the class (or user) doesn't specify fleqn then the LaTeX environments will center display math.

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.