I recently submitted an article to a Springer Journal. It was quite a pain to get the LaTeX submission working with Editorial Manager. Therefore I want to share my workarounds here, so that hopefully others can avoid the struggle.

The main problems in my case were:

  • minted source code listings
  • biblatex with biber

At first, the submission plattform was not able to produce a pdf file. Without a log file and a 15 minute compile time, there was no easy way to debug the problem. Thankfully I was a few days ahead of the deadline. Narrowing it down by reducing the code base lead to the root of the problem: minted crashes the LaTeX flow…

Minted source code

Our article used the package minted for source code listings. The package provides the option to use a frozencache so that there is no need for shell-escape. So the first step was to get the cache files into the system. Direct uploading was no option because the file ending would not end up in the Manuscript and therefore outside of the LaTeX toolflow. I ended up embedding all files with filecontents inside the main TeX file. To avoid subfolders, the cachedir was set to {.}.

However, the plattform still couldn’t generate a pdf. It turned out that not all included packages in minted.sty are available. So I created a stripped down version of the file, containing only the relevant parts to utilize the cached files.

The following script puts all cache files into a single document:

echo "\RequirePackage{filecontents}" > additionals.sty
for i in *.{pygstyle,pygtex}; do
  echo "\begin{filecontents*}{$(basename $i)}" >> additionals.sty
  cat $i >> additionals.sty
  echo "\end{filecontents*}" >> additionals.sty
done

This can then be included in the main tex file with \usepackage{additionals}.

Biblatex

For biblatex with biber, there is some guidance at StackExchange. Instead of the .bib, you have to include the .bbl file (again via filecontents) with your upload. Furthermore, all required style files have to be included. In addition to all those points, you have to be lucky and find a supported version of biber. At the time of writing this post, the plattform was based on texlive-2018 and upload was working with the version from Debian testing (aergus/latex docker image). The version from Fedora 31 was too old.

Other hints

  • Use \RequirePackage{filecontents} to use a more modern version of the packages, so that files get overwritten
  • Get the log written into the pdf file (from StackExchange):
    \usepackage{fancyvrb}
    \AtEndDocument{\VerbatimInput{Manuscript.log}}
    

I implemented all required changes with Gitlab CI, so that I have a clean working version and all muddy compatibility changes are done on commit. In that way, I can see that both workflows are working and also maintain reproducibility. And for submitting the camera ready version, everything is done automatically.

If I find time to further generalize my CI script, I may publish it in the future. In the mean time, feel free to contact me.