Changes between Version 1 and Version 2 of TracSyntaxColoring


Ignore:
Timestamp:
Jan 16, 2006, 10:33:20 AM (14 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracSyntaxColoring

    v1 v2  
    11= Syntax Coloring of Source Code =
    2 Trac supports language-specific colorization (syntax highlighting) of source code in [wiki:WikiFormatting WikiFormatted] text and the [wiki:TracBrowser Source Browser].
     2Trac supports language-specific syntax highlighting of source code in [wiki:WikiFormatting wiki formatted] text and the [wiki:TracBrowser repository browser].
    33
    4 To perform this, Trac relies on external software packages with support for a great number of programming languages.
     4To do this, Trac uses external libraries with support for a great number of programming languages.
    55
    6 Currently Trac supports syntax coloring using [http://people.ssh.fi/mtr/genscript/ GNU Enscript] and [http://silvercity.sourceforge.net/ SilverCity].
     6Currently Trac supports syntax coloring using one or more of the following packages:
    77
    8 '''To activate syntax coloring, simply install !SilverCity and/or Enscript.'''
     8 * [http://people.ssh.fi/mtr/genscript/ GNU Enscript]
     9 * [http://silvercity.sourceforge.net/ SilverCity]
    910
    10 Trac will automatically prioritize using !SilverCity before Enscript if possible. If neither is available, Trac will display the data as plain text.
     11To 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`.
    1112
    12 '''Note:''' ''Enscript supports a greater number of languages, however !SilverCity is generally faster since it is a library, not having to execute an external process.''
    13 [[br]]'''Note:''' ''Syntax Coloring is only available on trac >= 0.7.''
     13When in use, Trac will automatically prioritize !SilverCity highlighting over Enscript if possible, (see note below).
     14
     15If neither package is available, Trac will display the data as plain text.
     16
     17'''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.
     18
     19=== About SilverCity ===
     20!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://projects.edgewall.com/trac/wiki/SilverCityAddLanguage SilverCityAddLanguage] for some information how.
     21
    1422
    1523== Syntax Coloring Support ==
     
    3240|| IDL      ||   || X ||
    3341|| Javascript || X || X ||
     42
    3443|| m4       ||   || X ||
    3544|| Makefile ||   || X ||
     
    4251|| Pyrex    ||   || X ||
    4352|| * Python || X || X ||
    44 || * Ruby   || X || X ||
     53|| * Ruby   || X || X (1) ||
    4554|| Scheme   ||   || X ||
    4655|| Shell    ||   || X ||
     
    5766''(*) Supported as inline code blocks in [wiki:WikiFormatting Wiki text] using WikiProcessors.''
    5867
     68''(1) Ruby highlighting is not included in the Enscript distribution.  Highlighting rules for Ruby can be obtained from: http://neugierig.org/software/ruby/
     69
    5970== Extra Software ==
    6071 * GNU Enscript -- http://people.ssh.fi/mtr/genscript/
     
    6273
    6374----
    64 See also: WikiProcessors, WikiFormatting, TracWiki, TracBrowser.
     75See also: WikiProcessors, WikiFormatting, TracWiki, TracBrowser