In article <··············@ortler.iwr.uni-heidelberg.de>,
Nicolas Neuss <··················@iwr.uni-heidelberg.de> wrote:
> Hello,
>
> does anyone know of a possibility to get a colored printout for Lisp code
> in LaTeX?
Try the listings package which, to my memory, handles both verbatim
import and syntax highlighting for many programming languages.
>
> Thank you,
> Nicolas.
--
Kirk Job-Sluder
In article <··············@ortler.iwr.uni-heidelberg.de>,
··················@iwr.uni-heidelberg.de says...
> Hello,
>
> does anyone know of a possibility to get a colored printout for Lisp code
> in LaTeX?
>
Some editors, like Scite, export syntax-coloured code in Latex
(and other formats.) Try it.
Majorinc, Kazimir <·······@chem.pmf.hr> writes:
> Some editors, like Scite, export syntax-coloured code in Latex
> (and other formats.) Try it.
However, Scite (at least the Debian version) does not support Lisp.
Nicolas.
In article <··············@ortler.iwr.uni-heidelberg.de>,
··················@iwr.uni-heidelberg.de says...
> However, Scite (at least the Debian version) does not support Lisp.
>
> Nicolas.
I'm surprised. Windows version does support Lisp.
On 2005-12-17, Nicolas Neuss <··················@iwr.uni-heidelberg.de> wrote:
> does anyone know of a possibility to get a colored printout for Lisp
> code in LaTeX?
Vim will do HTML (see exercises for Chapter 6, and the "shortest path"
code, in http://theclapp.blog-city.com/read/javaandorlisp.htm for
example output) and maybe Latex (see
http://www.vim.org/scripts/script.php?script_id=947). The HTML works
pretty well; I haven't tried the Latex version. By its own admission,
"the code is really bad, and [the] project is not maintained anymore."
If you have (or can find) an HTML->Latex translater, maybe that'd work.
-- Larry
Maybe htmlize (Emacs)?
http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el
Dario
On Sat, 17 Dec 2005 14:55:19 +0100, Nicolas Neuss wrote:
> Hello,
>
> does anyone know of a possibility to get a colored printout for Lisp code
> in LaTeX?
>
> Thank you,
> Nicolas.
I really thing this is a job for listings.sty
%In the preamble
\usepackage{listings}
\lstloadlanguages{lisp}
%then in the spot where you want your lisp code
%make keywords red and boldfaced, and comments gray and smaller.
\lstset{keywordstyle=\color{red}\bfseries\underbar,
commentstyle=\color{Gray}\small}
%input your source code.
\lstinputlisting[language=lisp,
breaklines=true]{../data_lisp_experiment/validate.lisp}
One of the problems I've found is that even with breaklines, I still get
ugliness with long lines.
Documentation is at:
http://mirror.aarnet.edu.au/pub/CTAN/macros/latex/contrib/listings/listin
gs-1.3.pdf
--
Kirk Job-Sluder