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.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityThis 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}
-shell-escape
and you have to install python
and pygments
.
tcolorbox
package and its librarieslistings
,listingsutf8
andminted
? In the manual there are some examples that look just like a terminal.