0

I'm on Linux Mint 21, Ubuntu based. I installed TeXlive from apt from official repos. I need Fira Sans, but Texlive-fonts-extra is 1.5 gigabytes. I don't want to install all the fonts. How do I install just select packages like just Fira Sans?

I am told I can install the Fira package through

tlmgr install fira

This did not work. I got

(running on Debian, switching to user mode!)
(see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md) TLPDB: not a directory, not loading: /home/user/texmf tlmgr: user mode not initialized, please read the documentation!

I tried searching and it told me to run tlmgr init-usertree. It seemed to complete successfully. I ran tlmgr install fira again. I got

(running on Debian, switching to user mode!)
(see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)
tlmgr: Local TeX Live (2021) is older than remote repository (2022). Cross release updates are only supported with update-tlmgr-latest(.sh/.exe) --update See https://tug.org/texlive/upgrade.html for details.

It seems okay? But when I ran TeXstudio it gave me the error

File \FiraSans.sty' not found. \RequirePackage`

which seems to suggest that Fira wasn't installed correctly. Running as root got me nowhere.

What am I doing wrong here? How can I install FiraSans.sty without using APT to download Texlive-fonts-extra?

  • We have quite a few questions about installing some or all of TeXLive in Linux: start with https://tex.stackexchange.com/q/73016/86 – Andrew Stacey Aug 26 '22 at 06:47
  • tlmgr: Local TeX Live (2021) is older than remote repository (2022). means it did not install anything – David Carlisle Aug 26 '22 at 07:19
  • You cannot install packages using the Debian modified version of tlmgr. Debian wants you to install via apt. And Debian TeXLive is not packaged such that you can install individual LaTeX packages. You can only do that if you use upstream TeXLive where tlmgr is not modified. – daleif Aug 26 '22 at 07:35
  • I think I have my answer, I can't install on tlmgr outside apt. Thank you. – theienzo Aug 26 '22 at 07:48
  • Installing individual packages manually by downloading them from CTAN is usually quite easy, but for font packages it is a bit more involved with several helper programs, cache refresh etc. It is certainly possible but it needs some work and technical knowledge. So in that case you are better off installing the font-extra apt package, or use XeLaTeX/LuaLaTeX with a .ttf or .otf version of the font (which does not require any font-specific package to be installed), or use Overleaf. Or uninstall the apt distribution altogether and use the native TeX Live installer. – Marijn Aug 26 '22 at 08:55

1 Answers1

3

In general a LaTeX dist installed via apt needs to be updated via apt.

Even though it often comes with the tlmgr tool, the apt version of tlmgr has been changed such that it cannot install packages. [1]

[1] Given that packages installable from CTAN is only available to a given TeXLive version for about a year, the apt TeXLive is often behind, and would be refused anyway.

In addition, the way LaTeX is packaged in the apt installation, it is more or less impossible to install an individual package. It all comes in apt packages that we might label as bundles.

There are two ways to install a particular package in this case.

  1. use apt-file to look up which apt bundle provides file.sty. As you mention in this case it is texlive-fonts-extra

  2. Drop the apt based LaTeX installation and manually install upstream TeXLive (see https://tug.org/texlive). This has the benefit of getting access to the full tlmgr and here you can start of by installing a small TeXLive and then add individual packages afterwards.

daleif
  • 54,450
  • Thank you. If I install it manually, how do a clean uninstall of the TeXlive installed via apt? apt purge texlive*? If I install it manually, will programs like pandoc and TeXstudio be able to use the manually installed TeXlive if TeXlive is decoupled from the apt system? – theienzo Aug 26 '22 at 09:13
  • Something like that. With the manual install you need to be very careful manually adding the new PATH, you should probably added to both .bashrc and .profile and then log out and in again (.profile is only read at login), Then LaTeX should be found by other programmes. – daleif Aug 26 '22 at 10:27
  • If you have the space on your harddrive, så can just leave the APT installation. Just make sure that the new path for the manual TeXLive is added to the front of the PATH, then it is found first and overrules the apt one. – daleif Aug 26 '22 at 10:28