This is a command within LaTeX that I forget constantly and I always lose the resource from where I learned about it. So, I’m documenting it here so that I can find it later on when I need it. I also figured it might help somebody else out there looking for the same thing.
Basically, what this little code snippit does is import a source code file and inserts it into the final document. It’s a lot easier than copy/paste and it has a lot of formatting options associated with it. Just check out the lstset command manual or this guide here or this guide here (LaTeX wikibook). Be sure to include the listings package with this declaration before the main document: