1

This question already has an answer here:

I am running a command and want to show the output in my document. I will simply cut and paste it. I know that the font must be different. What package or command is used for formatting command output?

marked as duplicate by jub0bs, Jesse, Malipivo, moewe, Masroor Aug 8 '14 at 13:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Welcome to TeX.SE! You can try package 'listings'. Serch here for several examples for usage ... – Mensch Aug 8 '14 at 10:56
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – jub0bs Aug 8 '14 at 10:56
  • Than you both.. – horse hair Aug 8 '14 at 11:03
  • The listings package is one. – JPi Aug 8 '14 at 11:37
0

If you want the full command and output exactly as rendered (spacing and all) the built-in verbatim or Verbatim environment might be what you want. Eg.

\begin{Verbatim}
$ pdflatex --shell-escape poetrytex.dtx
\end{Verbatim}

If you're looking for inline output, just use a monospace font, eg.

\texttt{git describe --tags --dirty}
  • Too limited for my taste. listings and minted are better. – jub0bs Aug 8 '14 at 12:35
  • What specifically do you want then? It's not clear to me that this is a duplicate (unless you did, in fact, want syntax highlighting, but it's also not clear to me what you want other than just a monospace font. – Sam Whited Aug 8 '14 at 21:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.