[Halld-offline] code blocks + syntax highlighting on wiki
David Lawrence
davidl at jlab.org
Tue Sep 25 09:39:03 EDT 2012
Hi All,
At Paul's suggestion I have downloaded and installed an extension to
our wiki for syntax highlighting of source code. The documentation can
be found here:
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi
The short tutorial is: wrap your code block in <syntaxhighlight>
</syntaxhighlight> tags.
You can also have it add line numbers and/or highlight a specific line
you want to emphasize.
Multiple languages are supported, but I have set the default to C++ so
no language needs
to be specified for C++ code.
To see an example of this on our wiki, look here:
https://halldweb1.jlab.org/wiki/index.php/HOWTO_extract_photons_or_pi0%27s_from_the_framework
One additional note: I have created a file README.JLab in the directory
where the wiki source files
are kept. I have written down details there on what changes were made
and why regarding this
extension as well as a few others. The intent is for this to help with
maintaining the wiki and help
remind us what needs to be done when we upgrade again at some point in
the future. Please help
keep this file up to date if additional extensions are installed as well
as other modifications.
Regards,
-David
More information about the Halld-offline
mailing list