TeX-Live / texdoc

Find and view documentation in TeX Live
https://tug.org/texdoc/
GNU General Public License v3.0
47 stars 7 forks source link

geeomtry-de preferred? #104

Closed kberry closed 7 months ago

kberry commented 1 year ago

Texdoc 4.0.1 prefers geometry-de to geometry with texdoc geometry. Pretty sure that was not the case in the past. All my locale variables are "C", so that shouldn't be creating a preference for German ... --thanks, karl.

wtsnjp commented 11 months ago

Transferring my comment from https://github.com/TeX-Live/texdoc/issues/108#issuecomment-1742342097:

I tried and it correctly selects geometry.pdf if the Texdoc lang config is set to en. Would you show me the debug output (with either -D or -dconfig)?

wtsnjp commented 11 months ago

If you set all locale settings to C, Texdoc's lang config will be in a missing state (it used to be set to en, but C means default and I am not comfortable setting the default to English). To set Texdoc's lang config to English, you need to explicitly specify en in some way (easiest is to set LANGUAGE_texdoc=en).

In any case, it is certainly odd that geometry-de.pdf takes precedence over geometry.pdf when the lang config is missing. This issue has been raised in #102 and will be fixed in the future.

kberry commented 11 months ago

C (aka POSIX) does mean English. Maybe not in a 100% pedantic reading of the standard (I haven't looked), but definitely in practice, and historically since day one, every program (in the TeX and Unix world, anyway) outputs English messages in locale C, for example. Please reconsider your incompatible decision. Having to make a special texdoc setting to do something which every other program takes as the default is painful.

If someone wants something other than English, they already have to set their locale var(s) accordingly, so I don't see how anything is gained by assuming otherwise. -k

wtsnjp commented 11 months ago

Even in lang missing state instead of lang=en, it should show the English document in most cases (due to bug #102, this does not hold, sorry about that), which is compatible behavior with many other programs. As a matter of fact, the English document for geometry is geometry.pdf, not geometry-en.pdf.

wtsnjp commented 11 months ago

For the record, I recommended setting LANGUAGE_texdoc as a temporary workaround until bug #102 is fixed.