Math & Sciencebeamer | Align Equation with Text and Box around Variable

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

beamer | Align Equation with Text and Box around Variable

Post by Stefan Kottwitz »

Both within the document.

Example for a limited scope:

Code: Select all

\documentclass[fleqn]{article}
\begin{document}
{\setlength{\mathindent}{0pt}
% The following equation is aligned to the left
\[ 1+1 = 2 \]
}
% The following equation is indented as default
\[ 1+1 = 2 \]
\end{document}
An example with flalign*:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
% The following equation is aligned to the left
\begin{flalign*}
1+1 = 2 &&
\end{flalign*}
\end{document}
Stefan
LaTeX.org admin

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply