2

Can I somehow force my equations to all have the equal sign on the horizontal middle axis of the page? The equations are already individually aligned, but I would like to align them globally. I found \intertext{<text>} but this is not a good option.

EDIT: An example of code that is locally aligned but not globally.

\begin{equation}
F=\mathbb{E}_{Q}[\log Q(\widetilde{\boldsymbol{s}})-\log P(\widetilde{\boldsymbol{s}}, \widetilde{\boldsymbol{o}})]
\end{equation}

\begin{equation} \begin{aligned} F &=\mathbb{E}{Q}[\log Q(\tilde{\boldsymbol{s}})-\log P(\widetilde{\boldsymbol{s}}, \widetilde{\boldsymbol{o}})] \ &=\mathbb{E}{Q}[\log Q(\widetilde{\boldsymbol{s}})-\log P(\widetilde{\boldsymbol{s}} \mid \widetilde{\boldsymbol{o}})-\log P(\widetilde{\boldsymbol{o}})] \ &=D_{\mathrm{KL}}(Q(\widetilde{\boldsymbol{s}}) | P(\widetilde{\boldsymbol{x}} \mid \widetilde{\boldsymbol{o}}))-\log P(\widetilde{\boldsymbol{o}}) \end{aligned} \end{equation}

\begin{equation} \begin{aligned} \log (p(x)) &=\mathbb{E}{z \sim q}[\log (p(x))] \ &\left.=\mathbb{E}{z \sim q}\left[\log \left(\frac{p(z, x)}{p(z \mid x)}\right)\right]\right) \end{aligned} \end{equation}

Mariusmarten
  • 121
  • 5
  • Welcome to TeX.SE! Can you please show us a short compilable TeX code we can play with? – Mensch Dec 16 '21 at 14:14
  • Hi Mensch. Sure, I added some code above to clarify what I would like to do. – Mariusmarten Dec 16 '21 at 14:21
  • 1
    You can give a look at https://tex.stackexchange.com/q/343911/82917. – campa Dec 16 '21 at 14:44
  • 1
    Also https://tex.stackexchange.com/questions/115534/align-separate-equations, https://tex.stackexchange.com/questions/129369/alternative-to-align-in-this-case?noredirect=1&lq=1, https://tex.stackexchange.com/questions/122069/align-all-equal-signs-in-the-document?noredirect=1&lq=1 – Steven B. Segletes Dec 16 '21 at 17:02

0 Answers0