Math & Science ⇒ line-by-line annotation for proofs?
line-by-line annotation for proofs?
statement = statement by theorem blah
= manipulated statement by this property
< something else by definition
etc (note, the equals and the "by"s should be aligned). Are tables the best way to do this, or is there an environment for this? If tables are the solution, I would love it if people could post some snippets of how to do this in a clean-looking way.
--
decitrig
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
line-by-line annotation for proofs?
There's a reply that still awaits your reaction [1]. It is a matter of politeness to give feedback on provided solutions.
[1] View topic: Specify shorter author name for in-text citations?
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
line-by-line annotation for proofs?
another option could be the alignat environment provided by amsmath:
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat}{2}
A\cup(B\cap C) &= (A\cup B)\cap (A\cup C) &\quad &\text{by distributive law.}\\
&= (B\cup A)\cap (C\cup A) &&\text{by commutative law.}\\
&= (B\cap C)\cup A &&\text{by distributive law.}\\
\end{alignat}
\end{document}
line-by-line annotation for proofs?
localghost wrote:If the text represents math expressions, use the align environment from amsmath. However, be a bit more specific on what you want to do.
There's a reply that still awaits your reaction [1]. It is a matter of politeness to give feedback on provided solutions.
[1] View topic: Specify shorter author name for in-text citations?
Best regards
Thorsten
OT indeed there is. Apologies, it slipped my mind. Fixing now.
line-by-line annotation for proofs?
That worked very well - stupid of me not to see that in the docs.
I did the following:localghost wrote:If the text represents math expressions, use the align environment from amsmath. However, be a bit more specific on what you want to do
Code: Select all
% how very contrived this example is
\begin{align}
x^n &= x\cdot x^{n-1} & \mbox{by algebra}
\end{align}
line-by-line annotation for proofs?
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
x^n &= x\cdot x^{n-1} && \mbox{by algebra} \\
x^n + 1 &= x\cdot x^{n-1} + 1 && \mbox{by more algebra} \\
x^n + 1 - n &= x\cdot x^{n-1} + 1 - n && \mbox{by even more algebra}
\end{align}
\end{document}