0

I have texlive2021 and texlive2019 installed in my Linux computer. Recently I found the building is very slow when I was building a .tex file. I got the following message everytime I built this file:

Process started: "/usr/local/texlive/2021/bin/x86_64-linux/pdflatex" -synctex=1 -interaction=nonstopmode "ber220117_en".tex

kpathsea: Running mktextfm larm1000

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/larm1000.tfm already exists.

kpathsea: Running mktextfm lati1000

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/lati1000.tfm already exists.

kpathsea: Running mktextfm labx1000

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/labx1000.tfm already exists.

kpathsea: Running mktextfm larm0700

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/larm0700.tfm already exists.

kpathsea: Running mktextfm labx0700

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/labx0700.tfm already exists.

kpathsea: Running mktextfm larm0500

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/larm0500.tfm already exists.

kpathsea: Running mktextfm labx0500

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/labx0500.tfm already exists.

kpathsea: Running mktextfm labi1000

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/labi1000.tfm already exists.

kpathsea: Running mktextfm lati0700

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/lati0700.tfm already exists.

kpathsea: Running mktextfm labi0700

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/labi0700.tfm already exists.

kpathsea: Running mktextfm lati0500

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/lati0500.tfm already exists.

kpathsea: Running mktextfm labi0500

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/labi0500.tfm already exists.

kpathsea: Running mktextfm lacc1000

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/lacc1000.tfm already exists.

kpathsea: Running mktextfm larm0800

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/larm0800.tfm already exists.

kpathsea: Running mktextfm lati0800

mktextfm: /home/z5307561/.texlive2019/texmf-var/fonts/tfm/lh/lh-t2a/lati0800.tfm already exists.

Process exited normally

I ran the same .tex file in another machine which has only one version of texlive, it is very fast and the above messages about mktextfm didn't appear.

Do you know the reason? And how I can make the building faster?

Dekay
  • 1

1 Answers1

2

TeX Live 2019 is in your path but you are using TeX Live 2021 by explicitly providing a path. Therefore LaTeX looks for the .tfm files in the directory for TeX Live 2021. When it isn't found and mktextfm recreates the file then mktextfm gets called without an explicit path and therefore the TeX Live 2019 version is found which of course recreates the file in the TeX Live 2019 and not in the TeX Live 2021 directory.

To avoid this, you have to make sure that the right TeX Live binaries are found in your PATH before running pdflatex. You can find instructions how to do that in this answer from egreg to a related question.

  • Thank u, Marcel, Problem solved! Your comment saved my day! I had been running my .tex file in texstudio. Just now, I used pdflatex filename.tex in terminal, everything is OK, the message showed tjhat .tfm is installed in texlive2021 this time. I think something is wrong with my configuration of texstudio. – Dekay Jan 29 '22 at 07:20