From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q0ELBLXF001323 for ; Sat, 14 Jan 2012 22:11:21 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8BACjuEU9KfVM2kGdsb2JhbABCrS4IIgEBAQEJCQ0bBCGBcgEBAQQSAhMRCAEbHAIDDAYFCw0JFg8JAwIBAgEREQEFARwTBgICHodgmTgKi2qCb4QSP4hxAgULiHCDHASVEYcIhwI9g3w X-IronPort-AV: E=Sophos;i="4.71,511,1320620400"; d="scan'208";a="126967505" Received: from mail-ee0-f54.google.com ([74.125.83.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 14 Jan 2012 22:11:16 +0100 Received: by eeke53 with SMTP id e53so1088543eek.27 for ; Sat, 14 Jan 2012 13:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Acgvim6RNeioDxENXtoa8uEav3NBUlW4drfy92jkYk8=; b=QkSVD8CYJm1lj6n3ABGlnsZSwubPI2ym/ouH9IRYt9c2gfaOUpCGTUHGhAAaYRbPQc O6dTDGYXwF3ApyFkkTbOdX5LCphVa/XtWzIg46M32ddjMhHL8KKNI+EIIhM8sn19/ARH o7GKxJ7Gz8yftPqd2bzwuIAQU7KGucxuQ/TOc= Received: by 10.213.9.83 with SMTP id k19mr1023103ebk.13.1326575475830; Sat, 14 Jan 2012 13:11:15 -0800 (PST) Received: from ?IPv6:2a02:2f02:1022:7000:1e6f:65ff:fe23:db0d? ([2a02:2f02:1022:7000:1e6f:65ff:fe23:db0d]) by mx.google.com with ESMTPS id u53sm48873775eeu.6.2012.01.14.13.11.13 (version=SSLv3 cipher=OTHER); Sat, 14 Jan 2012 13:11:14 -0800 (PST) Message-ID: <4F11EF70.7050407@gmail.com> Date: Sat, 14 Jan 2012 23:11:12 +0200 From: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120104 Icedove/8.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <20120114.210459.1431907109936403821.Christophe.Troestler@umons.ac.be> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] ocamldoc option with oasis On 01/14/2012 11:01 PM, Philippe Veber wrote: > 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. > You can add flags to the ocamldoc command by adding something like to the end of your myocamlbuild.ml: Ocamlbuild_plugin.dispatch (function | After_rules as e -> flag ["doc"; "ocaml"] & (S[A"-colorize-code";A"-stars";A"-charset";A"utf8"]); dispatch_default e | e -> dispatch_default e) ;; Maybe oasis could offer a way to do this automatically (XocamlbuildFlags?). Best regards, --Edwin