From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id E8BB5BC57 for ; Sat, 6 Mar 2010 10:06:41 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvoAAE2qkUtKfVI2mGdsb2JhbACDC44fihkIFQEBAQEBCAkMBxMipQ44gWGEby2ISQEBAwWBLYJcagQ X-IronPort-AV: E=Sophos;i="4.49,592,1262559600"; d="scan'208";a="58301102" Received: from mail-ww0-f54.google.com ([74.125.82.54]) by mail4-smtp-sop.national.inria.fr with ESMTP; 06 Mar 2010 10:06:41 +0100 Received: by wwb17 with SMTP id 17so2330256wwb.27 for ; Sat, 06 Mar 2010 01:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=L2qg80jUwDDQ4Og6wF7iC3CPOccvBweNVwmxTLnu9sg=; b=GTkA5/ZkRlgEgDWSrL1tXtLLMR4A6H93b6UzTJUE0Zk9/4UOQrsJuRfHPaYkF/YEQE s1UBuzujg5W17+qZeET1cRPvaANOzFW623+wlvyxu72VFZO/6HZqpBREUhr5vHbvQokb rGX3lh2fZtXqbSBkr6I1QHuOrMWtWawj28cHc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=sWl9gfWPNKqpF7YRn4BpQdxAfGB2mXIHQQgrOH6L72xmP3m6yko2VFj/JUpEoYVkUD R14+7TXinTcxM1PwJKwsY3QoVIa8AZoLfBXMtdXzvfEi2LmO5OGiewNnWT8dkTVpYPB1 OGftdoAJ35Y2p5jJb/AZui3/oQhe2aw7ANJ7g= MIME-Version: 1.0 Received: by 10.216.167.131 with SMTP id i3mr846861wel.94.1267866401178; Sat, 06 Mar 2010 01:06:41 -0800 (PST) In-Reply-To: <9020d4c51003050851xe9f2a7ftf9fd2cc9deae40d6@mail.gmail.com> References: <9020d4c51003050851xe9f2a7ftf9fd2cc9deae40d6@mail.gmail.com> Date: Sat, 6 Mar 2010 10:06:41 +0100 Message-ID: <926565e51003060106s41693f1fqe24b862d42c3b656@mail.gmail.com> Subject: Re: [Caml-list] [MLPost] Curly brances From: Johannes Kanig To: Alexandre Pilkiewicz Cc: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 X-Spam: no; 0.00; lri:01 height:98 wrote:01 caml-list:01 functions:01 tex:01 tex:01 font:97 font:97 width:97 rarely:02 latex:02 latex:02 float:03 float:03 Hi, On Fri, Mar 5, 2010 at 5:51 PM, Alexandre Pilkiewicz wrote: > I'm sorry if that's the wrong list, but mlpost doesn't seem to have > it's own list. You can either use the mlpost-users list on mlpost's ocamlforge site - it hasn't seen much use yet, but this shouldn't hold you off - or simply send an email to one of the developers. > I would like to draw variable size curly braces, Unfortunately, this is trickier than one might think. TeX itself makes use of some special characters in the font to do it. However, there still are several possibilities. The first is to simply scale the "{" character to the right size, using either Picture.tex or Box.tex and the corresponding xscale / yscale functions. However, it's difficult to get it right, it never has quite the right proportions, and rarely looks good. The second option is to obtain the intended size (using Box.height / Box.width etc.), get a float value of this size using the Concrete.float_of_num function and generate the curly brace using the corresponding latex macro. The third option would be to use the same trick as latex does (aligning several characters of the font) in mlpost, but off the top of my head I couldn't do it right now. We really should put such a function in the interface ... Johannes -- Johannes Kanig johannes.kanig@lri.fr