LaTex syntax highlighting possible ?

Asked by Igor Nikolic

Hello,

I just installed PyRoom following the instructions on the main page. Great piece of work ! Can we have syntax highlighting ? Pretty please ? ;) I would love to see a LaTeX mode.. Nothing fancy is needed, the way Kile colorizes latex is great for example

A comment ( % text) is a bit paler than normal text and in italics. \xxx{} is bold. Starts when you load a *.tex file

Oh, and can we have a ctrl+f to find stuff ?

Igor

Question information

Language:
English Edit question
Status:
Solved
For:
PyRoom Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Rooke
Solved:
Last query:
Last reply:
Revision history for this message
Best Adam Rooke (abelianr) said :
#1

Will be very easy to get implemented - if you like i could push a branch that has the syntax highlighting available later on today. PyRoom utilises the same text display widget as gedit, so the syntax highlighting will be exactly the same as that.

Revision history for this message
Igor Nikolic (i-nikolic) said :
#2

I will gladly try it out. I have never used bzr, some instructions how to check stuff our are welcome (I am very familiar with svn though...)

Revision history for this message
Adam Rooke (abelianr) said :
#3

Right created a branch for you with a syntax highlight option in preferences.

in terminal type:
bzr branch http://bazaar.launchpad.net/~adamrooke/pyroom/syntax-latex pyroom

which will dowload the source code for you to "pyroom" in your home folder.
to run it type:
cd pyroom
./pyroom.py

You may not have bzr installed, in which case:
sudo apt-get install bzr

Revision history for this message
Adam Rooke (abelianr) said :
#4

ctrl F is a feature that will probably be on its way in the third relase (first one being 0.1, and 0.2 is on its way and 0.3 has features such as spelllcheck planned)

Revision history for this message
Igor Nikolic (i-nikolic) said :
#5

Fantastic ! This is a very, very nice feaure. Are you interested in a screen shot for the website ?

Revision history for this message
Igor Nikolic (i-nikolic) said :
#6

Thanks Adam Rooke, that solved my question.

Revision history for this message
Adam Rooke (abelianr) said :
#7

A screen shot could be good I suppose. I'm not sure if this will become a mainstream feature since its meant to be a writing enviroment rather than a coding one - but is a very easy feature to implement so we will have to see what demand is like.

Revision history for this message
Igor Nikolic (i-nikolic) said :
#8

I agree with the coding vs writing point. That is exactly the appeal of PyRoom. However, in my case (and probably many others) writing means writing in latex. Unless writing your PhD thesis does not count as writing but as coding ;)

Where do I send the screenshot ?

Revision history for this message
Adam Rooke (abelianr) said :
#9

go to wiki.pyroom.org and add the image on there somewhere - maybe Visual identity and bruno can take it from there. I agree I use latex the majority of the time and think having the syntax highlighting is very useful. I imagine there will be some discussion about it soon.

Revision history for this message
lbthrice (lbthrice) said :
#10

um, is this branch gone?
did it merge with main branch?
I can't see any LaTeX syntax highlighting options in pyroom prefs dialogue using o.4.1.
It is not inconceivable that the option exists and I have overlooked it.
Thank you for work on a fantastic project!
For whatever it is worth, I would like to advocate for the inclusion of LaTeX syntax highlighting feature.
thanks again

Revision history for this message
Florian Heinle (tiax) said :
#11

Hi,

the branch https://code.launchpad.net/~abelianr/pyroom/syntax-latex is still there, but it hasn't been merged into the main branch and caught some serious bitrot.

Currently, we don't support syntax highlighting in mainline PyRoom, as we switched from the text widget that allowed it (gtksourceview) to one that doesn't (gtk.TextBuffer).

However, design allows drop-in exchange of gtksourceview and our text buffer. It wouldn't be that hard to maintain a fork branch with syntax highlighting enabled. Personally, I'm not interested in that. But maybe someone else is. Feel free to ask for support.