[texdoc] texdoc 0.70

Manuel Pégourié-Gonnard mpg at elzevir.fr
Sun Feb 28 17:36:50 CET 2010


I've just pushed texdoc 0.70 to TeX Live. The major change in this version is
the use of information from the TeX Live packages database (tlpdb). This
information is used in many ways.

First, to find more results, in two ways: if the name asked correspond to a TeX
Live packages, then all documentation files from this package (as listed in the
tlpdb) are found as results (with the usual extension-filtering). The other way
is by looking a the package that contains NAME.sty (or .tex or .cls) and adding
all its docfiles to the list of results (useful for cases like titletoc ->

The catalogue associates some meta-data to some files, like the language or a
"details" string. Those are now displayed with the results, and the details are
used for scoring. Since they are free text, I'm using a very coarse heuristic:
everything but "readme" in the details fields means the file is "interesting"
and gets a higher score.

This allowed me to get rid of some 50 aliases which are now useless (version
0.60's heuristics improvements had roughly the same result). This is good news
not only because it makes the alias list easier to maintain, but also because it
suggests the new heuristics are able to guess correctly more often than before
for packages that I don't know enough to create an alias for.

Concerning machine-readable output, I added two trailing fields: lang and
details. These are not considered stable right now, because I may want to change
the meaning of the language field at some point.

Now, a few technical details for those interested. The texlive database is quite
big and reading and parsing it takes time. It basically multiplies by 2.5 the
running time of texdoc, which is annoying for people like me who want instant
access to the documentation. So I decided to use a cache in the form of a
dofile()-able lua file located under TEXMFVAR (which is 10 times faster to
load). The validity of this file is decided simply by comparing the last
modification date with the real texlive.tlpdb file.

I has a convenient side-effect: on derived distributions, there is no
texlive.tlpdb, and even in vanilla TeX Live, some meta-data is missing in the
tlpdb due to a bug (fixed a few days ago). So, I'm distributing a cache file
generated on my machine using a good version of the tlpdb. Installations with a
real tlpdb will only use the meta-data from this file (lang and details
information) while other will use the whole file. Of course, it should be
expected that the file be out of sync with the actual installation on derived
distributions, but it should cause no more harm than a few relevant results not
being found.

As usual, comments welcome. I hope I didn't introduce too many bugs with this
relatively big update.


More information about the texdoc mailing list