From mboxrd@z Thu Jan 1 00:00:00 1970 X-Sympa-To: caml-list@inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q0EL1vTd000797 for ; Sat, 14 Jan 2012 22:01:57 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiICAEjsEU/RVdy2mGdsb2JhbABDDodtnSoBhx5qCCIBAQEBAQgJDRslgXIBAQEDARICLAEbHQEDAQsGBQQHDS4iAREBBQEcBhMih1gImTgKi2qCb4QUP4hxAgULjAwElRGOCj2CTHc4 X-IronPort-AV: E=Sophos;i="4.71,511,1320620400"; d="scan'208";a="139364853" Received: from mail-vx0-f182.google.com ([209.85.220.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 14 Jan 2012 22:01:51 +0100 Received: by vcbfl17 with SMTP id fl17so483433vcb.27 for ; Sat, 14 Jan 2012 13:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=y35UM5rKPqJVIbr9ohWN9Tln7yDq8YsUwYE+8947xwo=; b=Pq4IIVc1T+d59yhL/L0MPVKxXgN+B+fijebq5I3vlgNVbusYuMc/wem5QsBDfYhB2o PGpY8pwenJOVwTWcGy+QiThjSgru9dwArkX3Skiu6tIp0foPOmvC97YG6LzOwfbhK3uF Mbsp81BZVTBSEVlFsoVARI8ltaCVR+E3vfsw4= Received: by 10.220.215.68 with SMTP id hd4mr4121909vcb.10.1326574910204; Sat, 14 Jan 2012 13:01:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.240.130 with HTTP; Sat, 14 Jan 2012 13:01:29 -0800 (PST) In-Reply-To: <20120114.210459.1431907109936403821.Christophe.Troestler@umons.ac.be> References: <20120114.210459.1431907109936403821.Christophe.Troestler@umons.ac.be> From: Philippe Veber Date: Sat, 14 Jan 2012 22:01:29 +0100 Message-ID: To: Christophe TROESTLER Cc: OCaml Mailing List Content-Type: multipart/alternative; boundary=bcaec54ee6044a696d04b6834ad9 X-Validation-by: philippe.veber@gmail.com Subject: Re: [Caml-list] ocamldoc option with oasis --bcaec54ee6044a696d04b6834ad9 Content-Type: text/plain; charset=ISO-8859-1 2012/1/14 Christophe TROESTLER > On Sat, 14 Jan 2012 20:47:17 +0100, Philippe Veber wrote: > > > > Is there a way to pass an option (in my case -charset utf8) to ocamldoc > > when using oasis? Said differently, I'd like to customize the command > used > > by oasis to generate the target of a Document section. > > This was discussed some time ago but I am not sure whether it was > implemented. You can use a custom generator to achieve the same thing > however. > > class gen = > object(self) > inherit Odoc_html.html > > initializer > character_encoding <- > " http-equiv=\"Content-Type\">\n" > end > > let () = > Odoc_args.set_doc_generator (Some(new gen :> Odoc_args.doc_generator)) > > Best, > C. > Thank you Christophe for this quick answer. I had found the thread you mention: http://caml.inria.fr/pub/ml-archives/caml-list/2010/06/5a947fba35df60a35bdc89a4bea1a869.fr.html and could check that Maxence Guesdon indeed added a -charset option, to make this process easier. However, I'm under the impression that the problem remains: I have to tell oasis to use ocamldoc with the custom generator, which requires to customize the ocamldoc command. Did I miss something? Thanks again, ph. --bcaec54ee6044a696d04b6834ad9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2012/1/14 Christophe TROESTLER <Christophe= .Troestler@umons.ac.be>
On Sat, 14 Jan 2012 20:47:17 +0100, Philippe Veber wrote:=
>
> Is there a way to pass an option (in my case -charset utf8) to ocamldo= c
> when using oasis? Said differently, I'd like to customize the comm= and used
> by oasis to generate the target of a Document section.

This was discussed some time ago but I am not sure whether it was
implemented. =A0You can use a custom generator to achieve the same thing
however.

class gen =3D
object(self)
=A0inherit Odoc_html.html

=A0initializer
=A0 =A0character_encoding <-
=A0 =A0 =A0"<meta content=3D\"text/html; charset=3Dutf-8\&quo= t; \
=A0 =A0 =A0 =A0http-equiv=3D\"Content-Type\">\n"
end

let () =3D
=A0Odoc_args.set_doc_generator (Some(new gen :> Odoc_args.doc_generator= ))

Best,
C.
Thank you Christophe for this quick answer. I had found = the thread you mention:

http://caml= .inria.fr/pub/ml-archives/caml-list/2010/06/5a947fba35df60a35bdc89a4bea1a86= 9.fr.html

and could check that Maxence Guesdon indeed added a -charset option, to= make this process easier. However, I'm under the impression that the p= roblem remains: I have to tell oasis to use ocamldoc with the custom genera= tor, which requires to customize the ocamldoc command. Did I miss something= ?
Thanks again,
ph.

--bcaec54ee6044a696d04b6834ad9--