I don't know of a full solution for editing mathematical text in Squeak.
It used to be possible to embed morphs into text. Does anyone know if this is still possible? If so, how do you do it? Scamper uses this facility internally, but I don't know how to do it as a normal user.
If it's still possible, then you could use Latex to generate PS or PDF, then convert those into GIF. Squeak can load GIF's! Load a GIF from a File List, and you'll have a morph which can then be embedded into text. (Assuming that the answer to the previous question was positive.)
Another approach you can try, if you have a lot of time on your hands to experiment with this, is to try the equation editors made by college students one semester at Georgia Tech. You'll have to file them in and see whether any of them work in the Squeakland image, but here they are if you are that interested:
http://coweb.cc.gatech.edu/cs2340/17
(scroll down to "summer 2000")
Some of them look nice, but I haven't tried them myself.
-Lex
El mar, 03-05-2005 a las 18:22 -0400, Lex Spoon escribió:
I don't know of a full solution for editing mathematical text in Squeak.
It used to be possible to embed morphs into text. Does anyone know if this is still possible? If so, how do you do it? Scamper uses this facility internally, but I don't know how to do it as a normal user.
Yes, it is possible, in fact I did that with scamper, the problem was that scamper aligns everything at the bottom of the text line, so equations mixed with text are quite hard to read, specially wether the equation graphic is three or four times the size of the text. They look like this (and even worst):
( 1 2 3 ) ( 1 2 x ) ( ) ( ) ( 2 4 6 ) ( 2 3 6 ) ( ) ( ) A= (4 5 3 ) + (s 5 9 )
Finally, I have been able to modify this behaviour and now text is centered aligned vertically with the images inside Scamper and GeeMailMorph (I use scamper to import the html latex rendered text and Geemail to present the text). I can send the changeset if anybody wants it. I have seen that it wouldn't be so hard to make scamper understand the middle, top and bottom html tags for images, but it requires somebody with a deeper knowledge of text styles, paragraphs, etc in Squeak. For my project this solution is good enough, except for subscripts, and I will replace them by graphics.
If it's still possible, then you could use Latex to generate PS or PDF, then convert those into GIF. Squeak can load GIF's! Load a GIF from a File List, and you'll have a morph which can then be embedded into text. (Assuming that the answer to the previous question was positive.)
Another approach you can try, if you have a lot of time on your hands to experiment with this, is to try the equation editors made by college students one semester at Georgia Tech. You'll have to file them in and see whether any of them work in the Squeakland image, but here they are if you are that interested:
http://coweb.cc.gatech.edu/cs2340/17
(scroll down to "summer 2000")
Some of them look nice, but I haven't tried them myself.
Yes, they really look nice, some of them have broken links, as http://coweb.cc.gatech.edu:8888/cs2340/uploads/gut.htm, but others look quite complete. I will have a look at http://coweb.cc.gatech.edu/cs2340/827 that looks quite well. I don't think I will have time enough to include it in this project (unless it works right from the beginning, but I don't think so), but it seems to be an excellent starting point to add it into Squeak for the next projects. Thanks for these links. Regards
José L. Redrejo Rodríguez wrote:
Finally, I have been able to modify this behaviour and now text is centered aligned vertically with the images inside Scamper and GeeMailMorph (I use scamper to import the html latex rendered text and Geemail to present the text). I can send the changeset if anybody wants it.
Please post it, I like to take a look at it. Karl
El vie, 06-05-2005 a las 00:44 +0200, karl escribió:
José L. Redrejo Rodríguez wrote:
Finally, I have been able to modify this behaviour and now text is centered aligned vertically with the images inside Scamper and GeeMailMorph (I use scamper to import the html latex rendered text and Geemail to present the text). I can send the changeset if anybody wants it.
Please post it, I like to take a look at it. Karl
Some other people has asked me for it out of this list, but it is easier if I send it here, so anybody can take a look. So, here it goes.
It adds that behaviour by default to Scamper and GeeMail. The key is in the TextComposer composeEachRectangleIn: rectangles method. I have added an instance variable called baseline. If the value is 0, the behaviour is the normal behaviour in Squeak (bottom alignment of text in lines), if its value is 1 the text is aligned in the middle of the line. I have created a TextMorphForEditViewVertical and MultiNewParagraphVertical classes to replace the TextMorphForEditView and MultiNewParagraph classes used by geemail (in fact TextPlusMorph is the text editor for geemail) and scamper. This classes are exactly equal as its parent classes, excepting they use the baseline =1 property.
To check how it works, just load in Scamper this web page http://www.itais.net/matriz2.html , before and after aplying the attached changeset. The differences are obvious if you look at the matrix graphics.
Regards.
Hi
I've done this Latex2png class which could be of interest for you. It works well under 3.4 but don't know why, there is a problem with OSProcess in 3.7. You need latex and convert to get this thing working. I designed this tool in order to get a way to collaborate with other scientists through a kind of mathwiki, but swiki was not very fun from the developer point of view, so I decided to switch on smallwiki, but have no time for the moment.
Tell me if it fits your need, I could try to get it working for 3.7
Regards, Samir
"José "L. Redrejo" Rodríguez" jredrejo@merida.uned.es writes:
El vie, 06-05-2005 a las 00:44 +0200, karl escribió:
José L. Redrejo Rodríguez wrote:
Finally, I have been able to modify this behaviour and now text is centered aligned vertically with the images inside Scamper and GeeMailMorph (I use scamper to import the html latex rendered text and Geemail to present the text). I can send the changeset if anybody wants it.
Please post it, I like to take a look at it. Karl
Some other people has asked me for it out of this list, but it is easier if I send it here, so anybody can take a look. So, here it goes.
It adds that behaviour by default to Scamper and GeeMail. The key is in the TextComposer composeEachRectangleIn: rectangles method. I have added an instance variable called baseline. If the value is 0, the behaviour is the normal behaviour in Squeak (bottom alignment of text in lines), if its value is 1 the text is aligned in the middle of the line. I have created a TextMorphForEditViewVertical and MultiNewParagraphVertical classes to replace the TextMorphForEditView and MultiNewParagraph classes used by geemail (in fact TextPlusMorph is the text editor for geemail) and scamper. This classes are exactly equal as its parent classes, excepting they use the baseline =1 property.
To check how it works, just load in Scamper this web page http://www.itais.net/matriz2.html , before and after aplying the attached changeset. The differences are obvious if you look at the matrix graphics.
Regards.
Squeakland mailing list Squeakland@squeakland.org http://squeakland.org/mailman/listinfo/squeakland
On Fri, May 13, 2005 at 08:34:22PM +0200, Samir Saidani wrote:
I've done this Latex2png class which could be of interest for you. It works well under 3.4 but don't know why, there is a problem with OSProcess in 3.7.
Hi Samir,
Can you please let me know what problem you had with OSProcess in 3.7? I will be gone for the next two weeks, but I will look into the problem for you as soon as I get back.
Thank you,
Dave
It adds that behaviour by default to Scamper and GeeMail. The key is in the TextComposer composeEachRectangleIn: rectangles method. I have added an instance variable called baseline. If the value is 0, the behaviour is the normal behaviour in Squeak (bottom alignment of text in lines), if its value is 1 the text is aligned in the middle of the line.
Neat work!!
For full Scamper support, it looks like it would be enough to modify the method HtmlImage>>addToFormatter: so that it sets the baseline setting....
-Lex
squeakland@lists.squeakfoundation.org