texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Under/Overbrace help, please !


From: Nix N. Nix
Subject: Re: [Texmacs-dev] Under/Overbrace help, please !
Date: 08 May 2003 10:29:39 -0600

On Thu, 2003-05-08 at 04:21, Joris van der Hoeven wrote:
[...]
> I did that for the next version. I see two ways for

Do you mean 1.0.1.14 ? Wow, really ?  Cool !  Does that mean I'll be
able to type C-q, bracelu, Enter, and have the symbol ?  I would be
delighted to see that !

> you to implement wide braces with these characters:
> the easy way would be to find the height of both extremes of
> the brace characters and the width of an extensible line.
> The disadvantage of this "cheap" method is that this height and
> width really depend on the font, so you probably won't be able
> to get things right in a robust way (think about a bold cmex font).

Yes, they do depend on the font, however, I have found that the
\brace{ld,ru,rd,lu} characters are designed such that, laid end-to-end,
they connect exactly to give you a brace.  That is,

\braceld\braceru\bracelu\bracerd

gives exactly a non-stretched overbrace.  Thus, we don't have to worry
about the height of the font, except if we choose to draw a line to
extend the brace.  However, if we use the \bracext (txexa#32) character,
as LaTeX does, then we will have a horizontal line in just the right
place, and of just the right thickness.

> 
> The second, most robust, implementation would be to create a special
> font with the wide characters <brace-under-1>, <brace-under-2>, ...
> and <brace-over-1>, <brace-over-2>, ... I suggest to create
> real bitmaps for each character.

Exactly.  Then, each <brace-over-n> can map to

\braceld\bracext...\bracext\braceru\bracelu\bracext...\bracext\bracerd
        <-------n/2------->                <-------n/2------->

which is a simple, inert text string.

> 
> I have looked a bit how you might do that. First of all you should add
> support for the <brace-...> characters in math_font_rep::search_font.
> Next you might add a new constructor in virtual_font_rep::compile
> for the repetition of a character. Finally, you will have to do
> something in order to get this constructor called with the right
> parameters for character names starting with "<brace-".
> The height and the width of the horizontal line can then be
> determined from the extremity of a bitmap for braceld
> or one of the others.

This would be the final product.  For the beginning, however, I would
like to simply draw these characters myself, until I get them right. 
Then I can abstract them away just like you did the large delimiters.

> 
> Yet another idea might be to find a robust trick for getting
> the exact height and width for the horizontal lines from
> the font itself. But I don't see an easy way to do that right now.

\bracext has that information, and /is/ a horizontal line.

Honestly, I would like to try to avoid using bitmaps for these
characters.  This is why I would like to try the cmex characters first,
and only then, if they fail, would I like to try bitmaps.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]