#! /usr/bin/env python # coding: utf8 # Copyright: Raphael 'kena' Poss # this file is placed in the public domain. # # Convert a CSS stylesheet into one for Docutils' LaTeX output. # # Usage example:: # # pygmentize -S default -f html | pygments_css2sty.py >pygments-default.sty # # Versions: # # 2012-05-09: Günter Milde : # Bugfix: do not fail at lines without comment. # Support for digits in role names. # ``\providecommand`` instead of ``\newcommand``. # Renamed from makesty.py to pygments_css2sty.py. # 2013-03-27: Günter Milde: # Implement bugfix from Juan Luis Cano Rodríguez for csnames. import sys import re print '% Stylesheet for syntax highlight with Docutils' print '% Generated by pygments_css2sty.py from a Pygments CSS style' print '% (output of `pygmentize -S