0

I have a new HP laptop. It's just for me; I am not a system administrator for multiple users. I wiped out Windows and replaced it with Ubuntu 22.04.4 LTS, using an ISO file from a thumb drive. Using the download install and the command install-tl, I installed the full TeXLive 2023 group of systems and files. Using Karl Berry's TeX Live Guide 2023, I added the 2023 TeX Live path to /etc/environment, and rebooted. I checked the system, and all programs functioned as expected. I then added my own sty and cls files, etc. in their appropriate folders in /home/robert/texmflocal, and I added that path to /etc/environment. Then I ran mktexlsr. All seemed good. However, I tested a simple file with my .cls in it, and TeXLive did not find that file. I added a few of my own sty and cls files in the appropriate subfolders in /usr/local/texlive/texmf-local. I added that to the path, re-ran mktexlsr, and rebooted. TeXLive still didn't find "my" files. I mostly use xelatex, so I followed the directions for making sure xetex sees the system fonts and that TeX's fonts can become used by the system. That all seemed to work, but . . . . . . while using tlmgr, I got the message that seemed to strongly suggest not to use tlmgr in Debian. I read the file the message referred me to. If I understood that correctly, then I should be alright using tlmgr since I did not use apt or apt-get to download and install TeX Live. Nevertheless, it's worrisome. Meanwhile, I don't know what I did, but I have fouled up xetex. After installation of TeX Live, xetex worked fine on opentype-info.tex. Now, xetex.fmt cannot be found. So, instead of making things better, I'm making things worse. So, there seem to be three issues here. 1-getting TeX to find my files, 2-restoring xetex.fmt, and 3-can I use tlmgr in Ubuntu?

5
  • Welcome to TeX.SE!
    – Mensch
    Feb 22 at 16:06
  • 2
    This sounds like you have got the Ubuntu-packaged TeX Live and that's coming first on your PATH (e.g. which tlmgr should confirm that), this can get installed undesirably through dependencies of editors etc. How are you setting PATH? Is the /usr/local/texlive coming first? Does it propagate correctly to your shell (echo $PATH?)
    – Dai Bowen
    Feb 22 at 16:18
  • if you get a debian message from tlmgr you are using debian's system texlive not the one you installed from tug Feb 22 at 16:49
  • My recommended solution would be: (1) remove Ubuntu's TeX Live (which will likely remove stuff you want, too, such as an editor), (2) install a dummy package designed to satisfy apt that TeX Live is installed, (3) reinstall the stuff lost in (1) such as your editor and any other TeX-dependant software. Otherwise, make sure /usr/local/texlive/2023/bin/x86_64-linux (amend if you're on a different architecture) comes before /usr/bin etc. in PATH.
    – cfr
    Feb 22 at 16:50
  • Answer to 2: Near the beginning of tug.org/texlive/quickinstall.html it says to "prepend" /usr/local/texlive/YYYY/bin/PLATFORM to your PATH. In other documentation, even later in that file, it only says "add." "Prepend" is absolutely necessary, ie, put first in the list. Doing this, solved the problem of TeX not finding xetex.ftm. Answer to 1: Not finding "my" files was due to my mistake. I used "texmflocal" as the name of the directory in $HOME where I put my files. One must use "texmf".
    – richardson
    Feb 24 at 3:19

1 Answer 1

2

For the record:

  1. TeX couldn't find my files (sty, cls) because I had put them in a directory in $HOME called "texmflocal". Use only "texmf".
  2. Another mistake by me also led to TeX not finding xetex.fmt. I added /usr/local/texlive/2023/bin/x86_64-linux in the middle of the path in /etc/environment; it needs to go first, which is what "prepends" means and which is written clearly and early in the quickinstall documentation. Also, anyone, unlike me, who understands how the command "export" works, would also know that that command prepends the statement to the path line.
  3. The problem of not being able to use tlmgr took more futzing around, but it finally got solved. I first uninstalled TeX Live and reinstalled it and then followed the directions in the wiki debian page called TeX Live and Debian/Ubuntu, which shows how to install a "vanilla" TeX and then uses the "equivs" command to deal with Debian/Ubuntu. After all that, however, still no luck. Someone had mentioned that sudo uses a different path than the environmental path. Only after some more digging into responses to similar questions did I get to an answer. First, however, I tried a symlink, but when tlmgr is symlinked to usr/bin, it fails to work. Then, I used sudo visudo on /etc/sudoers, where I found the Defaults secure_path line and there I manually added the TeX path to it. After that, sudo tlmgr works. Thank you all for your help.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .