[comp.lang.prolog] Prolog to TeX/LaTeX

arun@mandrill (Arun Lakhotia) (04/12/88)

Is anyone out there aware of any program to convert Prolog code to
TeX-pretty-print format, for printing code in paper or books?

I have a written a pl2tex myself. My work is a 'C' hack and does
reasonable work. If the code is already pretty-printed, I can LaTeX
it. I would like something that does the pretty-printing as well,
*** besides taking care of comments too**. I don't do a good job
with comments, other than having a kludge to change their fonts
as per user's wish.

In the absence of any other better work, I am ready to share my code.
It may be interfaced with emacs to provide command like
Prolog-To-Tex-region to do TeXing of code in-line a document. Or
one may TeX a whole source file into other file. This enables
including a TeXed-source-file into a document. Tie this with
`make' and you can keep your document upto-date with the code.
pl2tex uses a ~/.pl2tex startup file, which you may use
to customize the formatting.

The part of identifying a clause-head, body-goal, last-goal
and fact is a big hack, hence I am not keen on throwing the code
on the net. 

Arun

dipto@umbc3.UMD.EDU (Dipto Chakravarty) (04/18/88)

In article <2412@mandrill.CWRU.Edu> you write:
>Is anyone out there aware of any program to convert Prolog code to
>TeX-pretty-print format, for printing code in paper or books?
>
>I have a written a pl2tex myself. My work is a 'C' hack.
>In the absence of any other better work, I am ready to share my code.
>It may be interfaced with emacs to provide comm like Prolog-To-Tex-region
>to do TeXing of code in-line a document. pl2tex uses a ~/.pl2tex startup 
>file, which you may use to customize the formatting.
>
>The part of identifying a clause-head, body-goal, last-goal and fact is a
>big hack, hence I am not keen on throwing the code on the net. 

Dear Arun,
	    I will be exceedingly interested to get the pl2tex program.
I am a graduate student in CMSC at U. of Md, and have recently started 
working with Prolog language. 

All the doc and guidelines that you can provide will be much appreciated.
I would also like to have your phone number so that I can reach the pl2tex
guru if/when needed. 

Thanks again. Regards,
                        Dipto

P.S: At first, I tried e-mailing this article to arun@mandrill.CWRU.Edu.
     But apparently, the above path could not get recognized by our mailer.
     Hope Arun is able to read this posting. :-)
-- 
BITNET : dipto@umbc.BITNET    ------\
ARPANET: dipto@umbc3.UMD.EDU  -------> In-real-life: Dipto Chakravarty
USMAIL : CMSC, UMBC,Md 21228  ------/