Lisp HUG Maillist Archive

distributing color LISP source

I have a LISPWORKS LISP source file that I would like to distribute to people 
who are not LISP users. 

They do not have LW installed and aren't going to download it just to view 
this one file.

Is there any way I can send the file that preserves the colorized LISP code?

I tried printing to a PDF, which seems like it should work, but it doesn't. 
It turns the code to black-and-white before printing.

Opening the .lisp file in a generic text editor doesn't work, which is expected.

I'm on a Mac.

Thanks,

--
Keith


Re: distributing color LISP source

Would http://paste.lisp.org/ work?

e.g., http://paste.lisp.org/display/85133

On Mon, Aug 10, 2009 at 1:03 PM, Keith
Diefendorff<kdiefendorff@apple.com> wrote:
>
> I have a LISPWORKS LISP source file that I would like to distribute to people
> who are not LISP users.
>
> They do not have LW installed and aren't going to download it just to view
> this one file.
>
> Is there any way I can send the file that preserves the colorized LISP code?
>
> I tried printing to a PDF, which seems like it should work, but it doesn't.
> It turns the code to black-and-white before printing.
>
> Opening the .lisp file in a generic text editor doesn't work, which is expected.
>
> I'm on a Mac.
>
> Thanks,
>
> --
> Keith
>
>



-- 
=====================
Joshua Taylor
tayloj@cs.rpi.edu, jtaylor@alum.rpi.edu

"A lot of good things went down one time,
  back in the goodle days."
    John Hartford


Re: distributing color LISP source

Keith Diefendorff wrote:
> Is there any way I can send the file that preserves the colorized LISP code?
> 
> I tried printing to a PDF, which seems like it should work, but it doesn't. 
> It turns the code to black-and-white before printing.

You might consider a2ps (http://www.gnu.org/software/a2ps/):

 > a2ps --prologue=color -g -o /tmp/tx.ps 
/usr/local/lib/LispWorks/lib/5-1-0-0/src/editor/tx.lisp

The stylesheet (share/a2ps/sheets/clisp.ssh) and color prologue 
(share/a2ps/ps/color.pro) can be tweaked to suit your preferences.


Mike


Re: distributing color LISP source

On Aug 10, 2009, at 1:03 PM, Keith Diefendorff wrote:

> Is there any way I can send the file that preserves the colorized  
> LISP code?

One approach I have used is to grab the editor source in XHTML with  
CSS classes setup to preserve color runs.

Example created from a LispWorks editor buffer in SQL mode:

http://pgedit.com/public/sql/acl_admin/index.html



John DeSoi, Ph.D.





Re: distributing color LISP source

On 10 Aug 2009, at 18:03, Keith Diefendorff wrote:

> Is there any way I can send the file that preserves the colorized  
> LISP code?
>
> I tried printing to a PDF, which seems like it should work, but it  
> doesn't.
> It turns the code to black-and-white before printing.

There at least used to be stuff for emacs which would print preserving  
font-lock information (so, colours).

--tim


Updated at: 2020-12-10 08:40 UTC