# How to upload C code into latex appendix section [duplicate]

Possible Duplicate:

I am trying to upload the code into my latex document.Please let me know how can I do that.My code is as below.

``````\appendix

%My C code goes here
``````
-
You can add it with the package `listings` for example. You know this package? If not, please try `texdoc listings` in your command line. –  Kurt Sep 16 '12 at 20:16
I am supposed to use only appendix.Is it possible only with \appendix tag? –  Vutukuri Sep 16 '12 at 20:17
@Vutukuri It is not clear what you want. In the appendix you use the usual sectional unit commands for creating entries in the appendix: \chapter, \section, ... (but they get numbered differently). To include a listing, you must provide the LaTeX commands. @Kurt recommened the `listings` package to do this. (I'd recommend the `lstlistings` package.) –  Marc van Dongen Sep 16 '12 at 20:20

## marked as duplicate by lockstep, Marco Daniel, percusse, doncherry, Lev BishopSep 21 '12 at 6:48

You can try using `listings` package for proper source code formating, or you can just use `\verbatim` environment.