texi2html-bug
[Top][All Lists]
Advanced

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

[Texi2html-bug] init_out() function is called only after the TOC is gene


From: Reinhold Kainhofer
Subject: [Texi2html-bug] init_out() function is called only after the TOC is generated!
Date: Thu, 26 Mar 2009 17:47:29 +0100
User-agent: KMail/1.11.1 (Linux/2.6.27-11-generic; KDE/4.2.1; i686; ; )

Hi Patrice,
I'm trying to tweak the layout of our table-of-contents frame, depending on 
some command-line switch (-D short_toc). I'm trying to set a global perl 
variable in the .init file via (or of course via @set short_toc 1 in the 
texinfo file):

my $page_toc_depth = 2;
sub lilypond_init_out()
{
  my $rval = t2h_default_init_out();
  if (exists($main::value{'short_toc'})) {
    $page_toc_depth = 1;
  }
  return $rval;
}

This works mainly, except that the toc_body is called before the init_out, so 
there is no way to influence the default TOC generation by variables using 
@set... 
Thus, this setting (and all other settings done in the recommended init_out 
hook) will not have any effect on the toc.
The other entry point wout be a command_handler_init, but unfortunately they 
are executed before the variables set using @set are available, so I can't use 
that, either.

Or am I missing anything here? 

Cheers,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org




reply via email to

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