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
- Not a general purpose wiki, but a collaboration tool to create LaTeX documents
- Focus on LaTeX document creation, the "regular" wiki pages are just supporting this
- Subversion access for advanced users
- Editing via CGI should be safe (e.g. conflicts are either solved by subversion or displayed to the user)
- Should replace the old software http://lkwiki.nomeata.de/ fully
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.
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.
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
- Nicer HTML output
- Nicer CGI interface
- Proper encoding handling (currently on a "hope it works" basis)
- Per-Page-Last-Diff display (or possibly link to wsvn, or unfolable with AJAX)
- Syntax Highlighting for Haskell, Latex, Python
- Spam protection
- RSS generation
- CGI interface to svn move, svn rm
- Protection of certain pages from cgi access using svn properties
- Turing all haskell code to latex-embedded literate haskell. After all, this is a LaTeX wiki.
- A nice logo :-)
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:
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 email@example.com 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.
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 <firstname.lastname@example.org>