I want to create a command, accepting an argument, which sets the content of the argument as a TikZ picture. Problem: The argument is a minted/FancyVrb environment.
MWE:
%!TEX OPTIONS = --shell-escape
\documentclass{article}
\usepackage{tikz}
\usepackage{minted}
\newcommand{\tikzverb}[1]{\tikz{\node (text) [draw=blue, thick] {#1}; \fill [opacity=0.5] (text.north east) circle (5pt);}}
\begin{document}
\tikzverb{
\begin{minted}{text}
test
\end{minted}
}
\end{document}
Some background: This MWE is boiled down and simplified from a command from my slides, which I set via LaTeX Beamer. I configured minted for source code highlighting, so I'd rather use this package instead of other verbatim environments. In the slides, the command should display bash shell output.
During assembling of this MWE, I found out that using a savebox does not solve the issue, which was usually one of the solutions in other questions like this. A combination of savebox and lstlisting environments works (see also this), but that'd mean another package which needs to be configured separately. I rather stick to minted, if I can (because it's great).

tcolorbox. Although it's another abstraction layer on top, let's see how far I come! Thanks! – AndiH Aug 19 '17 at 14:53