caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* File inclusion with Ocamldoc
@ 2008-10-14 13:51 Dario Teixeira
  2008-10-14 17:22 ` [Caml-list] " Maxence Guesdon
  0 siblings, 1 reply; 7+ messages in thread
From: Dario Teixeira @ 2008-10-14 13:51 UTC (permalink / raw)
  To: caml-list

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?

Thanks!
Dario Teixeira






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] File inclusion with Ocamldoc
  2008-10-14 13:51 File inclusion with Ocamldoc Dario Teixeira
@ 2008-10-14 17:22 ` Maxence Guesdon
  2008-10-14 19:17   ` Dario Teixeira
  0 siblings, 1 reply; 7+ messages in thread
From: Maxence Guesdon @ 2008-10-14 17:22 UTC (permalink / raw)
  To: Dario Teixeira; +Cc: caml-list

Dario Teixeira <darioteixeira@yahoo.com> a ?it :

> Hi,

Hello,

> 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.

Example:
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:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>



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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] File inclusion with Ocamldoc
  2008-10-14 17:22 ` [Caml-list] " Maxence Guesdon
@ 2008-10-14 19:17   ` Dario Teixeira
  2008-10-15  8:55     ` Romain Bardou
  0 siblings, 1 reply; 7+ messages in thread
From: Dario Teixeira @ 2008-10-14 19:17 UTC (permalink / raw)
  To: Maxence Guesdon; +Cc: caml-list

Hi,

> 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.

Excellent!  Thanks for the tip.  Incidentally, the 3.10 version
of Ocamlbuild does not support the generation of documentation
from implementation files.  Will 3.11 fix this?

Cheers,
Dario






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] File inclusion with Ocamldoc
  2008-10-14 19:17   ` Dario Teixeira
@ 2008-10-15  8:55     ` Romain Bardou
  2008-10-15 14:43       ` Dario Teixeira
  0 siblings, 1 reply; 7+ messages in thread
From: Romain Bardou @ 2008-10-15  8:55 UTC (permalink / raw)
  To: caml-list

>> 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.
> 
> Excellent!  Thanks for the tip.  Incidentally, the 3.10 version
> of Ocamlbuild does not support the generation of documentation
> from implementation files.  Will 3.11 fix this?

It works for me with the 3.10.1. I just tried to write a file test.ml, 
and a file truc.odocl with "Test" in it, and then ran ocamlbuild :
	ocamlbuild truc.docdic/index.html
And it worked. Or maybe I didn't understand what you want?

-- 
Romain Bardou


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] File inclusion with Ocamldoc
  2008-10-15  8:55     ` Romain Bardou
@ 2008-10-15 14:43       ` Dario Teixeira
  2008-10-15 15:05         ` Nicolas Pouillard
  0 siblings, 1 reply; 7+ messages in thread
From: Dario Teixeira @ 2008-10-15 14:43 UTC (permalink / raw)
  To: caml-list, Romain Bardou

Hi,

> It works for me with the 3.10.1. I just tried to write a
> file test.ml, and a file truc.odocl with "Test" in it, and then
> ran ocamlbuild :
> 	ocamlbuild truc.docdic/index.html
> And it worked. Or maybe I didn't understand what you want?

You're right.  I took the Ocamlbuild manual at face value, since
it states it cannot handle implementation files.  Nevertheless,
I'm still running into some problems with Ocamlbuild+Ocamldoc.
First, while Ocamldoc will by default merge the comments from .ml
and .mli files (with precedence given to the .mli file, unless
-inv-merge-ml-mli is given), when I use Ocamlbuild to generate
the documentation I notice the following pattern: if only the .ml
file is present then it's used for generating the documentation;
If, however, both .ml and .mli are present, then only the .mli
is taken into account (no merging is done).  Second, how does one
tell Ocamlbuild to include .txt files in the documentation?

Thanks again for your attention,
Dario Teixeira






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] File inclusion with Ocamldoc
  2008-10-15 14:43       ` Dario Teixeira
@ 2008-10-15 15:05         ` Nicolas Pouillard
  2008-10-16 15:27           ` Dario Teixeira
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Pouillard @ 2008-10-15 15:05 UTC (permalink / raw)
  To: Dario Teixeira; +Cc: Caml_mailing list, romain.bardou

Excerpts from Dario Teixeira's message of Wed Oct 15 16:43:32 +0200 2008:
> Hi,
> 
> > It works for me with the 3.10.1. I just tried to write a
> > file test.ml, and a file truc.odocl with "Test" in it, and then
> > ran ocamlbuild :
> >     ocamlbuild truc.docdic/index.html
> > And it worked. Or maybe I didn't understand what you want?
> 
> You're right.  I took the Ocamlbuild manual at face value, since
> it states it cannot handle implementation files.  Nevertheless,
> I'm still running into some problems with Ocamlbuild+Ocamldoc.
> First, while Ocamldoc will by default merge the comments from .ml
> and .mli files (with precedence given to the .mli file, unless
> -inv-merge-ml-mli is given), when I use Ocamlbuild to generate
> the documentation I notice the following pattern: if only the .ml
> file is present then it's used for generating the documentation;
> If, however, both .ml and .mli are present, then only the .mli
> is taken into account (no merging is done).  Second, how does one
> tell Ocamlbuild to include .txt files in the documentation?

The manual states that implementation files are not handled because if you
have a .ml and .mli then ocamlbuild will choose the .mli.

-- 
Nicolas Pouillard aka Ertai


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] File inclusion with Ocamldoc
  2008-10-15 15:05         ` Nicolas Pouillard
@ 2008-10-16 15:27           ` Dario Teixeira
  0 siblings, 0 replies; 7+ messages in thread
From: Dario Teixeira @ 2008-10-16 15:27 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: Caml_mailing list

Hi,

> The manual states that implementation files are not handled
> because if you have a .ml and .mli then ocamlbuild will choose
> the .mli.

Thanks for the info.  You may want to clarify that on the manual,
because presently the language implies that implementation files
are ignored altogether.

Also, I'm having trouble getting Ocamlbuild/Ocamldoc working
on a project that also uses mlpack.  Basically, I have a "lambdoc" directory containing a number of modules whose
documentation I want to generate.  I also have lambdoc.mlpack
listing all those modules, and a lambdoc.mllib containing only
"Lambdoc".

In these circumstances, what should be the contents of the
lambdoc.odocl file?  I tried listing lambdoc's modules, both
fully qualified (eg, "Lambdoc.Document_ast") and not, but
Ocamlbuild always chokes.  Also, what is the rule of .odoc
files and how do they differ from .odocl?

Thanks for your time,
Dario Teixeira






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-16 15:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-14 13:51 File inclusion with Ocamldoc Dario Teixeira
2008-10-14 17:22 ` [Caml-list] " Maxence Guesdon
2008-10-14 19:17   ` Dario Teixeira
2008-10-15  8:55     ` Romain Bardou
2008-10-15 14:43       ` Dario Teixeira
2008-10-15 15:05         ` Nicolas Pouillard
2008-10-16 15:27           ` Dario Teixeira

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).