[texdoc] Localized package manuals
Manuel Pégourié-Gonnard
mpg at elzevir.fr
Sun Apr 3 22:51:17 CEST 2011
Le 03/04/2011 17:55, Philipp Stephani a écrit :
> I have started to implement a simple addition to the scoring system (see
> attached) that scores documents of the form pattern-language or
> language-pattern higher than an exact match. This is way too inflexible, but
> seems to work for several of the recent translations (e.g., geometry or
> booktabs).
Right. I think it would be a good starting point :
- works in a lot of cases;
- looks very unlikely to introduce wrong results.
I think it would be good to add this kind of support now, we can always move to
more elaborate strategies later if needed.
> Drawbacks: it requires a valid LANG environment variable which is
> certainly not present everywhere (reliable detection of the current language
> would require a C extension),
One note about implementation : checking LANG for each file to score doesn't
look right to me. I'd rather do this check once at initialisation. Probably the
best way is to create a 'lang' configuration entry, which could be set either
from the LANG variable, or from the config file (like the viewer settings for
example). This way, people without a valid LANG variable (which probably
includes all windows users) could set it manually.
Would you like to change your patch in this direction?
> there is no way to request the English documentation except using -l,
Command-line users can always use 'LANG=C texdoc foobar'. Anyway, being forced
to use -l doesn't sound too bad to me.
> it doesn't work with aliases,
I must admit I'm not sure how it should interact with aliases.
> it doesn't work with partial matches, etc.
OTOH, partial matches may introduce false positives, so the option you choose is
probably the safest for now.
> In general, it would be better to have nicer metadata in the catalog, but
> that would only shift the burden to the catalog maintainers.
>
Yep, that's a general issue, but indeed it would only shift the burden. In
theory, it would be nice if structured (and accurate) infomation could be
provided directly by package authors, but this too requires work: to implent the
sytem (Jim's AZ interface to CTAN looks like a good step in this direction) and
to handle the huge lot of already existing packages.
Manuel.
More information about the texdoc
mailing list