Re: [hatari-devel] Hatari manual internal links problem

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Sat, 22 Dec 2012 21:14:36 +0200
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> On lauantai 22 joulukuu 2012, Thomas Huth wrote:
> > schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> > > It doesn't work.
> > 
> > I've added a fix to the toc script, so it now seems to work fine -
> > at least with Firefox, Chromium and Konqueror.
> 
> It works with Chromium 6.x, but it doesn't work with Konqueror from
> KDE 4.4.5.

I am also using that version ... and it was working ok here for the
first tries, but now that I've tested it again, it also failed
sometimes. Seems to be a little bit shaky / dependend on how fast the
page loads. Also Konqueror often seems to cache the old page, so make
sure that you hit the reload button when you try a new version.

Anyway, I've changed the toc.js script again with a better fix that is
less a hack than a real fix now. Please test again.

> > And I don't like the idea to re-introduce manual id-tags (or named
> > anchors) for the headers again. We've had that in the past and it
> > also never really worked well - they were often not up-to-date
> > anymore.
> 
> I could write a script that automatically generates the ID attributes
> for all H tags (and generates index based on those).  Same script
> could also validate that all internal references are valid.

For a really proper script, you need to work on the DOM level of the
document. Only using some regex magic often fails as soon as one line
is written in a slightly different way - we've had that in the past
already, with the old bash script for generating the index.

That's why I really prefer the JavaScript TOC here - it can easily work
on the DOM level of the document. And it is automatically always up to
date, without hooks or other magic.

> > So if the fixed toc script now works with all major browsers, I'd
> > rather suggest to remove the remaining manual id-tags instead.
> 
> If somebody's going to look porting Hatari to Firebee/MiNT, surely
> Hatari manual should work (have index) there too.  Is there any
> Atari browser which support JavaScript? :-)

Draconis supports JavaScript according to their web page.

Anyway, we're not living in the 1990s anymore. JavaScript is now a real
wide-spread standard, and as long as the documents are at least
basically viewable without JavaScript (for w3m etc.), I don't think we
really have to have this "oh, but I want to view this document
including the TOC on my stoneage browser here" discussion, do we?
Or do you also want to replace the screenshots that we have in the
manual with ASCII art, just in case that somebody uses a browser that
does not support images?

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/