help-texinfo
[Top][All Lists]
Advanced

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

Re: [help-texinfo] texi2html Questions


From: Patrice Dumas
Subject: Re: [help-texinfo] texi2html Questions
Date: Wed, 30 Nov 2011 22:31:20 +0100
User-agent: Mutt/1.4.2.2i

On Tue, Nov 29, 2011 at 04:39:54PM -0600, Joel Sherrill wrote:
> Hi,
> 
> I am ashamed to admit that the RTEMS project
> (http://www.rtems.org) is still using texi2www.
> Anyone else remember that?

I didn't knew it, but the last release was some years
before I became involved in texi2html...

> + What should we be using? With texi2html folding
> into texinfo, is this just a packaging issue or will
> a new command replace texi2html?  I would hate to get
> moved up to texi2html only to be days away from it
> being obsolete.

It is obsolete, but a lot of what was in texi2html is now
in one form or another in texinfo and will be in the
next release.  The API changed, however and is still not
final and will only be finalized after the release.

> + texi2www had a "library" navigation button which
> could take you out of a document to a list of documents
> for the project.  Is there an equivalent for this in
> texi2html? I don't want to override all the buttons,
> just add one.

This is possible, but it is a bit involved, not really 
intuitive, and not documented.

Here is the perl code that you could put in an init file:

texinfo_register_handler('setup', \&add_button);

my $button_text = '<a href="../dir.html">Directory</a>';
sub add_button($)
{
  my $self = shift;
  foreach my $button_type ('SECTION_BUTTONS', 'CHAPTER_BUTTONS', 
                           'MISC_BUTTONS', 'TOP_BUTTONS') {
    my $buttons = $self->get_conf($button_type);
    push @$buttons, \$button_text;
  }
  return 1;
}


> + texi2www had a -header and -footer argument that
> took a filename to include in the output
> html.  I think EXTRA_HEAD or  AFTER_BODY_OPEN is what I
> am looking for. But I have no idea if these are the right
> variables and how one goes about setting them.

It is AFTER_BODY_OPEN.  And for the footer it is PRE_BODY_CLOSE.

You can either pass the text to the command line, but it is quite
ugly:

./texi2any.pl --verbose  --html c.texi --init exm.init  
--set=AFTER_BODY_OPEN='<A HREF="http://www.rtems.com";  target="Text Frame">
<IMG align=right BORDER=0 SRC="../images/rtems_logo.jpg" ALT="RTEMS
Logo">  </A>
<H1>RTEMS @VERSION@ On-Line Library</H1>
'

Or you can set it in an init file like

set_from_init_file ('AFTER_BODY_OPEN', 
'<A HREF="http://www.rtems.com";  target="Text Frame">
<IMG align=right BORDER=0 SRC="../images/rtems_logo.jpg" ALT="RTEMS
Logo">  </A>
<H1>RTEMS @VERSION@ On-Line Library</H1>
');

-- 
Pat



reply via email to

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