I'm trying to replicate a common pattern in programming books, where authors use to create few designs for brief, emphasized text portions that differ in the icon/image used, e.g.
or also:
and finally:
Each of the above styles comes from books where 3, 4 versions are used (changing only the icon, that carries a different meaning)
So far I've only been able to create a very basic mdframe example to be used in a scrbook class:
\documentclass[
letterpaper,
12pt,
oneside
]{scrbook}
\usepackage{lipsum}
\usepackage{pstricks}
\usepackage[framemethod=PSTricks]{mdframed}
\begin{document}
\mdfdefinestyle{roundframe}{
leftmargin=1cm,
rightmargin=1cm,
innerleftmargin=2cm,
innerrightmargin=2cm,
roundcorner=10pt
}
\newmdenv[style=roundframe]{framedaside}
\lipsum[1]
\begin{framedaside}
In any right triangle, the area of the square whose side is the hypotenuse is equal to the sum of the areas of the squares whose sides are the two legs.
\end{framedaside}
\lipsum[1]
\end{document}
I'm after a way to create few newmdenv where I would:
\begin{infoaside}
% ...
\end{infoaside}
\begin{warningaside}
%...
\end{warningaside}
Each of them would have an image (or ideally a FontAwesome icon) in the top-left part of the mdframe, and the body – either text, listings, etc. – padded accordingly, as in the examples provided.
Any help in guiding me through this would be greatly appreciated.
Thank you










bclogopackage https://tex.stackexchange.com/a/163249/11604 and – Fran Oct 02 '19 at 22:54