# [texhax] Terminal output

Schwartz, Steven J s.schwartz at imperial.ac.uk
Mon Sep 9 18:18:20 CEST 2013

Shawn,

shawn wilson wrote on 2013-09-09:
----------------
> What's the best way to show terminal output in a tex document?
>
>
> I've tried \verb{..} but this seems to fall apart after a single line.

Correct. \verb can't contain an end of line. A \begin{verbatim}...\end{verbatim} CAN contain more than one line, but can't be put inside another command, apart from a minipage (so it can't be put inside a box).

> Is there a better way to have text that has no formatting other than line breaks in it?
>
>
> I'd like a solution that works well with outside formatting (so i can
> put a box around it or texttt, etc)

A quick google threw up several solutions, including the framed package, and the fancyvrb package. There's also the listings package, designed for programming code I think.

HTH
Steve

--------------------------------------------------------------------
Professor Steven J Schwartz        Phone:  +44 (0)207 594 7660
Head, Space & Atmospheric Physics  Fax:    +44 (0)207 594 7772
Director, Imperial Space Lab       www.imperial.ac.uk/spacelab
The Blackett Laboratory            Email:  s.schwartz at imperial.ac.uk
Imperial College London            Office: Huxley 6M67A
London SW7 2AZ, UK                 Web:    www.sp.ph.ic.ac.uk/~sjs
--------------------------------------------------------------------