New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Xindy language options #7414
Conversation
The current language options for Xindy do not work if there are variants involved (din5007, cyrillic, etc.). The reason is that Xindy's module lookup derives the variant from the language argument (-L) and not from the codepage argument (-C). This patch has been tested with TeXLive 2019 (Xindy 2.5.1).
I'm not good at xindy. But it seems the man page of xindy says the variant is a part of codepage. So it should be passed via
@jfbu Could you check this please? I can't understand this is correct fix or not. |
That part of the documentation describes how module names are composed – the variant is part of the module name, not part of the codepage. Here is the relevant part of my @lang_base_dirs = ("$modules_dir/contrib/lang", "$modules_dir/lang");
my ($lang_dir, $variant);
foreach my $ld ( @lang_base_dirs ) {
if ( -d "$ld/$language" ) {
$lang_dir = "$ld/$language";
last;
} else {
$language =~ /^([^-]*)-(.*)/ ; # language name ends with 1st hyphen
if ( $2 && -d "$ld/$1" ) { # $2 is not set if the regex didn't match
$language = $1;
$lang_dir = "$ld/$language";
$variant = "$2-" unless ( $2 eq 'iso' );
$variant eq 'din-' and $variant = 'din5007-';
last;
}
}
} In the Digging deeper I've found out, why this has obviously been no problem before: I'm using XeLaTeX. And with XeLaTeX the During regular LaTeX processing the module lookup works even with the mixed up language/variant setup. But that's just a coincidence due to the way Xindy builds up the module path names later on. |
I did not find much documentation regarding the variant part, apart from this:
We must not confuse how the |
I've seen this is tagged as an "enhancement" while in fact it is a bugfix. Without these changes one cannot compile the generated documentation with XeTeX if using one of the affected languages. Should I file an appropriate bug report first? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems I may have been misled by Xindy phrasing of documentation. @cgudrian are you sure this does not break regular pdflatex usage? if yes, then +1 for merge
The patch works for PDFLaTeX as well. xindy doesn't care about the TeX engine. |
Thank you for detailed explanation. +1 for merging. |
Merged. thank you for your work! |
Well, thank you for your work! |
Bugfix
Purpose
The current language options for Xindy do not work if there are variants involved (din5007, cyrillic, etc.). The reason is that Xindy's module lookup derives the variant from the language argument (-L) and not from the codepage argument (-C).
This patch has been tested with TeXLive 2019 (Xindy 2.5.1).