我不需要我安装的每个软件包的文档(这会毫无理由地占用我的磁盘上几 GB)。但是,我想下载我经常需要查找的少数软件包的文档。我希望能够直接运行texdoc
并查看文档,而不必在 CTAN 或 texdoc.org 上查找正确的文件。
我知道可以通过运行 来全局启用文档安装tlmgr option docfiles 1
。我可以要求tlmgr
只安装我列出的某些软件包的文档吗?
附加问题:如果可以对来源做同样的事情,我很乐意听听。我想如果一个是可能的,另一个的解决方案应该不会有太大的不同。如果没有,请忽略这一点。
答案1
tlmgr
快速浏览一下(tlmgr help
)的手册,其中列出了
install [option...] pkg...
Install each pkg given on the command line, if it is not already
installed. It does not touch existing packages; see the "update" action
for how to get the latest version of a package.
By default this also installs all packages on which the given pkgs are
dependent. Options:
--dry-run
Nothing is actually installed; instead, the actions to be performed
are written to the terminal.
--file
Instead of fetching a package from the installation repository, use
the package files given on the command line. These files must be
standard TeX Live package files (with contained tlpobj file).
--force
If updates to "tlmgr" itself (or other parts of the basic
infrastructure) are present, "tlmgr" will bail out and not perform the
installation unless this option is given. Not recommended.
--no-depends
Do not install dependencies. (By default, installing a package ensures
that all dependencies of this package are fulfilled.)
--no-depends-at-all
Normally, when you install a package which ships binary files the
respective binary package will also be installed. That is, for a
package "foo", the package "foo.i386-linux" will also be installed on
an "i386-linux" system. This option suppresses this behavior, and also
implies "--no-depends". Don't use it unless you are sure of what you
are doing.
--reinstall
Reinstall a package (including dependencies for collections) even if
it already seems to be installed (i.e, is present in the TLPDB). This
is useful to recover from accidental removal of files in the
hierarchy.
When re-installing, only dependencies on normal packages are followed
(i.e., not those of category Scheme or Collection).
--with-doc
--with-src
While not recommended, the "install-tl" program provides an option to
omit installation of all documentation and/or source files. (By
default, everything is installed.) After such an installation, you may
find that you want the documentation or source files for a given
package after all. You can get them by using these options in
conjunction with "--reinstall", as in (using the "fontspec" package as
the example):
tlmgr install --reinstall --with-doc --with-src fontspec
因此如果你的安装没有 doc 和 src,你可以通过以下方式为单个包安装它
tlmgr install --reinstall --with-doc --with-src packagename
(我家里的电脑空间有限,所以如果需要的话我也会这么做)