[ gaim-Plugins-1586950 ] Instant Math (LaTeX) plugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[ gaim-Plugins-1586950 ] Instant Math (LaTeX) plugin

Plugins item #1586950, was opened at 2006-10-30 03:03
Message generated for change (Comment added) made by jikmo
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Benjamin Moody (floppusmaximus)
Assigned to: Nobody/Anonymous (nobody)
Summary: Instant Math (LaTeX) plugin

Initial Comment:
This is a plugin which uses LaTeX to render math
expressions in IM and chat conversations.  It has been
inspired by Kirill Zorin's TeXIM plugin (to which,
great thanks; I have borrowed ideas from it, and its
source was very helpful in understanding the weird
intricacies of using images in Gaim) and also by the
KopeTeX plugin for Kopete.

It supports both Gaim 1.x and 2.x (it has been tested
mostly with Gaim 1.5.0, 2.0.0-beta3 and beta4.)

It is intended to be compatible with both TeXIM and
KopeTeX, and supports all three existing syntaxes:
KopeTeX-style "$$MATH$$", TeXIM-style "\tex TEXT", and
the older-TeXIM-style "/tex TEXT".  KopeTeX-style
equations -- the most friendly syntax, in my opinion --
can be embedded in longer messages (up to a maximum of
16 equations per message.)

Two different security models are supported:
- a simple blacklist of forbidden commands (I have
collected a list of these from various sources; I'm no
TeX guru, and I'd really appreciate comments from
someone who is.)
- the highly-secure (though more limited in
functionality) 'texvc' tool from the MediaWiki project,
which parses everything beforehand and checks all
commands against a whitelist.
In addition, the plugin allows you to enable/disable
LaTeX on a per-conversation basis.  LaTeX is enabled by
default for all conversations, but you can change this
through the preferences.

Finally, this plugin is somewhat more customizable than
either of its predecessors.


- LaTeX
- dvipng (http://savannah.nongnu.org/projects/dvipng/)
- texvc (optional; part of the MediaWiki package from


An autoconf/libtool-based package; if you've installed
Gaim from source or you have the 'gaim-devel' /
'gaim-dev' package, simply do a './configure; make;
make install', or 'make install-user' to install to
your home directory.

If you do not have the development files installed and
you don't want to install them (e.g., you don't have
root access and don't want to fool around with
installation prefixes) then:
- Download, extract and configure the sources for your
version of Gaim
- Configure the plugin using './configure
--with-gaim-source=/path/to/gaim-X.Y.Z', compile and
install as usual


I have not tested this plugin at all under Windows; I
don't own a Windows machine.  However, I see no reason
why it should not work.  If you are a Windows user and
willing to test, drop me a line.


Comment By: Luke D (jikmo)
Date: 2007-04-11 01:18

Logged In: YES
Originator: NO

I am a Windows user.

I compiled and tested out your plugin, and it's working quite nicely.
Unfortunately, there are a few problems; in Windows, whenever g_spawn is
called (3 times per LaTeX processing), a console window opens.  It seems
that this is due to Gaim being compiled with an old version of GTK since
the problem seems to have been fixed in 2004/2005.  However, recompiling
Gaim and your plugin with the latest GTK and glib does not seem to do
anything. There is another LaTeX plugin for Gaim called gaim-latex that
gets around this by calling a Windows API function to spawn a new process.
It should be possible to use the Windows API to call the spawn the process
without opening a console, and it might be possible to alter the code and
compile it with the latest version of glib so that glib handles it
correctly.  Unfortunately, I do not know much about either the Windows API
or GTK/glib, so I cannot offer any suggestions at this time.

The other problem is that there there is no error stream in Windows, so
error messages are printed straight to the output.  This does not seem to
cause any problems other than that error messages cannot be displayed when
they are turned on.

When I get a chance, I will try to look into this, but I cannot promise

By the way, a friend of mine is using the plugin in Linux and the \tex and
/tex directives do not seem to work, only $$, which means that he can only
use the plugin for math.  Also, if you update the plugin, could you add a
way to set the maximum message length in the settings?  The current maximum
is a little low.


Comment By: Benjamin Moody (floppusmaximus)
Date: 2006-12-05 01:13

Logged In: YES
Originator: YES

Thanks!  I sent you an email on the subject.

Something is broken with this file attachment thingy -- I don't know if
it's a problem on my end or SF's, but 8 bytes of garbage seemingly got
added to the end of the file.  There's nothing missing, though.  With GNU
tar and gzip, at least, you can still extract everything just fine.  Sorry
about that, folks.


Comment By: Ankit (rageboy04)
Date: 2006-11-25 17:19

Logged In: YES
Originator: NO

Hey, I'm a Windows user and am willing to test, but I would prefer if
someone else compiled to the Windows DLL for me as I'm not completely
comfortable with it, though I would probably be able to figure out how and
do it if need be.


You can respond by visiting:

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
Gaim-plugins mailing list
[hidden email]
Has you: Yes