From: Petter Gustad
Subject: Re: Lisp source code formatting in Latex
Date: 
Message-ID: <87wtw3gi1y.fsf@parish.home.gustad.com>
"Steven E. Harris" <···@panix.com> writes:

> Michiel Borkent <··············@gmail.com> writes:
> 
> > But I don't know how to get this nice indented code nice into my
> > latex document, so that it shows up formatted in the resulting pdf
> > file.
> 
> Try the "listings" package.�

\usepackage{listings}

\lstset{
  language=Lisp,
  basicstyle=\scriptsize\ttfamily,
  keywordstyle={},
  commentstyle={},
  stringstyle={}}


Then you can input a part of the file, e.g. line 42-68 from the file
source.cl by doing:

\lstinputlisting[first=42,last=68]{source.cl}


Or you can use the lgrind program to generate LaTeX from your source
files.

Petter

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

From: ··············@gmail.com
Subject: Re: Lisp source code formatting in Latex
Date: 
Message-ID: <1102346248.448287.229330@c13g2000cwb.googlegroups.com>
I have run into a strange problem with the listings package I am now
using.

When I have  the following in my tex file:

Now we will show how to use functions of \lstinline$start$,
\lstinline$duration$ and \lstinline$time$ to control a notes internal
workings.

I get this error message: Undefined control sequence.

If I turn  \lstinline$time$ into e.g.,  \lstinline$gime$... it works
fine... What is this weird situation?

Grtz,
Michiel
From: Steven E. Harris
Subject: Re: Lisp source code formatting in Latex
Date: 
Message-ID: <jk4r7m3qq7c.fsf@W003275.na.alarismed.com>
··············@gmail.com writes:

> I have run into a strange problem with the listings package I am now
> using.

I recommend that you take this question to comp.text.tex. Post there
with a minimal example that exhibits the problem, and you'll likely
have an answer within a couple of hours.

-- 
Steven E. Harris
From: Petter Gustad
Subject: Re: Lisp source code formatting in Latex
Date: 
Message-ID: <87r7m3m805.fsf@parish.home.gustad.com>
··············@gmail.com writes:

> I have run into a strange problem with the listings package I am now
> using.
> 
> When I have  the following in my tex file:
> 
> Now we will show how to use functions of \lstinline$start$,
> \lstinline$duration$ and \lstinline$time$ to control a notes internal
> workings.
> 
> I get this error message: Undefined control sequence.
> 
> If I turn  \lstinline$time$ into e.g.,  \lstinline$gime$... it works
> fine... What is this weird situation?

Sounds like a clash with some internals of the package, unfortunately
there is no gensym in tex... Try comp.text.tex as Steven E. Harris
suggested.

Petter
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?