From teaching to research, the production of documents is ubiquitous and quite independant of the scientiﬁc domain: exams, reports, abstracts, thesis, projects or slides are common examples. During this production, we can distinguish the text writing itself and the creation of ﬁgures. Since there is a strong dependance between the text and the ﬁgures, the writer generally goes back and forth to make a full integration of ﬁgures in the ﬁnal document. This process could be painful, time consuming and strongly aﬀect the performance. For these reasons, modify and generate a ﬁgure to the usable format must be done quickly and efficiently. The goal is to minimize steps to edit, build and install ﬁgures to the correct path.
The solution I present here is the set up of a workﬂow. The aim is to be lightwight, support parralel builds and standart targets like conﬁgure, build, install, uninstall, clean...
Firstly, this requires a reﬂexion on involved technologies and ﬁle formats. A large variety of ﬁgures could be encountered such as drawings, chemical formulae, plots, plots including pictures or drawings... and interesting outputs are tex, eps, pdf, svg, etc. Though Tikz, I have chosen LATEX for the high quality and for automatization purpose. Moreover, ﬁgures are generally used in several documents which could be in diﬀerent languages. An efficient translation of ﬁgures is managed via a centralized .po ﬁle avoiding redundant translations.
Secondly, the fact is that there is numerous inputs and outputs. Generally, several unitary convertion tools have to be written. Then, they are called by a build tool which deals with dependances and avoid unecessary compilations.
I will show that these two sides could be achieved at once with a build automation tool written in python: waf. This choice is motivated by the homegeneity of the resulting solution, the ﬂexibility for future modiﬁcations and because no extra-language learning is needed: scripts are python modules!
Beyond this pratical application, such problematics could be of interrest to people who faces redondant tasks in diﬀerent situations. I will present how it is easy to automate tasks in our favorite language.