[GRASS-dev] TOC in HTML manual pages

Vaclav Petras wenzeslaus at gmail.com
Sat Apr 19 09:23:44 PDT 2014


On Sat, Apr 19, 2014 at 11:55 AM, Martin Landa <landa.martin at gmail.com>wrote:

> Hi,
>
> 2014-04-19 17:45 GMT+02:00 Vaclav Petras <wenzeslaus at gmail.com>:
>
> > Anyway, I've tried different approach and here is my prototype:
> >
> > https://googledrive.com/host/0B_7Sygt2HTPDamFPOEZpU0h1ZG8/r.mapcalc.html
>
> I like your changes, two small notes:
>
> And do you agree to overall idea of solving this in JS (every time page is
loaded) rather then Python (during compilation)? Or do you like just the
CSS which is of course applicable to any HTML regardless how it was
generated?


> * GRASS GIS 7 label is too big ;-)
>

That is true, there is a lot of space, so it can be either big, or small
with white space or with some other info, not sure which, perhaps the name
of the module stolen by JS from the NAME section, not sure what for GUI and
other non-module pages.


> * link to GRASS 6 could point directly to the manual page of given module
>

This is a great idea. Although, it will not work for modules not available
in the other version, I like it and we should do something like this. What
is unresolved about this when to put the box there, you don't want this to
be shown for offline version since it is trying to solve the case when
search engine returns 65 when user uses 64 or 7*.

Another thing which is different from the solution in trunk is that anchors
are derived from headings which might not be 100% safe but it allows to
link specific section nicely with a link which will not change unless you
rename section:

https://googledrive.com/host/0B_7Sygt2HTPDamFPOEZpU0h1ZG8/r.mapcalc.html#NULL_support

While the numbered id changes when you add section (but is independed on
special characters coming from math or localization):

http://grass.osgeo.org/grass71/manuals/r.mapcalc.html#h3_10

Also you can see that I just used every heading including the generated
ones. Not sure what is better, sure is that NAME section looks even more
strange in TOC then just as a heading, but I would ignore it because you
want to go to SYNOPSIS.

Additionally, I would suggest to generate some anchors even for Flags and
Parameters (Options?). This would allow to link a specific
flag/option/parameter. I'm not at all sure about the format:

http://grass.osgeo.org/grass71/manuals/r.mapcalc.html#expression
http://grass.osgeo.org/grass71/manuals/r.mapcalc.html#option-expression
http://grass.osgeo.org/grass71/manuals/r.mapcalc.html#parameter-expression
http://grass.osgeo.org/grass71/manuals/r.mapcalc.html#synopsis-expression
...

Vaclav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140419/d83ecfaa/attachment.html>


More information about the grass-dev mailing list