5

I was under the impression that equations align to the centre. I'm using a pack \documentclass [twocolumn, final] {svjour3} which I am guessing is changing that.

So for example this:

\begin{equation}
\begin{split}
\label{eq_vector_value}
V_{w_{xy}} &= 1 - Norm(\delta(w_{x},w_{y})) \\
           &= \{V_{w_{xy}} \in \mathbb{R} \| 0 \geq V_{w_{xy}} \geq 1\}.
\end{split}
\end{equation}

Produces this:

enter image description here

This is a two column format, and I've been trying to make it centre. Was I wrong to expect it would automatically align to the centre? All equations in this particular article seem to align left.

  • 1
    Do you have a fleqn option specified anywhere? See Display math formula in the middle of a line. – Werner Feb 11 '16 at 19:58
  • No I don't have. It seems to default to left alignment. Can I somehow cancel it out? – Ælex Feb 11 '16 at 20:05
  • what document class are you using. maybe that specifies left alignment. – barbara beeton Feb 11 '16 at 20:11
  • 1
    @barbarabeeton its a template from Springer, called svjour3.cls the type is simply defined as \documentclass[twocolumn,final]{svjour3}. Should I look into the document and see if theres a fleqn? – Ælex Feb 11 '16 at 20:14
  • 3
    i've just looked into svjour3.cls (i have an old copy lying around), and it includes this line: \PassOptionsToPackage{fleqn}{amsmath}}, there's your answer. that's what springer wants. – barbara beeton Feb 11 '16 at 20:18
5

That is the class default behavior. svjour3.cls includes

\PassOptionsToPackage{fleqn}{amsmath}}

So that the default

\documentclass[twocolumn, final]{svjour3}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{lipsum} % just for the demo
\DeclareMathOperator{\Norm}{Norm}
\begin{document}
\lipsum[1-5] % Just for the demo
\begin{equation}
  \begin{split}
    \label{eq_vector_value}
    V_{w_{xy}} &= 1 - \Norm(\delta(w_{x},w_{y})) \\
    &= \{V_{w_{xy}} \in \mathbb{R} \| 0 \geq V_{w_{xy}} \geq 1\}.
  \end{split}
\end{equation}
\lipsum[5-15] % Just for the demo
\end{document}

produces :

enter image description here

(By the way, you should use a \DeclareMathOperator to display nicely your "Norm" in the equation.)

  • Many thanks for the help and hint ;-) I guess thats what Springer expects. – Ælex Feb 11 '16 at 20:23
6

svjour3.cls defines fleqn as a class option, but also passes that option to amsmath if its loaded:

\DeclareOption{fleqn}{\input{fleqn.clo}\AtBeginDocument{\mathindent\z@}%
  \AtBeginDocument{\@ifpackageloaded{amsmath}{\@mathmargin\z@}{}}%
  \PassOptionsToPackage{fleqn}{amsmath}}

And, under the twocolumn document class option, it necessarily also uses fleqn, thereby adding content to the \@begindocumenthook and setting up amsmath:

\DeclareOption{twocolumn}{\@twocolumntrue\ExecuteOptions{fleqn}}

You can override this by using the following by removing any options passed to amsmath by the document class

\makeatletter
\expandafter\let\csname opt@amsmath.sty\endcsname\relax% Remove options passed to amsmath
\makeatother

The above seems sufficient, but one can also remove the margin adjustments introduced by the class:

\makeatletter
\AtBeginDocument{
  \mathindent=15pt % Restore \mathindent
  \@mathmargin\@centering} % Restore \@mathmargin
\makeatother

All of the above goes against better judgement, as journals have specific requirements that one should adhere to.

enter image description here

\documentclass[twocolumn, final]{svjour3}

\makeatletter
\expandafter\let\csname opt@amsmath.sty\endcsname\relax% Remove options passed to amsmath
\AtBeginDocument{
  \mathindent=15pt % Restore \mathindent
  \@mathmargin\@centering} % Restore \@mathmargin
\makeatother

\usepackage{amsmath,amssymb,lipsum}

\begin{document}

\sloppy% Just for this document
\lipsum*[1]
\begin{equation}
  f(x) = ax^2 + bx + c
\end{equation}

\lipsum[2]

\end{document}
  • Nice investigation. You should emphasize the sentence "All of the above goes against better judgement, as journals have specific requirements that one should adhere to." ! – Clément Feb 11 '16 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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