caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pietro Abate <Pietro.Abate@anu.edu.au>
To: ocaml ml <caml-list@inria.fr>
Subject: [Caml-list] can I use camlp4 to output latex ?
Date: Fri, 2 Apr 2004 10:45:18 +1000	[thread overview]
Message-ID: <20040402004518.GA11499@pulp.anu.edu.au> (raw)

Hi all,
I'd like to use camlp4 to pretty print my files (pseudo-ocaml) in latex.
At the same times I'd like to recycle the same syntax that I use to
produce valid ocaml. The problem is that when I use something like
EXTEND
        str_item: [
		....

the type of this expansion should be str_item, but I actually want to
output a string (containing the latex source). This way I can replace
all <<str_item< ... expansion with sprintf "something" and spit latex
instead of ocaml... a solution would be to add printf before the
str_item expansion and output both ocaml (first) and latex, but this
looks like to me a bad hack... how can I do it ? I basically don't want
to parse my files but use the calmp4 parser to do the job and only add
few hooks for the pretty printing...

:-)
tnx,
p

-- 
++ If you have an apple and I have an apple and we  exchange apples 
   then you and I will still each have one apple. But if you have 
   an idea and I have an idea and we exchange these ideas, then each 
   of us will have two ideas. -- George Bernard Shaw
++ Please avoid sending me Word or PowerPoint attachments.
   See http://www.fsf.org/philosophy/no-word-attachments.html

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2004-04-02  0:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-02  0:45 Pietro Abate [this message]
2004-04-02  4:51 ` Basile STARYNKEVITCH
2004-04-02  6:31   ` Pietro Abate

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=20040402004518.GA11499@pulp.anu.edu.au \
    --to=pietro.abate@anu.edu.au \
    --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;
as well as URLs for NNTP newsgroup(s).