I am looking for a package that provides verbatim environments but also supports different background color, frame style and icons (tips, error, warning etc.) shown on the upper-left corner.
The strategy is to first save parsed data (text) to a storage bin using the
Next I show how to use
(this time the entire box is placed inside the
You could try and use a combination of existing packages, lets say TikZ and minted:
Which yields (with appropriate code & icon files):
You could then wrap these into
Another, IMHO, elegant solution based on the great, but still relatively unknown
This package has the advantage, that it has built-in support for verbatim material (especially listings) and PGF/TikZ-based decorations, which provides a lot of graphical flexibility. It already comes with a stunning number of options, float support, etc.
One way to do, what you want, is to
This would as an MWE look like
Here in the escaped part we place an
The first line of an info-icon-code is just
The complete result is something like
Where of course you also can specify other positions of the lightbulb/icon depending on the
Edit: I just noticed that there is an linebreak too much after the ending
which removes the first empty line in the picture.
Another option would be
and its result: