Page LayoutText aligned to first Line of Table or System of Equations

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
collertom
Posts: 1
Joined: Sun May 06, 2012 7:40 pm

Text aligned to first Line of Table or System of Equations

Post by collertom »

I need to place text (one word or string) near align* or tabular environment. String (in example Test) must be in the same line as fist line of environment (in example aa=bb).

I know that I can whole put inside table or minipage but I need some simple solution.

Second problem is, that I don't know how can manage to break this environments on multiple pages.

Code: Select all

\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage{amsmath, amsfonts}

\begin{document}


\textbf{Test} \begin{align*}
aa &= dd \\
bb &= ee \\
cc &= ff
\end{align*}

\textbf{Test} \begin{tabular}{r @{=} l}
$aa$ & $bb$ \\
$cc$ & $dd$\\
$ee$ & $ff$ \\
\end{tabular}


\end{document}

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: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Text aligned to first Line of Table or System of Equations

Post by Stefan Kottwitz »

Hi,

welcome to the board!

Very good, that you posted a complete minimal example. So I can show the solution on it - use aligned instead of align*, and both with aligned and tabular use the [t] option for aligning at the top:

Code: Select all

\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage{amsmath, amsfonts}

\begin{document}

\textbf{Test} $\begin{aligned}[t]
aa &= dd \\
bb &= ee \\
cc &= ff
\end{aligned}$

\textbf{Test} \begin{tabular}[t]{r @{=} l}
$aa$ & $bb$ \\
$cc$ & $dd$\\
$ee$ & $ff$ \\
\end{tabular}

\end{document}
Regarding the second problem: for page breaks in multi-line math environments you could use \allowdisplaybreaks or \displaybreak, as described here: How can I make a page break within an align environment?

Stefan
LaTeX.org admin
Post Reply