Version française
Home     About     Download     Resources     Contact us    
Browse thread
[MLPost] Curly brances
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Johannes Kanig <johannes.kanig@g...>
Subject: Re: [Caml-list] [MLPost] Curly brances
Hi,

On Fri, Mar 5, 2010 at 5:51 PM, Alexandre Pilkiewicz
<alexandre.pilkiewicz@polytechnique.org> 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