# Is there a package that displays a terminal screen with code with listings or minted?

I search a LaTeX package which show code inside a terminal image, where I could use listings or minted.

If this not possible I have to build it by myself and will it post here.

• Perhaps tcolorbox package and its libraries listings, listingsutf8 and minted? In the manual there are some examples that look just like a terminal. Jul 30, 2021 at 12:34

This is my solution:

\usepackage{fancyvrb,minted,tcolorbox}
\tcbuselibrary{skins,breakable,breakable}
\tcbuselibrary{minted}

\definecolor{terminalColor}{RGB}{38,50,56}
\definecolor{Button1}{RGB}{254,94,86}
\definecolor{Button2}{RGB}{254,188,45}
\definecolor{Button3}{RGB}{38,202,59}

\begin{tcblisting}{listing engine=minted,minted style=native,
minted language=python,enhanced,
colback=terminalColor,colframe=terminalColor,listing only, title=\tikz {
\node[circle,fill=Button1,inner sep=3pt] (c) at (0,0){};
\node[circle,fill=Button2,inner sep=3pt] (c) at (0.5,0){};
\node[circle,fill=Button3,inner sep=3pt] (c) at (1,0){};
} ~~~~~~Terminal}
>>> a = [1, 2, 3]
>>> b = a
>>> b.append(4)
>>> b
[1, 2, 3, 4]
\end{tcblisting}


• Looks a bit Mac-specific :) but nice solution! Jul 31, 2021 at 10:08
• Thanks. I have been inspired by carbon.now.sh. It would be nice to have this also for windows linux and macOS terminals. Jul 31, 2021 at 10:45
• I cannot reproduce this example. Would you please show the preamble you used? Aug 3, 2021 at 17:10
• @LaTeXereXeTaL I add the imports. Please don't forget to use -shell-escape and you have to install python and pygments. Aug 3, 2021 at 20:26
• Thank you very much! Works perfectly! A beautiful implementation too! Aug 4, 2021 at 0:16