Posts Tagged ‘wiki’


Gollum on Ubuntu/Linux Mint

In howto on Sep 11, 2013 by theoryl Tagged: , , , , , , , ,

Gollum is the wiki engine that is developed and deployed by GitHub. The codes are hosted at It supports many syntaxes, including Markdown, ReStructuredText, Textile, MediaWiki, etc. To install:

On Linux Mint 13 “Maya” (based on Ubuntu 12.04 “Precise Pangolin”), first get Ruby and RubyGems:

sudo apt-get install ruby1.9.1 ruby1.9.1-dev rubygems1.9.1

Then install Gollum via RubyGems:

sudo gem install gollum

An alternative to install Gollum is to build from source (taking version 2.5.0 as example):

git clone
cd gollum
gem build gollum.gemspec
sudo gem install gollum-2.5.0.gem

If you build Gollum from source, you might also want to build its library from source (

To use it, simply create a Git repository:

mkdir ~/Wiki
cd ~/Wiki
git init
gollum .

Now point the browser to http://localhost:4567/, and you have a fully functional Wiki site up and running. As a bonus, it is automatically versioned by Git every time you create/edit a Wiki entry.

One downside thus far is that Gollum doesn’t support multiple repositories and multiple users.

Read More »



rst2wiki with math support

In howto on Jul 3, 2012 by theoryl Tagged: , , , , , ,

Another post about reStructuredText: can you convert reStructuredText into Wiki format? I found in Docutils sandbox a tool: rst2wiki. It currently supports conversion to TWiki and Atlassian Confluence. rst2wiki is available through SVN (web-access)

In Docutils >= 0.8, there is “math” support; on the other hand, TWiki can display LaTeX equations if MathModePlugin is installed and set up properly. The syntax is

<latex [attr="value"]* > formula </latex>

In order to use rst2wiki with math support, we will modify In class WikiTranslator, add:

    # Start Math
    def visit_math(self, node):
        if self.math_start:

    def depart_math(self, node):
        if self.math_end:
    # End Math

In class TWikiTranslator, add:

        self.math_start = '<latex>'
        self.math_end = '</latex>'

Done :)


Using mathrsfs script fonts in MediaWiki

In howto on Jan 28, 2011 by theoryl Tagged: , , , , , , , ,

This is in Ubuntu Lucid Lynx 10.04:

The RSFS fonts give you very nice script fonts:

The top row shows the fonts from the command \mathscr while the bottom from \mathcal, which \LaTeX users should be more familiar with.

In order to use the RSFS fonts in \LaTeX, you would add the preamble \usepackage{mathrsfs} in the .tex file. But what if you want to use the RSFS fonts in MediaWiki (the software that powers the Wikipedia), which by default does not include the preamble?

It turns out that you have to compile texvc (the \LaTeX interpreter incorporated into MediaWiki) with some slight modifications to (located in the source directory mediawiki/math). Basically, you want to add the preamble into that file. Below is what I did:

  • First, make sure you have installed mathrsfs.sty in the \LaTeX environment. If not, you can download it from In Ubuntu 10.04, it should be located at /usr/share/texmf-texlive/tex/latex/jknapltx/mathrsfs.sty.
  • Get the MediaWiki source from repo: sudo apt-get source mediawiki. Install all the dependencies as well.
  • Get its compiler: sudo apt-get install ocaml-nox gcc.
  • Now cd to the math directory: cd /var/lib/mediawiki/mediawiki-1.15.1/math
  • Edit the file Find the line beginning with: (if !modules_ams then "\\usepackage{amsmath}\n
  • Now, add: "\\usepackage(mathrsfs)\n" among the preambles.
  • Add another line close to the end of the file: | "\\mathscr" -> (tex_use_ams (); FUN_AR1 "\\mathscr ").
  • Compile: sudo make
  • After it is compiled successfully, copy the executable: sudo cp texvc /usr/bin

Make sure TeX is enabled in MediaWiki config file LocalSettings.php. If not, append the line to the file: $wgUseTeX = true ;.

That’s it. You should be able to use the command \mathscr in your MediaWiki!