Re: Case study: math macros

2006-08-20 Thread Andre Poenitz
On Thu, Aug 17, 2006 at 01:07:45AM +0200, Jean-Marc Lasgouttes wrote: > > Math macros crash LyX currently. This happens in metrics(). > > The following patch compiles, and it is the best I came up with (I > could not run it, because of qt3 moc breakage). > > I'd be interested to know how I could

Re: Case study: math macros

2006-08-17 Thread Jean-Marc Lasgouttes
| + vector ucs4pref = | + utf8_to_ucs4(vector(utf8pref.begin(), | + utf8pref.end())); Lars>vector ucs4pref = utf8_to_ucs4(pref.data(), pref.length()); Much better indeed. Thanks. JMarc

Re: Case study: math macros

2006-08-17 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | Index: src/mathed/math_macrotemplate.C | === | --- src/mathed/math_macrotemplate.C (revision 14714) | +++ src/mathed/math_macrotemplate.C (working copy) | @@ -112,7 +113,12 @@ voi

Re: Case study: math macros

2006-08-17 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> What encoding does "name" have? How is it generated? Shouldn't Angus> it eventually be a docstring itself? It is a latex macro name, so string is perfect. Angus> Similarly, if _(" Macro: %1$s: ") eventually returns a UCS-4 Angus>

Re: Case study: math macros

2006-08-16 Thread Angus Leeming
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > > "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > Jean-Marc> I'd be interested to know how I could have made it shorter, > Jean-Marc> and whether it is right. I have to say I do not like it > Jean-Marc> much :) > > OK, no

Re: Case study: math macros

2006-08-16 Thread Jean-Marc Lasgouttes
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: Jean-Marc> I'd be interested to know how I could have made it shorter, Jean-Marc> and whether it is right. I have to say I do not like it Jean-Marc> much :) OK, now that I have tried it, I see I forgot to handle draw() too. This

Re: Case study: math macros

2006-08-16 Thread Georg Baum
Am Donnerstag, 17. August 2006 01:07 schrieb Jean-Marc Lasgouttes: > A few things I would propose to make vectors easier: > > - define types utf8vector, ucs2vector and ucs4vector (less typing). Yes. > - use convert(utf8vector) specializations instead of > utf8_to_ucs4 and friends. That would

Case study: math macros

2006-08-16 Thread Jean-Marc Lasgouttes
Math macros crash LyX currently. This happens in metrics(). The following patch compiles, and it is the best I came up with (I could not run it, because of qt3 moc breakage). I'd be interested to know how I could have made it shorter, and whether it is right. I have to say I do not like it much