我在 Ubuntu 24 LTS 上安装了相当大的 (~ 1 GB) texlive:
$ apt list --installed | grep texlive
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
texlive-base/noble,now 2023.20240207-1 all [installed,automatic]
texlive-binaries/noble,now 2023.20230311.66589-9build3 amd64 [installed,automatic]
texlive-fonts-recommended/noble,now 2023.20240207-1 all [installed,automatic]
texlive-lang-greek/noble,now 2023.20240207-1 all [installed,automatic]
texlive-latex-base/noble,now 2023.20240207-1 all [installed,automatic]
texlive-latex-extra/noble,now 2023.20240207-1 all [installed]
texlive-latex-recommended/noble,now 2023.20240207-1 all [installed,automatic]
texlive-pictures/noble,now 2023.20240207-1 all [installed,automatic]
texlive-plain-generic/noble,now 2023.20240207-1 all [installed,automatic]
texlive-science/noble,now 2023.20240207-1 all [installed]
texlive/noble,now 2023.20240207-1 all [installed]
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
我需要编译一个使用该bbm.sty
文件的 LaTeX 文件。它由texlive-fonts-extra
- 提供,但该包又占用了 2 GB 的磁盘空间!
$ sudo apt-get install texlive-fonts-extra | grep MB
Need to get 728 MB of archives.
After this operation, 2017 MB of additional disk space will be used.
所有这些都只需要一个小文件。我尝试通过 TeX 包管理器安装它,但是无法安装:
$ sudo tlmgr install bbm
(running on Debian, switching to user mode!)
(see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)
TLPDB: not a directory, not loading: /root/texmf
tlmgr: user mode not initialized, please read the documentation!
我很少使用 TeX,也不想在我的硬盘里放上好几 GB 的文件。事实上,我为它准备的 1 GB 空间已经太多了。有没有什么办法可以精简我的 TeX 安装,同时仍然添加所需的文件bbm.sty
?或者除了分配几 GB 的空间之外,没有其他可靠的方法吗?
我很高兴删除 ubuntu 软件包并进行本机安装。我唯一的要求是我应该能够在标准数学和 CS 论文上使用 LaTeX ,而不是为此花费超过 1 GB 的空间。