[texdoc] Localized package manuals

Philipp Stephani st_philipp at yahoo.de
Sun Apr 3 17:55:07 CEST 2011


Am 03.04.2011 um 17:12 schrieb Manuel Pégourié-Gonnard:

> Le 03/04/2011 17:05, Philipp Stephani a écrit :
>>> Alternatively, you can obviously propose patches for this if you feel like
>>> doing so.
>> 
>> I'll see what I can do. I think it should be possible if texdoc did the
>> equivalent of "texdoc X-Y" before "texdoc X", where X is the package and Y
>> the labguage,
> 
> Yep, it could be a good idea. (Of course it would work only for documents using
> this naming convention.)

And it would ignore catalog data etc.

> 
>> or if the scoring system could be exploited ("adjscore(X) X-Y =
>> +20 if Y matches the current language").
> 
> This may be more flexible, for example it would allow using the language
> comments from the catalogue, or a user to specify a list of preferred languages
> in texdoc's configuration file (in addition to autodetecting via the locale
> setting).

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). 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), there is no way to request the English documentation except using -l, it doesn't work with aliases, it doesn't work with partial matches, etc. In general, it would be better to have nicer metadata in the catalog, but that would only shift the burden to the catalog maintainers.
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: score.patch
Type: application/octet-stream
Size: 1412 bytes
Desc: not available
URL: <http://tug.org/pipermail/texdoc/attachments/20110403/46b711d1/attachment.obj>


More information about the texdoc mailing list