Wiχi
About
Wiχi is a LaTeX-based document workbench and Wiki designed to keep collections of documents that do not constitute a website and stand alone on their own merits. Consider a file browser with the ability to edit information inline through a nice, versioned interface.
Wiχi is both a web service and a library:
- The library manages a repository folder, which contains the full hierarchy of documents, templates, images and other files. A small header at the beginning of each file indicates how to compile it, and it is combined with other documents prior to being run though LaTeX. The output is presented as a string after optional postprocessing.
- The web front-end provides the ability to edit, delete and upload documents, version control, many ways of viewing and compiling output as HTML, and a handy interface for managing settings. It gradually became a more practical way to edit documents than a text editor, though it provides the information to launch a text editor on the file directly, and I recommend the use of something like It's all Text to edit the pages.
Cool Stuff that is Supported
Wiχi supports a number of cool things, partially because its design is quite light on files...
- Macros — Ruby scripts that extend the
Macro class can autogenerate LaTeX to manage references, tables and other tedious things.
- BibTeX Support — BibTeX files are parsed and attached to LaTeX files, and the web front-end includes an interface to view and validate references. All are searchable using the normal search tools.
- Presentation formats — Swapping the template on a file is trivial, so multiformat or weird document templates can be produced. Essentially, style-content separation is improved.
- Human-manageable storage — Everything is stored in the directory tree you see. No hidden files or other RCS-style voodoo. My current backup system is dropbox.
- Search and compile without Wiχi — The method of combining documents is simple enough that it can be done manually without much effort, and files & their contents may be found using conventional shell tools such as grep (though there is an interface in the web front end too).
- Template support — The web interface is fully template driven, so can be customised to your heart's extent.
Cool Stuff that isn't Supported
The library was never designed for concurrent access. The web interface is entirely stateless except for cookie informsation, but there is the possiblity of overwriting one anothers' files when editing. Since the system is not designed as a public wiki this shouldn't be a problem.
Download
Download WiXi.tar.gz.
Usage & Configuration
Running the wiki is as simple as providing a folder to serve, thus:
$ ./launch.rb /home/extremetomato/wixi
[2011-08-15 17:05:02] INFO WEBrick 1.3.1
[2011-08-15 17:05:02] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux]
[2011-08-15 17:05:02] INFO WEBrick::HTTPServer#start: pid=5189 port=8088
localhost.localdomain - - [15/Aug/2011:17:05:22 BST] "GET / HTTP/1.0" 200 11415
- -> /
Wiχi's configuration format is heavily documented, and is written in YML. The Wiki itself is bundled with a sample directory, which I recommend you use to get familiar with the system. Visit http://your-wixi.url/?mode=config to check your configuration settings.
Requirements
Because the wiki is so heavily based on LaTeX, it requires a large number of LaTeX processing tools, as well as a few ruby libraries to manage things. Largely, each of these is optional to some degree, but you'll need at least one renderer.
Programs required:
- Ruby
- The wiki was designed on 1.9.1, but should run on 1.8.6 up.
- Some TeX distribution
- It's almost useless without some flavour of LATEX, but the individual rendering tools are all optional (see below)
LaTeX processing and rendering tools
- LaTeX2HTML
- Recommended as the `in browser' output. Note that this renderer does not support spaces in filenames, which is a bit daft.
- PDFLaTeX
- Recommended as the Download/Embed output, and very useful for rendering things like presentations (which LaTeX2HTML cannot handle).
- Hevea
- Fast and good with maths/symbols, but often lacking in accuracy for text sections, and doesn't support all features of TeX.
- DeTeX
- Used to strip LaTeX from documents, so can be good for plaintext output.
- TtH
- Very fast and reasonably accurate HTML output for page embedding.
- PlasTeX
- Another HTML renderer.
Ruby gems required:
- webrick
- Used to display and serve the whole site (though technically any CGI wrapper would work if you with to hack the server/serve.rb class).
- bibtex_parser
- Processes and error checks the bibtex listings.
Optional Ruby gems
- iconv
- Used for cleansing dodgy UTF-8 input (highly recommended!)
- ink
- Used to highlight LaTeX templates in the default view. Requires the `pygmentize' application for use (probably in your distribution's package manager)