
Código:
\documentclass[12 pt,handout,notheorems]{beamer}
\usepackage{amsmath}
\usepackage{bm} %For making Greek letters bold
\usepackage{pgfpages}
\usepackage{mleftright}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usetheme{Boadilla}
\renewcommand{\left}{\mleft}
\renewcommand{\right}{\mright}
\begin{document}
\begin{frame}
\setcounter{equation}{9}
\begin{equation}
\begin{aligned}
\mathcal{H}\left(\mathbf{x}\left(t\right), u\left(t\right), \bm{\lambda}\left(t\right) \right) ={}& 1 + \lambda_1\left(t\right)x_2\left(t\right) \\ &+ \lambda_2\left(t\right)\left[-g - \frac{k}{x_3\left(t\right)}u\left(t\right)\right]+ \lambda_3\left(t\right)u\left(t\right).
\end{aligned}
\end{equation}
\end{frame}
\end{document}
Producción:
¿Cómo hago para que el primer signo más de la segunda línea se alinee con el 1 de la primera línea?
Respuesta1
Aquí hay una solución que se basa en su configuración y funciona insertando \phantom{{}=1}
antes del primer +
símbolo en la línea 2. "Funciona" en términos de alineación, pero ahora la ecuación es demasiado amplia para permitir que el número de ecuación encaje correctamente.
De todos modos, no creo que sea tan importante alinear los dos +
símbolos. En mi opinión, un entorno simple multline*
funciona mejor.
\documentclass[12pt,handout,notheorems]{beamer}
\usepackage{amsmath}
\usepackage{bm} %For making Greek letters bold
\usepackage{pgfpages}
\usepackage{mleftright}
\mleftright % no need to redefine '\left' and '\right'
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usetheme{Boadilla}
\begin{document}
\begin{frame}
\setcounter{equation}{9}
\begin{equation}
\begin{aligned}[b]
\mathcal{H}\left(\mathbf{x}\left(t\right),
u\left(t\right), \bm{\lambda}\left(t\right) \right)
&= 1 + \lambda_1\left(t\right)x_2\left(t\right) \\
&\phantom{{}=1}+ \lambda_2\left(t\right)\left[-g - \frac{k}{x_3\left(t\right)}u\left(t\right)\right]+ \lambda_3\left(t\right)u\left(t\right).
\end{aligned}
\end{equation}
\begin{multline}
%% also replaced all 10 [!] instances of '\left(t\right)' with '(t)'.
\mathcal{H}\left(\mathbf{x}(t), u(t), \bm{\lambda}(t) \right)
= 1 + \lambda_1(t)x_2(t) \\
+ \lambda_2(t)\left[-g - \frac{k}{x_3(t)}u(t)\right]+ \lambda_3(t)u(t).
\end{multline}
\end{frame}
\end{document}
Respuesta2
aligned
, que estás usando, te permite hacer eso.
\documentclass[12 pt,handout,notheorems]{beamer}
\usepackage{amsmath}
\usepackage{bm} %For making Greek letters bold
\usepackage{pgfpages}
\usepackage{mleftright}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usetheme{Boadilla}
\renewcommand{\left}{\mleft}
\renewcommand{\right}{\mright}
\begin{document}
\begin{frame}
\setcounter{equation}{9}
\begin{equation}
\begin{aligned}[b]
\mathcal{H}\left(\mathbf{x}\mleft(t\mright), u\mleft(t\mright),
\bm{\lambda}\mleft(t\mright) \right) = 1 &+ \lambda_1\mleft(t\mright)x_2\mleft(t\mright) \\
&+ \lambda_2\mleft(t\mright)\left[-g -\frac{k}{x_3\mleft(t\mright)}u\mleft(t\mright)\right]\\
&+ \lambda_3\mleft(t\mright)u\mleft(t\mright).
\end{aligned}
\end{equation}
or
\begin{equation}
\begin{aligned}[b]
\mathcal{H}\bigl(\mathbf{x}(t), u(t),
\bm{\lambda}(t) \bigr)
= 1 &+ \lambda_1(t)\,x_2(t) \\
&+ \lambda_2(t)\,\left[-g -\frac{k}{x_3(t)}u(t)\right]\\
&+ \lambda_3(t)\,u(t)\;.
\end{aligned}
\end{equation}
\end{frame}
\end{document}
Puede cambiar la alineación [t]
o dejarla fuera para mover el número de ecuación. Ya que estás cargando, mleftright
aproveché la oportunidad para reemplazar algunos \left
ands \right
por \mleft
ands \mright
, pero puedes dejarlos aquí. Yo personalmente también agregaría espacios delgados para separar las funciones (ver la segunda versión).