From: Philippe Wang <lists@philippewang.info>
To: ocaml ml <caml-list@inria.fr>
Subject: Caml code listing inside LaTeX
Date: Fri, 22 Jun 2007 21:07:02 +0200 [thread overview]
Message-ID: <467C1DD6.1050705@philippewang.info> (raw)
Hi,
If ever you are interested in putting some caml code inside your latex
document, *without* using verbatim environment or listings package,
the online tool :
http://philippewang.info/cs.tools.camltotex.php (*)
takes some caml code and returns LaTeX code.
The applied treatments are :
- colors
- nested comments (even with strings such as "*)" inside) are detected
- based on LaTeX macros such as
\DeclareTextSymbol{\BS}{T1}{92} % backslash
\newcommand{\mlkeyword}[1]{\mbox{\color{red}{#1}}}
- the code is put in a tabular environment
Well, it's very small : 300 lines of code for the moment (about 230
lines of ocamllex and 30 lines of ocaml...).
It could have certainly been written in camlp4 or in latex, but well,
they are not (yet) my cup of tea.
Hopefully, it will be released under a free license next month (if you
are interested in this program, which license do you want ?)
The main goals are :
- no use of verbatim, so that it can be used with beamer without the
[fragile] option
- no use of the listings package (because it don't like it)
It certainly contains bugs, it was never proved or certified, and
probably never will be...
Cheers,
--
Philippe Wang
mail[at]philippewang.info
(*) I used php because cgi in pure caml is very complicated on the
hosting server
reply other threads:[~2007-06-22 19:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=467C1DD6.1050705@philippewang.info \
--to=lists@philippewang.info \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox