3

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?

4
  • 1
    Which options did you pass to the class call? Oct 1, 2013 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. Oct 1, 2013 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. Oct 1, 2013 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, 2013 at 19:07

1 Answer 1

9

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .