[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: htmlxref.cnf vs. manual names with a dot

From: Ludovic Courtès
Subject: Re: htmlxref.cnf vs. manual names with a dot
Date: Mon, 06 May 2019 12:18:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hi Gavin,

Gavin Smith <address@hidden> skribis:

> Hello Ludo, the extension is stripped in the _external_node_href 
> function in HTML.pm.  I found this one-line change would give the 
> desired output (when I added those lines to htmlxref.cnf):
> diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
> index 9ac4ae7..e987382 100644
> --- a/tp/Texinfo/Convert/HTML.pm
> +++ b/tp/Texinfo/Convert/HTML.pm
> @@ -5820,7 +5820,7 @@ sub _external_node_href($$$$)
>         { 'code' => 1, 
>           Texinfo::Common::_convert_text_options($self)});
>      my $manual_base = $manual_name;
> -    $manual_base =~ s/\.[^\.]*$//;
> +    $manual_base =~ s/\.info*$//;
>      $manual_base =~ s/^.*\///;
>      my $document_split = $self->get_conf('SPLIT');
>      $document_split = 'mono' if (!$document_split);
> I don't know for sure what the justification is 
> for that, but I suspect it is because some Texinfo manuals in the past 
> have used a file extension inside the cross-reference commands, like 
> this: @xref{node,,, manual.info, Manual}.

I see.  Would the above change be acceptable to you in Texinfo?

>> Is there a workaround you would recommend?
> It would be more reliable to call the translated manuals guix-de, 
> guix-es etc.  The full stop may be used to strip off a file extension in 
> other contexts; for example, the info browser might find it hard to 
> distinguish between an Info file guix.de.info and a file guix.info.  
> One issue is that Info files may be compressed and installed as e.g. 
> guix.info.gz, so the info browser has taken the simple approach of 
> stripping off all suffixes.

We’ve been using this naming scheme for several months now and this is
the only issue we’ve had so far.  The standalone Info reader and Emacs
are fine with the .LANG extension.

In fact—but that’s another story—I’d like to suggest improvements so
that the Info readers automatically open ‘dir.LANG’, when available,
instead of just ‘dir’, where LANG is extracted from the current locale.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]