Changes between Version 1 and Version 2 of TracSyntaxColoring


Ignore:
Timestamp:
09/22/11 13:47:52 (5 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracSyntaxColoring

    v1 v2  
    1212To activate syntax coloring, simply install either one (or more) of these packages. No additional configuration is required, however to modify the colors, have a look at `trac/htdocs/css/code.css`. 
    1313 
    14 If you don't know why trac isnt detecting an installed library, try turning on Trac logging. It actually appears that Trac is broken with SilverCity 0.9.6. Either use the current 0.9.7 or the older 0.9.5 http://trac.edgewall.org/wiki/TracFaq#why-is-my-css-code-not-being-highlighted-even-though-i-have-silvercity-installed 
     14If you don't know why trac isnt detecting an installed library, try turning on Trac logging. It actually appears that Trac is broken with !SilverCity 0.9.6. Either use the current 0.9.7 or the older 0.9.5 http://trac.edgewall.org/wiki/TracFaq#why-is-my-css-code-not-being-highlighted-even-though-i-have-silvercity-installed 
    1515 
    1616When in use, Trac will automatically prioritize !SilverCity highlighting over Enscript if possible, (see note below).  
     
    2020'''Note:''' Enscript supports a greater number of languages, however !SilverCity is generally faster since it is a library and isn't executed in an external process. 
    2121 
    22 === About SilverCity === 
     22=== About !SilverCity === 
    2323!SilverCity uses the lexer from [http://www.scintilla.org/ Scintilla]. Scintilla supports more languages than !SilverCity implements. If you want to add a language to !SilverCity supported by Scintilla, it's not very difficult. See [http://trac.edgewall.org/wiki/SilverCityAddLanguage SilverCityAddLanguage] for some information how. 
    2424 
     
    2727Starting with trac 0.11 [http://pygments.org/ pygments] will be the new default highlighter. It's a highlighting library implemented in pure python, very fast, easy to extend and [http://pygments.org/docs/ well documented]. While it does not support as many languages as Enscript or Scintilla the overall output quality is much better. 
    2828 
    29 To use pygments trac 0.11 you just have to install pygments 0.5.1 or higher. If you want to use it in trac 0.10 too you have to install the [http://trac-hacks.org/wiki/TracPygmentsPlugin TracPygmentsPlugin] from trac hacks. If you encounter any bugs, please file tickets regarding Pygments in [http://dev.pocoo.org/projects/pygments/ the pygments trac]. 
     29To use pygments in trac 0.11 you just have to install pygments 0.6 or higher.  If you want to use it in trac 0.10 too you have to install the [th:TracPygmentsPlugin TracPygmentsPlugin] from trac hacks. If you encounter any bugs, please file tickets regarding Pygments at [http://dev.pocoo.org/projects/pygments/ the Pygments Trac site]. 
     30 
     31The Pygments default style can specified in the [TracIni#mimeviewer-section mime-viewer] section of trac.ini. The default style can be over-ridden by setting a Style preference on the [/prefs/pygments preferences page].  
    3032 
    3133It's very likely that the list below is outdated because the list of supported pygments lexers is growing weekly. Just have a look at the page of [http://pygments.org/docs/lexers/ supported lexers] on the pygments webpage. 
     
    5052|| Eiffel   ||   || X || || 
    5153|| Elisp    ||   || X || || 
    52 || Fortran  ||   || X(3) || || 
     54|| Fortran  ||   || X(3) || X || 
    5355|| Haskell  ||   || X || X || 
    5456|| Genshi || || || X || 
     
    6365|| Matlab   ||   || X (5) || || 
    6466|| Mygthy || || || X || 
    65 || Objective-C|| || X || || 
     67|| Objective-C|| || X ||X || 
    6668|| OCaml    ||   ||   || X || 
    6769|| Pascal   ||   || X || X ||