Re: How to create help files / menus?



Here's how I do this at the moment:

- write user guide in latex

- label sections which I want to be able to call up from
 the app, eg.

   \section{Loading files}
   \mylabel{sec:load}

   Press the Load button to load a file.

- \mylabel{} adds a comment to the HTML including the label text

- use latex2html to generate the formatted manual

- a tiny perl program scans the formatted manual and finds URLs for each of the magic HTML comments inserted by \mylabel{}

- the formatted manual gets installed at $prefix/share/doc/whatever

- I have some extra stuff to discover $prefix at run time

- when you push the Help button in the file load dialog, it calls
 show_url( "sec:load" )

- which points mozilla (there's a preference to change the HTML viewer) at the right part of the manual

- win32 and mac os have more sensible ways to show a URL ... #ifdefs
 use those techniques instead on those platforms

No doubt there's a better way :-/ If you're interested in the sorts of indexing and cross referencing possible with latex2html, there's an on-line version of my manual here:

 http://www.vips.ecs.soton.ac.uk/vips-7.8/doc/nip/html/index.html

John

David Topper wrote:
I'd like to set up a nice help file mechanism for my GTK/GNOME apps. Does anyone have a preference? Ideally, it would be nice to have a fully cross-referenced mechanism. I'm looking at libxml2 right now but am not currently sold on it.



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