close
Warning:
Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.
- Timestamp:
-
2015-05-25T08:23:07-07:00 (10 years ago)
- Author:
-
trac
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v2
|
v3
|
|
7 | 7 | |
8 | 8 | * [http://pygments.pocoo.org/ Pygments], by far the preferred system, as it covers a wide range of programming languages and other structured texts and is actively supported |
9 | | * [http://www.codento.com/people/mtr/genscript/ GNU Enscript], commonly available on Unix but somewhat unsupported on Windows |
10 | | * [http://silvercity.sourceforge.net/ SilverCity], legacy system, some versions can be [http://trac.edgewall.org/wiki/TracFaq#why-is-my-css-code-not-being-highlighted-even-though-i-have-silvercity-installed problematic] |
| 9 | * [http://www.codento.com/people/mtr/genscript/ GNU Enscript], commonly available on Unix but somewhat unsupported on Windows //(use is deprecated)// |
| 10 | * [http://silvercity.sourceforge.net/ SilverCity], legacy system, some versions can be problematic //(use is deprecated)// |
11 | 11 | |
12 | 12 | |
… |
… |
|
17 | 17 | === About Pygments === |
18 | 18 | |
19 | | Starting 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]. |
| 19 | Since Trac 0.11 [http://pygments.org/ pygments] is 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]. |
20 | 20 | |
21 | 21 | The Pygments default style can specified in the [TracIni#mimeviewer-section mime-viewer] section of trac.ini. The default style can be overridden by setting a Style preference on the [/prefs/pygments preferences page]. |
… |
… |
|
30 | 30 | [[KnownMimeTypes]] |
31 | 31 | |
| 32 | Note that the rich content may be directly //rendered// instead of syntax highlighted. This usually depends on which auxiliary packages are installed and on which components are activated in your setup. For example a `text/x-rst` document will be rendered via `docutils` if it is installed and the `trac.mimeview.rst.ReStructuredTextRenderer` is not disabled, and will be syntax highlighted otherwise. |
| 33 | |
| 34 | In a similar way, a document with the mimetype `text/x-trac-wiki` is rendered using the Trac wiki formatter, unless the `trac.mimeview.api.WikiTextRenderer` component is disabled. |
| 35 | |
| 36 | HTML documents are directly rendered only if the `render_unsafe_html` settings are enabled in the TracIni (those settings are present in multiple sections, as there are different security concerns depending where the document comes from). If you want to ensure that an HTML document gets syntax highlighted and not rendered, use the `text/xml` mimetype. |
| 37 | |
| 38 | If a mimetype property such as 'svn:mime-type' is set to 'text/plain', there is no coloring even if file is known type like 'java'. |
32 | 39 | |
33 | 40 | === List of Languages Supported, by Highlighter #language-supported |
… |
… |
|
43 | 50 | || C# || || ✓ ^[#a1 (1)]^ || ✓ || |
44 | 51 | || C++ || ✓ || ✓ || ✓ || |
| 52 | || CMake || ? || ? || ✓ || |
45 | 53 | || Java || ✓ ^[#a2 (2)]^ || ✓ || ✓ || |
46 | 54 | || Awk || || ✓ || || |
… |
… |
|
98 | 106 | |
99 | 107 | == Extra Software == |
100 | | * GNU Enscript -- http://directory.fsf.org/GNU/enscript.html |
101 | | * GNU Enscript for Windows -- http://gnuwin32.sourceforge.net/packages/enscript.htm |
102 | | * !SilverCity -- http://silvercity.sf.net/ |
103 | | * Pygments -- http://pygments.org/ |
| 108 | * GNU Enscript — http://directory.fsf.org/GNU/enscript.html |
| 109 | * GNU Enscript for Windows — http://gnuwin32.sourceforge.net/packages/enscript.htm |
| 110 | * !SilverCity — http://silvercity.sf.net/ |
| 111 | * **Pygments — http://pygments.org/** |
104 | 112 | |
105 | 113 | ---- |