I've created an "example" environment for my examples.
I need to enclose the text inside the example with a vertical line.
Obviously the \vline command won't work.
What's the optimal way to achieve this?
I want to avoid using minipage or multicol since I use the wrapfig inside the example environment and as you most probably know these packages are incompatible to each other.
Text Formatting ⇒ Vertical line around text
Vertical line around text
Last edited by yiorgosb on Thu Mar 03, 2011 1:13 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Vertical line around text
How can a (single) vertical line enclose something? Please give at least a visual help of what you are after or submit a minimal example with what you have done so far. Both would be best.
Thorsten
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
Vertical line around text
You are right. The term enclose is not appropriate.
I mean a result like the one produced by the following code
which is just for demonstration of what I want to do.
I mean a result like the one produced by the following code
Code: Select all
\begin{tabular}{|c}
Lorem Ipsum is simply dummy text \\
Lorem Ipsum has been the industry's \\
when an unknown printer specimen book. \\
\end{tabular}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Vertical line around text
The framed package is probably what you are looking for.
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{framed}
\usepackage{blindtext}
\begin{document}
\blindtext
\begin{leftbar}
\blindtext
\end{leftbar}
\blindtext
\end{document}
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
Vertical line around text
Thank you it's working.
For anyone who may see this topic, to change the color of the sidebar
you may refer here
For anyone who may see this topic, to change the color of the sidebar
you may refer here