General ⇒ Indented text for code example
Indented text for code example
I need to add in a report a piece of code i wrote in matlab. I though I could do that with \begin{quote} ... \end{quote}. The problem is that it doesn't keep the indentation. Does anyone know how to make the text as it looks like in matlab?
Thanks
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Indented text for code example
Re: Indented text for code example
I was wondering if there was an environment that could recognize the indentation, but I guess that I have to do it manually.
Thanks again
Indented text for code example
Code: Select all
\documentclass{article}
\begin{document}
\begin{verbatim}
text
text
text
text
\end{verbatim}
\end{document}
Re: Indented text for code example
That is exactly what I was looking for!