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?
Asked
Active
Viewed 302 times
1
-
3Welcome to TeX.SE! You can try package 'listings'. Serch here for several examples for usage ... – Mensch Aug 08 '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 08 '14 at 10:56
-
Than you both.. – Ken - Enough about Monica Aug 08 '14 at 11:03
-
The listings package is one. – JPi Aug 08 '14 at 11:37
1 Answers
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}
-
-
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. – Aug 08 '14 at 21:34