Abstract: Methods are provided for collaborative editing of documents which allow users who are editing source code to see previews of a compiled document as the process of editing continues. During editing, the source code is compiled to provide a compiled document from which previews can be produced. Steps can be taken to ensure that previews are only produced and/or sent to the user for those pages that have been changed since a previous compile. Moreover, a pre-compile checking process may avoid unnecessary attempts to compile incomplete or erroneous source code.