docker-texlive icon indicating copy to clipboard operation
docker-texlive copied to clipboard

latexmk with lualatex cannot stabilize

Open polgab opened this issue 2 years ago • 4 comments

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 avatar Jul 30 '23 06:07 polgab

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

polgab avatar Aug 02 '23 13:08 polgab