[Tex/LaTex] fancy text boxes like in Redhat documentation or mercurial book

boxesframed

I would like to have framed texts with an Icon on the side like the ones here
http://www.centos.org/docs/5/html/5.5/Release_Notes/ar01s06.html
or
http://hgbook.red-bean.com/read/collaborating-with-other-people.html

these text boxes are helping to emphsize text, and hg book has really nice frames around code ! which are nicer than the simple code frames I use now.

So far I found The mdframed package as a candidate for that, but the question is
how do I insert the tiny image in the side, and define internal margin ?

Can someone give a code snippet ?

** Also, another question, I love Latex, but I am thinking the following:
Since I want to publish my book online, it does make sense just to download the code of the hgbook, and learn the syntax of that XML ? would latex give me more advandages ?

Best Answer

I think bclogo can help you. Its documentation is in french but full of examples.

Some little examples:

\documentclass{article}
\usepackage[tikz]{bclogo}
\usepackage{lipsum}
\begin{document}
\begin{bclogo}{Nice bclogo example}
\lipsum[3]
\end{bclogo}

\begin{bclogo}[couleur = blue!30,couleurBord=red!50,logo=\bcoutil]{Nice bclogo example}
\lipsum[3]
\end{bclogo}

\begin{bclogo}[arrondi=0.1,epBarre=0,couleur = green!30,couleurBord=orange!50,logo=\bcfeutricolore]{Nice bclogo example}
\lipsum[3]
\end{bclogo}
\end{document}

enter image description here

Related Question