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: 10359
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

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

Post Reply