[Top][All Lists]

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

Re: Customization variables for HTML filenames like NODE_FILES

From: Patrice Dumas
Subject: Re: Customization variables for HTML filenames like NODE_FILES
Date: Mon, 22 Apr 2019 16:11:57 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Sun, Apr 21, 2019 at 11:54:11AM +0100, Gavin Smith wrote:
> On Tue, Apr 16, 2019 at 12:23:02AM +0200, Patrice Dumas wrote:
> > > NODE_FILENAMES (and the --node-filenames option) seems to be a holdover 
> > > from texi2html, before node filenames were named in a predictable way.
> > 
> > I do not think so, I think that it allowed to have the generation of the
> > file required for the inter manual links and also have other files
> > generated with another extensions.  This was actually used in the
> > Singular manual.
> I was confused: there is no --node-filenames option.  (I was thinking of 
> --node-files which is used for redirection files.)  The NODE_FILENAMES 
> option could be used to give filenames like "elisp_859.html" instead of 
> "Comment-Tips.html".  I see that is what is done at 
> https://www.singular.uni-kl.de/Manual/4-0-3/, with filenames like 
> sing_5.htm -- is that the Singular manaul you refer to?

Yes, this is the manual I refer to.

> Those pages state they are generated by texi2html.  If they ever start 
> using texi2any instead, is there any reason why they would need to keep 
> that scheme?

Probably not.  But they could, with a function like 
Texinfo::Config::element_file_name if they wanted even without
NODE_FILENAMES, so I think that everything is ok.

> > > The only use I can think of for NODE_FILE_EXTENSION is to use ".htm" 
> > > instead of ".html" on MS-DOS - not worth worrying about.
> > 
> > Actually to be able to use both, .htm for files not used as targets from
> > external manuals, and .html for files used as targets from external 
> > manuals.
> I don't understand; what HTML files that texi2any generates would not be 
> linked to from other HTML manuals?  My understanding is that 
> NODE_FILE_EXTENSION was used for all of the HTML files that texi2any 
> generated.

texi2any generates a few files in addition to nodes files, such as an
about, a file for footnotes, for shortcontents or contents.  It is not
done in the default case, but with -c TEXI2HTML which is set in the
tests in the default case, those files are generated if needed. File


> Do you mean that with NODE_FILE_EXTENSION, links to other manuals would 
> still use '.html'?

They would still have used NODE_FILE_EXTENSION and not EXTENSION.

> I've removed TOP_NODE_FILE.


> I agree it is simpler to include the extension in the value of 
> TOP_NODE_FILE_TARGET.  But the Top node file for other manuals will 
> always be 'index.html' if these manuals have been generated in such a 
> way that they can be linked to reliably.  Moreover, if a manual links to 
> more than one external manual, there is no way to specify different 
> filenames for the Top nodes of those manuals.

There is the trick used with --node-files that sets up a redirection to 
TOP_NODE_FILE_TARGET, so the index.html file can be a redirection rather
than the file with real html content.

> > > It is not useful to set USE_SETFILENAME_EXTENSION explicitly (the 
> > > extension 
> > > to the argument to @setfilename, usually .info, is only used for Info 
> > > output).
> > 
> > Indeed, but this needs to remain in one way or another, to do something
> > different for info and other formats.  It is explicitly said that users
> > should not modify it:
> > 
> >      Default is on for Info, off for other output.  If set, use exactly
> >      what '@setfilename' gives for the output file name, including the
> >      extension.  You should not need to explicitly set this variable.
> > 
> > I think that this one should stay.
> What's the point of making this visible to the users?  Couldn't it be 
> made the default behaviour without an option?  I could think of these 
> two use cases:
> * If you want to say something like "@setfilename manual.htm" for a 
> manual that is only converted to HTML, and not to Info -- but this would 
> be an incorrect use of @setfilename.

Not so incorrect, this could make sense for a user who is not interested
at all in info and want another format to use @setfilename to set the

> * If you are outputting to Info, and you want to override the 
> @setfilename command in the file (e.g. if they had done "@setfilename 
> manual", with no extension).  I think this could be dealt with by 
> setting EXTENSION to the desired extension.

Right now it is not possible, one need to use both
USE_SETFILENAME_EXTENSION=0 and EXTENSION to have the desired extension
in info.

So I think that it is better to have that visible to the users, with the
documentation stating that it should not be changed, but the possibity
for users who know what they are doing to use it.


reply via email to

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