bug-texinfo
[Top][All Lists]
Advanced

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

Re: CSS file for texinfo HTML output


From: Per Bothner
Subject: Re: CSS file for texinfo HTML output
Date: Thu, 21 Jul 2016 00:11:46 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1



On 07/20/2016 10:48 PM, Gavin Smith wrote:
On 13 February 2016 at 03:55, Gavin Smith <address@hidden> wrote:
On 9 February 2016 at 02:31, Per Bothner <address@hidden> wrote:
and then add the following in the <head>:
The obvious simply approach is to add --javascript-include and/or
--javascript-ref command-line options to makeinfo, by analogy
with --css-include and --css-ref.

It might be desirable to "plug in" user-selectable JavaScript
user-interface libraries on the fly depending on the user preference,
but the simple makeinfo-time --javascript-ref option will do to start with.

Added in revision 7007. If it looks good, I'll add the option to the
documentation.

No-one's used this feature as far as I know, so I'm tempted to take it
out until we can be more sure it's what we really want.

I've mentioned earlier using JavaScript to generate a table-of-contents
side-bar using Javascript, similar to the Kawa homepage (which is
https://www.gnu.org/software/kawa/ and is currently generated ahead-of-time,
without using JavaScript).

I went ahead and implemented this for the Kawa epub version.
I wrote some JavaScript that loads the epub table-of-contents
page (in Kawa's case bk01-toc.xhtml) and loads it into a
either an iframe or a frameset, depending on the URL used.
Furthermore, it hides and unhides nodes in the ToC so it
only shows the most interesting links (basically children,
ancestors, and siblings).

The Kawa manual is generating using makeinfo --docbook followed
by the docbook/xsl epub scripts.  However, I see no reason why
it wouldn't work with minor changes for html (or xhtml) manuals
generated directly by makeinfo, as long as makeinfo or some other
program generates the foo-toc.xhtml file.

In which case of course you'd need the --javascript-ref flag
- or similar functionality.

((An ebook reader will typically display a table--or-contents
using the contents of (in Kawa's case) bk01-toc.xhtml.
I wanted to be able to distribute the Kawa documentation in the form
an of epub, but make it pleasant to browse even if you're not
using a dedicated epub reader or plugin, so the JavaScript
does the work of the epub plugin.))

If you want to see it in action download and unzip:
ftp://ftp.gnu.org/pub/gnu/kawa/kawa-latest.zip
The epub version of the manual is kawa-2.1.9/doc/kawa-manual.epub.
This is basically just a zip archive of a bunch of xhtml pages that
follow certain conventions. You can unzip it and browse it using
a file: URL (though for security reason there may be some limitations
using file: URLs).  The file kawa-2.1.9/doc/README-epub explains
other ways to browse the manual.
--
        --Per Bothner
address@hidden   http://per.bothner.com/



reply via email to

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