21

Is there any way to override the fact that certain environments in LaTeX are automatically "displayed"? One such example is the align* environment. I want to keep my aligned equations inline. So basically I want something like

\begin{align*}
x+y&=z\\
u+v&=w
\end{align*}

embedded into a line of text.

32

In such cases you could simply use the aligned environment within inline math instead of align*:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
text
$\begin{aligned}
x+y&=z\\
u+v&=w
\end{aligned}$
more text
\end{document}

Output:

alt text

| improve this answer | |
  • @Stefan, thanks...I wasn't aware that there was an aligning environment outside of math mode. Doh! – Kristen Nov 17 '10 at 23:43
  • 1
    @Kristen: It's not outside math mode, but inside inline math mode. – Hendrik Vogt Nov 18 '10 at 9:46
  • I wonder if it is essentially the same as \halign{#\hfill&&~#\hfill\cr text&$\eqalign{x+y&=z\cr u+v&=w}$&more text\cr}\bye in plain. – morbusg Nov 29 '10 at 12:35
  • 1
    how do I do it without the vertical centering – theonlygusti May 14 '19 at 14:13
  • @theonlygusti found a solution? – Colo Apr 26 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.