Photo

Return to home page


E-mail

fredrik.sandin@gmail.com
(encryption key)

Official webpage

ltu.se/staff/f/fresan

Address

Fredrik Sandin,
EISLAB,
Luleå tekniska universitet,
971 87 Luleå,
Sweden.


Publications with Bibtex

Profile at Google Scholar


Collaborative writing using Etherpad and Latex

Note: This tool works fine, but nowadays there are alternative options available online that you may want to consider first (overleaf, sharelatex etc).

Tools for collaborative writing are useful but typically comes with compatibility or privacy issues. Therefore, I have made some scripts that enable browser-based collaborative editing and display of Latex documents, including support for Bibtex. These scripts are based on open-source software and can be installed on your own web server.

Example, browser-based editor

Editor

Example, browser-based display of document

Viewer

Etherpad

Etherpad is a javascript real-time collaborative editor. This editor can be used in a web browser. It enables multiple authors to work simultaneously on the same document. It has a simple automatic versioning system that makes it possible to see historical versions of each document. Etherpad highlights text written by different authors, and it includes a basic authentication system. A MySQL database is typically used for storage of documents. For further information see the Etherpad homepage. You need to install Etherpad according to the instructions provided at the homepage.

Scripts

Two scripts are needed to compile and display Etherpad latex documents in a web browser. Script 1 is a Python script that fetches and compiles the Latex and Bibtex source from two Etherpad documents. This script requires bibtex and pdflatex, which are free and available on most platforms (Linux/FreeBSD/OSX etc). If needed, the Python script can be used as a command-line tool for compilation of latex documents on an Etherpad server. The Python script uses the Etherpad HTTP API to fetch documents, and it calls bibtex / pdflatex to compile a PDF.

Script 2 is a PHP script that executes the Python script and displays the resulting PDF file (or an error message) in a web browser. When you reload the web page (PHP script) the latex and bibtex documents are 1) downloaded from the Etherpad server 2) compiled with bibtex / pdflatex and 3) displayed in the web browser as a PDF. If the document does not compile successfully the error message from pdflatex is displayed in the browser. The PHP script needs to be installed on a web server, for example Apache.

Additional installation hints

Install Etherpad according to the instructions provided at the homepage. Create a new Etherpad document and add a Latex template to it. Create a second Etherpad document and add some bibtex references to it. Open the console or ssh shell and create a new folder in your home directory. Download the python script to this folder. Edit the configuration at the top of the python script. Run the python script from the command line. This should download the Etherpad documents and compile them into a PDF.

For a fully browser-based setup you also need a web server with PHP support. Download the PHP script to a folder that is accessible through the web server. Edit the configuration at the top of the PHP script. I suggest that you name the PHP script so that it matches the Etherpad document ID.

Make sure that the python script is not available in the folders that are published by the web server because it includes the secret key for your Etherpad server. The web server needs to have write permission in the folder where the Latex output files are generated.

Usage hints

A web browser with three open tabs is needed. Two tabs are used to open the Etherpad editor with the latex and bibtex sources (which can be edited collaboratively). The third tab is used to display the PDF that is generated from the Latex code by the PHP script. The PDF is updated by reloading the third tab (keyboard shortcut CTRL+R, CMD+R etc). Note that the third tab needs to be reloaded multiple times when a bibtex reference is updated or added (bibtex / pdflatex is called once each time the tab is reloaded).

In addition to this a script that enables file uploads to the latex folder from a web browser is useful, so that collaborators can upload figures and style files.


Software

3FCS
ASOUND
CBVS
Dircheck
Etherpad Latex scripts (github)
Femtolensing calculator
Random indexing
Shellmap
SSH-distributed calculations

Technical reports

TDP derivatives (extends Appendix E/F)
Fault detection in district energy systems
Intelligent Industrial Processes

Bulletin board

Thu Oct 08, 2015
Master thesis proposal on embedded streaming text analytics.

Wed Oct 07, 2015
Gunnar Öquist fellows, vice-chancellors and representatives from research funding organisations in Sweden were invited to IVA by the Kempe Foundations to present their view on and discuss the fellowship programme. A very interesting and stimulating meeting.

Thu Sep 24, 2015
Master thesis proposal on learning condition monitoring system.

Mon Sep 14, 2015
Dr. Vasaki Ponnusamy from Quest International University in Malaysia is visiting us for one month with support from STINT.

Mon Aug 31, 2015
Sergio visits EUSIPCO 2015 and presents our paper.

Wed May 27, 2015
Sergio Martin del Campo Barraza presents his licentiate thesis on autonomous sensor systems. Congratulations! Thanks to the opponent, Karl Skretting, for his helpful questions at the seminar.

Mon Apr 27, 2015
Participated at CapoCaccia, great event! Implemented a realtime Matlab / Mex interface (screenshot) for the DAVIS device and learned more about criticality and the ROLLS.

Fri Dec 12, 2014
Gunnar Öquist Fellow ceremony. A memorable day and a great and timely opportunity. More info here.

Thu Nov 13, 2014
Received an encouraging letter from the student union. Thank you for nominating me!

Fri Nov 7, 2014
Presenting our work on interoperability by learning at BICA 2014 in Boston.

Wed Oct 1, 2014
Blerim defends his Ph.D. thesis. Congrats! See also the news article.

Thu Jun 5, 2014
Workshop on bio-inspired computation, organized at UTP, Malaysia. Thanks to STINT, UTP and MMU for support.

Fri Apr 25, 2014
Ph.D. student Sergio Martin del Campo attends MLSS2014 and presents a poster.

News archive.


Valid XHTML 1.0 Transitional