Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kopetex
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Thu Aug 12, 2004 2:27 am    Post subject: kopetex Reply with quote

Has anyone by chance got the kopetex plugin working in kopete under kde 3.3 ?
Back to top
View user's profile Send private message
Slyde
Guru
Guru


Joined: 14 Jul 2003
Posts: 314

PostPosted: Thu Aug 12, 2004 2:43 am    Post subject: Reply with quote

Heh, I thought Kopetex was a brand of tampon.
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Thu Aug 12, 2004 2:51 am    Post subject: Reply with quote

haha :) .... nope it is an official plugin for kopete to render latex in the message window (in kde 3.3 at least) .... I can activate it, however it does not show any info about itself ... from scarce findings on the internet, it seems you are supposed to be able to surround the tex/latex commands in $$.
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Thu Aug 12, 2004 3:59 am    Post subject: Solved Reply with quote

After looking at the source code for the plugin, I figured out how to send latex formula through kopete.

First let me say that it actually uses a script called tex2im developed here ... except kde 3.3 actually installs the script itself here: /usr/kde/3.3/bin/kopete_latexconvert.sh ... the script converts the latex formula into an image then sends the image.

The kopetex plugin seems to not work with the cryptography plugin active.

To send latex formula, surround the formula with double $$, example:
Code:
$$\psi_{tot}(x,-t_0,r) = \frac{1}{(2\pi)^2} \int\!\!\!\int
\tilde\Psi_{tot}\left(k_x,\frac{c}{2}\sqrt{k_x^2 + k_r^2},r=0\right)$$
Back to top
View user's profile Send private message
nsahoo
l33t
l33t


Joined: 17 Jul 2003
Posts: 618

PostPosted: Thu Aug 12, 2004 5:08 am    Post subject: Reply with quote

so kde is targeting the nerdy phd market ? hmm..
Back to top
View user's profile Send private message
Slyde
Guru
Guru


Joined: 14 Jul 2003
Posts: 314

PostPosted: Thu Aug 12, 2004 5:21 am    Post subject: Reply with quote

nsahoo wrote:
so kde is targeting the nerdy phd market ? hmm..
???
Back to top
View user's profile Send private message
nsahoo
l33t
l33t


Joined: 17 Jul 2003
Posts: 618

PostPosted: Thu Aug 12, 2004 2:52 pm    Post subject: Reply with quote

Slyde wrote:
nsahoo wrote:
so kde is targeting the nerdy phd market ? hmm..
???


who else would type in tex ?
Back to top
View user's profile Send private message
TNorthover
Guru
Guru


Joined: 25 Jan 2004
Posts: 434
Location: Edinburgh, UK

PostPosted: Sun Aug 22, 2004 12:45 pm    Post subject: Re: Solved Reply with quote

jdgill0 wrote:
The script converts the latex formula into an image then sends the image.


Empirical tests seem to show it actually sends the TeX command and relies on the other end to deal with that properly (with jabber <--> kopete, jabber displays $$...$$, and if jabber sends maths, kopete displays it).

Thanks for finding the $$ though, I'd only tried $ and given up after that.
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Sun Aug 22, 2004 2:41 pm    Post subject: Re: Solved Reply with quote

TNorthover wrote:
Empirical tests seem to show it actually sends the TeX command and relies on the other end to deal with that properly (with jabber <--> kopete, jabber displays $$...$$, and if jabber sends maths, kopete displays it).


Yep, you are right ... I learned this, but had not taken the time to post here.

Quote:
Thanks for finding the $$ though, I'd only tried $ and given up after that.


Surprisingly, I have upgrade to KDE 3.3.0 (final release), and the kopetex plug-in has zero information!
Back to top
View user's profile Send private message
SPW
Guru
Guru


Joined: 22 Jul 2003
Posts: 318
Location: Lëtzebuerg

PostPosted: Sun Aug 29, 2004 9:34 am    Post subject: Reply with quote

Kopetex is a killer feature. It rules! Why doesn't someone do a standalone app of this? I mean this could be very helpful. A simple GUI where you enter the code and with a simple click you get a picture of LaTeX-output. (This is a bit different from apps like Kile and as it is already implemented in Kopete it should be quite easy to develop such an app?)
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Sun Aug 29, 2004 2:43 pm    Post subject: Reply with quote

SPW wrote:
Kopetex is a killer feature. It rules! Why doesn't someone do a standalone app of this? I mean this could be very helpful. A simple GUI where you enter the code and with a simple click you get a picture of LaTeX-output. (This is a bit different from apps like Kile and as it is already implemented in Kopete it should be quite easy to develop such an app?)


It already is a standalone app .... KDE developers just incorporated the latex script into KDE itself ... see my post above on where the KDE script is ... the original script is tex2im, which you can find at http://www.nought.de/tex2im.php

There is one improvement they could do ... kopetex will not work when using cryptopgraphy
Back to top
View user's profile Send private message
SPW
Guru
Guru


Joined: 22 Jul 2003
Posts: 318
Location: Lëtzebuerg

PostPosted: Sun Aug 29, 2004 3:22 pm    Post subject: Reply with quote

jdgill0 wrote:
It already is a standalone app .... KDE developers just incorporated the latex script into KDE itself ... see my post above on where the KDE script is ... the original script is tex2im, which you can find at http://www.nought.de/tex2im.php

Well, I think I expressed myself quite unclearly. What I think about is a small app with QT-gui which gives the latex output immediately to the screen (maybe after a mouse click). To use the script you first have to create a tex file an then enter the command, and then you get a png file. This is quite complicated and takes even more time than generating a PDF file from LaTeX code in Kile.
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Sun Aug 29, 2004 4:30 pm    Post subject: Reply with quote

Sorry ...... I misunderstood what you where saying.

A simple qt-designer ui where you have an input box and a convert button to quickly convert to an image (along with a preview with a kpart plugin maybe?) seems like it would be a simple task

However, I disagree that using tex2im is complicated ... you simply enter the math formula into a tex file and run tex2im on it ... if you create a gui, you would be doing the same thing -- typing the latex commands ... why not just type them in a text file with nano, emacs, etc and run tex2im?
Back to top
View user's profile Send private message
SPW
Guru
Guru


Joined: 22 Jul 2003
Posts: 318
Location: Lëtzebuerg

PostPosted: Sun Aug 29, 2004 4:42 pm    Post subject: Reply with quote

jdgill0 wrote:
Sorry ...... I misunderstood what you where saying.

That was my fault, not yours. I really didn't adequatly describe what I meant.
jdgill0 wrote:
However, I disagree that using tex2im is complicated ... you simply enter the math formula into a tex file and run tex2im on it ... if you create a gui, you would be doing the same thing -- typing the latex commands ... why not just type them in a text file with nano, emacs, etc and run tex2im?

That would mean that I had to create a text file with nano that I would delete anyway after I have the png file. And to have a look at the "result" I would need to open konqueror and to open the png file with "kuickshow". This way I need at least 5 apps: konsole, nano, tex2im, konqueror, kuickshow. I guess this is a little bit more complicated than having a simple GUI that you start, type in your latex code and click on a button that renders it and displays the png file.
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Sun Aug 29, 2004 4:54 pm    Post subject: Reply with quote

SPW wrote:
... This way I need at least 5 apps: konsole, nano, tex2im, konqueror, kuickshow. I guess this is a little bit more complicated than having a simple GUI that you start, type in your latex code and click on a button that renders it and displays the png file.


I had not thought of it that way :)

It seems like a qt-qui would be easy to do ... all i think kopete does is save the message to a file, run tex2im (call the already provided kde script), and display the image ... the qt-gui could basically do the same thing ... have an edit box to enter the latex, the convert button could save the message to a tmp file and call tex2im, then maybe use a kpart plugin to preview the image? ... I have not actually done any qt programming other than follow through a couple quick tutorials ... you could borrow the code straight from kopete? ... :idea: this might actually make a nice qt learning project, I have been wanting to learn
Back to top
View user's profile Send private message
SPW
Guru
Guru


Joined: 22 Jul 2003
Posts: 318
Location: Lëtzebuerg

PostPosted: Sun Aug 29, 2004 5:27 pm    Post subject: Reply with quote

jdgill0 wrote:
...save the message to a file, run tex2im (call the already provided kde script), and display the image ... the qt-gui could basically do the same thing ... have an edit box to enter the latex, the convert button could save the message to a tmp file and call tex2im, then maybe use a kpart plugin to preview the image?

That's exactly what I was thinking of :P
I can also imagine that it won't be very difficult to program such a small app. But I'm not a programmer and I'm really not talented at such tasks. In addition I don't have much time now as I have 5 exams over the next 10 days. :cry: If you code it I will beta-test it though :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum