I am trying to print a .tex code in a pdf file. I am using verbatim package for this. but this package automatically breaks the line but I don't want to break the line. my output should be something like this. enter image description here

but my output is something like this enter image description here

  • 2
    Use \verb+\appendix+ instead of verbatim. Aug 10, 2017 at 11:36
  • 2
    The verbatim environment always starts a new paragraph. If you want to use a verbatim string inside a paragraph you can use something like \verb|\appendix|. Aug 10, 2017 at 11:37
  • And next time, please cut and paste your code instead of sticking in images.
    – JPi
    Aug 10, 2017 at 12:37
  • @JPi I have edited the question is it ok now ? Aug 10, 2017 at 13:23
  • 4
    I'm voting to close this question as off-topic because it is a basic feature explained in any introduction.
    – jarnosc
    Aug 10, 2017 at 18:34


Browse other questions tagged .