2

I've been trying to work on Basic Academic Journal Article Template featured by Overleaf.

Although $$ a + b = c$$ is centered, the following equations are not centered:

\[ a + b = c \]
\begin{equation*}
    a + b = c
\end{equation*}
\begin{equation}
    a + b = c
\end{equation}

Three equations are not centered by default

How do I revise the template to make all these equations centered by default?

Here is my project, which can be edited by anyone with the link. The original code in the project link is as follows.

\documentclass[fleqn,10pt,lineno]{olplainarticle}

\title{Example Article Title}

\author[1]{First Author} \affil[1]{Address of first author}

\keywords{Keyword1, Keyword2, Keyword3}

\begin{abstract} abstract \end{abstract}

\begin{document}

\flushbottom \maketitle \thispagestyle{empty}

\section*{Mathematics}

$$ a + b = c $$

[ a + b = c ] \begin{equation} a + b = c \end{equation} \begin{equation} a + b = c \end{equation}

\end{document}

sierxue
  • 23

1 Answers1

5

Your full document starts with this line:

\documentclass[fleqn,10pt,lineno]{olplainarticle}

The culprit is the document class option fleqn -- short for "flush-left equations". If you want equations to be centered rather than typeset flush-left, get rid of this option.

Mico
  • 506,678
  • 1
    Or really, get rid of everything and start with an empty document and not a template that doesn't realize that $$ is incompatible with fleqn. – Teepeemm Feb 05 '24 at 01:30
  • @Teepeemm -- I was willing to give the OP the benefit of the doubt that there might be a valid reason for employing the olplainarticle [!] document class. :-) – Mico Feb 05 '24 at 01:33