2

I want to add highlighted Mathematica source code to Wikipedia pages, samples of brief apps like those in WR's Tweet-a-Program.

Currently, there's good support for Mathematica syntax highlight in prettify.js, and this is what mathematica.stackexchange.com and the Wolfram Community use to display code.

I know that Wikipedia supports Geshi, however Geshi lacks Mathematica support, and I want to avoid messing with that, as I haven't done regex for a while.

Can Prettify.js be used to highlight code posted in Wikipedia?

Community
  • 1
  • 1
andandandand
  • 21,946
  • 60
  • 170
  • 271
  • Do you want to install it on your own mediawiki, or do you want to enable it on wikipedia? – Bergi Apr 23 '15 at 16:35
  • @Bergi: I want to enable it on Wikipedia, I know that prettify.js can be used on personal Mediawikis http://www.richardnichols.net/2010/04/adding-google-prettify-syntax-highlight-to-mediawiki/ – andandandand Apr 23 '15 at 17:09
  • You can start reading at https://en.wikipedia.org/wiki/Wikipedia:User_scripts – leo Apr 23 '15 at 19:12
  • 1
    Reported at https://phabricator.wikimedia.org/T97981 – MaxSem May 04 '15 at 10:27
  • Thanks MaxSem, this file can be useful for this too. https://github.com/cglosser/geshi-1.0/blob/master/src/geshi/mathematica.php – andandandand May 08 '15 at 10:54

1 Answers1

1

You can also use it with an add-on like greasemonkey. (I don't have the rep to comment, have to put this as an answer).