dante-ev / docker-texlive

Full TeX Live
https://hub.docker.com/r/danteev/texlive/
MIT License
89 stars 26 forks source link

latexmk with lualatex cannot stabilize #51

Open polgab opened 11 months ago

polgab commented 11 months ago

With this simple document (lualatex-simple.tex):

\documentclass{article}
\usepackage{fontspec}
\setmainfont{QTGraphLite}
\begin{document}
Essai
\end{document}

the following command:

docker run --rm -it -v $(pwd):/workdir danteev/texlive latexmk -pdflua lualatex-simple.tex

reruns lualatex at each run !

As /usr/local/texlive is writeable, the following files are (re)created at each run:

Rule 'lualatex':  Reasons for rerun
Changed files or newly in use/created:
  /usr/local/texlive/2023/texmf-var/luatex-cache/generic/names/luaotfload-lookup-cache.luc
Rule 'lualatex':  Reasons for rerun
Changed files or newly in use/created:
  /usr/local/texlive/2023/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-bold.lua
  /usr/local/texlive/2023/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.lua
  /usr/local/texlive/2023/texmf-var/luatex-cache/generic/fonts/otl/qtgraphlite.lua
  /usr/local/texlive/2023/texmf-var/luatex-cache/generic/names/luaotfload-lookup-cache.luc
polgab commented 11 months ago

We can also consider that it is a defect of latexmk.

A first workaround is to tell latexmk to ignore .luc files via the following line in a latexmkrc file:

$hash_calc_ignore_pattern{'luc'}='^';

A second workaround is to define the TEXMFCACHE environment variable in the container:

ENV TEXMFCACHE=/workdir/.texlive2023/texmf-var