Re: Customizing html file names

Patrice Dumas <[email protected]>
Newsgroups gmane.comp.tex.texinfo.general
Message-ID <[email protected]>
On Sun, Aug 14, 2022 at 11:50:12AM -0700, Raymond Toy wrote:
> On Sun, Aug 14, 2022 at 9:46 AM Patrice Dumas <[email protected]> wrote:
> 
> > On Sun, Aug 14, 2022 at 07:18:45AM -0700, Raymond Toy wrote:
> > > For a while maxima has been customizing the html file names that makeinfo
> > > uses.  Basically, the file names are of the form maxima_nnn.html or
> > > maxima_toc.html for the table of contents.
> > >
> > > I would like to be able to change this so that the appendices or indices
> > > don't get a number.  Using the original names makeinfo would have used is
> > > fine.  I don't know how to do that, so some help would be appreciated.
> >
> > A new version, with a proper use of the API for the document_name, with
> > a version that is an update of the code you shown adapted to the current
> > API, and the other is a file that does what you want, if I understood
> > correctly.
> >
> 
> Thank you very much for your help.  But I tried the maxima_file_names_old.pm
> and I get this error:
> 
> makeinfo: warning: error loading
> /home/toy/src/sourceforge/maxima-code/doc/info/es/../texi2html.init:
> Undefined subroutine
> &Texinfo::Config::texinfo_register_file_id_setting_function called at
> /home/toy/src/sourceforge/maxima-code/doc/info/es/../texi2html.init line 42.
> 
> I'm using texinfo 6.8.

The API I ported to is indeed the finished API from the development
version.  Previously, the API was not finished nor documented.  I do
not remember well how it was possible to do things like I did in the
file I sent, it is probably possible, but it is much less practical,
because of the lack of documentation (even for me...).  I would suggest
using the development version if you use the HTML customization allowed
by init files.  If you really can't, I could try to do something, but I
would suggest keeping the existing init files and not doing any change,
waiting for 6.9.

> In case it matters, texi2html.init also has this at the very top, before
> the code you provided:
> 
> $options->{"EXTRA_HEAD"} = '<link rel="icon" href="figures/favicon.ico">
> <script src="https://polyfill.io/v3/polyfill.min.js?features=es6
> >"></script>';

Should become, with the finished API

set_from_init_file('EXTRA_HEAD', '<link rel="icon" href="figures/favicon.ico">
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6
>"></script>');

-- 
Pat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.