Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
File inclusion with Ocamldoc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-10-14 (17:22)
From: Maxence Guesdon <maxence.guesdon@i...>
Subject: Re: [Caml-list] File inclusion with Ocamldoc
Dario Teixeira <> a ?it :

> Hi,


> I want to create a customised APIDOC starter page that includes
> links to child pages containing various tutorials for the API.
> Now, Ocamldoc already has a -intro option that allows an external
> file to be used as an APIDOC starter page.  But I see no way
> to create a link to an external file from within this starter
> page, and to tell Ocamldoc to also process and include the
> external file.  Does someone know of a straightforward solution
> for this problem?

You can use .txt files to do this. Simply type ocamldoc comment  
(without (** *)) in a file.txt file and pass it to ocamldoc like any  
.ml or .mli file. This will be considered as a File module and you can  
refer to it by {!File} from any ocamldoc comment.

cat > file.txt
This is the {!File} file.

ocamldoc -html file.txt

Hope this helps,

Maxence Guesdon

> Thanks!
> Dario Teixeira
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports:

This message was sent using IMP, the Internet Messaging Program.