[TxMt] Latex to CSS (pygments ?)
Alexander Ross
alex.j.ross at gmail.com
Sun Feb 4 20:57:40 UTC 2007
Alain,
You need to set up your path. See my previous email.
- Alex
On Feb 4, 2007, at 12:50 PM, Alain Matthes wrote:
>
> Le 4 févr. 07 à 21:29, Charilaos Skiadas a écrit :
>
>> On Feb 4, 2007, at 2:47 PM, Alain Matthes wrote:
>>
>>>
>>>> thydere
>>>
>>> ??? sorry but i don't understand...
>>
>> Not much to understand, that's the IRC name of the guy who helped
>> me fix this.
>>
>>> Traceback (most recent call last):
>>> File "/tmp/temp_textmate.tERir7", line 4, in ?
>>> from pygments import highlight
>>> ImportError: No module named pygments
>>
>> Looks like you don't have pygments installed, it doesn't come
>> built in. You would need to install pygments first, or wait a bit
>> until (if) we package it with TextMate.
>>
>
> Pygments is install this code work :
>
> import codecs
> from pygments import highlight
> from pygments.lexers import TexLexer
> from pygments.formatters import HtmlFormatter>>> from
> pygments.formatters import HtmlFormatter
> from pygments.lexers import TexLexer
> from pygments.formatters import HtmlFormatter
> fileObj = codecs.open("/Users/ego/Desktop/sign-diagram.tex", "r" ,
> "utf8")
> code = fileObj.read()
> filecontent = highlight(u, TexLexer(), HtmlFormatter())
> unicodefilecontent = unicode(filecontent)
> out = file( "/Users/ego/Desktop/sign-diagram.html", "w")
> out.write(unicodefilecontent)
> out.close()
>
> when i run python !
>
> Alain
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
More information about the textmate
mailing list