Last active
May 9, 2024 13:00
-
-
Save titospadini/3355265db5868d4742333ecaa7fcb16f to your computer and use it in GitHub Desktop.
A simple box with rounded edges, and with a title, to show command-lines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage[table, dvipsnames]{xcolor} | |
\usepackage{changepage} | |
\usepackage[skins]{tcolorbox} | |
\newenvironment{coloredterminal}{ | |
\begin{adjustwidth}{10mm}{} | |
\begin{tcolorbox}[colback=gray!10, boxrule=1pt, title=Terminal, fonttitle=\footnotesize] | |
}{ | |
\end{tcolorbox} | |
\end{adjustwidth} | |
} | |
\newcommand{\terminal}[1]{ | |
\begin{coloredterminal} | |
\ttfamily\footnotesize | |
#1 | |
\end{coloredterminal} | |
} | |
\begin{document} | |
% just an example with multiple command-lines. | |
\terminal{ | |
sudo apt update \\ | |
sudo apt upgrade | |
} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment