TheChymera / RepSeP

Reproducible Self-Publishing - Demo Publications in the Most Common Formats
14 stars 6 forks source link

Build script/system #2

Open TheChymera opened 7 years ago

TheChymera commented 7 years ago

LaTeX already produces a number of trace files which can lead to unpredictableness of document reproducibility, and PythonTeX introduces some complexity in excess of that.

Ideally we could manage the building and cleanup more automatically (and include functionality for the bibliography, instead of doing what I do now:

pdflatex pres.tex && pythontex.py pres.tex && pdflatex pres.tex && bibtex pres && pdflatex pres.tex && pdflatex pres.tex

That is not an elegant way to go about this, and particularly non-encouraging to less technically inclined people who might otherwise be interested in using this template to reap the benefits of PythonTeX.

@gpoore, we touched upon this before, and I would be curious whether you have any recommendation on how best to proceed:

gpoore commented 7 years ago

I would recommend using latexmk. It would be possible to develop a shortcut command specifically for this repository, or a somewhat more general shortcut for PythonTeX, but as soon as people actually start using it, they will want customizations. At that point, it will start becoming a (limited) LaTeX build tool. And that already exists in latexmk. I've only used latexmk a few times, but from what I remember, it was pretty simple to get started with.

TheChymera commented 7 years ago

Do you have any experience with Python-based LaTeX build systems?

latexmk is Perl, a language with very limited scientific applications. Depending on it would increase the minimum required complexity of a reproducible self-publication environment. I have come across a few Python build-tools for LaTeX, but they all look quite a bit dead:

I think Rubber may be the most promising option. Other opinions?

gpoore commented 7 years ago

I've never used anything but latexmk, and rubber is the only one in your list I've heard of. Most Linux distributions come with Perl automatically, and TeX Live bundles a basic Perl installation with its Windows installer, so a dependency on Perl shouldn't be much of an issue for most users.

You could just supply a few different build scripts. Maybe bash, Python (via subprocess), or something similar that basically just automates the commands that you yourself use, and then also a latexmk version for those who want the ability to customize things more (at the expense of needing Perl and perhaps digging into a little more documentation).

TheChymera commented 7 years ago

So apparently autotools, the gcc docs, and the kernel build system all depend on Perl - so a Linux system without Perl is improbable and probably used as a highly dedicated binary box. So it is totally ok for us to depend on it.