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: Mon, 8 Feb 2016 10:55:33 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0



On 02/08/2016 07:48 AM, Tom Tromey wrote:
Per> Also with JavaScript one could have the same keyboard shortcuts
Per> (more or less) as the info program or Emacs info mode.

See https://github.com/nicferrier/gnudoc-js

The demo link doesn't work so it's hard to try it out:
It depends on docker and elnode and proxying the GNU website.
Interesting, and probably has some useful code, but
it looks like a dead end to me.

What I have in mind is much simpler: Just a standalone
JavaScript file that could be imported in the HTML
file with a simple <script>, and doesn't require a
server or big libraries.

The attached (zip'd) info.js is a proof-of-concept.
It implements the 'n', 'p', and 'u' commands.

Just generate a single-file .html file:

makeinfo --html --no-split  -I . -o foo.html foo.texi

and then add the following in the <head>:

<script type="text/javascript" src="info.js"></script>

My prototype doesn't handle the more complex commands
like 'm' or searches, but that should be a "small matter of programming".
It might be reasonable (possibly optional) to hide nodes other than
the current one - especially for a home page, which one
doesn't want to look too cluttered.
Another possible enhancement would be to generate a side-bar
like I do for Kawa and DomTerm: http://domterm.org

The info.js is unnecessarily complex because the structure
of the html generated by makeinfo (texinfo 6.0) is very poor.
To start with texinfo really should generate id="xxx" attributes
rather than <a name="xxx"> nodes.

--
        --Per Bothner
address@hidden   http://per.bothner.com/

Attachment: info.zip
Description: Zip archive


reply via email to

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