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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
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