Using mdframed
is probably the way to go if you need to be able to cross page boundaries. Instead of thicker lines, you could also use tikz
with shadows to highlight the desired edges. Here I have adapted the solution from New command for a height-flexible rect. Not only can you can adjust the values of xshift
to get a thicker shadow, but the full power available of tikz
is available to customize as you desire:
\documentclass[border=5pt]{standalone}
\usepackage{calc}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{tikz}
\usetikzlibrary{shadows}
\tikzstyle{shadedbox} = [
text width=0.97\linewidth,
draw=black,
shade, top color=white, bottom color=white,
drop shadow={
top color=black,
bottom color=black,
shadow xshift=-1.5pt,% add shading on left
shadow yshift=-0.5pt,% 0pt removes shading at bottom
},
rectangle,
]
\newcommand{\myquote}[2][]{%
\noindent%
\begin{tikzpicture}%
\node [shadedbox, #1] (box) {#2};%
\end{tikzpicture}%
}
\newcommand{\ShortLoremIpsum}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam turpis turpis, rutrum vel facilisis nec, scelerisque ut nisi.
Proin et elit sapien. Ut non ante tellus. Pellentesque et tempus metus. Phasellus sit amet est nisl, a varius elit. Nunc nunc magna, molestie sit amet fermentum a, facilisis at urna.
}%
\begin{document}
\myquote{\ShortLoremIpsum}
\myquote[bottom color=yellow!10]{\ShortLoremIpsum}
\myquote[rounded corners=5pt, line width=1.0pt, draw=blue]{\ShortLoremIpsum}
\myquote[text width=0.6\linewidth, top color=red!10, densely dotted]{\ShortLoremIpsum}
\end{document}
mdframed
. It allows for breaking across pages as well.mdframed
doesn't supportcss
style. You can use\mdfdefinestyle
to define your own style. At the moment I have no separate line specification implemented. But with theframemethod=default
it should be very simple.