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
  • You can use the package \usepackage{nccmath}and the environement ceqn to center your equations
    – RockyRock
    Commented May 30, 2018 at 6:26

1 Answer 1

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

2
  • 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. Commented May 30, 2018 at 7:09
  • I have added an edit to my answer using a standard equation environment :-)
    – RockyRock
    Commented May 30, 2018 at 8:09

You must log in to answer this question.

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