Syntax Coloring of Source Code
Trac supports language-specific syntax highlighting of source code in wiki formatted text and the repository browser.
To do this, Trac uses external libraries with support for a great number of programming languages.
Currently Trac supports syntax coloring using one or more of the following packages:
To 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.
When in use, Trac will automatically prioritize SilverCity highlighting over Enscript if possible, (see note below).
If neither package is available, Trac will display the data as plain text.
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.
SilverCity uses the lexer from 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 SilverCityAddLanguage for some information how.
Syntax Coloring Support
| | SilverCity | Enscript
|
| Ada | | X
|
| Asm | | X
|
| * ASP | X | X
|
| * C | X | X
|
| * C++ | X | X
|
| * Java | | X
|
| Awk | | X
|
| CSS | X |
|
| Diff | | X
|
| Eiffel | | X
|
| Elisp | | X
|
| Fortran | | X
|
| Haskell | | X
|
| HTML | X | X
|
| IDL | | X
|
| Javascript | X | X
|
| m4 | | X
|
| Makefile | | X
|
| Matlab | | X
|
| Objective-C | | X
|
| Pascal | | X
|
| * Perl | X | X
|
| * PHP | X | X
|
| PSP | X |
|
| Pyrex | | X
|
| * Python | X | X
|
| * Ruby | X | X (1)
|
| Scheme | | X
|
| Shell | | X
|
| SQL | X | X
|
| Troff | | X
|
| TCL | | X
|
| Tex | | X
|
| Verilog | | X
|
| VHDL | | X
|
| Visual Basic | | X
|
| VRML | | X
|
| XML | X | X
|
(*) Supported as inline code blocks in Wiki text using WikiProcessors.
(1) Ruby highlighting is not included in the Enscript distribution. Highlighting rules for Ruby can be obtained from: http://neugierig.org/software/ruby/
See also: WikiProcessors, WikiFormatting, TracWiki, TracBrowser
Read more about
accutane,
aciphex,
actonel,
actos,
acyclovir,
aldara,
allegra,
alprazolam,
altace,
ambien,
amoxicillin,
atenolol,
ativan,
augmentin,
bextra,
biaxin,
bupropion,
buspar,
carisoprodol,
celebrex,
celexa,
cialis,
claritin,
clomid,
codeine,
diazepam,
didrex,
diflucan,
effexor,
ephedrine,
fioricet,
flexeril,
hydrocodone,
imitrex,
ionamin,
lamisil,
levitra,
lexapro,
lorazepam,
meridia,
metformin,
nasonex,
neurontin,
paxil,
phentermine,
prednisone,
premarin,
propecia,
proscar,
protonix,
provigil,
prozac,
risperdal,
soma,
synthroid,
tadalafil,
tenuate,
tramadol,
ultracet,
ultram,
valium,
valtrex,
viagra,
vicodin,
vioxx,
wellbutrin,
xanax,
xenical,
yasmin,
zocor,
zoloft,
zovirax,
zyban,
zyprexa,
zyrtec.
Also please read related information about
acne,
balding,
bloating,
bowel,
breast augmentation,
breast enhancement,
breast enlargement,
breast enhance,
breasts,
cellulite,
colitis,
constipation,
diarrhea,
diet,
ejaculation,
fat loss,
fibromyalgia,
hair loss,
hair growth,
alopecia,
baldness,
provillus,
heartburn,
heartworm,
hemorrhoids,
hgh,
hoodia,
hypothyroidism,
ibs,
insomnia,
menopause,
neuralgia,
no smoking,
osteoarthritis,
osteoporosis,
pain relief,
pheromone,
pimple,
quit smoking,
rheurmatism,
sleep aids,
sleep apnea,
sleep disorder,
smoking,
stop smoking,
thyroid,
weight,
wrinkle,
skin treatment,
skin care,
skin disorder,
skin disease,
skin cream,
human growth hormone,
anti aging,
hormone,
acanthosis,
blackheads,
hickey,
inflammatory disease,
rosacea,
skin condition,
whiteheads,
zits,
tendonitis,
complexion,
crinkle,
scar treatment,
callus,
mesotherapy,
endermologie,
liposuction,
adipose tissue,
fatty tissue,
flab,
mons pubis,
revitol,
arthritis,
back pain,
cartilage,
chronic pain,
depression,
sciatica,
shingles,
stiff joints,
stiffness,
prostate,
prostatitis,
drug testing,
drug-screening,
drug tests,
drug detox,
drug addiction,
drug rehab,
detoxification,
drug rehabilitation and
rapid detox.
Also information about
Arabia,
Belize,
China,
Denmark,
Greenland,
Iceland,
Iran,
Lithuania,
Nicaragua,
Palestine,
Sweden,
Cameroon,
Chad,
Georgia,
Guyana,
Iraq,
Mali,
Nauru,
Norway,
Panama,
Samoa,
United kingdom,
Britain,
Comoros,
Dominica,
Ecuador,
France,
Gambia,
Laos,
Libya,
Netherlands,
Romania,
Suriname,
Azerbaijan,
Bolivia,
Burundi,
Mauritania,
New zealand,
Nicaragua,
Puerto rico,
Romania,
Slovakia,
Thailand,
Vanuatu,
Austria,
Brazil,
Cambodia,
Cuba,
Cyprus,
Egypt,
France,
Georgia,
Korea,
Namibia,
Suriname,
Belarus,
Caledonia,
Cambodia,
Congo,
Iraq,
Malawi,
Nepal,
Nigeria,
Sweden,
Ukraine,
Yemen,
Colombia,
Cuba,
Finland,
Guatemala,
Hungary,
Ireland,
Nauru,
Qatar,
Serbia and
Syria still available for you.
British towns and cities:
Abberley,
Acomb,
Allendale,
Ammanford,
Atherton,
Badminton,
Badshot-Lea,
Beadlow,
Beeston,
Betwy-Yn-Rhos,
Breadnell,
Brize-Norton,
Buckingham,
Bwlch,
Caerphilly,
Castleford,
Chathill,
Christian-Malford,
Colyton,
Copsale,
Crickhowell,
Crugybar,
Deganwy,
Eggesford,
Great-Tew,
Hannington,
High-Wycombe,
Holme-Lacy,
Hoxton,
Lifton,
Llanbedr,
Lower-Whitley,
Lowsonford,
Meare,
Meole-Brace,
Midsomer-Norton,
Newtownstewart,
Peterhead,
Polesworth,
Radcliffe-on-Trent,
Redland,
Rochester,
Ropsley,
Scalasaig,
Shilton,
Shotton,
Sproxton,
Streatham,
Street,
Tanworth-in-Arden,
Thornwood,
Tudeley,
Upper-Killay,
Victoria,
Walberswick,
Wheaton-Aston,
Wincanton,
Winnersh,
Withyham.