Hi All,

I have been trying to include source code
written in Prolog into a chapter. It seems
to be more difficult than it should be. The
verbatim context doesn't do it for me ... it
seems to force double spacing into text that 
is single spaced. An example of what I use is
this:

   % foo/3 is true when all subprocedures
   % are true.
   foo(A,B,C) :-
     do_something(A),
     do_something_else(B,C),
     bar(A,B,C).

   % bar/3. This is my second procedure
   bar(A,B,C) :-
     check(A),
     check(B),
     check(C),
     write(ok),nl.

And that's how I want it to look in my
text. Is there such a thing as a pretty-
printer for source code in LaTeX? Or LyX
for that matter? 

Thanks for any help or hints.
Regards
Goffredo








This message was sent through MyMail http://www.mymail.com.au


Reply via email to