Math & ScienceHow to prevent a linebreak before align environment?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

How to prevent a linebreak before align environment?

Post by Fibonacci »

I have the following document:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{itemize}
\item \begin{align}
10&=2+2+2+2+2\\
&=3+3+3+1
\end{align}
\end{itemize}
\end{document}
It produces a linebreak right between the itemize bullet and the equations.
Is there any way to prevent that?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

How to prevent a linebreak before align environment?

Post by Stefan Kottwitz »

Use an aligned environment in inline math mode.

Code: Select all

\begin{itemize}
\item $\begin{aligned}[t]
10&=2+2+2+2+2\\
&=3+3+3+1
\end{aligned}$
\end{itemize}
Stefan
LaTeX.org admin
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

Re: How to prevent a linebreak before align environment?

Post by Fibonacci »

Thank you, that's what I was looking for.
Post Reply