Math & Science ⇒ How to center align all parts of multilined formula
How to center align all parts of multilined formula
I want to make something like gather environment where all parts are center aligned (it doesn't fit because it considers every new line as new formula).
The problem with multline environment is that the first line is left aligned and the last is right aligned, and center environment doesn't help here.
The split environment is also not very useful here cause it requires manual definition of align points.
I'm sure there is a way to make this but i can't find it.
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
How to center align all parts of multilined formula
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{gathered}
2+2=4\\
3+3=6\\
1234 - 1234 = 0
\end{gathered}
\end{equation}
\end{document}
Re: How to center align all parts of multilined formula
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to center align all parts of multilined formula
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10