HTML and ConTeXt

From Wiki
Jump to navigation Jump to search

< Main Page

The Problem

Several issues arise when a TeX document is to be constructed collaboratively.

  • Your partner(s) may not be used to TeX (ConTeXt) markup.
  • Marking up editorial comments is difficult (for instance in WYSIWIG softwaresuch as WORD, edits can be highlighted by switching on "Track changes")
  • One needs to have the same document in different formats (PDF, HTML, DOC etc)

A Solution

There are several different ways to address each of these issues. For instance

  • Have the partner construct the document in WYSIWIG software and have them import it to OpenOffice and then export it to TeX.
  • Have the partner edit the source code
  • Use third party software to convert between formats (PDF to Word for instance).

I would like to offer a different path towards solving these issues, especially with the aim of involving non-TeX folks in the process. Essentially the approach is to use a web-based Wiki to construct parts of the document and then use Ruby to translate HTML syntax to ConTeXt syntax. The advantages I can think of are:

  • Wiki syntax is easy to learn
  • People can join the effort from anywhere in the world provided they have an internet connection.
  • Editing the document is relatively easy.
  • Folks can visualize the structure of their document in the HTML version.
  • Folks who want to convert the document into WORD just needs to import the HTMLversion.

Now, without much ado, to the details ...

Using Wiki software for collaborative document preparation

Any Wiki software may just be fine. In this document I will use a new Ruby Rails based wiki software known as Informl to illustrate key ideas. One attractive aspect of Informl for my colleagues who are used to WYSIWIG software is that while in edit mode, a real-time preview is available in a twin-window.

Wiki prev.jpg

Translating HTML into ConTeXt using Ruby