[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DocBook.pm "Not a HASH reference at ../tta/perl//../perl/Texinfo/Convert
From: |
Gavin Smith |
Subject: |
DocBook.pm "Not a HASH reference at ../tta/perl//../perl/Texinfo/Convert/DocBook.pm line 730. |
Date: |
Mon, 9 Jun 2025 22:39:32 +0100 |
texi2any --docbook currently does not work on some manuals.
Here is an input file (cut down from the libc manual) producing
the error:
\input texinfo
@titlepage
@center @titlefont{The GNU C Library}
@sp 1
@center @titlefont{Reference Manual}
@sp 2
@center Sandra Loosemore
@center with
@center Richard M. Stallman, Roland McGrath, Andrew Oram, and Ulrich Drepper
@sp 3
@c Disabled (printed editions, see above).
@c @center Edition @value{EDITION}
@c @sp 1
@center for version @value{VERSION}
@ifclear PKGVERSION_DEFAULT
@sp 1
@center @value{PKGVERSION}
@end ifclear
@page
@vskip 0pt plus 1filll
@insertcopying
@c Disabled (printed editions, see above).
@c @sp 2
@c Published by the @uref{https://www.fsf.org/, Free Software Foundation} @*
@c ISBN @value{ISBN} @*
@c Disabled (printed editions, see above).
@c @sp 2
@c Cover art for the Free Software Foundation's printed edition
@c by Etienne Suvasa.
@end titlepage
@bye
$ ../tta/perl/texi2any.pl --docbook test.texi
test.texi:15: warning: undefined flag: VERSION
test.texi:18: warning: undefined flag: PKGVERSION
Not a HASH reference at ../tta/perl//../perl/Texinfo/Convert/DocBook.pm line
434.
The error is due to the @titlefont command.
The following fixes the error:
diff --git a/tta/perl/Texinfo/Convert/DocBook.pm
b/tta/perl/Texinfo/Convert/DocBook.pm
index bde254ee07..71adfb78e0 100644
--- a/tta/perl/Texinfo/Convert/DocBook.pm
+++ b/tta/perl/Texinfo/Convert/DocBook.pm
@@ -431,8 +431,8 @@ sub conversion_output_begin($;$$)
}
if (!defined($fulltitle_command)) {
my $command = $global_commands->{'titlefont'};
- if ($command and $command->{'contents'}
- and $command->{'contents'}->[0]->{'contents'}) {
+ if ($command and $command->[0]->{'contents'}
+ and $command->[0]->{'contents'}->[0]->{'contents'}) {
$fulltitle_command = $command;
}
}
This code was changed in this commit:
commit 6ad7393ed21dc4ce27d9c97e0bc80a65d7a5c2a6
Author: Patrice Dumas <pertusus@free.fr>
Date: 2024-11-11 11:46:13 +0100
Use contents instead of args for brace commands in Texinfo tree
However, then there is a further error:
Not a HASH reference at ../tta/perl//../perl/Texinfo/Convert/DocBook.pm line
730.
This error is for the _convert_argument_and_end_line function. I haven't
tried to fix it.
I suspect that the DocBook code wasn't updated correctly for
whatever change was made in the commit on 2024-11-11.
- DocBook.pm "Not a HASH reference at ../tta/perl//../perl/Texinfo/Convert/DocBook.pm line 730.,
Gavin Smith <=