# Text environment with vertical header and border

I have no experience with creating latex environments, so I hope that someone would be so kind helping me trying to create a new text environment with a border and a vertical header to the right of the text area.

I've tried to depict it using my MS Paint skills:

Is there anyone who can help me create such an environment or give me some hints on how to do it? Any help will be much appreciated.

-
Welcome! A suggestion: marcodaniel.github.com/mdframed or see this question: tex.stackexchange.com/questions/52023/… –  Marco Daniel May 1 '12 at 10:19
A truly awesome package. Thank you very much for sharing it Marco. If you make an answer, I'll accept it. –  Tommy Jakobsen May 1 '12 at 10:23

As I wrote in the comment I suggest the package mdframed. I am sure the packages framed or tcolorbox are also able to do this.

All listed options can be found in the documentation. I also recommend the example of the question mdframed-Put something on the start of one vertical left rule where I explain most of the following code.

\documentclass{article}
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{calc}%need for tikz let operation
\usepackage{kantlipsum}%filling text

\newmdenv[%
skipabove=\topskip,%
skipbelow=\topskip,%
rightmargin=.5cm,%
leftmargin=2cm, %
middlelinewidth=2pt,%
middlelinecolor=blue!70,%
firstextra={\path[overlay]  let \p1=(P), \p2=(O) in ($(\x2,0)+1*(0,\y1)$)
singleextra={\path[overlay] let \p1=(P), \p2=(O) in ($(\x2,0)+1*(0,\y1)$)
]{myframe}

\begin{document}
\kant[1]

\begin{myframe}
\kant[2]
\end{myframe}

\kant[3]

\end{document}


-
Thank you so much. Exactly what I was looking for! –  Tommy Jakobsen May 1 '12 at 10:54
I've been trying to figure out how to add an option for changing the header in their digression-environment (Example 6 here: cloud.github.com/downloads/marcodaniel/mdframed/…), so you can use the package something like this: \begin{mdframed}[style=digressionarrows]{Header of the environment}. Do you know how to do that? :-) –  Tommy Jakobsen May 3 '12 at 10:19
@TommyJakobsen: Yes ;-). I recommend to ask a new question. I can't answer it know. If you ask in 2 hours again, I will be back. –  Marco Daniel May 3 '12 at 14:54
Yes of course. Here it is :-) tex.stackexchange.com/questions/54754/… –  Tommy Jakobsen May 7 '12 at 9:04