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

Latex

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.

Subversion

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.

TODO

Lots of course, patches welcome

Wiki Syntax

Simple Wikisyntax, supports:

Preform
       atted
             content

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!!

Hello World

We also have special commands on SiteMap and RecentChanges.

Deployment

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://svn.nomeata.de/latexki /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>
  ServerName latexki.nomeata.de
  ServerAdmin mail@joachim-breitner.de
  DocumentRoot /var/www/latexki.nomeata.de/
  ScriptAliasMatch ^/cgi/([^/]+)(/.*)?$ /opt/latexki/cgi-$1.py$2
  SetEnv HTTP_LATEXKI_REPOS "file:///var/svn/latexki"
</VirtualHost>

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:

#!/bin/sh
REPOS="$1"
REV="$2"
/opt/latexki/latexki file://$REPOS /var/www/latexki.nomeata.de/

Of course, replace file:///var/svn/latexki with your wiki's repository and /var/www/latexki.nomeata.de/ 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.

History

This wiki originated in a private LaTeX-extended version of kwiki at http://lkwiki.nomeata.de/ ...

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

Contact & Copyright

Latexki © 2006-2009 Joachim Breitner <mail@joachim-breitner.de>