I want to center this following code:
\documentclass[12pt,fleqn]{article}
\usepackage{bm}
\usepackage{amsmath}
\usepackage[overload]{empheq}
\newcommand*\widebox[1]{\fbox{\hspace{1em}#1\hspace{1em}}}
\newcommand*\rpos{\text{\textbf{r}}}
\begin{document}
\begin{empheq}[box=\widebox]{align}
\rpos&=x\,\hat{i}+y\,\hat{j}+z\,\hat{k},\nonumber\\
\mathbf R &= (R_{\text{Terra}}+\text{h})\:\hat{k},\nonumber\\
\bm{\mathcal R}&=\mathbf R + \rpos,\nonumber\\
\bm{\omega}&=\omega(sin\lambda\:\hat{i}+cos\lambda\:\hat{k}).\nonumber\\ \nonumber
\end{empheq}
\end{document}
Any ideas?
\\ \nonumber
to center the equations vertically in the box.fleqn
class option and usegather*
instead ofalign
. Also you should be usingalign*
and then there'd be no need for\nonumber
s.