[texdoc] lm -> lm, not cfr-lm

Manuel Pégourié-Gonnard mpg at elzevir.fr
Fri Dec 9 18:05:49 CET 2011

Le 28/11/2011 18:43, Karl Berry a écrit :
> $ texdoc -l lm
>  1 /home/texlive/karl/Master/texmf-dist/doc/fonts/cfr-lm/cfr-lm.pdf
>    = Package documentation
>  2 /home/texlive/karl/Master/texmf-dist/doc/fonts/lm/lm-info.pdf
> ..
> It would be better for lm to return the first entry in the lm package
> rather than anything from another package (regardless of whether it has
> Catalogue commentary).

Of course. I just adjusted some weights in the scoring system to this effect.

>  Does texdoc have the concept of package?
Hmmm, it's a bit complicated. Actually, there are two steps:

1. Finding files. Here a file is selected if:
	1a. its pathname (disregarding the first components) contains the search string;
	1b. its pathname ends exactly with one of the alias strings;
	1c. it is in a TL package whose name is the search string;
	1d. it is in a TL package that contains NAME.sty or NAME.cls as a runfile (this
is very LaTeX-centric, I know, sorry).

2. Scoring results according to various criteria carrying different weights. One
of these is having the search string as a path component; for some reason it had
very low weight while having a comment in the catalogue was deemed worthy of a
bigger bonus.

The scoring part is sort of a mess, I'm not sure why I fixed the various weights
and rules the way they are, and what could be the side effects of any given
change. I should probably keep a list of examples to document the rules and test

Anyway, thanks for the report.

More information about the texdoc mailing list