# How do I show an example of a file in latex?

I need to write an example of a file format. I want to do something like this:

The text inside the square is something I'll write inside latex and represents how a certain kind of file is made, it's not the content of a real file on my file system. I tried looking up online but I only came across results showing how to import verbatim the content of a file.

I'm also interested in putting the caption after the image.

The text I'll write will be made of file formats and algorithms.

With the help of the listings package:

\documentclass{article}
\usepackage{listings}
\lstset{numbers=left, numberstyle=\tiny,frame=single}
\begin{document}
\begin{lstlisting}[caption={Your caption text}, label=labeltext, captionpos=b]
.i 4
.o 1
-10- 1
\end{lstlisting}
\end{document}

• Do you know how can I replace the word "Listing" under the figure with another word, like "Figure"? – Gerardo Zinno Sep 1 '19 at 20:46