Hello,
I am using \newtheorem{mdef}[equation]{Definition} for definitions, examples and proofs. To emphasise these text blocks in a large text document, I am trying to implement a thick border on the left side of this text block. Is there any possibility to simply draw a gray thick line vertically next to a \begin{mdef}...\end{mdef} block?
I have tried to use pdfcomments, I do not understand a word how to use it. I tried changebars, but it is getting to float-errors all the time. Are you having any simple example for a left border without reading wide documentations without any useful code?
Thank you in advance!
Text Formatting ⇒ Left border for Definitions, Examples, Proofs, etc
NEW: TikZ book now 40% off at Amazon.com for a short time.
Left border for Definitions, Examples, Proofs, etc
Hi,
you can use the leftbar environment provided by the framed package to design a new environment combining the leftbar and mdef environments:
you can use the leftbar environment provided by the framed package to design a new environment combining the leftbar and mdef environments:
Code: Select all
\documentclass{book}
\usepackage{amsthm}
\usepackage{framed}
\newtheorem{mdef}[equation]{Definition}
\newenvironment{mydef}
{\begin{leftbar}\begin{mdef}}
{\end{mdef}\end{leftbar}}
\begin{document}
\begin{mydef}
dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text
\end{mydef}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Left border for Definitions, Examples, Proofs, etc
A similar issue has already been discussed here some time ago [1]. The presented solution provides also the possibility to color the rule.
[1] View topic: ruled margins
Best regards
Thorsten
[1] View topic: ruled margins
Best regards
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