|
|
Home » U++ Library support » RichText,QTF,RTF... » RichEdit and styles questions
|
|
|
|
Re: RichEdit and styles questions [message #21544 is a reply to message #21539] |
Tue, 26 May 2009 08:59   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Hello luzr
luzr wrote on Mon, 25 May 2009 22:02 |
koldo wrote on Mon, 25 May 2009 12:44 | Hello luzr
Sorry, I am going to explain it better.
The idea I had is to insert equations in Qtf text using a "poor man" approach. Instead of creating a full featured equation editor (perhaps some day) I thought to insert the text and equations in text following certain format, but selecting with a "Formula" style the formulas.
|
Well, the equation of text can be the content of your RichObject. I believe that is the most simple approach.
RichObjects can be edited and you can add "Insert equation" button. Both will lead to "editor" where you just edit the text and perhaps see the preview.
|
Sorry. I do not understand you
One thing I liked was to parse Qtf, so to parse this:

that is this in Qtf format:
[ $$0,0#00000000000000000000000000000000:Default]
[$(255.255.192) $$1,1#705B135C58F979E6FF526087DA632601:Formula]
[{_}%EN-US
[s0; This is the explanation around the formula&]
[s0; &]
[s1; integral(sqrt(cos(phi`_ini`^2)) `+ i`^2 `+ 6, i `= 1, 10)`*dx&]
[s0; &]
I have two options:
1. Parse this Qtf string looking for "Formula" style paragraphs and substitute them with the rendered formulas (if the user has pressed preview button)
2. Other smarter option
Do you know if there is an option like the smarter option?
Best regards
Koldo
-
Attachment: Formula.JPG
(Size: 11.13KB, Downloaded 1132 times)
Best regards
Iñaki
|
|
|
Re: RichEdit and styles questions [message #21545 is a reply to message #21544] |
Tue, 26 May 2009 10:23   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
koldo wrote on Tue, 26 May 2009 02:59 | Hello luzr
luzr wrote on Mon, 25 May 2009 22:02 |
koldo wrote on Mon, 25 May 2009 12:44 | Hello luzr
Sorry, I am going to explain it better.
The idea I had is to insert equations in Qtf text using a "poor man" approach. Instead of creating a full featured equation editor (perhaps some day) I thought to insert the text and equations in text following certain format, but selecting with a "Formula" style the formulas.
|
Well, the equation of text can be the content of your RichObject. I believe that is the most simple approach.
RichObjects can be edited and you can add "Insert equation" button. Both will lead to "editor" where you just edit the text and perhaps see the preview.
|
Sorry. I do not understand you
One thing I liked was to parse Qtf, so to parse this:

that is this in Qtf format:
[ $$0,0#00000000000000000000000000000000:Default]
[$(255.255.192) $$1,1#705B135C58F979E6FF526087DA632601:Formula]
[{_}%EN-US
[s0; This is the explanation around the formula&]
[s0; &]
[s1; integral(sqrt(cos(phi`_ini`^2)) `+ i`^2 `+ 6, i `= 1, 10)`*dx&]
[s0; &]
I have two options:
1. Parse this Qtf string looking for "Formula" style paragraphs and substitute them with the rendered formulas (if the user has pressed preview button)
2. Other smarter option
Do you know if there is an option like the smarter option?
Best regards
Koldo
|
Ah, I see, you not only want to enter formulas in RichEdit, but also in "manual" QTF, right?
Well, I agree, this would be a bit harder because RichObjects are usually quite "compressed".
Anyway, quite easier fix would be to introduce "text based RichObject" format in QTF, what do you thing?
Say
[ $$0,0#00000000000000000000000000000000:Default]
[$(255.255.192) $$1,1#705B135C58F979E6FF526087DA632601:Formula]
[{_}%EN-US
[s0; This is the explanation around the formula&]
[s0; &]
[s1; @formula integral(sqrt(cos(phi`_ini`^2)) `+ i`^2 `+ 6, i `= 1, 10)`*dx@&]
[s0; &]
(would need more tuning I suspect...)
Mirek
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun Apr 27 12:49:29 CEST 2025
Total time taken to generate the page: 0.02819 seconds
|
|
|