Not logged in. · Lost password · Register
Forum: Community Feature Requests RSS
Latex-patch

Announcement

11-16-2005, 12:33 by halr9000
Subject: Psi Groupchat (new address)
Join us at the Psi Groupchat (MUC)! Room name: psi@conference.psi-im.org
Page:  1  2  next 
Avatar
hugoe #1
Member since 12/2004 · 4 posts
Group memberships: Members
Show profile · Link to this post
Hi,

since we needed quite urgently a LaTeX support for an IM application (computer science students...) we began code a patch for the psi cvs version. At the moment we have a kind of 'proof of concept' version. It works, no error checks, no configuration options and still a bit system dependant....

But if there would be general interest we are willing to develop it further to a more mature state.  Is there a chance, that you would include our patches in  psi , if we reach a stable state? Or would you consider LaTeX support a feature which should not be available in the Psi core, but only as a plugin?

We could supply Linux and Windows version. As some parts are a bit platform dependant (we put them in a small external library), we would need someone, who is willing to make the neccessary changes for Mac.

If there is no chance to get it into psi's cvs release, we would be willing to supply a patch to those interested until a plugin system is available, as soon as we reach a quite usable state.

We are looking forward to your feedback.
Avatar
spike (Administrator) #2
Member since 02/2003 · 1873 posts · Location: Leuven (Belgium)
Group memberships: Administrators, Developers, Members
Show profile · Link to this post
Quote by hugoe on 12-15-2004, 03:57:
since we needed quite urgently a LaTeX support for an IM application
That's great. This kind of functionality has been asked a few times before, and the plan is indeed to have this as a plugin (not in the core). In the meantime, i would suggest you guys keep on working on what you do and improving the LaTeX support, and maybe put up a webpage or at least a link to the working version of your patch so that other people can enjoy your work. Once plugins are here, you guys will hopefully be able to make a plugin out of it pretty fast.
- Remko
Avatar
Kev (Administrator) #3
User title: Project Lead
Member since 11/2002 · 2998 posts · Location: Exeter, UK
Group memberships: Administrators, Developers, Members
Show profile · Link to this post
For the definitive answer:
I don't see a need for latex support in the client core, but would be more than delighted to see a plugin for it.
I don't know what's best to suggest in terms of continuing development, Plugins won't be here in the next couple of months, but it's a high priority feature for me.
Basically, you can continue to develop it, and if you're careful about what you do the work on, the actually cost of translating this to a plugin should be limited.
I'm sorry you're developing this before the time of plugins, but will be very happy to have the plugin. It could be really useful.
You could also potentially help us quite a lot by determining the actions required of the plugin interface.
Feel free to jabber me if you like.
Psi Project Leader.
Homepage, including development blog
Avatar
machekku #4
User title: Crazy guy from Poland
Member since 07/2004 · 781 posts · Location: Poland
Group memberships: Developers, Members
Show profile · Link to this post
If you have a working patch, publish it somewhere - maybe it will appear in some of custom builds. Then you may get feedback from many users.
Maciek "Machekku" Niedzielski
Psi developer
[Image: http://machekku.uaznia.net/jabber/jobble/map/jmpixel1.png]
Avatar
hugoe #5
Member since 12/2004 · 4 posts
Group memberships: Members
Show profile · Link to this post
Hi,

thanks for your quick response. As it seems there's real interest in such a plugin, we'll submit a patch to the forum as soon as we have it in a quite usable state. We think, we can do ist before the end of the year, at the moment it is still possible to crash your psi by sending a wrong forumula. A little bit of error handling seems to be a good idea   ;)
Avatar
Kev (Administrator) #6
User title: Project Lead
Member since 11/2002 · 2998 posts · Location: Exeter, UK
Group memberships: Administrators, Developers, Members
Show profile · Link to this post
a wrong formula?
you mean, if I type $1=0$ in my chats Psi crashes :o
;)
Psi Project Leader.
Homepage, including development blog
This post was edited on 12-17-2004, 09:01 by Unknown user.
Avatar
hugoe #7
Member since 12/2004 · 4 posts
Group memberships: Members
Show profile · Link to this post
Quote by Kev on 12-17-2004, 02:01:
you mean, if I type $1=0$ in my chats Psi crashes :o
Yeah, we includes mathematica into psi, so you don't need too much programs anymore  :-D
No, it crashes if latex is not able to render the texcode. Then we don't get an image back and psi tries to show this image and *boom*.
But our texcode is able to report an error in that case, only the code we injected into psi don't check for errors yet.
artus83 #8
Member since 12/2004 · 1 post
Group memberships: Members
Show profile · Link to this post
Well, nearly two weeks to late, but here is our patch.

The diff file can be used to patch the code from CVS. You should download a clean version from CVS to avoid problems with intermediate files and makefiles. To apply the patch change in the directory psi from the cvs release and use the command:
patch -p0 -i libTeXFormula.diff
After patching it should be possible to build psi using configure and make as ususal (for windows use the batch file). To use the latex extension you will need an installed version of latex (with the program pdflatex in the path) and an installed version of ghostscript (with either gs or gswin32 in the path or the GhostScript library in the path).
You can send LaTeX code using the tag $$. I.e. $$e=mc^2$$ should show the rather famous formula.

WARNING: We tried to prevent dangerous LaTeX code from being executed and try to filter all harmful commands, but we don't know all internals of LaTeX and can't guarantee  that we didn't miss some possible exploits. So we ask hereby all LaTeX gurus to take a look at our code to check for possible security problems (primarily the function isStringSecure from the file libTeXFormula.cpp).  USE ON YOUR OWN RISK!

The release is with the headers from the GPL Version of GhostScript.  There is a newer version of Ghostscript wich is only available in a more restrictive license. When you have problems compiling or using the patch try the headers iapi.h and gdevdsp.h from AFPL GhostScript 8.5 instead.

The diff file is available at:  http://www.uni-bonn.de/~nieuwenh/libTeXFormula.diff

We would appreciate any feedback.

Since we have no Mac we invite anyone interested to port it.
yoda222 #9
Member since 01/2005 · 1 post
Group memberships: Members
Show profile · Link to this post
Hello,
I reply just for saying that LaTeX [plugin|patch] is a good think for psi. But I have just one remark.
I have write a such plugin for gaim (a long time ago... about 6 month, I think) (he's here : http://sourceforge.net/projects/gaim-latex/ )(I think he has from 15 to 20 user, most of there (~6) are friend of me). I also see that someone else write "the same" It was 2 or three months. (http://sourceforge.net/tracker/index.php?func=detail&… and http://www.student.cs.uwaterloo.ca/~kzorin/ ) This work also on aMsn. Both just work on unix-like system.

But those different plugin have a little problem : your work with LaTeX between $$ tag, TeXIM work with a \tex tag at the begin of message, and mine with [tex]\LaTeX here[/tex].
So we have just a little community of user (I speak for my work just) but we have 3 different working style. Allthis plugin can work easily with the other, if we just change the tag system. (I think)
Also I don't want to impose my style (I was thinking to adapt mine to the \tex tag, but I have no time)

So I think the best solution is to try to have the same method. (I can adapt my solution to your system in the following day/week/month (when I have time)) but I think it can be a good think if you can "convert" TeXIM developer to your system ;)

I've also to say that I'm not more using gaim, because I use psi, but I always change to gaim when I want to use LaTeX. I wil try your plugin in the following day, and I will report bug, if I found it.

I've also a question : can I use part of you code? (other word : what's your licence? I'm interested with your litle error verify system)
(don't look my plugin code source, I really think that he is very ugly, because I'm not a informatician, and I've written it to fast)

Sorry for my bad English.
Avatar
hugoe #10
Member since 12/2004 · 4 posts
Group memberships: Members
Show profile · Link to this post
Hi yoda222,
thanks for your hint, that there is such a plugin for gaim. We've heard of the capability of using LaTeX in kopete and used their tags $$ to be compatible. But it shouldn't be a problem to alter our code to support other tags, too. As we only decode the TeX code you only have to know the IM of your contact to encode it properly. And don't be ashame of your code, ours is also not perfect, as we want to wait for a plugin interface in psi :-)

Our code is under zlib license (see http://www.gzip.org/zlib/zlib_license.html). It is a very free license, it says: Do what you want but don't come to us if anything goes wrong :-) . So you can use our code in  any way and the altered psi parts under psi's license.
And my english is also not perfect :-)
Avatar
mblsha (Moderator) #11
Member since 11/2002 · 287 posts · Location: Moscow, Russia
Group memberships: Developers, Global Moderators, Members
Show profile · Link to this post
2hugoe: peeked at your patch, it's pretty well-done, but i haven't looked seriously at the backend. And in the PsiTextView end, you don't have to add the 'iconUpdated()' function. I've added it to support animations.
Pydera #12
Member since 12/2005 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: another improvement request
Hi!
First of all: BIIIG THX for the TeX-Patch! This is a feature (not only) I was wanting for a long time. :-)

But for compatibility issues here's another feature request:
There are many TeX--packages out there like pstrick, xypic a.s.o.. It would be cool to use whatever packages you want. So I would like to have the following 'workflow':

You can set the used packages in an options dialog in Psi. If you transfer a TeX--contaminated message, these package names are submitted, too, so the receiver knows how to compile the message correctly. (Maybe just a textfield to enter a custom TeX--header?)

So e.g. if I want to use \text{asd} I'll just include 'amsmath' in my options and the receiver can see the message rendered correctly. I'm not so used to XMPP internals, but maybe these options can be sent as another XML--node, so that the original way does not get affected and users from e.g. Kopete can at least try to render the message?

Of course I understand there is a security issue without good checking of incoming messages, but for start maybe a simple 'enable experimental feature' option is enough?
mark #13
Member since 02/2006 · 4 posts
Group memberships: Members
Show profile · Link to this post
I'm using psi with the gentoo patches, which include the latex-patch (which is successfully applied). Psi 0.9 worked fine, but Psi 0.10 doesn't create/show LaTeX code within my posts.
Does the patch need an update to work with 0.10?
Avatar
michalj (Moderator) #14
Member since 04/2004 · 2174 posts · Location: Legionowo, Poland
Group memberships: Global Moderators, Members
Show profile · Link to this post
Please ask Psi-gentoo maintainer or patch creator about it, vanilla Psi does not include this patch and we have no idea about it. BTW: There should be Psi-gentoo based on 0.10 already released - isn't that patch working correctly?
Michał Jazłowiecki (michalj)
Psi Forum & Wiki Moderator :: Psi-Daisy Author
Avatar
machekku #15
User title: Crazy guy from Poland
Member since 07/2004 · 781 posts · Location: Poland
Group memberships: Developers, Members
Show profile · Link to this post
I may be mistaken, but remember hearing somewhere that this patch was removed from psi-gentoo.
Maciek "Machekku" Niedzielski
Psi developer
[Image: http://machekku.uaznia.net/jabber/jobble/map/jmpixel1.png]
Close Smaller – Larger + Reply to this post:
Smilies: :mellow: :huh: ^_^ :o ;) :P :D :lol: B) :rolleyes: -_- <_< :) :wub: :angry: :( :unsure: :wacko: :blink: :ph34r:
Special characters:
Page:  1  2  next 
Go to forum
Unclassified NewsBoard devel of 20051113 © 2003-5 by Yves Goergen
Current time: 05-17-2008, 11:49:41 (UTC -04:00)