I'm familiar with the Defining a command for a minted environment question. In addition to defining the mint parameters I also want to wrap the minted code inside a Tikz box for its nice looks.
I've tried the following code which obviously doesn't work due to the command issue. But I can't find how combine it with the tools the minted library provides:
\newcommand{\jscode}[1]{
\begin{tikzpicture} \node [mintedbox] (box){ \begin{minipage}{\textwidth}
\begin{minted}{javascript}#1\end{minted}
\end{minipage} }; \end{tikzpicture}
}
Perhaps superfluous but here is the error I get:
! Paragraph ended before \FV@BeginScanning was complete.
