File: source-highlight.html

package info (click to toggle)
source-highlight 1.11-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,872 kB
  • ctags: 4,699
  • sloc: sh: 3,633; cpp: 2,606; lex: 2,463; ansic: 1,610; makefile: 537; php: 185; perl: 145; yacc: 122; ruby: 63; sed: 53; python: 45; ml: 38; java: 30
file content (412 lines) | stat: -rw-r--r-- 24,902 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
  <meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-1">
  <meta name="GENERATOR"
 content="Mozilla/4.79 [en] (X11; U; Linux 2.4.18-6mdk i686) [Netscape]">
  <meta name="Author" content="Lorenzo Bettini">
  <title>GNU Source-highlight - GNU Project - Free Software Foundation
(FSF)</title>
</head>
<body style="background-color: rgb(255, 255, 255);">
<h1> GNU Source-highlight 1.11</h1>
<p>by <a href="http://www.lorenzobettini.it">Lorenzo Bettini</a> </p>
<p>This program, <i>given a source file, produces a document with
syntax highlighting</i>. </p>
<p>At the moment this package can handle </p>
<ul>
  <li> <i><font color="#990000">Java</font></i></li>
  <li><i><font color="#990000">Javascript</font></i></li>
  <li><i><font color="#990000">C/C++</font></i></li>
  <li> <i><font color="#990000">Prolog</font></i></li>
  <li> <i><font color="#990000">Perl</font></i></li>
  <li> <i><font color="#990000">Php3</font></i></li>
  <li> <i><font color="#990000">Python</font></i></li>
  <li> <i><font color="#990000">Flex</font></i></li>
  <li> <i><font color="#990000">ChangeLog</font></i></li>
  <li> <i><font color="#990000">Ruby</font></i></li>
  <li><i><font color="#990000">Lua</font></i></li>
  <li><i><font color="#990000">Caml</font></i></li>
  <li><i><font color="#990000">Sml</font></i></li>
  <li><i><font color="#990000">Log&nbsp;</font></i><b><font
 face="Arial,Helvetica"><font color="#ff0000"></font></font></b></li>
</ul>
as source languages, and
<ul>
  <li> <i>HTML</i></li>
  <li> <i>XHTML</i></li>
  <li><i>ANSI color escape sequences</i> (<a href="#with_less">you can
use this feature with less</a>)</li>
</ul>
as output formats.
<p><font color="#990000">NOTICE: now the name of the program is </font><b><i><font
 color="#663366">source-highlight</font></i></b><font color="#990000">:
there are no two separate programs, namely <i>java2html</i> and <i>cpp2html</i>,
anymore.&nbsp; However there are two shell scripts with the same name
in order to facilitate the migration (however their use is not
advised).</font> </p>
<p>GNU Source-highlight is <b><font color="#009900">free software</font></b>.
Please see the file <a href="COPYING">COPYING</a> for details. For
documentation, please read this file. </p>
<p>GNU Source-highlight is a <a href="http://www.gnu.org">GNU</a>
program and its main home page is at GNU site: <br>
<a href="http://www.gnu.org/software/src-highlite/source-highlight.html">http://www.gnu.org/software/src-highlite/source-highlight.html</a>
</p>
<h2> Download</h2>
You can download it from GNU's ftp site: <br>
<a href="ftp://ftp.gnu.org/gnu/src-highlite/">ftp://ftp.gnu.org/gnu/src-highlite/</a>
or from one of its mirrors (see <a
 href="http://www.gnu.org/prep/ftp.html">http://www.gnu.org/prep/ftp.html</a>).
<p>I do not distribute Windows binaries anymore; since, they can be
easily built by using <b>Cygnus C/C++</b> compiler, available at <a
 href="http://www.cygwin.com/">http://www.cygwin.com/</a>. However, if
you don't feel like downloading such compiler, you can request such
binaries directly to me, by e-mail (find my e-mail at my <a
 href="http://www.lorenzobettini.it/">home page</a>)
and I can send them to you. <br>
An MS-Windows port of Source-highlight is available from <a
 href="http://gnuwin32.sourceforge.net/">http://gnuwin32.sourceforge.net/</a>.</p>
<p>You may also want to check the <i>md5sum</i> of the archives, which
are also digitally signed by me (<i>Lorenzo Bettini</i>) with <i>GNU
gpg </i>(<a href="http://www.gnupg.org">http://www.gnupg.org</a>). My
GPG public key can be found at my home page (see at the end of this
doc). </p>
<p>You can also get the patches, if they are available for a particular
release (see <a href="#Patching%20from%20a%20previous%20version">below</a>
for patching from a previous version). </p>
<h3> Anonymous CVS Access</h3>
This project's CVS repository can be checked out through anonymous
(pserver) CVS with the following instruction set. When prompted for
a password for anoncvs, simply press the Enter key.
<pre>cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/src-highlite login</pre>
<pre>cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/src-highlite co src-highlite</pre>
Further instructions can be found at the address: <a
 href="http://savannah.gnu.org/projects/src-highlite">http://savannah.gnu.org/projects/src-highlite</a>.
<h2> Changes in this release</h2>
<ul>
  <li> see <a href="NEWS">NEWS</a> file for a summary of new features
in
this release and</li>
  <li> see ChangeLog for the complete list of changes sources</li>
</ul>
<h2> Related Software and Links</h2>
Martin Gebert is also implementing a KDE interface to source-highlight
programs, at
the moment it is still in beta (but he did a wonderful job!), and it
is called <b>ksrc2html</b>; if you want to test it: <a
 href="http://murphy.netsolution-net.de/Ksrc2.html">http://murphy.netsolution-net.de/Ksrc2.html</a>.
<p>CGI support was enabled thanks to Robert Wetzel;
I haven't tested it personally yet, so you may ask him directly.
Moreover he set up some examples at the page <a
 href="http://www.inf.tu-dresden.de/%7Erw8/java2.html">http://www.inf.tu-dresden.de/~rw8/java2.html</a>.
If you want to use source-highlight as a CGI program, you have to use
the executable <b>source-highlight-cgi</b>. </p>
<p>Moreover there's also a Java version of java2html, you can find it
at <a href="http://www.generationjava.com/projects/Java2Html.shtml">http://www.generationjava.com/projects/Java2Html.shtml</a>.</p>
<h2> Installation</h2>
See the file <a href="INSTALL">INSTALL</a> for detailed building and
installation instructions; anyway if you're used to compiling Linux
software that comes with sources you may simply follow the usual
procedure:
<pre>cd <i>&lt;source code main directory&gt;<br></i><tt>./configure<br>make<br>make install</tt></pre>
Note: unless you specify a different install directory by --prefix
option of configure (e.g. <tt>./configure --prefix=<i>&lt;your
home&gt;</i></tt>), you must be root to '<tt>make install</tt>'.
<p>It is also possible to specify as following option for <i>configure</i>:<i>--enable-input-chroot</i>
to hardcode in the program the path to prefix for input files. </p>
<p>Before you run '<tt>make install</tt>' you may want to check that
the programs have compiled fine, so you can run '<tt>make check</tt>'. </p>
<p>Files will be installed in the following directories: </p>
<ul>
  <li> <tt>Executables&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-&gt; /prefix/bin</tt></li>
  <li> <tt>docs and samples&nbsp;&nbsp;&nbsp;&nbsp; -&gt;
/prefix/share/doc/source-highlight</tt></li>
  <li> <tt>conf
files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;
/prefix/share/source-highlight</tt></li>
</ul>
Default value for prefix is <tt>/usr/local</tt> but you may change it
with --prefix option to configure (see above).<br>
<h3>Building .rpm</h3>
Christian W. Zuckschwerdt added support for building an .rpm and an
.rpm.src. &nbsp;You can issue the following command<br>
<pre>rpm -tb source-highlight-1.11.tar.gz<br></pre>
for building an .rpm with binaries and
<pre>rpm -ts source-highlight-1.11.tar.gz<br></pre>
for building an .rpm.src with sources.
<h3> What you need to build source-highlight</h3>
<b><font color="#ff0000">Actually you need nothing more than a Unix
C/C++ compiler</font></b>
<p>source-highlight has been developed under <font color="#008000">Linux</font>,
using <b>gcc</b> (C++), and <b>bison</b> (yacc) and <b>flex</b>
(lex),
and ported under <font color="#008000">Win32</font> with <b>Cygnus
C/C++</b>compiler, available at <a href="http://www.cygwin.com/">http://www.cygwin.com/</a>
(a
.DLL is also distributed together with the .exe: you may simply copy it
in the same place of the .exe). I used the excellent GNU <b>Autoconf</b>and<b>Automake</b>.
I also used <b>Autotools </b>(<a
 href="ftp://ftp.ugcs.caltech.edu/pub/elef/autotools">ftp://ftp.ugcs.caltech.edu/pub/elef/autotools</a>)
which creates a starting source tree (according to GNU standards) with
autoconf, automake starting files. Finally I used GNU <b>gengetopt</b>
(<a href="http://www.gnu.org/software/gengetopt">http://www.gnu.org/software/gengetopt</a>),
for command line parsing. </p>
<p>Actually, unless you want to develop source-highlight, you don't
need all these tools to build source-highlight because I provide
generated sources; you don't need neither bison (yacc) nor flex
(lex), for the same reason. Actually programs that use lex generated
files need to link with library<i>libfl </i>(or <i>libl </i>for
lex); anyway configuration phase can discover if this library is
missing and in that case it sets the program to link with a source
file I provide. This hack works for flex: I don't know about lex
generated scanners. But, again, this is a problem only if you develop
source-highlight and you use lex. </p>
<h3> <a name="Patching from a previous version"></a>Patching from a
previous version</h3>
If you downloaded a patch, say <tt>source-highlight-1.3-1.3.1-patch.gz</tt>(i.e.
the patch to go from version 1.3 to version 1.3.1), cd to the directory
with sources from the previous version (<tt>source-highlight-1.3</tt>)
and type:
<pre>gunzip -cd ../source-highlight-1.3-1.3.1.patch.gz | patch -p1</pre>
and restart the compilation process (if you had already run configure a
simple <tt>make</tt> will do).
<h2> Usage and examples</h2>
source-highlight only does a lexical analysis of the source code, so
the program source is assumed to be correct !
<p>here's how to run source-highlight (for this example we will use <i>C/C++</i>input
files, but this is valid also for other source-highlight input
languages): </p>
<pre>source-highlight --src-lang cpp --out-format html --input <i>&lt;file (a C++ prog)&gt;</i> --output <i>&lt;file (an html)&gt;</i> [options]</pre>
For input files, apart from the <i>-i</i> (<i>--input</i>) option and
the standard input redirection, you can simply specify some files at
the command line and also use regular expressions (for instance <i>*.java</i>).&nbsp;
In this case the name for the output files will be formed using the
name of the source file with a .&lt;ext&gt; appended, where
&lt;ext&gt; is the extension chosen according to the output format
specified (in this example it would be .html).
<p>If <tt>STDOUT</tt> string is passed as <i>-o</i> (<i>--output</i>)
option, then the output is forced to the standard output anyway. </p>
<p><b>Required command line option</b> is: </p>
<ol>
  <li><i>--out-format</i> (or <i>-f</i>) &lt;format&gt;:
where &lt;format&gt; can only be:</li>
  <ul>
    <li> <i>html</i></li>
    <li> <i>xhtml</i></li>
    <li><i>esc<br>
      </i></li>
  </ul>
This specifies the format for the output of the highlighter (for the
moment only html output can be produced).
</ol>
<b>Other command line options</b>: <br>
<i><br>
</i><span style="font-weight: bold;">--src-lang</span> (or <i>-s</i>)
&lt;lang&gt;: where
&lt;lang&gt; can be:
<ul>
  <li> <i>java</i> (for Java)</li>
  <li><span style="font-style: italic;">javascript</span> (for
Javascript)<br>
  </li>
  <li> <i>cpp</i> (for C/C++)</li>
  <li> <i>prolog</i> (for Prolog)</li>
  <li> <i>perl</i> (for Perl)</li>
  <li> <i>php3</i> (for Php3)</li>
  <li> <i>python</i> (for Python)</li>
  <li> <i>flex</i> (for flex)</li>
  <li> <i>changelog</i> (for ChangeLog)</li>
  <li><i>ruby</i> (for Ruby)</li>
  <li><span style="font-style: italic;">lua</span> (for Lua)</li>
  <li><span style="font-style: italic;">caml</span> (for Caml)</li>
  <li><span style="font-style: italic;">sml</span> (for Sml)</li>
  <li><span style="font-style: italic;">log</span> (for log files,
e.g., system logs, apache and IpTables)<br>
  </li>
</ul>
This specifies the language used to write the sources that have to be
processed.&nbsp; If you do not specify this option, source-highlight
will guess the source language from the file extension.<br>
<br>
If you want a real html document, specify <b>--doc</b> option at the
end. Otherwise you just get some text to copy and paste in you own html
pages. If you choose -doc option the page will have a white background
and your source file name as title. <b>--tab n</b> option apply a
substitution of tab characters with <i>n</i> spaces. You also may want
to specify the title of the page with <b>--title "my title" </b>option
(this implies -doc). You can also generate an html with CSS format,
by using <b>--css "url of .css"</b> (try some .css files included in
the package). If you want to cancel the --doc option when it is implied
(e.g. with --title and --css) you can do that with <b>--no-doc</b>.
The order of the options is not relevant. You may also
want to customize the produced document: you can use<b>--header</b> and
<b>--footer</b>
options that allow you to specify files to be included, respectively,
at
the beginning and at the end of the document.<b>--tags-file</b> allows
to specify the location of the file for format options (see
below).&nbsp; <b>--output-dir</b> specifies the output directory (if
the <i>output</i> option is not specified the same directory of the
source file is used).&nbsp; <b>--line-number</b> option enables
generation of line numbers.&nbsp; <b>--line-number-ref</b> also add an
anchor that can be referred to from another document.
<p>Here are some links to some of the C and C++ sources of
source-highlight colored with source-highlight itself: </p>
<blockquote><a href="startapp.cc.html">startapp.cc.html</a></blockquote>
generated with the following command
<blockquote>
  <pre>source-highlight -s cpp -f html --doc startapp.cc</pre>
</blockquote>
Obviously it works with C files as well:
<blockquote><a href="cmdline.c.html">cmdline.c.html</a></blockquote>
Created with the command (notice that this one uses both CSS file and
headers and footers):
<blockquote>
  <pre>source-highlight -s cpp -f html -i cmdline.c -o cmdline.c.html&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --css="cpp2html.css"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --header="./header.html" --footer="./footer.html"</pre>
</blockquote>
And obviously it works with header file as well:
<blockquote><a href="cmdline.h.html">cmdline.h.html</a></blockquote>
created with the command:
<blockquote>
  <pre>source-highlight -s cpp -f html *.h --css="mono.css"</pre>
</blockquote>
Here are some examples of Java files processed with source-highlight:
Use <a href="Hello.java">Hello.java</a> to make some test, if you
want. Here's how <a href="Hello1.html">Hello1.html</a>, <a
 href="Hello2.html">Hello2.html</a>, <a href="Hello3.html">Hello3.html</a>,
<a href="Hello4.html">Hello4.html</a>, <a href="Hello5.html">Hello5.html</a>,
<a href="Hello_h_f.html">Hello_h_f.html</a>, <a href="Hello_lines.html">Hello_lines.html</a>,
<a href="Hello_xhtml.html">Hello_xhtml.html</a>, <a
 href="Hello_xhtml2.html">Hello_xhtml2.html</a> were created:
<pre>source-highlight -s java -f html -i Hello.java -o Hello1.html<br>source-highlight -s java -f html --input Hello.java --output Hello2.html --doc<br>source-highlight -s java -f html -i Hello.java -o Hello3.html --title "Happy Java with java2html :-)" --tab 3<br>source-highlight -s java -f html &lt; Hello.java &gt; Hello4.html --title "and what about CSS :-)" --css "Hello.css"<br>source-highlight -s java -f html &lt; Hello.java &gt; Hello5.html --title "Wooo... this is quite dark ;-D" --css "mono-alt.css"<br>source-highlight -s java -f html --doc *.java<br>Processed Hello.java&nbsp;&nbsp; <i>(creates Hello.java.html)<br></i>source-highlight -s java -f html --doc -i Hello.java -o Hello_h_f.html --tags-file="tags2.j2h" --header="header.html" --footer="footer.html"<br>source-highlight -s java -f html --line-number --doc -i Hello.java -o Hello_lines.html<br>source-highlight -s java -f xhtml --doc -i Hello.java -o Hello_xhtml.html --css xhtml.css<br>../src/source-highlight -s java -f xhtml --doc -i Hello.java -o Hello_xhtml2.html --tags-file tags.j2h</pre>
Here's the output of source-highlight applied to a Prolog program
(through the option `<tt>source-highlight -s prolog</tt>`: <a
 href="test.pl.html">test.pl.html</a>.&nbsp; This one is an
highlighted Perl program (through the option `<tt>source-highlight -s
prolog</tt>`): <a href="test.pm.html">test.pm.html</a>.&nbsp; Here's
an
highlighted PHP3 program: <a href="test.php3.html">test.php3.html</a>.
And here's a Python program: <a href="test.py.html">test.py.html</a>.&nbsp;
This the the flex scanner for flex files <a href="flex_scanner.ll.html">flex_scanner.ll.html</a>.
This is a Ruby
program: <a href="test.rb.html">test.rb.html</a>. This is a Javascript
program <a href="test.js.html">test.js.html</a>.&nbsp; This is a Lua
test program <a href="test.lua.html">test.lua.html</a>.&nbsp; This is
a Caml test program <a href="test.ml.html">test.ml.html</a> and this
is an Sml test program <a href="test.sml.html">test.sml.html</a>.&nbsp;
<br>
<br>
Here are some log files formatted using the color file <a
 href="tags.syslog">tags.syslog</a>: <br>
<ul>
  <li><a href="test.log.html">test.log.html</a>,</li>
  <li><a href="access.log.html">access.log.html</a>,</li>
  <li><a href="auth.log.html">auth.log.html</a>,</li>
  <li><a href="error.log.html">error.log.html</a>,</li>
  <li><a href="syslog.log.html">syslog.log.html</a>.<br>
  </li>
</ul>
<p>You can pass the output of source-highlight, when using <span
 style="font-family: monospace;">esc</span> as output format (that
generates ANSI color escape sequences), directly to <span
 style="font-family: monospace;">less</span>, this way:<br>
</p>
<pre>source-highlight -f esc -i Hello.java -s java | less -R<br></pre>
<p>And here's the output of `<tt>source-highlight --help</tt>` </p>
<pre>GNU source-highlight 1.11<br>&nbsp;<br>Purpose:<br>&nbsp; Highlight the syntax of a source file (e.g. Java)<br>&nbsp; into a specific format (e.g. HTML)<br>&nbsp;<br>Usage: source-highlight [OPTIONS]... [FILES]...<br><br>  -h, --help               Print help and exit<br>  -V, --version            Print version and exit<br>  -i, --input=STRING       input file. default std input<br>  -o, --output=STRING      output file. default std output<br>  -s, --src-lang=STRING    source language (e.g. java, javascript, cpp, <br>                             prolog, perl, php3, python, ruby, flex, <br>                             changelog, lua, caml, sml, log).   If not <br>                             specified, the source language will be <br>                             guessed from the file extension.<br>  -f, --out-format=STRING  output format (e.g. html, xhtml, esc)<br>  -v, --verbose            verbose mode on<br>  -d, --doc                create html with title and header<br>      --no-doc             cancel the --doc option even if it is implied<br>                             (e.g., when css is given)<br>  -c, --css=STRING         use a css for formatting. Implies --doc<br>  -T, --title=STRING       give a title to the html. Implies --doc<br>  -t, --tab=INT            specify tab length. default 8<br>  -H, --header=STRING      file to insert as header<br>  -F, --footer=STRING      file to insert as footer<br>      --tags-file=STRING   specify format options (def. tags.j2h)<br>  -n, --line-number        number all output lines<br>      --line-number-ref    number all output lines and generate an anchor that<br>                             can be referred to from another document<br>      --output-dir=STRING  output directory<br>      --gen-version        put gengetopt version in the generated file<br>                             (default=on)<br></pre>
As it handles standard output and input you may also run it like
<pre>cat MyFile.cpp | source-highlight -s cpp -f html | lpr</pre>
You may want to specify your options for syntax highlighting in the
file <b>tags.j2h</b>. If this file is not present in the current
directory, some default colors will be used. Here's the <tt>tags.j2h</tt>
file that comes with this distribution:
<pre>keyword blue b ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // <i>for language keywords<br></i>type darkgreen ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>// for basic types<br></i>string red ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>// for strings and chars<br></i>comment brown i ;&nbsp;&nbsp;&nbsp;&nbsp; <i>// for comments<br></i>number purple ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>// for literal numbers<br></i>preproc darkblue b ;&nbsp; <i>// for preproc directives (e.g. #include, import)<br></i>symbol darkred ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>// for simbols (e.g. &lt;, &gt;, +)<br></i>function black b;&nbsp;&nbsp;&nbsp;&nbsp; <i>// for function calls and declarations<br></i>cbracket red;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>// for block brackets (e.g. {, })<br></i><br><span
 style="font-style: italic;">// line numbers</span><br>linenum black;<br><br><span
 style="font-style: italic;">// other elements for ChangeLog and Log files</span><br>date blue b ;<br>time darkblue b ;<br>ip darkgreen ;<br>file darkblue b ;<br>name darkgreen ;<i><br></i></pre>
<b>tags2.j2h</b> also specify the color of normal text, indeed it adds
this line
<pre>normal darkblue ;</pre>
as you might see the syntax of this file is quite straightforward:
<ul>
  <li> b = bold</li>
  <li> i = italics</li>
  <li> u = underline</li>
</ul>
You may also specify more than on of these options separated by commas<br>
e.g.
<pre><tt>keyword blue u, b ;</tt></pre>
you may see all possible colors in the file <a href="colors.html">colors.html</a>
but you can also use the standard #&lt;number&gt; html syntax for
specifying a color.
<p>if something goes wrong with your options try to run
source-highlight with <tt>--verbose</tt> option enabled.<br>
</p>
<h2><a name="with_less"></a>Use source-highlight with less</h2>
This was suggested by Konstantine Serebriany.<br>
The script <span style="font-family: monospace;">src-hilite-lesspipe.sh</span>
will be installed together with source-highlight.<br>
You can use the following environment variables:<br>
<pre wrap="">export LESSOPEN="| /path/to/src-hilite-lesspipe.sh %s"<br>export LESS=' -R '<br></pre>
This way, when you use less to browse a file, if it is a source file
handled by source-highlight, it will be automatically highlighted.<br>
<p> </p>
<h2> Credits</h2>
See CREDITS for detailed contributions and THANKS&nbsp; for a complete
list of people that
helped me with Source-highlight :-)
<h2> Feedback</h2>
Please tell me if you like this software :-)
<p>Actually I want to extend it, so if you have some ideas... <br>
The most import one will be to make source-highlight more customizable
:-) </p>
<p>Please send all bug reports by electronic mail to: <br>
<font color="#3333ff">bug-source-highlight at gnu dot org</font>
</p>
<h1> TODO</h1>
Here's the <a href="TODO.txt">list of TODO stuff</a>, if you'd like to
contribute :-)
<h1> Mailing Lists</h1>
The following mailing lists are available:
<ul>
  <li> <font color="#3333ff">help-source-highlight at gnu dot org</font>,
for generic discussions about the program and for asking for help about
it (open mailing list), <a
 href="http://mail.gnu.org/mailman/listinfo/help-source-highlight">http://mail.gnu.org/mailman/listinfo/help-source-highlight</a></li>
  <li> <font color="#3333ff">info-source-highlight at gnu dot org</font>,
for receiving information about new releases and features (read-only
mailing list), <a
 href="http://mail.gnu.org/mailman/listinfo/info-source-highlight">http://mail.gnu.org/mailman/listinfo/info-source-highlight</a></li>
</ul>
if you want to subscribe to a mailing list just go to the URL and
follow the instructions, or send me an e-mail and I'll subscribe
you.
<p>My home page is <a href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a>
</p>
<p>source-highlight is free software. See the file COPYING for copying
conditions. Anyway I won't get offended if you send me a postcard :-) </p>
<p> </p>
<hr>
<p>Return to <a href="/home.html">GNU's home page</a>. </p>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <i><a
 href="mailto:gnu@gnu.org">gnu@gnu.org</a></i>. There are also <a
 href="http://www.gnu.org/home.html#ContactInfo">other ways to contact</a>
the FSF. </p>
<p>Please send comments on these web pages to <i><a
 href="mailto:webmasters@gnu.org">webmasters@gnu.org</a></i>, send
other questions to <i><a href="mailto:gnu@gnu.org">gnu@gnu.org</a></i>.</p>
<p>Copyright (C) 2001 Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111, USA </p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved. </p>
<p>Updated:<!-- hhmts start -->9 Jan 2001 mhw<!-- hhmts end --> <br>
</p>
<hr> <br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>