Hi everybody,
I'm sorry to disturb you with probably such an easy thing, but I just begin to use LaTeX and I would like to put a vertical line on the left of every mathematical proof I do (please see the attached example). How can I do in math mode?
Thank you,
Vince
Page Layout ⇒ Vertical Line left of Proofs
-
- Posts: 1
- Joined: Mon Aug 06, 2012 11:30 pm
Vertical Line left of Proofs
- Attachments
-
- layout.pdf
- (77.1 KiB) Downloaded 865 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Vertical Line left of Proofs
I think using the leftbar environment of the framed package will do what you wish, like so:
Code: Select all
\documentclass{article}
\usepackage{framed}
\usepackage{amsmath,amsthm}
\newenvironment{theorem}[1][Proof]
{\begin{leftbar}\begin{proof}[#1]}
{\end{proof}\end{leftbar}}
\begin{document}
Hello! This is text, leading to
\begin{theorem}[Proof by Paradox]
\begin{equation}
\begin{split}
\mathrm{A.}\quad & \mathrm{A} \oplus \mathrm{B} \\
\mathrm{B.}\quad & 1 = 2
\end{split}
\end{equation}
Case 1: Statement A is FALSE, meaning statement B is TRUE \\
Case 2: Statement A is TRUE, meaning statement B is TRUE
\end{theorem}
And here's another one for you,
\begin{theorem}
\begin{gather}
ax^2 + bx + c = 0 \\
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\end{gather}
\end{theorem}
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Vertical Line left of Proofs
You may also want to take a look at the mdframed package. The example of kaiserkarl13 modified accordingly.
For further customization please have a look at the comprehensive package manual.
Best regards and welcome to the board
Thorsten
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage[framemethod=TikZ]{mdframed}
\surroundwithmdframed[
topline=false,
rightline=false,
bottomline=false,
leftmargin=\parindent,
skipabove=\medskipamount,
skipbelow=\medskipamount
]{proof}
\begin{document}
\noindent
Preceding Text
\begin{proof}[Proof by Paradox]
\begin{equation}
\begin{split}
\mathrm{A.}\quad & \mathrm{A} \oplus \mathrm{B} \\
\mathrm{B.}\quad & 1 = 2
\end{split}
\end{equation}
Case 1: Statement A is FALSE, meaning statement B is TRUE \\
Case 2: Statement A is TRUE, meaning statement B is TRUE
\end{proof}
Following Text
\end{document}
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10