texdoc icon indicating copy to clipboard operation
texdoc copied to clipboard

Allowing multiple results for fuzzy search?

Open kberry opened this issue 3 years ago • 1 comments

texdoc -l unifonttable prefers texmf-dist/doc/latex/fonttable/fonttable.pdf. That is somewhat understandable, but unicodefonttable.pdf doesn't appear anywhere in the list, which seems surprising. Maybe "uni" somehow needs to imply looking for "unicode"? There are several packages named unicode* ...

This is with the texdoc in current TeX Live, Texdoc 3.4.1 (2022-03-19), though I doubt it matters.

kberry avatar Dec 26 '22 22:12 kberry

I'm afraid Texdoc does not have a direct solution for that. We can add aliases for each uni* package, but it won't be a fundamental solution.

We need either feature extension:

  1. query preprocessing to replace some well-known abbreviations to the expanded version, such as uni -> unicode.
  2. allowing multiple results for fuzzy search to match several package names by a fuzzy query; currently, the fuzzy search feature is used to find only one best package name close to a query. This is fine for the view mode (since only the best document matters), but it is not enough when considering the list mode.

I would rather take the second option. Maintaining the list of abbreviations just for these cases will be another burden.

wtsnjp avatar Dec 27 '22 06:12 wtsnjp