2

How do I align a particular equation to the center in a left aligned environment. I guess one benefit of left alignment is when the equations are quite long. However this question, applies in the case of a short equation in the align left environment. I use the environment below:

\usepackage[fleqn]{amsmath}

From my study, this question differs from the one being asked here

1 Answers1

2

The package nccmath allow you to center your equations in a fleqn document, here is a quick example,

\documentclass[a4paper,12pt]{article}
\usepackage[english]{babel}
\usepackage[fleqn]{amsmath}
\usepackage{nccmath}

\begin{document}

\begin{ceqn}
\begin{align}
& e = m c^{2} \\
& c^2 = a^2 +b^2
\end{align}
\end{ceqn}

\end{document}

enter image description here

EDIT:

It also works with a simple equation environment,

\documentclass[a4paper,12pt]{article}
\usepackage[english]{babel}
\usepackage[fleqn]{amsmath}
\usepackage{nccmath}

\begin{document}

\begin{ceqn}
\begin{equation}
e = m c^{2}
\end{equation}
\end{ceqn}

\end{document}

Hope that helps.

Romain

RockyRock
  • 1,221
  • 1
    Thanks for the answer. Can \begin{ceqn} \end{ceqn} be used with \begin{equation} \end{equation}? Currently I haven't gotten a repository to download it yet. – Abdulhameed May 30 '18 at 07:09
  • I have added an edit to my answer using a standard equation environment :-) – RockyRock May 30 '18 at 08:09