Latexki - a Latex Wiki

Welcome to the Latexki Latex Wiki self-hosting Wiki by Joachim Breitner.

Feel free to explore and use the wiki as usual, but please refrain from substantial changes to the source code files without my consent, or I will have to implement the page lockdown feature from the TODO list next.

For questions and comments, please use the FeedBack page.

Aims and Goals

Current Features


Pages can be either plain wiki pages or fullfledged LaTeX pages, or even LaTeX pages that consist of several LaTeX pages around. The first page of the produced document is put as a PNG preview on the corresponding HTML page. A list of chapters in the document is presented with the option of editing just a selected chapter for better overview.


The wiki is Subversion-driven. All source files are in a Subversion repository, and the HTML or PDF files you see here are created by the Haskell program latexki from a post-commit hook. Edits can either happen through the web browser or, more comfortable, directly to the Subversion repository.

CGI Interface

For the spontaneous user, a web interface to add and edit pages exists. It is based on python and pysvn, for the code, see cgi-edit.

Dependency Checking

The latexki program acts a bit like "make" in a sense that it only re-creates pages that need updates because they or one of their dependencies have changed.


Lots of course, patches welcome

Wiki Syntax

Simple Wikisyntax, supports:


And of course, simple paragraphs, separated by empty lines.

Special keywords on a wiki page can so special stuff, set inbetween two pairs of #'s, as an example:


Hello World

We also have special commands on SiteMap and RecentChanges.


I assume you have a subversion repository on your server, and the user "svn" can write to it. Here is how I set up this latexki:

A user is created for creating the webpage. He needs write permission on the output directories, and read permission on the svn repositories. I called the account "latexki".

I exported the latexki repository (which is what this wiki displays) to /opt/latexki, compiled the program and gave it the suid flag.

svn export --force  svn:// /opt/latexki
chown -R latexki: /opt/latexki
cd /opt/latexki; ghc -O --make latexki.hs -o latexi
chmod +s /opt/latexki/latexki

This could of course also be done on a differnet host, to run latexki, you only need cgi-* and the latexki binary.

The Virtual Host configuration looks like this:

<VirtualHost *:80 *:443>
  DocumentRoot /var/www/
  ScriptAliasMatch ^/cgi/([^/]+)(/.*)?$ /opt/latexki/cgi-$$2
  SetEnv HTTP_LATEXKI_REPOS "file:///var/svn/latexki"

The ScriptAliasMatch makes the nice "/cgi/something" links work. The HTTP_LATEXKI_REPOS enviroinment variable tells the script what repository this wiki is about - you can have more than one instances on one server, of course.

Now you just have to make the svn-hook:

/opt/latexki/latexki file://$REPOS /var/www/

Of course, replace file:///var/svn/latexki with your wiki's repository and /var/www/ with the directory where you want the pages to be generated in.

This should be a relatively sane setup, but I'm open for comments.


This wiki originated in a private LaTeX-extended version of kwiki at ...

This whole setup is similar to Joey's ikiwiki, although developed independently of it.

Contact & Copyright

Latexki © 2006-2009 Joachim Breitner <>