Tullio Facchinetti

Workflow for writing theses collaboratively

by Tullio Facchinetti

Categories: article lang_en latex article_en


In the last few years I have been supervisor of tens of students (I keep an updated list here). In some periods I had to manage the concurrent writing of 5-6 theses. This huge parallel work called to develop a specific workflow to manage the collaborative writing of a thesis, which I find rather effective and that I will share in this article.

Well, to be more precise, in the mentioned “collaborative writing work” most of the writing is done by the student, while my job is mainly to give indications on the thesis organization and expected content, revise everything, providing feedback and updates (this is the role of a supervisor, doesn’t it? :-)).

The tools

The workflow is built around the following tools:

On GitHub there is the thesis-templatex repository that contains the template for a thesis document. The frontpage is the standard for theses at the University of Pavia.

LaTeX

During the years, I found that writing relatively long documents that include tables, images with captions, equations and references can be a nightmare with MS Word or Libreoffice Writer, due to the endless adjustments required to every minor change to the document. They are plainly not adequate to the task.

The best option for writing a long document with consistent formatting and coping with all the needs of a thesis, is LaTeX. I do not enter into the details of the most common tips and tricks to write a thesis here. I wrote a dedicated article to that matter.

I just report a summary of the most important reasons that make LaTeX the best option for the task:

The student does not need to be a LaTeX ninjia. A template is made available with the most common setup for a thesis. Thus editing the document becomes a matter of simply writing the text in the appropriate place, plus some few specific commands to deal with images, equations, references, tables, etc. The template includes examples of such commands, which makes the inclusion of these elements a matter of copy-and-paste with the necessary minor adaptations.

When there is the need to draw high quality vector images and graphs, I suggest the use of Inkscape. Sometimes, to draw flowcharts I use yED. I rare occasions, I have used tikz, which is less user-friendly and may require some effort to obtain the desired results, especially if the picture is complex. Its “coding-oriented” approach is very stimulating.

All these tools fit very well in the process of writing a thesis with LaTeX.

git and Gitlab

git is nowadays the most popular tool for code versioning and code sharing. It powers services such as Github, Gitlab, SourceHut, and many others.

By using a central repository to host the thesis, git allows sharing of the whole directory containing .tex files, images, and all the necessary other material.

With some cautions to avoid concurrent independent editing of the same file, the merge of changes is always done automatically. In many cases, git allows even the merge of concurrently edited files without “collisions”. A collision is when two changes to the same part of text are made by different authors, which leads to the impossibility to automatically sort out which is the change to keep in the next version of the document.

A feature that I find especially useful is the possibility to check the word-by-word diff between two versions of the same file. I Leverage this feature to find the changes made by students to my latest provided version of the file.

For this purpose, I firstly run a git log, and I find the last commit from myself. E.g.:

$ git log
...
commit c129ac2735b89fbdb6d6a81621e8c04d0947c04f
Author: Tullio Facchinetti <tullio.facchinetti@unipv.it>
Date:   Sun Dec 26 13:16:14 2021 +0100

    Minor rephrasing of introduction chapter.
...

Once I get the hash of my last change, I can inspect the modifications introduced by the student with the command:

git diff --word-diff c129ac27 chapter_intro.inc.tex

where c129ac27 is the commit in which the last changes to the file happened, and chapter_intro.inc.tex is the file that I want to examine. This allows to easily check what has been changed by the student on that file.

Tracking activities

The iterative process of writing and revising a thesis can take several weeks. When there are many theses to supervise at the same time, it be hard to track the progress on all of them.

For this reason, the repository with the LaTeX template includes a file named TRACKING.md that is used to keep track of the status of development of each chapter in the thesis. The file is versioned together with the .tex files.

Beside some notes regarding the structure of the thesis, which are written during the planning with the student, the most important part of the file is organized as in the figure:

The TRACKING.md file used to keep track of the progress.

The table in the file has a row for each chapter, reporting the title of the chapter and the filename of the LaTeX file containing the text.

Two columns of the sheet are especially important for tracking the work on the thesis: Status and Responsibility. The status can take one of the following values:

The responsibility tells who has the rights to access the file. The files include the rules to update the status. Basically, the idea is that there is only one person in charge of editing a given file, being either the student or myself. By having only one person at a time having such rights, the chance to have conflicts due to concurrent editing of the same file is minimized.

The workflow

At the beginning, a template of the LaTeX repository is shared with the student through Gitlab.

The content of the LaTeX template hosted on Gitlab.

The student starts writing the thesis. All the chapters are under his/her responsibility and in WRITING state.

As soon as one chapter is deemed complete by the student, so that he/she does not need to make any new change, he/she sends me a notification by email. The status becomes REVIEW and the responsibility becomes mine.

Once the review is completed, I notify the event to the student. The .tex file is updated with my changes. Moreover, I typically insert comments, notes and observations to be addressed by the student. I prepend every comment with the “keyword” toOl, so that they can be easily searched in the text. At this point, the responsibility goes back to the student, the status becomes REVISED, and the version number is increased.

I require the student to address my comments. The student is asked to add a short comment him/herself to explain what was done. If the change is trivial, a simple ok is enough to understand that he/she did not miss my observation. In case there are doubts, the student can simply write an “answer” to my comment, directly in the .tex file, below my comment.

An important aspect is that the student must not remove any comment. It is my responsibility to remove the comments once I checked that it was addressed properly. This is done to avoid to miss some observations made during the review.

As can be expected, it may take a couple of iterations of REVIEW/REVISED. Once all the chapters are marked as FINAL, the thesis is completed.

Conclusions

The workflow and the simple tools that are involved in its implementation can be used not only by tech-savvy students, but are suited to everyone with a basic knowledge of the tools.

Probably git could be the most tricky to use. However, on one hand the used functionalities are the very basic ones, and on the other hand there is plenty of tutorials even for beginners on how to use it.

LaTeX requires more effort than MS Word or Libreoffice Writer to get started, but I am convinced that the initial effort pays off quite a lot during the writing and the cooperation on the thesis.


Highlights

  • Students and theses
  • Publications
  • Thesis topics
  • Curated awesome list of CLI apps
  • Last updates (English)

  • Speed up the compilation of LaTex Beamer presentations ()
  • Students and theses ()
  • Students and theses - English ()
  • Learn enough C to survive ()
  • Workflow for writing theses collaboratively ()
  • Guidelines for theses and presentations ()
  • Projects ()
  • Last updates (Italian)

  • Risultati FdI 20 Febbraio 2024 ()
  • Risultati FdI 02 Febbraio 2024 ()
  • Risultati FdI 20-27 Novembre 2023 ()
  • Risultati FdI 28 Settembre 2023 ()
  • Risultati FdI 01 Settembre 2023 ()
  • Risultati FdI 27 Luglio 2023 ()
  • Risultati FdI 28 June 2023 ()
  • List of categories

    Article Article_en Article_it C Courses Fdi Lang_en Lang_it Latex Programming Project Research Results Robotics Software Teaching Thesis Tips