[Tex/LaTex] How to mark book paragraphs as note, warning, tip etc.

book-designformattingparagraphs

In my text I have some paragraphs that should be denoted as "note", "caution", "tip", "story". These paragraphs should be rendered with darker background and an icon on the left side.

I was not able to figure out the good keywords to google this up.

Any clues?

Best Answer

\documentclass[english]{article}
\usepackage{babel,xcolor,framed,marginnote,blindtext}
\colorlet{shadecolor}{blue!10}

\newenvironment{SpecialPar}
  {\begin{shaded}\marginnote{\fbox{Icon}}}
  {\end{shaded}}

\begin{document}

\blindtext
\begin{SpecialPar}
\blindtext 
\end{SpecialPar}
\blindtext

\end{document}

enter image description here

Related Question