Skip to content

Packaging Texdoc

Takuto ASAKURA edited this page Feb 23, 2020 · 2 revisions

This page is for packagers/distributors of TeX Live-based distributions and describes how to make Texdoc available within your distribution.

If your distribution includes a complete TeX Live including its database texlive.tlpdb you don't have to do anything special for installing Texdoc. Just leave the Texdoc in TeX Live as it is and everything should be fine.

In case your distribution does not include the database texlive.tlpdb, you have to package either of the database texlive.tlpdb or a pre-hashed cache file of Texdoc Data.tlpdb.lua. The former solution would be a bit easier to implement: you can just copy the file from a full TeX Live distribution into the right position in your distribution.

The latter cache file used to be included in the Texdoc program itself but has been removed (see issue #2). Thus, now you have to generate it yourself if you don't want to include the texlive.tlpdb in your distribution and going to package only a cache file. A benefit of including only the cache file instead of including the original database is that the size of the cache file is notably smaller than the texlive.tlpdb. The cache file can be generated easily by using a rake task:

$ rake gen_datafile

Note that this task has to be executed under a full TeX Live environment with a texlive.tlpdb. Optionally, you can use the --tlpdb option to specify the path of the database file explicitly:

$ rake gen_datafile -- --tlpdb=<path>

In case you don't have the Rake system and don't want to install it, you can generate the cache file manually. The rake task simply executes the Texdoc which can find a texlive.tlpdb with an arbitrary query and copy a generated cache file $TEXMFVAR/texdoc/cache-tlpdb.lua to $TEXDOC/script/Data.tlpdb.lua.