# flalign doesn't work in beamer

I want to write just one equation from left in a beamer documentclass, but it seems that \begin{flalign} doesn't work, and everything that I write will be centered. I don't want to use \usepackage[fleqn]{beamer} as it will make all the equations to start from left. This is my code:

\documentclass{beamer}
\usepackage{graphicx} % Allows including images
\usepackage{booktabs} % Allows the use of \toprule, \midrule and
\usepackage{dsfont}
\usepackage{amsmath}
\begin{document}
\begin{frame}
\begin{flalign}
&\min\hspace{0.5cm}\sigma_{ASE}^2x^{-1}+\zeta_1x^2+\zeta_2z &&\\
&\text{s.t.}\hspace{0.5cm}&\mathds{1}^Tp=1 &&\\
& p\geq 0 &&\\
& a^Tp\leq P_t &&\\
& a^T p=x &&\\
& b^T p=z &&
\end{flalign}
\end{frame}
\end{document}


and this is my output:

There is a similar post here, but it does not give me any solution. Any help?

• note that fl in the fleqn option stands for flush left but the fl in flalign stands for full length, it isn't designed to be flush left so much as take up the full width of the page so starting at the left edge... – David Carlisle Apr 11 '17 at 22:18
• so is there anyway to handle it? I am trying to put that part here to run it – CLAUDE Apr 11 '17 at 22:20
• @DavidCarlisle I editted my post now – CLAUDE Apr 11 '17 at 22:24
• $\displaystyle 5+6=11$ on a line by itself. – egreg Apr 11 '17 at 22:35
• @egreg what about the new code? – CLAUDE Apr 11 '17 at 22:40

Like all the ams alignments it isn't really designed for single line equations (and isn't designed to make flush left at all) but....

\documentclass{beamer}
\usepackage{amsmath}
\usepackage{dsfont}
\begin{document}
\begin{frame}
\begin{flalign*}
&5+6=11&&
\end{flalign*}
\end{frame}
\end{document}


\documentclass{beamer}
\usepackage{amsmath}
\usepackage{dsfont}
\begin{document}
\begin{frame}
\begin{flalign*}
\min\hspace{0.5cm}&\sigma_{ASE}^2x^{-1}+\zeta_1x^2+\zeta_2z &\\
\text{s.t.}\hspace{0.5cm}&\mathds{1}^Tp=1&\\
& p\geq 0 &\\
& a^Tp\leq P_t &\\
& a^T p=x &\\
& b^T p=z &
\end{flalign*}
\end{frame}
\end{document}

• But for the original problem (which you can see it in the problem), I get centered output again :( – CLAUDE Apr 11 '17 at 22:38
• @CLAUDE added the expression you had originally, looks left aligned to me? – David Carlisle Apr 11 '17 at 22:46
• It worked finally, I really appreciate your help David – CLAUDE Apr 11 '17 at 22:51