3

After an exhausting search, I've seen that default path for installing new fonts manually is /usr/local/texlive/texmf-local (TEXMFLOCAL).

But when I put my files under the tree structure of that path and it comes the time to run sudo updmap-sys --enable Map=mtpro2.map or sudo updmap-sys (based on this) it say me that isn't searching in that directory, instead only in the following three:

updmap will read the following updmap.cfg files (in precedence order):
  /etc/texmf/web2c/updmap.cfg
  /usr/share/texmf/web2c/updmap.cfg
  /usr/share/texlive/texmf-dist/web2c/updmap.cfg

Shortly, I can't install fonts in that path due this updmap configuration.

Is there any way to add the /usr/local/texlive/texmf-local path to updmap search?

  • Which TeX Live installation are you running? – Davislor Feb 21 '22 at 04:11
  • You seem to be using backslashes, not forward slashes? is that just a typo in your post, or what you’re typing on the command line? That would definitely break your commands. – Davislor Feb 21 '22 at 04:13
  • When you type whereis updmap-sys, does it find the correct installation? On some systems (such as a custom TeX Live installation on Debian) you need to run sudo -E $(kpsewhich updmap-sys) -enable Map=mtpro2.map. This calls the correct version with and preserves your environment. – Davislor Feb 21 '22 at 04:17
  • Although, on those, I declare an alias in my profile to avoid having to type that. – Davislor Feb 21 '22 at 04:20
  • @Davislor 1. 2021. 2. Sorry, LaTeX commands habbit, already corrected. 3. Output for whereis updmap-sys: updmap-sys: /usr/bin/updmap-sys /usr/local/texlive/2021/bin/x86_64-linux/updmap-sys /usr/share/man/man1/updmap-sys.1.gz. – Alberto López Feb 21 '22 at 04:57

1 Answers1

1

From your comment, it appears that you have two different TeX live installations on your system, the system one in /usr/bin/updmap-sys, which probably was installed by your package manager, and a custom installation in /usr/local/texlive/2021/, which was probably installed manually.

The one in your system path is being searched first, but is out-of-date and only half-functional. You want to make sure that /usr/local/texlive/2021/bin/x86_64-linux appears in your PATH before /usr/bin. One way to do that is here.

You might additionally want to run

sudo -E $(kpsewhich texhash)
sudo -E $(kpsewhich updmap-sys) -enable Map=mtpro2.map

The sudo -E $(kpsewhich ...) might be necessary for the command to run with the correct search path and environment. Running texhash might be necessary for the updmap-sys command to find the map file in the file index. I usually also set

alias update-tex='sudo -E $(which tlmgr) update --self --all'

so that I can update my installation with the command update-tex.

You’ll also find the commands I use to install and update my TeX distro as the system user tex, not as root, which means that any install script I run at least doesn’t rootkit my machine. This involves passing the sudo command the additional flag -u tex, usually through an alias.

Pragmatically, though, an installation script running as the tex user can modify an executable that I frequently run as my user account, which can then read and alter all my user files. You might reasonably conclude that getting root is not what should concern us.

Davislor
  • 44,045
  • Yes, /usr/local/texlive/2021/bin/x86_64-linux is the first in my PATH. The sudo -E commands appears not to work, it prints: usage: sudo -h | -K | -k | -V... for both. – Alberto López Feb 23 '22 at 03:24
  • @AlbertoLópez Which OS and distro? Check the man page for the correct option to preserve the environment. – Davislor Feb 23 '22 at 04:09
  • Ubuntu 20.04, when I run sudo --help effectively it tells me its -E, but I don't know why I can't run your command. – Alberto López Feb 24 '22 at 02:50
  • @AlbertoLópez Is the $(kpsewhich texhash) part not working? Is that giving you a pathname? – Davislor Feb 24 '22 at 02:59
  • No, it doesn't print anything. – Alberto López Feb 24 '22 at 03:04
  • @AlbertoLópez So, that’s the problem. If kpsewhich is installed, the shell doesn’t seem to be finding it in the PATH. Which means that, probably, the other commands don’t work either. Make sure your path is set correctly. You might want to find /usr -name "kpsewhich" -print to be sure where it is. – Davislor Feb 24 '22 at 03:14
  • It's in /usr/local/texlive/2021/bin/x86_64-linux/kpsewhich and /usr/bin/kpsewhich, Do I add that path to my PATH? – Alberto López Feb 24 '22 at 04:52
  • @AlbertoLópez /usr/local/texlive/2021/bin/x86_64-linux should be in your path, before /usr/bin. The link in my answer explains how to put it there. Once you save the commands to a file named something like /etc/profile.d/texlive.sh, open a new login shell with exec bash -login, or reboot, and it should work. – Davislor Feb 24 '22 at 09:57
  • Yes, /usr/local/texlive/2021/bin/x86_64-linux is the first entry in my PATH, and when I run find /usr -name "kpsewhich" -print it shows the two paths in my latest comment. Should I add that two paths to my PATH? – Alberto López Feb 26 '22 at 03:03
  • Something is goofed up on your installation. Maybe the file permissions, but I’m not sure. Maybe you’re using a shell other than bash. – Davislor Feb 26 '22 at 03:26
  • I'm using normal terminal in ubuntu, it's the same doesn't it? – Alberto López Feb 26 '22 at 03:47