How can I insert a box and put my code into it in Latex?

Viewed 212

I've this ASN.1 code into my latex document:

\begin{verbatim}
...my code...
\end{verbatim}

All I want to do is simply put this code into a box, a square box. How can I do it? Thank you everybody

1 Answers

One possibility: the fancyvrb package

\documentclass{article}

\usepackage{fancyvrb}

\begin{document}

\begin{Verbatim}[frame=single]
...my code...
\end{Verbatim}

\end{document}

enter image description here

If you need anything more complicate, have a look at listings or minted

Related