Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there a way to have framed.sty's sidebar environment to use a long wavy line, constructed, for example, using the mathabx.sty's \lfilet variable-sized delimiter?

share|improve this question
    
Being able to use an arbitrary variable-sized delimiter would be nice, of course. –  Mariano Suárez-Alvarez Jan 28 '13 at 21:48
2  
Probably mdframed with TikZ is a better guess. –  egreg Jan 28 '13 at 22:02

1 Answer 1

Here's one possibility using mdframed, and a coil decoration from TikZ:

\documentclass{article}
\usepackage[a6paper]{geometry}% just for the example
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{decorations.pathmorphing,calc}
\usepackage{lipsum}% just to generate text for the example

\newcommand\wavydecor{%
    \draw[decoration={coil,aspect=0.1,segment length=5pt,amplitude=0.8pt},decorate,line width=1.5pt,black]
      (O|-P) -- (O);
}

\newmdenv[
hidealllines=true,
innerleftmargin=10pt,
innerrightmargin=0pt,
innertopmargin=0pt,
innerbottommargin=0pt,
leftmargin=-10pt,
skipabove=.5\baselineskip,
skipbelow=.5\baselineskip,
singleextra={\wavydecor},
firstextra={\wavydecor},
secondextra={\wavydecor},
middleextra={\wavydecor}
]{wavysbar}

\begin{document}

\lipsum[4]
\begin{wavysbar}
\lipsum[4]
\end{wavysbar}
\lipsum[4]
\begin{wavysbar}
\lipsum[4-5]
\end{wavysbar}
\lipsum[4]

\end{document}

enter image description here

And just to show some other possibilities for decorations:

\documentclass{article}
\usepackage[a6paper]{geometry}% just for the example
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{shapes,decorations.pathmorphing,decorations.shapes,backgrounds,calc}
\usepackage{lipsum}% just to generate text for the example

\newcommand\sawdecor{%
    \draw[decoration={saw,aspect=0.1,segment length=9pt,amplitude=3pt},decorate,line width=1.5pt,red!50!black]
      (O|-P) -- (O);
}

\newcommand\triangledecor{%
    \draw[decoration={triangles,shape size=4,segment length=6pt},fill=orange!70!black,draw=orange,decorate]
      (O|-P) -- (O);
}

\newmdenv[
hidealllines=true,
innerleftmargin=10pt,
innerrightmargin=0pt,
innertopmargin=0pt,
innerbottommargin=0pt,
leftmargin=-10pt,
skipabove=.5\baselineskip,
skipbelow=.5\baselineskip,
singleextra={\sawdecor},
firstextra={\sawdecor},
secondextra={\sawdecor},
middleextra={\sawdecor}
]{bumpsbar}

\newmdenv[
hidealllines=true,
innerleftmargin=10pt,
innerrightmargin=0pt,
innertopmargin=0pt,
innerbottommargin=0pt,
leftmargin=-10pt,
skipabove=.5\baselineskip,
skipbelow=.5\baselineskip,
singleextra={\triangledecor},
firstextra={\triangledecor},
secondextra={\triangledecor},
middleextra={\triangledecor}
]{trisbar}

\begin{document}

\begin{trisbar}
\lipsum[4]
\end{trisbar}
\lipsum[4]
\begin{bumpsbar}
\lipsum[4-5]
\end{bumpsbar}
\lipsum[4]

\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.