Is there a way I can make the verbatim text word wrap?
If yes, is there a way I can have verbatimtab with word wrap?
If yes, is there a way I can have verbatimtab with line numbers, like
a listing environment, with word wrap?
Thanks
Here is some documentation:
http://www.pvv.ntnu.no/~berland/latex/docs/listings.pdf
Here is a complete example:
\documentclass{article}
% this will print a listing of a file even if it has
% characters that are normally problematic in tex.
\usepackage{listings}
\begin{document}
%
%%% the language setting would be used to format
%%% the text according to a programming languge.
%%%\lstset{language=TeX}
%
%
% This setting will affect the inline listing.
\lstset{numbers=left,breaklines=true}%set options
%
\textbf{here is an inline listing:}
\begin{lstlisting}
this is a !@#$% funn line that is long !@#ASD !@#ASD !@#ASD !
@#ASD !@#ASD !@#ASD !@#ASD !@#ASD !@#ASD !@#ASD
this is the second line
\end{lstlisting}
%
% list lines 1 through 19 of a file and word wrap (breaklines=true):
% this is a long comment line asdf asdf asdf asdf asdf asdf asdf asdf
asdf asdf asdf asdf asdf asdf asdf asdf
\textbf{Here is a listing of a file:}
% This reads a file called FileListing2.tex
% which is what I called this tex document:
\lstinputlisting[linerange=1-9,numbers=left,breaklines=true]%
{FileListing2.tex}
This line is after the file listing.
\end{document}
gosh: only three years old.
for a current copy of the documentation, go to ctan:
http://mirror.ctan.org/macros/latex/contrib/listings/listings.pdf
--
Robin Fairbairns, Cambridge
Thanks, the listing package *seems* to be the package I'm looking for,
but code needs to be in a fixed width font and I cant figure out how
to change it. I want it to look like verbatim just with line wrapping.
I looked at the manual and I still cant find how to change the font.
sorry I spoke too soon. Its easy to change the font all is needed is
to use the \lstset{ basicstyle=\ttfamily } command.