[Tex/LaTex] Put line numbers inside fancyvrb environment

fancyvrbline-numberingverbatim

Line numbers generated for verbatim text by the fancyvrb package are put outside the verbatim environment:

\documentclass{article}   
\usepackage{fancyvrb}

\begin{document}
\begin{Verbatim}[numbers=left]
First verbatim line.
Second verbatim line.
\end{Verbatim}
Normal text
\end{document}

Output

How do I align the numbering in such a way that they are inside the verbatim environment (left aligned with "normal text") and don't go into the page margin?

Thanks

Best Answer

Use xleftmargin:

\documentclass{article}   
\usepackage{fancyvrb}

\begin{document}
\begin{Verbatim}[numbers=left,xleftmargin=5mm]
First verbatim line.
Second verbatim line.
\end{Verbatim}
Normal text
\end{document}

enter image description here