Valid HTML 4.0!Valid CSS! Здесь есть бред! А больше, боюсь, ничего и нет...

Code listings colorizer for eLyXer output

Ever needed to write a web article containing a lot of formulae and code listings? There is a ton of stuff available for beatiful colored code listings, but math formulae is something different. Of course, there's MathML which is still poorly supported by browsers, and there are various other ways which I'm not going to mention there because other people have already done this. However, should you pick LyX as the tool of your choice, you'll notice that although it provides a way of inserting code listings, it has somewhat limited support for coloring, which doesn't even work at all when you export your document into HTML via eLyXer. At least that's true for eLyXer 1.2.2.

Here is where this useful script comes into play. It is written in Perl and uses Text::VimColor which generates colored listings using Vim, which is a bit silly and slow, but on the other hand provides excellent support for numerous languages. The script just looks for listings in eLyXer output and colorizes them, and also inserts a link to light.css stylesheet which is needed for colors to actually show up. The light.css file is bundled with Text::VimColor.

The script is in no way complete and mature software. In fact, it is more like a dirty hack. As it is, it is set up to use with Python listings, but you can easily set it up for any language even if you don't know any Perl. And if you do know some Perl, then you could easily tweak it for documents with listings in multiple languages.

Хостинг от uCoz