Question : How can I insert a txt file ( a source code) as such in latex without any change in indentation, tabs, formatting etc?
Consider I have a text file as below ( It is a part of a VHDL code edited in gEdit ):
I want to include this code in Latex as it is.
I used verbatim method available in Kile, and below is the result I got :
You can see the tabs and indentation is dislocated. ( This is just a small part, remaining part is also similar, means, everything dislocated)
How can I add this code as such into a latex file ?
It is after the comment of @Kurt;
I also used
listings package. Again the same problem. Intendation is not correct. Also, it even cut some portions of text on the right side.
library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity TOP_MODULE is port (CLK : IN STD_LOGIC; -- clock RESET : IN STD_LOGIC; -- reset signal DECODED_DATA : OUT STD_LOGIC_VECTOR(0 TO 15) -- decoded message ); end TOP_MODULE;