Search found 1 match

by squiggle
Fri Feb 25, 2011 5:13 am
Forum: Text Formatting
Topic: Using listings to create code that can be copied and pasted
Replies: 1
Views: 3781

Using listings to create code that can be copied and pasted

Hello,
I would really like to make a pdf that has code that can be copied and pasted into an editor and run, however, when I use:

\documentclass{article}
\usepackage{listings}
\begin{document}
\lstset{language=C}
\begin{lstlisting}
// Basic command
fprintf("I'm sad this doesn't work");
\end ...