[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texi2html-bug] Obtaining the node name in element_file_name?
From: |
Reinhold Kainhofer |
Subject: |
Re: [Texi2html-bug] Obtaining the node name in element_file_name? |
Date: |
Sun, 20 Jul 2008 14:34:45 +0200 |
User-agent: |
KMail/1.9.9 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Samstag, 19. Juli 2008 schrieb Patrice Dumas:
> On Sat, Jul 19, 2008 at 09:55:14PM +0200, Reinhold Kainhofer wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi Patrice,
> >
> > Now, in element_file_name I want to look up the node name in my map and
> > retrieve the file name for it. Unfortunately, in the $element hash I
> > couldn't find the full node name for that section, only the mangled
> > nodename stored as 'target'. Is there any way to obtain the original node
> > name for a section?
>
> The node element is in
> $element->{'node_ref'}
> if there is a @node associated with this element. Then you have
> $element->{'node_ref'}->{'text'}
> $element->{'node_ref'}->{'texi'}
> $element->{'node_ref'}->{'no_texi'}
> $element->{'node_ref'}->{'simple_format'}
> depending on what you want.
Ah, thanks, I was fooled by the output of the dumper (where I had set the
depth to 3, so the node_ref has was not printed out...
Now, a different, probably trivial question: How can I obtain the file path of
the input ,texi file?
Some other points:
- -) In t2h_cross_manual_normal_text you use a $ascii_character_map hash and
# wild guess that should work for latin1
$result .= '_' . '00' . lc(sprintf("%02x",ord($1)));
Wouldn't it be easier to simply use
my $ccode = ord($1);
if ( $ccode <= 0xFFFF ) {
$result .= sprintf("_%04x", $ccode);
} else {
$result .= sprintf("__%06x", $ccode);
}
This works with all characters...
- -) You have some code to load a $texinfo_htmlxref file. Unfortunately, I
don't
see any reference to how this is created. What does this do exactly? I
suppose it cannot be used to determine target file names for xrefs, which we
need, since we put all unnumberedsubsubsec into one file?
Cheers,
Reinhold
- --
- ------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
* Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
* K Desktop Environment, http://www.kde.org, KOrganizer maintainer
* Chorvereinigung "Jung-Wien", http://www.jung-wien.at/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIgzDoTqjEwhXvPN0RAmhpAKCICifL6PCpX9uXCtWKSvk+vi3PIgCffk3p
PVAFbS1iZWVWM8e72XC3CD4=
=h/NE
-----END PGP SIGNATURE-----