[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-texinfo] How to disable '_' to '_005f' transliteration in file
From: |
Patrice Dumas |
Subject: |
Re: [help-texinfo] How to disable '_' to '_005f' transliteration in file names? |
Date: |
Wed, 23 Sep 2009 10:30:44 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Tue, Sep 22, 2009 at 05:13:28PM -0500, Karl Berry wrote:
> Hi Peter,
>
> for the sake of backwards compatibility with older versions of the web
> site I'd need those files to be called "ax_have_epoll.html", i.e. I'd
> like to disable the '_' to '_005f' transliteration.
>
> I don't recall any way to disable it in makeinfo. Patrice, is there a
> way in texi2html (short of hacking the source)?
I think that doing an init file along the following should do the trick
(untested), and then call texi2html as
makeinfo --init-file underscore_hex_to_underscore.init
# underscore_hex_to_underscore.init
# change underscore followed by an hex number (for special character)s to a
# simple underscore
$element_file_name = \&underscore_hex_to_underscore_file_name;
sub underscore_hex_to_underscore_file_name($$$)
{
my $element = shift;
my $type = shift;
my $docu_name = shift;
my $orig_file = $element->{'file'};
if ($orig_file =~ /_[0-9a-f]{4}/)
{
$orig_file =~ s/_[0-9a-f]{4}/_/g;
return $orig_file;
}
retur nundef;
}