texi2html-bug
[Top][All Lists]
Advanced

[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: Sat, 9 Aug 2008 13:55:56 +0200
User-agent: KMail/1.9.9

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Patrice,

Thanks for all your quick fixes! I'm now rebuilding all of the lilypond 
documentation... Hopefully no more issues will appear ;-)


Am Freitag, 8. August 2008 schrieb Patrice Dumas:
> On Mon, Aug 04, 2008 at 07:43:31PM +0200, Reinhold Kainhofer wrote:
> > Am Montag, 4. August 2008 schrieb Reinhold Kainhofer:
> > > Unfortunately, I can't find any hook, which is called between the
> > > assignment of THISDOC{'input_file_name'} and the call to
> > > rearrange_elements (I don't care much about the element_file_name calls
> > > for special nodes, which happen immediately after the 'input_file_name'
> > > assignment).
> >
> > Well, I now found the command init handlers, so I'm misusing the
> > @Texi2HTML::Config::command_handler_init array to force texi2html to call
> > my own handler function before parsing the texi file. Is this a misuse of
> > the command_handler_init or is it supposed to be used for such things? It
> > just feels so different from the other paradigms used to tweak
> > texi2html...
>
> It is done exactly for that use. 

Ah, cool, so reading the code sometimes IS useful ;-)

> It is originally taken from the 
> latex2html part that I wanted to get out of the main processing.

Hehe, yeah, that was pretty clear from the code 

> Do you think that this interface is badly done and should be done
> otherwise? It is documented in 'Bypassing normal formatting'.

Ah, I skipped that part of the docs, because I thought it was only dealing 
with how to customize formatting for various environments. I didn't expect 

> As a side note, I am not sure that there is really a paradigm for
> texi2html tweaking... It is very ad-hoc, and I certainly didn't designed
> anything consciously when I added to the already existing interface done
> by Olaf.
>
> It may be interesting, however if you could explain what paradigm you
> have seen, such that in the future we stick to a given style.

Most other tweaks work by writing your own function, assigning a ref to it in 
a variable in the $Texi2HTML::Config:: context. If you want/need the default 
functionality, you'll have to call the default function manually in your own 
function.

The other tweaks I have encountered are by setting some internal arrays or 
hashes, which are used by the default functions.

Here, however, suddenly you don't assign a function ref to a variable, but add 
the function to a list of functions that are sequentially called. You don't 
need to call a default function any more etc. That was the new paradigm, 
which I wasn't used to in texi2html yet. 
Of course, considering its functionality, it makes sense here, since typically 
the other init handlers should be called in any case.

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)

iD8DBQFInYXMTqjEwhXvPN0RAtPSAJ0XptbwvopMWjZL57Tbl8vx8YVR8ACg3iOP
neIRNAKvvi63Gp7rzsKjF4c=
=PE3E
-----END PGP SIGNATURE-----




reply via email to

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