summaryrefslogtreecommitdiff
path: root/doc/menu.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/menu.html')
-rw-r--r--doc/menu.html/ch1.html207
-rw-r--r--doc/menu.html/ch2.html192
-rw-r--r--doc/menu.html/ch3.html1249
-rw-r--r--doc/menu.html/ch4.html145
-rw-r--r--doc/menu.html/ch5.html226
-rw-r--r--doc/menu.html/ch6.html224
-rw-r--r--doc/menu.html/ch7.html821
-rw-r--r--doc/menu.html/ch8.html665
-rw-r--r--doc/menu.html/index.html208
9 files changed, 3937 insertions, 0 deletions
diff --git a/doc/menu.html/ch1.html b/doc/menu.html/ch1.html
new file mode 100644
index 0000000..e060eb6
--- /dev/null
+++ b/doc/menu.html/ch1.html
@@ -0,0 +1,207 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Debian Menu System - Introduction</title>
+
+<link href="index.html" rel="start">
+<link href="index.html" rel="prev">
+<link href="ch2.html" rel="next">
+<link href="index.html#contents" rel="contents">
+<link href="index.html#copyright" rel="copyright">
+<link href="ch1.html" rel="chapter" title="1 Introduction">
+<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user">
+<link href="ch3.html" rel="chapter" title="3 The menu file">
+<link href="ch4.html" rel="chapter" title="4 What packages with applications should do">
+<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do">
+<link href="ch6.html" rel="chapter" title="6 How a user can override the menus">
+<link href="ch7.html" rel="chapter" title="7 The internals of the menu package">
+<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts">
+<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?">
+<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files">
+<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints">
+<link href="ch3.html#s3.1" rel="section" title="3.1 Location">
+<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax">
+<link href="ch3.html#s3.3" rel="section" title="3.3 The title field">
+<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field">
+<link href="ch3.html#s3.5" rel="section" title="3.5 The section field">
+<link href="ch3.html#s3.6" rel="section" title="3.6 The command field">
+<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field">
+<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field">
+<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections.">
+<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars">
+<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file">
+<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages">
+<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus">
+<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed">
+<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files">
+<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program">
+<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program">
+<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions">
+<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization">
+<link href="ch8.html#s8.1" rel="section" title="8.1 String constants">
+<link href="ch8.html#s8.2" rel="section" title="8.2 Variables">
+<link href="ch8.html#s8.3" rel="section" title="8.3 Functions">
+<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables">
+<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables">
+<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables">
+
+</head>
+
+<body>
+
+<p><a name="ch1"></a></p>
+<hr>
+
+<p>
+[ <a href="index.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ 1 ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch2.html">next</a> ]
+</p>
+
+<hr>
+
+<h1>
+Debian Menu System
+<br>Chapter 1 - Introduction
+</h1>
+
+<hr>
+
+<p>
+Before the advent of <code>update-menus</code>, when the sysadmin installed a
+package onto a Debian system, they would need to edit various window manager
+config files to make the new program show up on, for example,
+<code>fvwm</code>'s menus. The menus could easily become out of sync with what
+programs were actually available, with some menu items that didn't work, and
+other programs that lacked a menu entry. update-menus and Debian's menu
+package aim to solve this problem.
+</p>
+
+<p>
+<code>update-menus</code> automatically generates menus of installed programs
+for window managers and other menu programs. It should be run whenever a menu
+file or menu-method file is changed. <code>update-menus</code> will be ran
+automatically when Debian packages that contain menu files are installed or
+removed from the system. Users themselves can add/delete menu items, and
+should then run <code>update-menus</code> as that user, thus creating
+window-manager startup files that are used in preference to the systemwide
+files.
+</p>
+
+<p>
+One problem we ran into with menu-1.x (and before) was that the number of
+entries in any submenu vary wildly: on my system there are only two entries in
+<samp>/Applications/Editors</samp>, while I'm sure that other people have more
+like 20 entries there. Many people complained about the fullness of certain
+submenus, citing scientific studies or personal experience to explain why
+overfull or underfull submenus are a bad thing. To overcome this, menu-2.0 now
+can optimize the tree itself, possibly subdividing for example the
+<samp>/Applications/Editors</samp> tree in, say <samp>Editors/Beginner</samp>,
+<samp>Editors/Experienced</samp>, or whatever, if there are many entries in
+that submenu, or maybe even totally removing <samp>/Applications/Editors</samp>
+on systems where there are few editors installed. To be able to do this, menu
+follows the information supplied to it in the `hints' variables (see paragraph
+below, or the hints chapter).
+</p>
+
+<p>
+Each package that needs to add an entry to the menu tree, includes a menu file
+<code>/usr/share/menu/package-name</code>. In this file, it will have one line
+per menu entry, like this (copied from <code>/usr/share/menu/xbase</code>):
+</p>
+
+<pre>
+ ?package(xbase):command=&quot;/usr/bin/xedit&quot; needs=&quot;X11&quot; \
+ section=&quot;Applications/Editors&quot; title=&quot;Xedit&quot; \
+ hints=&quot;Beginner,Small&quot;
+</pre>
+
+<p>
+This describes the type of interface Xedit needs (X11), the menu section the
+menu entry should be in, the menu text, and the command that should be
+executed. Also, it tells menu that, if <samp>/Applications/Editors</samp> is
+overfull, it could put Xedit in a <samp>Applications/Editors/Beginner</samp> or
+<samp>Applications/Editors/Small</samp> subsection.
+</p>
+
+<p>
+Whenever <samp>root</samp> runs <code>update-menus</code>, it will check all
+menu files in <code>/etc/menu</code>, <code>/usr/lib/menu</code>,
+<code>/usr/share/menu</code>, and run the installation scripts that display
+managers like <code>fvwm2</code> should provide in
+<code>/etc/menu-methods</code>.
+</p>
+
+<p>
+The menu package itself provides a set of default menu files, for people to get
+the idea, and to speed up things a bit. (These files should be incorporated
+into the package.)
+</p>
+
+<p>
+Note, that substantial and incompatible changes took place with the menu-1.0
+release, while substantial features were added by the release of menu-2.0.
+This document describes menu-2.0. Menu-2.0 now doesn't accept the menu-methods
+written for menu-0.x, but for most window managers that still have those old
+menu-methods, I have put new style menu-methods in
+/usr/share/doc/menu/examples. Everything written for menu-1.0 will work with
+menu-2.0.
+</p>
+
+<p>
+Most notable changes between menu-0.x and menu-1.x are listed in the file
+README.changes in the menu package, the features added by menu-2.0 can be
+summarised here: hints, and the menu-2 compat mode. (where lines are finished
+by a ';' instead of a newline).
+</p>
+
+<hr>
+
+<p>
+[ <a href="index.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ 1 ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch2.html">next</a> ]
+</p>
+
+<hr>
+
+<p>
+Debian Menu System
+</p>
+
+<address>
+version 1.4, 10 November 2011<br>
+<br>
+Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br>
+Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br>
+Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br>
+Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br>
+<br>
+</address>
+<hr>
+
+</body>
+
+</html>
+
diff --git a/doc/menu.html/ch2.html b/doc/menu.html/ch2.html
new file mode 100644
index 0000000..558e9b4
--- /dev/null
+++ b/doc/menu.html/ch2.html
@@ -0,0 +1,192 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Debian Menu System - Menu from the viewpoint of a user</title>
+
+<link href="index.html" rel="start">
+<link href="ch1.html" rel="prev">
+<link href="ch3.html" rel="next">
+<link href="index.html#contents" rel="contents">
+<link href="index.html#copyright" rel="copyright">
+<link href="ch1.html" rel="chapter" title="1 Introduction">
+<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user">
+<link href="ch3.html" rel="chapter" title="3 The menu file">
+<link href="ch4.html" rel="chapter" title="4 What packages with applications should do">
+<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do">
+<link href="ch6.html" rel="chapter" title="6 How a user can override the menus">
+<link href="ch7.html" rel="chapter" title="7 The internals of the menu package">
+<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts">
+<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?">
+<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files">
+<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints">
+<link href="ch3.html#s3.1" rel="section" title="3.1 Location">
+<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax">
+<link href="ch3.html#s3.3" rel="section" title="3.3 The title field">
+<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field">
+<link href="ch3.html#s3.5" rel="section" title="3.5 The section field">
+<link href="ch3.html#s3.6" rel="section" title="3.6 The command field">
+<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field">
+<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field">
+<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections.">
+<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars">
+<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file">
+<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages">
+<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus">
+<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed">
+<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files">
+<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program">
+<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program">
+<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions">
+<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization">
+<link href="ch8.html#s8.1" rel="section" title="8.1 String constants">
+<link href="ch8.html#s8.2" rel="section" title="8.2 Variables">
+<link href="ch8.html#s8.3" rel="section" title="8.3 Functions">
+<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables">
+<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables">
+<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables">
+
+</head>
+
+<body>
+
+<p><a name="ch2"></a></p>
+<hr>
+
+<p>
+[ <a href="ch1.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ 2 ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch3.html">next</a> ]
+</p>
+
+<hr>
+
+<h1>
+Debian Menu System
+<br>Chapter 2 - Menu from the viewpoint of a user
+</h1>
+
+<hr>
+
+<hr>
+
+<h2><a name="s2.1"></a>2.1 How/when do the window manager startup files get created?</h2>
+
+<p>
+Basically, users don't need to know any of how and when the startup files are
+created, but they might be interested to know anyway.
+</p>
+
+<p>
+When a package that wants to add something to the menu tree gets installed, it
+will run <code>update-menus</code> in its <code>postinst</code> script.
+Update-menus then reads in all menu files in <code>/etc/menu/</code>,
+<code>/usr/lib/menu</code>, <code>/usr/share/menu</code> and
+<code>/usr/share/menu/default</code>, and stores the menu entries of all
+installed packages in memory. Once that has been done, it will run the
+menu-methods in <code>/etc/menu-methods/*</code>, and pipe the information
+about the menu entries to the menu-methods on stdout, so that the menu-methods
+can read this. Each window-manager or other program that wants to have the
+Debian menu tree, will supply a menu-method script in
+<code>/etc/menu-methods/</code>. This menu-method then knows how to generate
+the startup-file for that window manager. To facilitate this task for the
+window-manager maintainers, menu provides a <code>install-menu</code> program.
+This program can generate the startupfiles for just about every window manager.
+</p>
+
+<hr>
+
+<h2><a name="s2.2"></a>2.2 Tuning of the generated window manager startup files</h2>
+
+<p>
+In principle this is a very window-manager specific business. But for all
+window managers (and others) applies:
+</p>
+
+<p>
+The file to attack is the menu-method in <code>/etc/menu-methods/$wm</code>,
+with <samp>$wm</samp> the name of your window manager. However, if this
+menu-method <samp>!include</samp>-s the <code>menu.h</code> file (as it
+should), you can also edit that file, to make your changes work for every
+installed window manager.
+</p>
+
+<p>
+If the menu-method file of your window manager does <samp>!include</samp> the
+<code>menu.h</code> file, and makes proper use of the definitions in there,
+then you can look at the comments in that <code>menu.h</code> file to see how
+you can make minor adjustments to the look of your menus in your window
+manager.
+</p>
+
+<p>
+To generally change the menu tree, see the next section.
+</p>
+
+<hr>
+
+<h2><a name="s2.3"></a>2.3 Optimization of menu tree: hints</h2>
+
+<p>
+If <samp>hint_optimize=true</samp> has been set in a menu-method script
+(actually, that definition should appear in the <samp>!include</samp>-ed
+<samp>menu.h</samp> file), then install-menu will try to alter the menu tree,
+to make every submenu have about the optimum number of menu entries (as
+specified by <samp>hints_nentry=...</samp>). It will do that by removing
+under-full submenus (only if the `parent' of that submenu isn't itself already
+overfull), and by possibly creating new submenus, using hints. Note, however,
+that the optimization of the tree takes in principle exponential time, so menu
+speeds up the process, at the expense of occasionally not finding the best
+tree. So, the tree you are presented with may not be optimal. For tuning
+variables, see the hint_* variables in the last chapter.
+</p>
+
+<hr>
+
+<p>
+[ <a href="ch1.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ 2 ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch3.html">next</a> ]
+</p>
+
+<hr>
+
+<p>
+Debian Menu System
+</p>
+
+<address>
+version 1.4, 10 November 2011<br>
+<br>
+Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br>
+Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br>
+Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br>
+Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br>
+<br>
+</address>
+<hr>
+
+</body>
+
+</html>
+
diff --git a/doc/menu.html/ch3.html b/doc/menu.html/ch3.html
new file mode 100644
index 0000000..673b251
--- /dev/null
+++ b/doc/menu.html/ch3.html
@@ -0,0 +1,1249 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Debian Menu System - The menu file</title>
+
+<link href="index.html" rel="start">
+<link href="ch2.html" rel="prev">
+<link href="ch4.html" rel="next">
+<link href="index.html#contents" rel="contents">
+<link href="index.html#copyright" rel="copyright">
+<link href="ch1.html" rel="chapter" title="1 Introduction">
+<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user">
+<link href="ch3.html" rel="chapter" title="3 The menu file">
+<link href="ch4.html" rel="chapter" title="4 What packages with applications should do">
+<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do">
+<link href="ch6.html" rel="chapter" title="6 How a user can override the menus">
+<link href="ch7.html" rel="chapter" title="7 The internals of the menu package">
+<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts">
+<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?">
+<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files">
+<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints">
+<link href="ch3.html#s3.1" rel="section" title="3.1 Location">
+<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax">
+<link href="ch3.html#s3.3" rel="section" title="3.3 The title field">
+<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field">
+<link href="ch3.html#s3.5" rel="section" title="3.5 The section field">
+<link href="ch3.html#s3.6" rel="section" title="3.6 The command field">
+<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field">
+<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field">
+<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections.">
+<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars">
+<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file">
+<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages">
+<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus">
+<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed">
+<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files">
+<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program">
+<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program">
+<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions">
+<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization">
+<link href="ch8.html#s8.1" rel="section" title="8.1 String constants">
+<link href="ch8.html#s8.2" rel="section" title="8.2 Variables">
+<link href="ch8.html#s8.3" rel="section" title="8.3 Functions">
+<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables">
+<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables">
+<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables">
+
+</head>
+
+<body>
+
+<p><a name="ch3"></a></p>
+<hr>
+
+<p>
+[ <a href="ch2.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ 3 ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch4.html">next</a> ]
+</p>
+
+<hr>
+
+<h1>
+Debian Menu System
+<br>Chapter 3 - The menu file
+</h1>
+
+<hr>
+
+<hr>
+
+<h2><a name="s3.1"></a>3.1 Location</h2>
+
+<p>
+Packages-provided menu files should be in <code>/usr/share/menu/</code>, unless
+the menu files are actually executable binaries, in which case they go in
+<code>/usr/lib/menu/</code>. System-local menu files should be in
+<code>/etc/menu/</code>. User-specific menu files should be in
+<code>~/.menu/</code>
+</p>
+
+<hr>
+
+<h2><a name="s3.2"></a>3.2 Syntax</h2>
+
+<p>
+The format is:
+</p>
+
+<pre>
+ ?package(package[,package2,...]): \
+ field1=&quot;value1&quot;\
+ field2=&quot;value2&quot;\
+</pre>
+
+<p>
+Here is an example to describe the syntax of such a file:
+</p>
+
+<pre>
+ ?package(gnumeric):\ specifies what packages need to be installed
+ multiple requirements should be separated by
+ comma
+ needs=&quot;X11&quot;\ what kind of environment this command expects
+ section=&quot;Applications/Office&quot;\ in what section this menu entry should be
+ title=&quot;Gnumeric&quot;\ the title of the menu entry
+ command=&quot;gnumeric&quot; \ the command to run
+ hints=&quot;Gnome,Spreadsheets&quot; \ some hints about menu placement.
+ icon=&quot;/usr/share/pixmaps/gnumeric.xpm&quot; the path to the icon to use.
+</pre>
+
+<p>
+A number sign (&quot;#&quot;) can be used to include comments. An entry must
+be terminated by a newline; however you can use a backslash to escape a
+newline.
+</p>
+
+<p>
+Values must be quoted with &quot;, and meta-characters (&quot;, backslash,
+newline) must be escaped with a backslash.
+</p>
+
+<p>
+You can include several entries in the same file.
+</p>
+
+<p>
+The file must be encoded in 7-bit ASCII. This is necessary to accomodate
+window managers that do not support 8-bit encodings. However the translations
+are not limited in encoding.
+</p>
+
+<p>
+<samp>?package(...)</samp> contains a comma-separated list of packages that
+need to be installed for the menu entry to be displayed. That should include
+the package containing the menu file and any packages necessary to run the
+command not depended on by the package nor essential. Users can use
+pseudo-package names starting with &quot;<samp>local.</samp>&quot; which are
+assumed to be always installed.
+</p>
+
+<p>
+The fields <samp>needs</samp>, <samp>section</samp>, <samp>title</samp> and
+<samp>command</samp> are mandatory. Other fields are optional. Custom fields
+are supported, so you can add new fields for you own purpose. If a field is
+specified multiple times in a menu entry, the last instance will be used.
+</p>
+
+<hr>
+
+<h2><a name="s3.3"></a>3.3 The <samp>title</samp> field</h2>
+
+<p>
+The <samp>title</samp> must follow the following requirements:
+</p>
+<ol type="1" start="1" >
+<li>
+<p>
+It must be short. There is an optional <samp>longtitle</samp> field for users
+that want longer titles.
+</p>
+</li>
+</ol>
+<ol type="1" start="2" >
+<li>
+<p>
+It must be properly capitalized. Use <em>Emacs</em> and not <em>emacs</em>.
+</p>
+</li>
+</ol>
+<ol type="1" start="3" >
+<li>
+<p>
+It must be unique. Two entries must not have the same title.
+</p>
+</li>
+</ol>
+
+<hr>
+
+<h2><a name="s3.4"></a>3.4 The <samp>needs</samp> field</h2>
+
+<p>
+The following <samp>needs</samp> are documented for use in the Debian menu.
+</p>
+<ol type="1" start="1" >
+<li>
+<p>
+<samp>X11</samp>: if this program runs under X11.
+</p>
+</li>
+</ol>
+<ol type="1" start="2" >
+<li>
+<p>
+<samp>text</samp>: if it runs under a terminal. X11 window managers will spawn
+an X terminal emulator.
+</p>
+</li>
+</ol>
+<ol type="1" start="3" >
+<li>
+<p>
+<samp>vc</samp>: if it runs under a linux virtual console but not under a X
+terminal emulator.
+</p>
+</li>
+</ol>
+<ol type="1" start="4" >
+<li>
+<p>
+<samp>wm</samp>: if it is a X11 window manager. The current window manager
+will exec(2) this program to avoid &quot;Another window manager is
+running&quot; errors.
+</p>
+</li>
+</ol>
+
+<p>
+A menu manager can use a special <samp>needs</samp> value reflecting the menu
+manager name for menu entries that must only be displayed in this menu manager.
+Examples include <samp>fvwm</samp> modules, <samp>dwww</samp> menu entries.
+</p>
+
+<p>
+A program like gnuplot which can be run on X11 as well as on a text terminal
+should <em>not</em> have an extra entry with <samp>needs=X11</samp> with an
+hard-coded call to an X terminal emulator, because this would defeat the
+configuration mechanism of menu that allow to choose which window manager is
+called.
+</p>
+
+<p>
+On the other hand, if a program (like <code>emacs</code>) can be run as real X
+application as well as in a terminal, two entries should be listed, otherwise
+the program will always be run in an <code>xterm</code> (or <code>rxvt</code>).
+However, two entries are not allowed to have the same title. The title must be
+unique.
+</p>
+
+<hr>
+
+<h2><a name="s3.5"></a>3.5 The <samp>section</samp> field</h2>
+
+<p>
+The <samp>section</samp> field holds a slash-separated list of hierarchical
+sections components.
+</p>
+
+<p>
+The <em>authoritative list of Debian's menu structure</em> is maintained in the
+Debian Menu sub-policy document which is part of the Debian Policy package.
+The current menu structure was drafted in 2006 by Linas Zvirblis with input
+from the debian-devel mailing list.
+</p>
+
+<p>
+The menu structure below is included only for convenience and is not
+authoritative. If it disagrees with the structure in the Debian Menu
+sub-policy, please send a wishlist bug to the <samp>menu</samp> package.
+</p>
+
+<p>
+Packages must be placed in leaf sections. Please do <em>not</em> put your
+packages into any other sections.
+</p>
+<dl>
+<dt>Applications</dt>
+<dd>
+<p>
+Normal applications
+</p>
+<dl>
+<dt>Accessibility</dt>
+<dd>
+<p>
+Tools to aid people with disabilities or for machines lacking usual input
+devices.
+</p>
+
+<p>
+Examples: gok, yasr, dasher.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Amateur Radio</dt>
+<dd>
+<p>
+Anything relating to HAM radio.
+</p>
+
+<p>
+Examples: baken, hamsoft, twlog
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Data Management</dt>
+<dd>
+<p>
+Interactive database programs, collection managers, address books, bibliography
+tools, etc.
+</p>
+
+<p>
+gaby, alexandria, mdbtools
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Editors</dt>
+<dd>
+<p>
+Editors, other than office word processors, for text-based information.
+</p>
+
+<p>
+Examples: ksubtile, nano, hexedit
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Education</dt>
+<dd>
+<p>
+Educational and training softwares.
+</p>
+
+<p>
+Examples: gtypist, gcompris, quiz
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Emulators</dt>
+<dd>
+<p>
+Software that allows you to run non-native software or more than one OS at a
+time.
+</p>
+
+<p>
+Examples: wine, dosemu, qemu
+</p>
+</dd>
+</dl>
+<dl>
+<dt>File Management</dt>
+<dd>
+<p>
+Tools for file management, archiving, searching, CD/DVD burning, backup, etc.
+</p>
+
+<p>
+Examples: file-roller, mc, baobab
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Graphics</dt>
+<dd>
+<p>
+2D and 3D graphics manipulation software.
+</p>
+
+<p>
+Examples: gimp, inkscape, imagemagick
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Mobile Devices</dt>
+<dd>
+<p>
+Software that allows you to interface with mobile devices (phones, PDAs, etc.).
+</p>
+
+<p>
+Examples: kandy, gnokii, gnome-pilot
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Network</dt>
+<dd>
+<p>
+Network related software. This is a three-level section, do not put entries
+directly here.
+</p>
+<dl>
+<dt>Communication</dt>
+<dd>
+<p>
+Mail, USENET news, chat, instant messaging, IP telephony, video conferencing
+software, etc.
+</p>
+
+<p>
+Examples: xchat, gaim, mutt
+</p>
+</dd>
+</dl>
+<dl>
+<dt>File Transfer</dt>
+<dd>
+<p>
+File transfer software such as download managers, FTP clients, P2P clients,
+etc.
+</p>
+
+<p>
+Examples: amule, gftp, d4x
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Monitoring</dt>
+<dd>
+<p>
+Network monitoring software
+</p>
+
+<p>
+Examples: gip, ettercap, iptstate
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Web Browsing</dt>
+<dd>
+<p>
+Web browsers, tools for offline browsing, etc.
+</p>
+
+<p>
+Examples: elinks, epiphany-browser, webhttrack
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Web News</dt>
+<dd>
+<p>
+Web feed (RSS, Atom, etc.) and podcast aggregators.
+</p>
+
+<p>
+Examples: akregator, kitty, liferea
+</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<dl>
+<dt>Office</dt>
+<dd>
+<p>
+Office suites, word processors, spreadsheets, CRM, ERP, financial sofware, etc.
+</p>
+
+<p>
+Examples: openoffice.org, tinyerp-client, gnucash
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Programming</dt>
+<dd>
+<p>
+IDEs, debuggers, etc.
+</p>
+
+<p>
+Examples: anjuta, gdb, eclipse
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Project Management</dt>
+<dd>
+<p>
+Timetable managers, group task trackers, bug tracking software, etc.
+</p>
+
+<p>
+Examples: planner, bugzilla, gnotime
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Science</dt>
+<dd>
+<p>
+Scientific and engineering-related software.
+</p>
+<dl>
+<dt>Astronomy</dt>
+<dd>
+<p>
+Astronomy-related software.
+</p>
+
+<p>
+Examples: celestia, spacechart, stellarium
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Biology</dt>
+<dd>
+<p>
+Biology-related software.
+</p>
+
+<p>
+Examples: arb, ncbi-tools-x11, seaview
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Chemistry</dt>
+<dd>
+<p>
+Chemistry-related software.
+</p>
+
+<p>
+Examples: chemtool, kalzium, xdrawchem
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Data Analysis</dt>
+<dd>
+<p>
+Software designed for processing, extracting, and presenting generic scientific
+data.
+</p>
+
+<p>
+Examples: fityk, ygraph, mn-fit
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Electronics</dt>
+<dd>
+<p>
+Circuit design tools, simulators and assemblers for microprocessors, etc
+</p>
+
+<p>
+Examples: geda, gnucap, tkgate
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Engineering</dt>
+<dd>
+<p>
+CAD, UML tools, diagram-drawing and other engineering-related software.
+</p>
+
+<p>
+Examples: tcm, dia, qcad
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Geoscience</dt>
+<dd>
+<p>
+Geoscience-related software.
+</p>
+
+<p>
+Examples: earth3d, qgis, therion
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Mathematics</dt>
+<dd>
+<p>
+Mathematics-related software.
+</p>
+
+<p>
+Examples: gcalctool, snappea, xeukleides
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Medicine</dt>
+<dd>
+<p>
+Medicine-related software.
+</p>
+
+<p>
+Examples: mssstest, gnumed-client, xmedcon
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Physics</dt>
+<dd>
+<p>
+Physics-related software.
+</p>
+
+<p>
+Examples: kxterm, ifrit, paw
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Social</dt>
+<dd>
+<p>
+Social sciences-related software.
+</p>
+
+<p>
+Examples: gnomesword, hanzim, bibletime
+</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<dl>
+<dt>Shells</dt>
+<dd>
+<p>
+Various shells to be used inside a terminal emulator.
+</p>
+
+<p>
+Examples: bash, ksh, zsh
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Sound</dt>
+<dd>
+<p>
+Sound players, editors, and rippers/recorders.
+</p>
+
+<p>
+Examples: beep-media-player, grip, audacity
+</p>
+</dd>
+</dl>
+<dl>
+<dt>System</dt>
+<dd>
+<p>
+System related software.
+</p>
+<dl>
+<dt>Administration</dt>
+<dd>
+<p>
+Administrative and system configuration utilities, also tools for personal user
+settings.
+</p>
+
+<p>
+Examples: gnome-control-center, configure-debian, gksu
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Hardware</dt>
+<dd>
+<p>
+Tools for manipulating specific hardware, especially non-standard laptop
+hardware.
+</p>
+
+<p>
+Examples: toshutils, nvclock-gtk, nvtv
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Language Environment</dt>
+<dd>
+<p>
+This section is reserved for language-env as a special case.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Monitoring</dt>
+<dd>
+<p>
+System information and monitoring tools, log viewers, etc.
+</p>
+
+<p>
+Examples: top, hal-device-manager, gtkdiskfree
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Package Management</dt>
+<dd>
+<p>
+Package managers and related tools.
+</p>
+
+<p>
+Examples: aptitude, deborphan, smartpm
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Security</dt>
+<dd>
+<p>
+Security, cryptography and privacy related software, antiviruses, tools to
+track and report bugs, etc.
+</p>
+
+<p>
+Examples: gpgkeys, bastille, avscan
+</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<dl>
+<dt>Terminal Emulators</dt>
+<dd>
+<p>
+Graphical terminal emulators.
+</p>
+
+<p>
+Examples: xterm, gnome-terminal, rxvt
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Text</dt>
+<dd>
+<p>
+Text oriented tools like dictionaries, OCR, translation, text analysis
+software, etc.
+</p>
+
+<p>
+Examples: kdrill, stardict, turkey
+</p>
+</dd>
+</dl>
+<dl>
+<dt>TV and Radio</dt>
+<dd>
+<p>
+TV-in, TV-out, FM radio, teletext browsers, etc.
+</p>
+
+<p>
+Examples: gradio, gatos, alevt
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Viewers</dt>
+<dd>
+<p>
+Software for viewing images, documents and other (non-video) media.
+</p>
+
+<p>
+Examples: gqview, evince, gthumb
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Video</dt>
+<dd>
+<p>
+Video players, editors, and rippers/recorders.
+</p>
+
+<p>
+Examples: istanbul, totem, kino
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Web Development</dt>
+<dd>
+<p>
+Software for web site editing, web programming, and site administration.
+</p>
+
+<p>
+Examples: bluefish, screem, gphpedit
+</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<dl>
+<dt>Games</dt>
+<dd>
+<p>
+Games and recreations
+</p>
+<dl>
+<dt>Action</dt>
+<dd>
+<p>
+Games that involve a lot of action and require fast reflexes.
+</p>
+
+<p>
+Examples: xsoldier, supertux, xmoto
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Adventure</dt>
+<dd>
+<p>
+Role playing and adventure games, interactive movies and stories, etc.
+</p>
+
+<p>
+Examples: beneath-a-steel-sky, egoboo, kq
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Blocks</dt>
+<dd>
+<p>
+Tetris-like games involving falling blocks.
+</p>
+
+<p>
+Examples: crack-attack, frozen-bubble, netris
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Board</dt>
+<dd>
+<p>
+Games played on a board.
+</p>
+
+<p>
+Examples: phalanx, xshogi, xboard
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Card</dt>
+<dd>
+<p>
+Games involving a deck of cards.
+</p>
+
+<p>
+Examples: pysol, ace-of-penguins, xpat2
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Puzzles</dt>
+<dd>
+<p>
+Tests of ingenuity and logic.
+</p>
+
+<p>
+Examples: xmpuzzles, sgt-puzzles, enigma
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Simulation</dt>
+<dd>
+<p>
+Simulations of the real world in all detail and complexity.
+</p>
+
+<p>
+Examples: flightgear, torcs
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Strategy</dt>
+<dd>
+<p>
+Games involving long-term strategic thinking.
+</p>
+
+<p>
+Examples: wesnoth, widelands, netpanzer
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Tools</dt>
+<dd>
+<p>
+Server browsers, configurators, editors, and other game-related tools that are
+not games themselves.
+</p>
+
+<p>
+Examples: xqf, crystalspace
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Toys</dt>
+<dd>
+<p>
+Amusements, eye-candy, entertaining demos, screen hacks (screensavers), etc.
+</p>
+
+<p>
+Examples: xdesktopwaves, xphoon, xpenguins
+</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<dl>
+<dt>Help</dt>
+<dd>
+<p>
+programs that provide user documentation
+</p>
+
+<p>
+Examples: debian-reference, apt-howto, dhelp
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Screen</dt>
+<dd>
+<p>
+Programs that affect the whole screen.
+</p>
+<dl>
+<dt>Saving</dt>
+<dd>
+<p>
+Tools for blanking the screen. Entries of screen hacks and configuration GUIs
+should go to other appropriate sections.
+</p>
+
+<p>
+Examples: xscreensaver, xlockmore
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Locking</dt>
+<dd>
+<p>
+Tools for locking the screen.
+</p>
+
+<p>
+Examples: xscreensaver, xlockmore
+</p>
+</dd>
+</dl>
+</dd>
+</dl>
+<dl>
+<dt>Window Managers</dt>
+<dd>
+<p>
+X window managers.
+</p>
+
+<p>
+Examples: fluxbox, metacity, waimea
+</p>
+</dd>
+</dl>
+<dl>
+<dt>FVWM Modules</dt>
+<dd>
+<p>
+FVWM-based window manager modules. As only modules related to the running
+window-manager are displayed, do not create subsections for specific
+window-managers.
+</p>
+
+<p>
+Examples: fvwm, fvwm-gnome, fvwm95
+</p>
+</dd>
+</dl>
+<dl>
+<dt>Window Maker</dt>
+<dd>
+<p>
+This section is reserved for wmaker as a special case.
+</p>
+
+<p>
+All wmaker specific entries must go here.
+</p>
+</dd>
+</dl>
+
+<p>
+Users wanting to access some menu entries quickly can also put them in the root
+menu. This is done by using <em>section=&quot;/&quot;</em>. Package-provided
+menu entries must never use this feature.
+</p>
+
+<hr>
+
+<h2><a name="s3.6"></a>3.6 The <samp>command</samp> field</h2>
+
+<p>
+The command field holds the command that should be executed when the menu entry
+is selected. Commands will be executed with <code>sh -c</code> using
+</p>
+
+<pre>
+ execl(&quot;/bin/sh&quot;,&quot;sh&quot;,&quot;-c&quot;,command)
+</pre>
+
+<p>
+or the equivalent.
+</p>
+
+<hr>
+
+<h2><a name="s3.7"></a>3.7 The <samp>icon</samp> field</h2>
+
+<p>
+Please make sure the icons you specify are always available on the system. So,
+if you want to have an icon with your menu entry, the preferred method is to
+supply the icon with that package. Icons should generally be installed in the
+directory <code>/usr/share/pixmaps</code>.
+</p>
+
+<p>
+Debian package maintainers should ensure that any icons they include for use in
+the Debian menus conform to the following points:
+</p>
+<ol type="1" start="1" >
+<li>
+<p>
+The icons should be in xpm format.
+</p>
+</li>
+</ol>
+<ol type="1" start="2" >
+<li>
+<p>
+The icons may not be larger than 32x32 pixels, although smaller sizes are ok.
+</p>
+</li>
+</ol>
+<ol type="1" start="3" >
+<li>
+<p>
+The background area of the icon should be transparent, if possible.
+</p>
+</li>
+</ol>
+
+<p>
+You can provide both 16x16 and 32x32 pixels icons using the variables icon16x16
+and icon32x32 so that the user can configure menu to use one or the other.
+</p>
+
+<p>
+If you, as a system administrator, don't like the icons in the menus, simply
+change the <samp>icon()</samp> function from the file
+<code>/etc/menu-methods/menu.h</code>, and run <code>update-menus</code>.
+</p>
+
+<hr>
+
+<h2><a name="s3.8"></a>3.8 The <samp>hints</samp> field</h2>
+
+<p>
+Hints are used to help menu structure generated menus in a more optimal way.
+For example:
+</p>
+
+<pre>
+ ?package(emacs20):\
+ needs=&quot;x11&quot;\
+ hints=&quot;Big,Expert,Featureful&quot; \
+ section=&quot;Applications/Editors&quot;\
+ title=&quot;Emacs 20&quot;\
+ command=&quot;/usr/bin/emacs20&quot;\
+ icon=/usr/share/emacs/20.3/etc/emacs.xbm
+</pre>
+
+<p>
+The above hints will tell <samp>menu</samp> to consider grouping
+<samp>emacs</samp> together with other editors that are marked similar. For
+example, if <samp>vi</samp> on your system has a hints=&quot;Small,Expert&quot;
+definition, and there are too many entries in the
+<samp>/Applications/Editors</samp> menu entry, then menu will consider creating
+a <samp>/Applications/Editors/Expert</samp> submenu, and put both
+<samp>vi</samp> and <samp>emacs</samp> in it. (Of course, only if you have
+<samp>hint_optimize=true</samp> in your <code>/etc/menu-methods/menu.h</code>
+file).
+</p>
+
+<hr>
+
+<h2><a name="s3.9"></a>3.9 Entries for menu sections.</h2>
+
+<p>
+It is possible to add entries for menu sections, but it is not mandatory since
+section entries are created automatically. However, this allows to specify
+fields for sections like <samp>icon</samp> and <samp>sort</samp>. The syntax
+for menu sections entries is the same as for regular entries, the
+<samp>section</samp> field holding the name of the parent section. For example
+</p>
+
+<pre>
+ ?package(local.games): needs=&quot;text&quot; title=&quot;Games&quot; section=&quot;/&quot; sort=&quot;001&quot;
+</pre>
+
+<p>
+will sort <samp>Games</samp> first.
+</p>
+
+<hr>
+
+<h2><a name="s3.10"></a>3.10 Fvwm's task and title bars</h2>
+
+<p>
+The problem with the stuff in the task bar is that all items are displayed all
+of the time. So, if 1500 Debian packages all were to register a button, the
+buttons would quickly fill the screen, making the exercise useless. The few
+applications that are considered important enough to be listed in the task bar
+usually vary widely on each system, making it impossible to select a ``happy
+few'' apps that are allowed there on every Debian system. If you (as a local
+system administrator) want your <code>fvwm2</code> to have a few buttons, you
+can install files for those packages in <samp>/menu/$package</samp>, containing
+a menu entry like this:
+</p>
+
+<pre>
+ ?Package(xmball):needs=button\
+ section=Games/Puzzles\
+ icon=path-to-pixmap.xpm\
+ title=&quot;Xmball&quot;\
+ command=/usr/games/xmball
+</pre>
+
+<p>
+Then, do the following:
+</p>
+
+<pre>
+ cd /etc/menu-methods/
+ cp fvwm2 fvwm2button
+ vi fvwm2button
+</pre>
+
+<p>
+and remove all the &quot;supported&quot; entries, adding the one below. For
+the rest, leave everything the same except those listed below.
+</p>
+
+<pre>
+ supported
+ button=&quot;+ Style \&quot;&quot; $title &quot;\&quot; TitleIcon&quot; $icon &quot; Exec &quot; $command &quot;\n&quot;
+ endsupported
+ startmenu: &quot;AddToTitlebar \n&quot;
+ endmenu: &quot;\n&quot;
+ submenutitle:&quot;&quot;
+ mainmenu:
+ genmenu: &quot;buttondefs.hook&quot;
+</pre>
+
+<p>
+(Of course regular users (not system administrators) can also specify
+`buttonfiles' in their ~/.menu/ directory).
+</p>
+
+<hr>
+
+<p>
+[ <a href="ch2.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ 3 ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch4.html">next</a> ]
+</p>
+
+<hr>
+
+<p>
+Debian Menu System
+</p>
+
+<address>
+version 1.4, 10 November 2011<br>
+<br>
+Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br>
+Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br>
+Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br>
+Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br>
+<br>
+</address>
+<hr>
+
+</body>
+
+</html>
+
diff --git a/doc/menu.html/ch4.html b/doc/menu.html/ch4.html
new file mode 100644
index 0000000..d793f51
--- /dev/null
+++ b/doc/menu.html/ch4.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Debian Menu System - What packages with applications should do</title>
+
+<link href="index.html" rel="start">
+<link href="ch3.html" rel="prev">
+<link href="ch5.html" rel="next">
+<link href="index.html#contents" rel="contents">
+<link href="index.html#copyright" rel="copyright">
+<link href="ch1.html" rel="chapter" title="1 Introduction">
+<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user">
+<link href="ch3.html" rel="chapter" title="3 The menu file">
+<link href="ch4.html" rel="chapter" title="4 What packages with applications should do">
+<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do">
+<link href="ch6.html" rel="chapter" title="6 How a user can override the menus">
+<link href="ch7.html" rel="chapter" title="7 The internals of the menu package">
+<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts">
+<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?">
+<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files">
+<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints">
+<link href="ch3.html#s3.1" rel="section" title="3.1 Location">
+<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax">
+<link href="ch3.html#s3.3" rel="section" title="3.3 The title field">
+<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field">
+<link href="ch3.html#s3.5" rel="section" title="3.5 The section field">
+<link href="ch3.html#s3.6" rel="section" title="3.6 The command field">
+<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field">
+<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field">
+<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections.">
+<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars">
+<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file">
+<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages">
+<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus">
+<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed">
+<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files">
+<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program">
+<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program">
+<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions">
+<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization">
+<link href="ch8.html#s8.1" rel="section" title="8.1 String constants">
+<link href="ch8.html#s8.2" rel="section" title="8.2 Variables">
+<link href="ch8.html#s8.3" rel="section" title="8.3 Functions">
+<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables">
+<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables">
+<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables">
+
+</head>
+
+<body>
+
+<p><a name="ch4"></a></p>
+<hr>
+
+<p>
+[ <a href="ch3.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ 4 ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch5.html">next</a> ]
+</p>
+
+<hr>
+
+<h1>
+Debian Menu System
+<br>Chapter 4 - What packages with applications should do
+</h1>
+
+<hr>
+
+<h2><a name="s4.1"></a>4.1 Providing a menu file</h2>
+
+<p>
+A package should provide a menu file
+<code>/usr/share/menu/&lt;package-name&gt;</code> that contains information
+about each program it likes to make available in the menus.
+</p>
+
+<hr>
+
+<h2><a name="s4.2"></a>4.2 Adding a hook for dpkg in your packages</h2>
+
+<p>
+The <samp>postinst</samp> script and the <code>postrm</code> script of the
+package should include the line
+</p>
+
+<pre>
+ if test -x /usr/bin/update-menus; then update-menus; fi
+</pre>
+
+<p>
+If you are using <code>debhelper</code>, the program
+<code>dh_installmenu</code> can do it for you.
+</p>
+
+<hr>
+
+<p>
+[ <a href="ch3.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ 4 ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch5.html">next</a> ]
+</p>
+
+<hr>
+
+<p>
+Debian Menu System
+</p>
+
+<address>
+version 1.4, 10 November 2011<br>
+<br>
+Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br>
+Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br>
+Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br>
+Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br>
+<br>
+</address>
+<hr>
+
+</body>
+
+</html>
+
diff --git a/doc/menu.html/ch5.html b/doc/menu.html/ch5.html
new file mode 100644
index 0000000..78df396
--- /dev/null
+++ b/doc/menu.html/ch5.html
@@ -0,0 +1,226 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Debian Menu System - What packages with menu managers should do</title>
+
+<link href="index.html" rel="start">
+<link href="ch4.html" rel="prev">
+<link href="ch6.html" rel="next">
+<link href="index.html#contents" rel="contents">
+<link href="index.html#copyright" rel="copyright">
+<link href="ch1.html" rel="chapter" title="1 Introduction">
+<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user">
+<link href="ch3.html" rel="chapter" title="3 The menu file">
+<link href="ch4.html" rel="chapter" title="4 What packages with applications should do">
+<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do">
+<link href="ch6.html" rel="chapter" title="6 How a user can override the menus">
+<link href="ch7.html" rel="chapter" title="7 The internals of the menu package">
+<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts">
+<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?">
+<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files">
+<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints">
+<link href="ch3.html#s3.1" rel="section" title="3.1 Location">
+<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax">
+<link href="ch3.html#s3.3" rel="section" title="3.3 The title field">
+<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field">
+<link href="ch3.html#s3.5" rel="section" title="3.5 The section field">
+<link href="ch3.html#s3.6" rel="section" title="3.6 The command field">
+<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field">
+<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field">
+<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections.">
+<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars">
+<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file">
+<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages">
+<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus">
+<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed">
+<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files">
+<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program">
+<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program">
+<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions">
+<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization">
+<link href="ch8.html#s8.1" rel="section" title="8.1 String constants">
+<link href="ch8.html#s8.2" rel="section" title="8.2 Variables">
+<link href="ch8.html#s8.3" rel="section" title="8.3 Functions">
+<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables">
+<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables">
+<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables">
+
+</head>
+
+<body>
+
+<p><a name="ch5"></a></p>
+<hr>
+
+<p>
+[ <a href="ch4.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ 5 ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch6.html">next</a> ]
+</p>
+
+<hr>
+
+<h1>
+Debian Menu System
+<br>Chapter 5 - What packages with menu managers should do
+</h1>
+
+<hr>
+
+<p>
+Each package containing a <em>menu manager</em> (i.e., a program that can
+display a menu) should provide a script or program in
+<code>/etc/menu-methods/</code> that can read the menu files. This script will
+be executed by <code>update-menus</code>, which will feed the menu entries to
+be installed to your script via standard input (stdin).
+</p>
+
+<p>
+The scripts in <code>/etc/menu-methods/</code> should be configuration files,
+so the user can tune the behaviour of the script, and they must always include
+the <code>/etc/menu-methods/menu.h</code> configuration file at the beginning
+with the command <samp>!include menu.h</samp> For the same reason, scripts in
+<code>/etc/menu-methods/</code> are requested to use the following configurable
+functions: <samp>title()</samp> for the title (in place of
+<samp>$title</samp>), <samp>icon()</samp> for the icon (in place of
+<samp>$icon</samp>), <samp>term()</samp> for running <samp>text</samp> command
+under <samp>X11</samp>. <samp>sections_translations()</samp> for the list of
+translations of sections name available. This later one is only defined if you
+<samp>!include lang.h</samp>
+</p>
+
+<p>
+Good examples for these scripts for nearly all Debian window managers are
+included in the <samp>menu</samp> package in
+<code>/usr/share/doc/menu/examples</code>. Note that while working on your
+script, you can use the tricks described in &quot;The internals of the menu
+package&quot;, section &quot;The update-menus program&quot;, to run just your
+script, instead of having update-menus run all scripts (can save quite a lot of
+time).
+</p>
+
+<p>
+This script should not be executable in the package. Instead the
+<samp>postinst</samp> should add the execute bit and then run
+<code>update-menus</code> (if it is executable).
+</p>
+
+<p>
+Similarly, the <code>postrm</code> script when called with option ``remove''
+should remove the execute bit and run <code>update-menus</code> (if it is
+executable).
+</p>
+
+<p>
+Here is an example of such a <code>postrm</code> script using <code>sh</code>:
+</p>
+
+<pre>
+ #!/bin/sh
+ set -e
+ inst=/etc/menu-methods/#PACKAGE#
+ case &quot;$1&quot; in
+ remove)
+ if [ -f $inst ]; then
+ chmod a-x $inst
+ if [ -x /usr/bin/update-menus ]; then update-menus ; fi
+ fi
+ ;;
+ purge)
+ #remove the files that install-menu creates:
+ rm -rf /var/lib/foo-wm/menu
+ ;;
+ upgrade);;
+ *)
+ echo &quot;postrm called with unknown argument \`$1'&quot; &gt;&amp;2
+ exit 0
+ ;;
+ esac
+</pre>
+
+<p>
+And here is a good example for a <code>postinst</code> script:
+</p>
+
+<pre>
+ #!/bin/sh
+ set -e
+ inst=/etc/menu-methods/#PACKAGE#
+ if [ -f $inst ]; then
+ chmod a+x $inst
+ if [ -x /usr/bin/update-menus ]; then
+ update-menus
+ fi
+ fi
+</pre>
+
+<p>
+If you are using <code>debhelper</code>, the program
+<code>dh_installmenu</code> can help you do it.
+</p>
+
+<p>
+Please, do not make your package <em>depend</em> on the menu package! The
+preferred way of telling dpkg that your wm can cooperate with menu is:
+</p>
+
+<pre>
+ Suggests: menu
+</pre>
+
+<p>
+Please only consider using &quot;depends&quot; if you feel providing reasonable
+defaults for systems without <code>menu</code> will make life very difficult
+for you.
+</p>
+
+<hr>
+
+<p>
+[ <a href="ch4.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ 5 ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch6.html">next</a> ]
+</p>
+
+<hr>
+
+<p>
+Debian Menu System
+</p>
+
+<address>
+version 1.4, 10 November 2011<br>
+<br>
+Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br>
+Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br>
+Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br>
+Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br>
+<br>
+</address>
+<hr>
+
+</body>
+
+</html>
+
diff --git a/doc/menu.html/ch6.html b/doc/menu.html/ch6.html
new file mode 100644
index 0000000..fcfa7b9
--- /dev/null
+++ b/doc/menu.html/ch6.html
@@ -0,0 +1,224 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Debian Menu System - How a user can override the menus</title>
+
+<link href="index.html" rel="start">
+<link href="ch5.html" rel="prev">
+<link href="ch7.html" rel="next">
+<link href="index.html#contents" rel="contents">
+<link href="index.html#copyright" rel="copyright">
+<link href="ch1.html" rel="chapter" title="1 Introduction">
+<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user">
+<link href="ch3.html" rel="chapter" title="3 The menu file">
+<link href="ch4.html" rel="chapter" title="4 What packages with applications should do">
+<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do">
+<link href="ch6.html" rel="chapter" title="6 How a user can override the menus">
+<link href="ch7.html" rel="chapter" title="7 The internals of the menu package">
+<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts">
+<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?">
+<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files">
+<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints">
+<link href="ch3.html#s3.1" rel="section" title="3.1 Location">
+<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax">
+<link href="ch3.html#s3.3" rel="section" title="3.3 The title field">
+<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field">
+<link href="ch3.html#s3.5" rel="section" title="3.5 The section field">
+<link href="ch3.html#s3.6" rel="section" title="3.6 The command field">
+<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field">
+<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field">
+<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections.">
+<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars">
+<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file">
+<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages">
+<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus">
+<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed">
+<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files">
+<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program">
+<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program">
+<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions">
+<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization">
+<link href="ch8.html#s8.1" rel="section" title="8.1 String constants">
+<link href="ch8.html#s8.2" rel="section" title="8.2 Variables">
+<link href="ch8.html#s8.3" rel="section" title="8.3 Functions">
+<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables">
+<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables">
+<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables">
+
+</head>
+
+<body>
+
+<p><a name="ch6"></a></p>
+<hr>
+
+<p>
+[ <a href="ch5.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ 6 ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch7.html">next</a> ]
+</p>
+
+<hr>
+
+<h1>
+Debian Menu System
+<br>Chapter 6 - How a user can override the menus
+</h1>
+
+<hr>
+
+<hr>
+
+<h2><a name="s6.1"></a>6.1 Configuring the menus</h2>
+
+<p>
+Users can specify their own menu entries in the <code>~/.menu</code> directory.
+The files can have an arbitrary file name as long as the new syntax for the
+menu entries is used. They should start with either
+</p>
+
+<pre>
+ ?package(installed-package):
+</pre>
+
+<p>
+or
+</p>
+
+<pre>
+ ?package(local.mystuff):
+</pre>
+
+<p>
+if it's something that isn't ``debian-officially'' installed. (Any ``package''
+that starts with ``<samp>local.</samp>'' is considered installed.)
+</p>
+
+<p>
+If users want to have their own menu methods, they should create a
+<code>~/.menu-methods</code> directory and put all their menu methods in it.
+(If <code>~/.menu-methods</code> exists, <code>/etc/menu-methods</code> will
+not be searched when a user runs <code>update-menus</code>).
+</p>
+
+<p>
+A system administrator should place system-wide menu entries in
+<code>/etc/menu</code> (not in <code>/usr/share/menu/package</code>, since
+these files will probably be overwritten by a package upgrade).
+</p>
+
+<hr>
+
+<h2><a name="s6.2"></a>6.2 Specifying that a menu entry should not be displayed</h2>
+
+<p>
+If a user wants to remove the entries of <samp>package</samp> from the system
+menu then this will do the trick:
+</p>
+
+<pre>
+ echo -n &gt; ~/.menu/package
+</pre>
+
+<p>
+The zero-size file will tell <code>update-menus</code> that the corresponding
+package should not have any menu entries listed. A system administrator can
+remove menu entries system-wide with
+</p>
+
+<pre>
+ echo -n &gt; /etc/menu/package
+</pre>
+
+<hr>
+
+<h2><a name="s6.3"></a>6.3 Including other files</h2>
+
+<p>
+<var>Historical comment by Joost:</var>
+</p>
+
+<p>
+<var>More out of curiosity than anything else, I recently read the KDE mailing
+list. In it I saw some discussion about how good the Debian menu system is
+(whow, thanks, guys!), but one person found a missing feature: s/he said you
+couldn't include other files in the user menu files. Well, actually, it was
+already possible, but not very well documented.</var>
+</p>
+
+<p>
+To include the contents of the file <code>/usr/share/menu/somefile</code>, add
+this to your menu file:
+</p>
+
+<pre>
+ !include /usr/share/menu/somefile
+</pre>
+
+<p>
+Apart from that, it is of course possible to make the menu entry file
+executable (<samp>chmod a+x ~/.menu/package</samp>), and do something like
+</p>
+
+<pre>
+ #!/bin/sh
+ cat /usr/share/menu/somefile
+ sed -e &quot;/unwanted_entry/s/?package(/?package(notinstalled./&quot; \
+ /usr/share/menu/someotherfile
+</pre>
+
+<p>
+to get the same effect, with the added flexibility of being able to filter out
+unwanted lines.
+</p>
+
+<hr>
+
+<p>
+[ <a href="ch5.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ 6 ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch7.html">next</a> ]
+</p>
+
+<hr>
+
+<p>
+Debian Menu System
+</p>
+
+<address>
+version 1.4, 10 November 2011<br>
+<br>
+Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br>
+Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br>
+Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br>
+Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br>
+<br>
+</address>
+<hr>
+
+</body>
+
+</html>
+
diff --git a/doc/menu.html/ch7.html b/doc/menu.html/ch7.html
new file mode 100644
index 0000000..3cc602c
--- /dev/null
+++ b/doc/menu.html/ch7.html
@@ -0,0 +1,821 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Debian Menu System - The internals of the menu package</title>
+
+<link href="index.html" rel="start">
+<link href="ch6.html" rel="prev">
+<link href="ch8.html" rel="next">
+<link href="index.html#contents" rel="contents">
+<link href="index.html#copyright" rel="copyright">
+<link href="ch1.html" rel="chapter" title="1 Introduction">
+<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user">
+<link href="ch3.html" rel="chapter" title="3 The menu file">
+<link href="ch4.html" rel="chapter" title="4 What packages with applications should do">
+<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do">
+<link href="ch6.html" rel="chapter" title="6 How a user can override the menus">
+<link href="ch7.html" rel="chapter" title="7 The internals of the menu package">
+<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts">
+<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?">
+<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files">
+<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints">
+<link href="ch3.html#s3.1" rel="section" title="3.1 Location">
+<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax">
+<link href="ch3.html#s3.3" rel="section" title="3.3 The title field">
+<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field">
+<link href="ch3.html#s3.5" rel="section" title="3.5 The section field">
+<link href="ch3.html#s3.6" rel="section" title="3.6 The command field">
+<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field">
+<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field">
+<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections.">
+<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars">
+<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file">
+<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages">
+<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus">
+<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed">
+<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files">
+<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program">
+<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program">
+<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions">
+<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization">
+<link href="ch8.html#s8.1" rel="section" title="8.1 String constants">
+<link href="ch8.html#s8.2" rel="section" title="8.2 Variables">
+<link href="ch8.html#s8.3" rel="section" title="8.3 Functions">
+<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables">
+<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables">
+<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables">
+
+</head>
+
+<body>
+
+<p><a name="ch7"></a></p>
+<hr>
+
+<p>
+[ <a href="ch6.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ 7 ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch8.html">next</a> ]
+</p>
+
+<hr>
+
+<h1>
+Debian Menu System
+<br>Chapter 7 - The internals of the menu package
+</h1>
+
+<hr>
+
+<hr>
+
+<h2><a name="s7.1"></a>7.1 The update-menus program</h2>
+
+<p>
+On startup, update-menus checks the file <code>/var/run/update-menus.pid</code>
+and the pid in it. If there's an <code>update-menus</code> process with that
+pid it kills it. If <code>/var/lib/dpkg/lock</code> exists, it checks to see
+if dpkg supports triggers. If so, it uses dpkg-trigger to trigger a real
+update-menus run later. Otherwise, it forks to background and returns control
+to dpkg. The background process checks the <code>/var/lib/dpkg/lock</code>
+file approx. every two second until the file's gone.
+</p>
+
+<p>
+Once it's decided to run, whether in the background after dpkg exits, or in the
+foreground when used with a trigger-capable dpkg, <code>update-menus</code>
+reads the menu-entry files in the following directories:
+<code>/etc/menu</code>, <code>/usr/lib/menu</code>,
+<code>/usr/share/menu</code>, <code>/usr/share/menu/default</code>. (if a user
+runs <code>update-menus</code>, it will add <code>~/.menu</code> to the front
+of that list). For every menu entry line in each file it checks if the
+corresponding package is installed. The menu entries of all packages marked as
+installed by dpkg are added together in one big buffer that is kept in memory
+(exception: executable menu entry files are executed, and stdout is placed in
+the buffer).
+</p>
+
+<p>
+Once it's read all menu entry files, <code>update-menus</code> starts all
+executable scripts in <code>/etc/menu-methods/</code>, hands the scripts the
+previously created buffer via stdin. (If <code>update-menus</code> is run by a
+user, it will first try to run the scripts in <code>~/.menu-methods</code>, and
+only if that directory doesn't exist, it will run the scripts in
+<code>/etc/menu-methods</code>).
+</p>
+
+<p>
+Note that as an aid to debugging, one can use
+</p>
+
+<pre>
+ update-menus --stdout &gt; /tmp/menu-stdin
+</pre>
+
+<p>
+and then view the file <code>/tmp/menu-stdin</code> to see exactly what
+<code>update-menus</code> handed the menu-methods on their stdin.
+</p>
+
+<p>
+This may also be useful for people writing <code>/etc/menu-method/*</code>
+scripts: Running <code>update-menus</code> every time you changed something in
+the script may be quite time-consuming. So, it's much easier to run
+<code>update-menus --stdout</code> once, and then run
+</p>
+
+<pre>
+ /etc/menu-methods/mymethod &lt; /tmp/menu-stdin
+</pre>
+
+<p>
+(and, if that also takes too long, just try editing /tmp/menu-stdin, and
+removing 90% or so of all entries)
+</p>
+
+<hr>
+
+<h2><a name="s7.2"></a>7.2 The install-menu program</h2>
+
+<p>
+The files <code>/etc/menu-methods/$wm</code> are executable config files that
+start with the line
+</p>
+
+<pre>
+ #!/usr/bin/install-menu
+</pre>
+
+<p>
+and thus start that program, handing it the configuration file for the specific
+window manager in the first command line argument. This configuration consists
+of:
+</p>
+<ol type="1" start="1" >
+<li>
+<p>
+the compatibility mode (&quot;menu-1&quot; or &quot;menu-2&quot;).
+</p>
+</li>
+</ol>
+<ol type="1" start="2" >
+<li>
+<p>
+where the various files should be stored/read.
+</p>
+</li>
+</ol>
+<ol type="1" start="3" >
+<li>
+<p>
+what &quot;needs&quot; are supported, and what wrapper files should be used for
+each &quot;type&quot;.
+</p>
+</li>
+</ol>
+<ol type="1" start="4" >
+<li>
+<p>
+how to remove the generated menu files.
+</p>
+</li>
+</ol>
+
+<p>
+See <code>/usr/share/doc/menu/examples/</code> of the menu package for more
+comments.
+</p>
+
+<p>
+Options to <code>install-menu</code>:
+</p>
+
+<pre>
+ --remove Remove the menu files instead of generating them.
+ --verbose Output outline of operations that are performed.
+</pre>
+
+<p>
+Some window managers don't support an `include'-like statement in their
+<code>system.*rc</code> files (like <code>m4</code> or <code>cpp</code>
+preprocessing); they cannot read the <code>menudefs.hook</code> file generated
+by install-menu from their <code>system.*rc</code> config file. To still be
+able to use them, <code>install-menu</code> will copy the file
+<code>$path/$examplercfile</code> to <code>$path/$rcfile</code> (with
+<code>$examplercfile</code> and <code>$rcfile</code> defined in the
+<code>install-menu</code> config file, and <code>$path</code> either the
+<code>$rootprefix</code> or <code>${HOME}/$userprefix</code>, depending on
+whether root or user executed the file.), and replace all occurrences of
+``install-menu-defs'' with the <code>$genmenu</code> file it just generated.
+</p>
+
+<p>
+As an example, consider the following:
+<samp>examplercfile=system.foo-wm-example</samp>,
+<samp>rcfile=system.foo-wm</samp>, <samp>genmenu=menudefs.hook</samp> and
+<samp>rootprefix=/var/lib/foo-wm/menu</samp>. Now, if
+<code>install-menu</code> gets run, it will first generate the file
+<code>/var/lib/foo-wm/menu/menudefs.hook</code>. Next, it will line-by-line
+read the file <code>/var/lib/foo-wm/menu/system.foo-wm-example</code> and copy
+its contents to <code>/var/lib/foo-wm/menu/system.foo-wm</code>, replacing
+every occurrence of the string <samp>install-menu-defs</samp> with the contents
+of the file <code>/var/lib/foo-wm/menu/menudefs.hook</code>.
+</p>
+
+<p>
+To activate the file copying in this way, simply define the
+<samp>$examplercfile</samp> and <samp>$rcfile</samp> variables in the
+<code>install-menu</code> configuration file (for example, see
+<code>/etc/menu-methods/fvwm</code>), and make sure there is a
+<code>$path/$examplercfile</code> (<samp>$path</samp> being either
+<samp>$rootprefix</samp>, or <code>$userprefix</code>.)
+</p>
+
+<p>
+If you are writing a menu method, you can use the following to make debugging
+it somewhat more easily:
+</p>
+<ol type="1" start="1" >
+<li>
+<p>
+use <samp>update-menus --stdout &gt; /tmp/menu-stdin</samp> to create a list of
+menu entries in <code>/tmp/menu-stdin</code> and then
+</p>
+</li>
+</ol>
+<ol type="1" start="2" >
+<li>
+<p>
+you can run just your menu-method with (if it's called wm):
+</p>
+
+<pre>
+ ./wm -v &lt; /tmp/menu-stdin
+</pre>
+</li>
+</ol>
+
+<hr>
+
+<h2><a name="s7.3"></a>7.3 The install-menu config script definitions</h2>
+
+<p>
+The menu-methods in <code>/etc/menu-methods/*</code> are basically made up of a
+lot of ``tag=string'' definitions, telling <code>install-menu</code> how to
+generate a <code>system.${wm}rc</code> script. This way you can tune the look
+of generated <code>system.${wm}rc</code> to your needs.
+</p>
+
+<p>
+In the following, something like
+</p>
+
+<pre>
+ treewalk=&quot;c(m)&quot;
+</pre>
+
+<p>
+means that the treewalk variable by default has the value &quot;c(m)&quot;.
+</p>
+
+<p>
+For examples of what these scripts can look like, see
+<code>/usr/share/doc/menu/examples/*</code>.
+</p>
+<dl>
+<dt><samp>compat=&quot;menu-1&quot;</samp></dt>
+<dd>
+<p>
+Two mode are defined:
+</p>
+<dl>
+<dt><samp>&quot;menu-1&quot;</samp></dt>
+<dd>
+<p>
+menu directives are terminated by an end-of-line character.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>&quot;menu-2&quot;</samp></dt>
+<dd>
+<p>
+menu directives are terminated by a semicolon character.
+</p>
+</dd>
+</dl>
+
+<p>
+This must be just after the <samp>!include &quot;menu.h&quot;</samp> directive
+so that <code>menu.h</code> can use its own compat mode.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>outputencoding=&quot;UTF-8&quot;</samp></dt>
+<dd>
+<p>
+Set the encoding used for output files. Use <samp>iconv --list</samp> to get
+the list of supported encoding. Useful values include &quot;UTF-8&quot; and
+&quot;ISO-8859-1&quot;. The special value &quot;LOCALE&quot; means that the
+current locale encoding will be used. If set to an empty string, no
+translations are performed. This is the default.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>outputlanguage=&quot;&quot;</samp></dt>
+<dd>
+<p>
+If set to &quot;C&quot; automatic translations will be disabled. Note that you
+can still use translate() to perform explicit translation.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>supported</samp></dt>
+<dt><samp>endsupported</samp></dt>
+<dd>
+<p>
+Between the <samp>supported</samp> and <samp>endsupported</samp> keywords you
+define what &quot;needs&quot; are supported by this window manager. So, the
+following is an example for a wm that supports both needs=x11 and needs=text:
+</p>
+
+<pre>
+ function q($s) = &quot;\&quot;&quot; esc($s,&quot;\\\&quot;&quot;) &quot;\&quot;&quot;
+ supported
+ x11 =&quot; ShowEntry(&quot; q(title()) &quot;, &quot; q($command) &quot;)&quot;
+ text=&quot; ShowEntry(&quot; q(title()) &quot;, &quot; q(term()) &quot;)&quot;
+ endsupported
+</pre>
+
+<p>
+For the variable substitution (and functions, not shown above), see the next
+paragraph. In the above example, you'll notice that for the menu entries that
+&quot;need=text&quot;, the term() function is used. This is a user-supplied
+function that will run $command in a X terminal emulator. Also, as X11 is
+higher up in the supported list above than text, a package that supplies both a
+&quot;needs=X11&quot; and a &quot;needs=text&quot; entry will have the
+needs=X11 entry installed, in favour of the needs=text entry. You can continue
+lines on the next line with a backslash (&quot;\&quot;), but make sure you
+don't add any spaces after the backslash.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>startmenu=&quot;&quot;</samp></dt>
+<dt><samp>endmenu=&quot;&quot;</samp></dt>
+<dt><samp>submenutitle=&quot;&quot;</samp></dt>
+<dd>
+<p>
+These define what to print for the beginning/end of a menu, and how to the
+print a menu entry that pops up another menu. They are substituted the same
+way as the &quot;supported&quot; stuff is; see next paragraph.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>treewalk=&quot;c(m)&quot;</samp></dt>
+<dd>
+<p>
+This string defines in what order to dump the <samp>$startmenu</samp>,
+<samp>$endmenu</samp>, and <samp>$submenutitle</samp> (and its children). Each
+char in the string refers to:
+</p>
+
+<pre>
+ c : dump children of menu.
+ m : dump this menu's $submenutitles
+ ( : dump $startmenu
+ ) : dump $endmenu
+ M : dump all $submenutitles of this menu and this menu's children.
+</pre>
+
+<p>
+The default is &quot;c(m)&quot;. For olvwm, one needs: &quot;(M)&quot;
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>genmenu=&quot;&quot;</samp></dt>
+<dd>
+<p>
+The menu file to generate (usually something like
+<samp>system.&quot;$wm&quot;rc</samp>). The file itself may depend on the
+level or title that is currently being worked on, like
+</p>
+
+<pre>
+ genmenu=&quot;/subdir/&quot; replacewith($section,&quot; &quot;,&quot;_&quot;) &quot;/rc.menu&quot;
+</pre>
+
+<p>
+(Substitution works just like in the supported stuff, see above). Note that
+the files made this way are truncated upon opening, so if you have a genmenu
+like the example above, then your <samp>endmenu=</samp> will override the
+startmenu stuff (but you probably only need one of the two anyway).
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>rootsection=&quot;/Debian&quot;</samp></dt>
+<dd>
+<p>
+the prefix every <samp>$section</samp> variable gets.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>prerun=&quot;&quot;</samp></dt>
+<dt><samp>postrun=&quot;&quot;</samp></dt>
+<dd>
+<p>
+The commands to run before and after, respectively, the actual generation of
+the <code>menudefs.hook</code> (genmenu) file. Commands will be executed by
+<code>sh</code>. Example:
+</p>
+
+<pre>
+ prerun=&quot;rm -rf &quot; prefix() &quot;/*&quot;
+ postrun=&quot;killall -USR1 fvwm2&quot;
+</pre>
+
+<p>
+(Substitution works just like the supported stuff, see below).
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>preruntest=&quot;&quot;</samp></dt>
+<dd>
+<p>
+Just like prerun, but if the return value of the command is non-zero, menu will
+quit.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>also_run=&quot;&quot;</samp></dt>
+<dd>
+<p>
+If non-zero, install-menus will, after generating the output files, also load
+the file also_run, and use the new assignments to treewalk, genmenu, etc. to
+generate more output. This second time, variables like <samp>prerun</samp> and
+all of the hint stuff are ignored.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>removemenu=&quot;&quot;</samp></dt>
+<dd>
+<p>
+The command to run when the menu-method is invoked with the option
+<samp>--remove</samp>. This should remove all the autogenerated menu files.
+If this option is not present, then install menu will remove
+<samp>genmenu</samp> if it is a constant string and <samp>rcfile</samp> if it
+is defined, and try to remove <samp>prefix()</samp> if it is empty.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>onlyrunasroot=false</samp></dt>
+<dt><samp>onlyrunasuser=false</samp></dt>
+<dd>
+<p>
+If <samp>onlyrunasroot</samp> is set to true, <code>install-menu</code> will
+quit silently when run as a user. Similarly for <samp>onlyrunasuser</samp>.
+<var><samp>onlyrunasroot</samp> is deprecated since it is simpler to just not
+define <samp>userprefix</samp>.</var> On the other hand,
+<samp>onlyrunasuser</samp> might be needed if you use <samp>rcfile</samp> since
+<samp>rootprefix</samp> is used as a fallback location for the template.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>preoutput=&quot;#Automatically generated file. Do not edit (see /usr/share/doc/menu/html)\n\n&quot;</samp></dt>
+<dt><samp>postoutput=&quot;&quot;</samp></dt>
+<dd>
+<p>
+Text to put at the beginning resp. end of the generated file ($genmenu).
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>command=&quot;&quot;</samp></dt>
+<dd>
+<p>
+A command to run instead of <code>install-menus</code>. This command used to
+be needed to get around limitations due to compatibility stuff. But that
+compatibility with pre menu-1 stuff has been dropped, and isn't needed any
+more.
+</p>
+
+<p>
+Example:
+</p>
+
+<pre>
+ command=&quot;cat &gt; /tmp/menu-stdin&quot;
+</pre>
+</dd>
+</dl>
+<dl>
+<dt><samp>hotkeyexclude=&quot;&quot;</samp></dt>
+<dd>
+<p>
+Keys not to use for hotkey generation. You can use the same variables and
+functions here as in for example the startmenu sections.
+</p>
+
+<p>
+Example:
+</p>
+
+<pre>
+ hotkeyexclude=&quot;q&quot; $section
+</pre>
+</dd>
+</dl>
+<dl>
+<dt><samp>hotkeycase=&quot;insensitive&quot;</samp></dt>
+<dd>
+<p>
+can be either &quot;insensitive&quot; or &quot;sensitive&quot;. Determines
+whether the hotkeys can be of mixed case (<samp>fvwm2</samp> reads the hotkeys
+case-insensitive, <samp>pdmenu</samp> case-sensitive). In case of the titles
+&quot;Xa&quot; and &quot;xb&quot;, hotkey case-insensitive will generate
+&quot;X&quot; and &quot;b&quot;, whereas case-sensitive would generate
+&quot;X&quot; and &quot;x&quot;.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>sort=$sort &quot;:&quot; $title</samp></dt>
+<dd>
+<p>
+Entries within one menu will be alphabetically sorted by whatever sort returns.
+So, if you do <samp>sort=ifelse($command, &quot;1&quot;,
+&quot;0&quot;):$title</samp>, then all submenus will appear above the commands
+in a submenu. (A submenu always has <samp>$command=&quot;&quot;</samp>). Or,
+as Joey Hess writes:
+</p>
+
+<pre>
+ You can add another field to the menu items, with whatever name you like,
+ let's say it's called priority. Then add this line to
+ /etc/menu-methods/*:
+
+ sort=ifelse($priority, $priority, &quot;9&quot;)
+
+ This has the result of sorting things so items with a low priority sort to the
+ top, and items with no priority default to priority 9 and sort to the bottom.
+
+ (Note that it compares the strings alphabetically, not numerically.)
+</pre>
+</dd>
+</dl>
+<dl>
+<dt><samp>rcfile=&quot;&quot;</samp></dt>
+<dd>
+<p>
+If the window manager doesn't support an &quot;include filename&quot; or
+&quot;read(filename)&quot; statement in it's config file, you can rename the
+wm's config file to <samp>system.&quot;$wm&quot;rc-menu</samp>, and insert a
+&quot;install-menu-defs&quot; line (without the quotes, or whitespace around
+it, and &quot;install-menu-defs&quot; must be the only thing on the line) in
+the <samp>system.&quot;$wm&quot;rc-menu</samp> file. This will then get
+replaced by the <samp>$genmenu</samp> file that was just created (see also
+<samp>$examplercfile</samp>).
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>examplercfile=&quot;&quot;</samp></dt>
+<dd>
+<p>
+if needed (see <samp>rcfile</samp>), this is the
+<samp>system.rc&quot;$wm&quot;-menu</samp> file. In that case, make
+<samp>rcfile=system.rc&quot;$wm&quot;</samp>.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>rootprefix=&quot;&quot;</samp></dt>
+<dd>
+<p>
+The prefix to use when running as root (applies to $genmenu, $rcfile,
+$examplercfile and other old cache files). If it is not defined, the
+menu-method will be skipped when run as root.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>userprefix=&quot;&quot;</samp></dt>
+<dd>
+<p>
+As <samp>rootprefix</samp>, but when running as user. userprefix is relative
+to the user home directory, unless it start with 2 slashes, in which case it is
+treated as an absolute path. If it is not defined, the menu-method will be
+skipped when run as a user.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>hint_optimize=false</samp></dt>
+<dd>
+<p>
+If set to true, menu will try to generate an `optimal' tree, using the
+variables below. If set to false, menu will keep the sections as they are
+specified in the menu entry files (and ignore any hint stuff).
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>hint_nentry=6</samp></dt>
+<dd>
+<p>
+Optimal number of entries in a submenu. It's a float, so you can set it to 5.5
+if you cannot decide between 5 and 6. Also, values less than 3 probably don't
+work very well at the moment.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>hint_topnentry=5</samp></dt>
+<dd>
+<p>
+Same as hint_nentry, but for the top level menu. Often here are other entries,
+added by the window-manager itself (like Exit, Xterm, whatever) that menu
+doesn't know about, so that you may want to instruct menu to put less entries
+in the top level menu.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>hint_mixedpenalty=15.0</samp></dt>
+<dd>
+<p>
+Penalty for `mixed' menus. Mixed menus are those with both submenus and direct
+commands in them.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>hint_minhintfreq=0.1</samp></dt>
+<dd>
+<p>
+Minimal relative frequency for the hints before they are considered. Internal
+variable to speed up the tree generation. If you find menu slow, increase this
+value (to, say 0.2 or 0.3).
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>hint_mlpenalty=2000</samp></dt>
+<dd>
+<p>
+`max local penalty', while evaluating the possible trees, menu gives
+`penalties' for submenus that don't contain the desired number of submenus.
+The penalty is sqrt(n_entry_opt-n_entry), and eventually will be calculated as
+a sum of all nodes. But to speed things up, menu will discard possibilities in
+which any node has a `local' penalty of more than hint_mlpenalty. Increase
+this value if you think menu is overlooking your favorite tree (also decrease
+minhintfreq), decrease this value if you think menu is wasting too much time.
+Because of hint_max_ntry, the influence of this variable is nearly zero
+nowadays.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>hint_max_ntry=4</samp></dt>
+<dd>
+<p>
+menu will recursively, for each node, try the hint_max_ntry best local
+menu-divisions.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>hints_max_iter_hint=5</samp></dt>
+<dd>
+<p>
+The search for what hints to use in one menu is rather expensive. But due to
+the way things are sorted, menu seems to always find the `best' match in the
+first 2% of iterations. Thus, a way to speed things up is simply to cut of
+menu searching after `some' iterations are done. This value controls this, and
+limits the number of iterations to
+5+hint_max_iter_hint*number_of_possible_hints. Set this value to negative to
+disable this.
+</p>
+</dd>
+</dl>
+<dl>
+<dt><samp>hint_debug=false</samp></dt>
+<dd>
+<p>
+Set to true if you want to see loads and loads of debug output.
+</p>
+</dd>
+</dl>
+
+<hr>
+
+<h2><a name="s7.4"></a>7.4 Hints, tree optimization</h2>
+
+<p>
+The hints actually work in a rather strange way: when
+<samp>hint_optimize=true</samp> then all <samp>$section</samp> elements are
+added to the specified <samp>$hints</samp> variable, and the order
+(<samp>/Applications/Editors</samp> or <samp>/Editors/Applications</samp>) of
+the resulting hints is completely ignored. Then, the hints for each menu entry
+are handed to the optimization routine, which will calculate a reasonable tree
+for those hints. That tree must comply with the following:
+</p>
+
+<p>
+When a user looks for a program &quot;Program&quot; with, say, hints
+&quot;Good,Bulky,Heaven&quot;, then, while walking through the tree, it should
+at every node visited be clear for the user what submenu to select (or the menu
+should have &quot;Program&quot; directly in it). So, the top-level menu may
+look like
+</p>
+
+<pre>
+ Good
+ Hell
+ Microsoft
+</pre>
+
+<p>
+because then a searcher for a menu entry with hints
+&quot;Good,Bulky,Heaven&quot; will know to select the submenu &quot;Good&quot;.
+The toplevel menu may not look like
+</p>
+
+<pre>
+ Good
+ Hell
+ Heaven
+</pre>
+
+<p>
+as now it isn't clear whether to visit the Good or the Heaven submenu.
+</p>
+
+<p>
+That rule allows usually for many different trees, and the task of the
+optimization procedure is to select, in a finite amount of time, the tree that
+best matches the user's desire about the optimum number of menu entries.
+</p>
+
+<hr>
+
+<p>
+[ <a href="ch6.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ 7 ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch8.html">next</a> ]
+</p>
+
+<hr>
+
+<p>
+Debian Menu System
+</p>
+
+<address>
+version 1.4, 10 November 2011<br>
+<br>
+Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br>
+Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br>
+Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br>
+Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br>
+<br>
+</address>
+<hr>
+
+</body>
+
+</html>
+
diff --git a/doc/menu.html/ch8.html b/doc/menu.html/ch8.html
new file mode 100644
index 0000000..caa542f
--- /dev/null
+++ b/doc/menu.html/ch8.html
@@ -0,0 +1,665 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Debian Menu System - Variables and functions in the install-menu scripts</title>
+
+<link href="index.html" rel="start">
+<link href="ch7.html" rel="prev">
+<link href="index.html" rel="next">
+<link href="index.html#contents" rel="contents">
+<link href="index.html#copyright" rel="copyright">
+<link href="ch1.html" rel="chapter" title="1 Introduction">
+<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user">
+<link href="ch3.html" rel="chapter" title="3 The menu file">
+<link href="ch4.html" rel="chapter" title="4 What packages with applications should do">
+<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do">
+<link href="ch6.html" rel="chapter" title="6 How a user can override the menus">
+<link href="ch7.html" rel="chapter" title="7 The internals of the menu package">
+<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts">
+<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?">
+<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files">
+<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints">
+<link href="ch3.html#s3.1" rel="section" title="3.1 Location">
+<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax">
+<link href="ch3.html#s3.3" rel="section" title="3.3 The title field">
+<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field">
+<link href="ch3.html#s3.5" rel="section" title="3.5 The section field">
+<link href="ch3.html#s3.6" rel="section" title="3.6 The command field">
+<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field">
+<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field">
+<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections.">
+<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars">
+<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file">
+<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages">
+<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus">
+<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed">
+<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files">
+<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program">
+<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program">
+<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions">
+<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization">
+<link href="ch8.html#s8.1" rel="section" title="8.1 String constants">
+<link href="ch8.html#s8.2" rel="section" title="8.2 Variables">
+<link href="ch8.html#s8.3" rel="section" title="8.3 Functions">
+<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables">
+<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables">
+<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables">
+
+</head>
+
+<body>
+
+<p><a name="ch8"></a></p>
+<hr>
+
+<p>
+[ <a href="ch7.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ 8 ]
+[ <a href="index.html">next</a> ]
+</p>
+
+<hr>
+
+<h1>
+Debian Menu System
+<br>Chapter 8 - Variables and functions in the install-menu scripts
+</h1>
+
+<hr>
+
+<p>
+The supported &quot;needs&quot; definitions and &quot;startmenu=&quot;,
+&quot;endmenu=&quot; and &quot;submenutitle=&quot; are interpreted as follows:
+</p>
+
+<hr>
+
+<h2><a name="s8.1"></a>8.1 String constants</h2>
+
+<p>
+Anything inside double quotes (&quot;&quot;) is interpreted as a string, and is
+written verbatim to the output file. Escape sequences like \n, \t, ... will
+be replaced with their C expansions (but currently \0xx octal escape sequences
+are not supported).
+</p>
+
+<hr>
+
+<h2><a name="s8.2"></a>8.2 Variables</h2>
+
+<p>
+Anything matching $[a-z,A-Z,_]* is interpreted as a variable, and the
+corresponding definition from the menu entry is substituted.
+</p>
+
+<hr>
+
+<h3><a name="s8.2.1"></a>8.2.1 Special variables</h3>
+
+<p>
+The following variables are treated in a special way by install-menus, either
+because they are used for other purposes too, or because they are modified by
+install-menus (the ones marked with a &quot;!&quot; are modified by
+install-menus).
+</p>
+<dl>
+<dt>needs:</dt>
+<dd>
+<p>
+Used to determine whether the window manager supports this menu entry.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>command:</dt>
+<dd>
+<p>
+If this is undefined, this menu entry is taken as defining a sub-menu. This
+way you can specify icons of sub-menus.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>title!:</dt>
+<dd>
+<p>
+Used for sorting (see section). For sub-menu entries (those with empty
+command), this is initialised to the last part of the section. Please, keep
+the title short (two words at maximum). The title is for people who already
+know what program they want to start. See &quot;longtitle&quot; and
+&quot;description&quot; below for longer descriptions.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>sort:</dt>
+<dd>
+<p>
+Used for sorting (see section). To make sure an entry is at the beginning, use
+something with a low ASCII number, like &quot;$&quot;. For sorting at the end,
+use &quot;|&quot;
+</p>
+</dd>
+</dl>
+<dl>
+<dt>section!:</dt>
+<dd>
+<p>
+Used to determine the section of the menu entry. The menu entries that have a
+empty $command, ie those that define a submenu, have $title added to the end of
+$section The menu entries that have a non-empty $command have their $section
+modified to $section/$title, or $section/$sort:$title if $sort is defined. The
+menu entries within one submenu are sorted according to $section. If you want
+to retrieve the real section name, see the $basesection variable.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>basesection!:</dt>
+<dd>
+<p>
+Used to contain the *real* section name. This is useful because $section will
+be changed to $section/$title in special cases (see above). This causes a
+problem when you want to do parent($section) because you won't get the real
+parent section. Instead you can use $basesection, which will never contain the
+title.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>hotkey!:</dt>
+<dd>
+<p>
+Modified to reflect what install-menus thinks is the most suitable hotkey for
+this menu entry. The hotkey= in the menu entry file is taken as a suggestion,
+that could be overwritten if there is another entry with the same hotkey=. To
+suggest two possible hotkeys for an entry use hotkey=&quot;ab&quot;, with
+&quot;a&quot; being the most preferred hotkey.
+</p>
+</dd>
+</dl>
+
+<hr>
+
+<h3><a name="s8.2.2"></a>8.2.2 Preferred variables</h3>
+
+<p>
+The following aren't special for install-menus, but it's nice (read: essential)
+to use the same variables for the same things. So, I'll suggest some here. If
+you want to invent new ones, please do so and mail them to me so that I can
+include them here.
+</p>
+<dl>
+<dt>icon:</dt>
+<dd>
+<p>
+The location of the icon file for this menu entry. If you don't have an icon
+file, just leave out the icon= in the menu entry.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>icon32x32:</dt>
+<dd>
+<p>
+The location of a 32x32 icon file for this menu entry.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>icon16x16:</dt>
+<dd>
+<p>
+The location of a 16x16 icon file for this menu entry. This allows users to
+choose between 16x16 and 32x32 icon.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>longtitle:</dt>
+<dd>
+<p>
+For people that like descriptive titles (about one line) It is probably best to
+include this in your menu entries, while the window-managers don't (by default)
+put it in the menus. That way, people who want descriptive titles can turn
+them on, but others don't need to use them.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>description:</dt>
+<dd>
+<p>
+An even longer description (about 5 lines). For example, a description of the
+documentation in the dwww generated html pages.
+</p>
+</dd>
+</dl>
+
+<hr>
+
+<h3><a name="s8.2.3"></a>8.2.3 Suggested variables</h3>
+
+<p>
+The following variables probably shouldn't appear often (or at all) in the menu
+files supplied with packages. They are mostly intended for use by local system
+managers. Nevertheless, it is advised that all Debian systems use the
+following variable names:
+</p>
+<dl>
+<dt>visible</dt>
+<dd>
+<p>
+Some apps add entries to utmp the utmp file, so that &quot;who&quot; and
+friends know they are running (this is especially true for xterms etc). If
+$visible set (to anything other than &quot;&quot; or &quot;none&quot;), xterms
+etc will not write logging info to utmp. (may not work for your window
+manager).
+</p>
+</dd>
+</dl>
+<dl>
+<dt>geometry</dt>
+<dd>
+<p>
+For X apps, this will be the size of the (main) window that will be created
+(units in either chars or pixels, depending on type of main window (xterm or
+graphic)). If you as package maintainer want to use this, you should probably
+think about setting this variable somewhere in an Xresources file.
+</p>
+</dd>
+</dl>
+
+<hr>
+
+<h2><a name="s8.3"></a>8.3 Functions</h2>
+
+<p>
+Anything matching <samp>[a-zA-Z_]+</samp> is taken as a function name, and an
+error is generated if the function doesn't exist. The arguments of the
+functions can be other functions, string constants or variables.
+</p>
+<dl>
+<dt>prefix()</dt>
+<dd>
+<p>
+returns the current prefix dir: either $rootprefix, or $HOME/$userprefix,
+depending on who runs install-menu
+</p>
+</dd>
+</dl>
+<dl>
+<dt>ifroot($rootarg, $userarg)</dt>
+<dd>
+<p>
+if(getuid()==0) print $rootarg, else print $userarg
+</p>
+</dd>
+</dl>
+<dl>
+<dt>print($arg)</dt>
+<dd>
+<p>
+Same as just $arg; if $arg is empty, generate an error.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>nstring($n, $string)</dt>
+<dd>
+<p>
+write $string $n times. So, nstring(3,&quot;Aa&quot;) writes
+&quot;AaAaAa&quot;. (Useful in combination with level()).
+</p>
+</dd>
+</dl>
+<dl>
+<dt>esc($arg1,$arg2)</dt>
+<dd>
+<p>
+Print $arg1, but escape all occurrences of characters in $arg2 with a '\'
+(thus, if arg1=&quot;hello&quot;, arg2=&quot;lo&quot;, print
+&quot;he\l\l\o&quot;).
+</p>
+</dd>
+</dl>
+<dl>
+<dt>escwith($arg1, $arg2, $arg3)</dt>
+<dd>
+<p>
+Same as esc, but use $arg3 as escape sequence.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>escfirst($arg1, $arg2, $arg3)</dt>
+<dd>
+<p>
+Same as escwith, but only escapes first occurrence of $arg2.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>cppesc($arg1)</dt>
+<dd>
+<p>
+Escape anything that isn't a letter, number or _ with $&lt;hex-ascii-code&gt;.
+So, for example, a '-' is replaced by '$2D'. This way, $arg1 can be used as a
+#define in cpp.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>tolower($arg)</dt>
+<dt>toupper($arg)</dt>
+<dd>
+<p>
+Returns the argument set in lowercases resp uppercases.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>replacewith($s, $replace, $with)</dt>
+<dd>
+<p>
+Search $s for occurrences of characters from string replace, and replace them
+by the corresponding character in $with. Example: replacewith(&quot;hello
+$world, %dir&quot;, &quot;$% &quot;, &quot;123&quot;) returns:
+&quot;hello31world,32dir&quot;
+</p>
+</dd>
+</dl>
+<dl>
+<dt>replace($s, $replace, $with)</dt>
+<dd>
+<p>
+Search $s for occurences of $replace and replace them with $with. Note that
+the behaviour of this function is quite different than the replacewith()
+function.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>ifempty($arg1, $arg2)</dt>
+<dd>
+<p>
+If $arg1 is empty, print $arg2, otherwise print nothing. For compatibility,
+$arg1=&quot;none&quot; is interpreted as empty.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>ifnempty($arg1, $arg2)</dt>
+<dd>
+<p>
+If $arg1 is not empty, print $arg2. For compatibility, the string
+&quot;none&quot; is seen as empty.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>ifelse($arg1,$arg2,$arg3)</dt>
+<dd>
+<p>
+If $arg1 is non-empty, print $arg2, otherwise $arg3. For compatibility, the
+string &quot;none&quot; is seen as empty.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>ifeq($arg1, $arg2, $arg3)</dt>
+<dd>
+<p>
+If ($arg1==$arg2) then print $arg3
+</p>
+</dd>
+</dl>
+<dl>
+<dt>ifneq($arg1, $arg2, $arg3)</dt>
+<dd>
+<p>
+If ($arg1!=$arg2) then print $arg3
+</p>
+</dd>
+</dl>
+<dl>
+<dt>ifeqelse($arg1, $arg2, $arg3, $arg4)</dt>
+<dd>
+<p>
+If ($arg1==$arg2) then print $arg3 else print $arg4
+</p>
+</dd>
+</dl>
+<dl>
+<dt>cond_surr($arg1, $arg2, $arg3)</dt>
+<dd>
+<p>
+If $arg1 is non-empty print $arg2$arg1$arg3, otherwise print nothing. For
+compatibility, $arg1=&quot;none&quot; is interpreted as empty.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>iffile($arg1, $arg2)</dt>
+<dd>
+<p>
+If file $arg1 exists, and can be opened for reading by whoever started the
+current process, return $arg2, otherwise return nothing.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>ifelsefile($arg1, $arg2, $arg3)</dt>
+<dd>
+<p>
+If file $arg1 exists, and can be opened for reading by whoever started the
+current process, return $arg2, otherwise return $arg3.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>catfile($arg1)</dt>
+<dd>
+<p>
+Return the contents of file $arg1.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>shell($arg1)</dt>
+<dd>
+<p>
+Return the output of the shell command $arg1.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>forall($array, &quot;var&quot;, $exec)</dt>
+<dd>
+<p>
+For each element of the column separated array $array, set $var to that
+element, and print $exec. Example:
+</p>
+
+<pre>
+ !include lang.h
+ forall(sections_translations(), &quot;lang&quot;, \
+ &quot; section[&quot; $lang &quot;]=&quot; translate($lang, title()) &quot;\n&quot;)
+</pre>
+</dd>
+</dl>
+<dl>
+<dt>parent($arg)</dt>
+<dd>
+<p>
+for $arg a &quot;directory&quot;, return parent directory:
+parent(&quot;/Debian/Applications/Editors&quot;) =
+&quot;/Debian/Applications&quot;.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>basename($arg)</dt>
+<dd>
+<p>
+return the last part of the parent directory:
+basename(&quot;/Debian/Applications/Editors&quot;) = &quot;Applications&quot;.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>stripdir($arg)</dt>
+<dd>
+<p>
+everything after the last slash, i.e. what basename() should have returned:
+stripdir(&quot;/Debian/Applications/Editors&quot;) = &quot;Editors&quot;.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>entrycount()</dt>
+<dd>
+<p>
+the number of entries in this menu.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>entryindex()</dt>
+<dd>
+<p>
+returns relative position of this entry. Start with 0, last entry is
+entrycount() - 1. BUG: if sort= anything other than $title, then this
+entryindex() will return incorrect values.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>firstentry($arg)</dt>
+<dd>
+<p>
+return $arg if this is the first entry of this menu (that is, entryindex() =
+0). Else, return nothing.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>lastentry()</dt>
+<dd>
+<p>
+return $arg if this is the last entry in this menu (that is, entryindex() =
+entrycount() -1). Else, return nothing.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>level()</dt>
+<dd>
+<p>
+return nesting of this menu in the total menu tree.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>add($arg1,$arg2)</dt>
+<dt>sub($arg1,$arg2)</dt>
+<dt>mult($arg1,$arg2)</dt>
+<dt>div($arg1,$arg2)</dt>
+<dd>
+<p>
+returns the sum, difference, product or quotient of $arg1 and $arg2. Note that
+the arguments are strings, that are converted to integers. example:
+mult(&quot;24&quot;, entryindex())
+</p>
+</dd>
+</dl>
+<dl>
+<dt>rcfile()</dt>
+<dt>examplercfile()</dt>
+<dt>mainmenutitle()</dt>
+<dt>rootsection()</dt>
+<dt>rootprefix()</dt>
+<dt>userprefix()</dt>
+<dt>treewalk()</dt>
+<dt>postoutput()</dt>
+<dt>preoutput()</dt>
+<dd>
+<p>
+These functions all output whatever they were defined to be in the menu-method
+file.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>translate($lang, $text)</dt>
+<dd>
+<p>
+Translate $text into $lang using gettext, see <samp>forall</samp> for an
+example. Note that currently outputlanguage must be set to &quot;C&quot;. If
+$lang is the empty string, $text will be translated in the current locale
+language. See sections_translations() for a list of available translations.
+</p>
+</dd>
+</dl>
+<dl>
+<dt>implicit concatenation</dt>
+<dd>
+<p>
+String constants, variables and functions can be concatenated by placing them
+after each other with a space in between, like: &quot;hello&quot;
+ifelse($comma, $comma, &quot; sorry&quot; $period &quot; comma not
+defined&quot;) &quot; world&quot;
+</p>
+</dd>
+</dl>
+
+<hr>
+
+<p>
+[ <a href="ch7.html">previous</a> ]
+[ <a href="index.html#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ 8 ]
+[ <a href="index.html">next</a> ]
+</p>
+
+<hr>
+
+<p>
+Debian Menu System
+</p>
+
+<address>
+version 1.4, 10 November 2011<br>
+<br>
+Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br>
+Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br>
+Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br>
+Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br>
+<br>
+</address>
+<hr>
+
+</body>
+
+</html>
+
diff --git a/doc/menu.html/index.html b/doc/menu.html/index.html
new file mode 100644
index 0000000..cb79bda
--- /dev/null
+++ b/doc/menu.html/index.html
@@ -0,0 +1,208 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<html>
+
+<head>
+
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+
+<title>Debian Menu System</title>
+
+<link href="index.html" rel="start">
+<link href="ch8.html" rel="prev">
+<link href="ch1.html" rel="next">
+<link href="index.html#contents" rel="contents">
+<link href="index.html#copyright" rel="copyright">
+<link href="ch1.html" rel="chapter" title="1 Introduction">
+<link href="ch2.html" rel="chapter" title="2 Menu from the viewpoint of a user">
+<link href="ch3.html" rel="chapter" title="3 The menu file">
+<link href="ch4.html" rel="chapter" title="4 What packages with applications should do">
+<link href="ch5.html" rel="chapter" title="5 What packages with menu managers should do">
+<link href="ch6.html" rel="chapter" title="6 How a user can override the menus">
+<link href="ch7.html" rel="chapter" title="7 The internals of the menu package">
+<link href="ch8.html" rel="chapter" title="8 Variables and functions in the install-menu scripts">
+<link href="ch2.html#s2.1" rel="section" title="2.1 How/when do the window manager startup files get created?">
+<link href="ch2.html#s2.2" rel="section" title="2.2 Tuning of the generated window manager startup files">
+<link href="ch2.html#s2.3" rel="section" title="2.3 Optimization of menu tree: hints">
+<link href="ch3.html#s3.1" rel="section" title="3.1 Location">
+<link href="ch3.html#s3.2" rel="section" title="3.2 Syntax">
+<link href="ch3.html#s3.3" rel="section" title="3.3 The title field">
+<link href="ch3.html#s3.4" rel="section" title="3.4 The needs field">
+<link href="ch3.html#s3.5" rel="section" title="3.5 The section field">
+<link href="ch3.html#s3.6" rel="section" title="3.6 The command field">
+<link href="ch3.html#s3.7" rel="section" title="3.7 The icon field">
+<link href="ch3.html#s3.8" rel="section" title="3.8 The hints field">
+<link href="ch3.html#s3.9" rel="section" title="3.9 Entries for menu sections.">
+<link href="ch3.html#s3.10" rel="section" title="3.10 Fvwm's task and title bars">
+<link href="ch4.html#s4.1" rel="section" title="4.1 Providing a menu file">
+<link href="ch4.html#s4.2" rel="section" title="4.2 Adding a hook for dpkg in your packages">
+<link href="ch6.html#s6.1" rel="section" title="6.1 Configuring the menus">
+<link href="ch6.html#s6.2" rel="section" title="6.2 Specifying that a menu entry should not be displayed">
+<link href="ch6.html#s6.3" rel="section" title="6.3 Including other files">
+<link href="ch7.html#s7.1" rel="section" title="7.1 The update-menus program">
+<link href="ch7.html#s7.2" rel="section" title="7.2 The install-menu program">
+<link href="ch7.html#s7.3" rel="section" title="7.3 The install-menu config script definitions">
+<link href="ch7.html#s7.4" rel="section" title="7.4 Hints, tree optimization">
+<link href="ch8.html#s8.1" rel="section" title="8.1 String constants">
+<link href="ch8.html#s8.2" rel="section" title="8.2 Variables">
+<link href="ch8.html#s8.3" rel="section" title="8.3 Functions">
+<link href="ch8.html#s8.2.1" rel="subsection" title="8.2.1 Special variables">
+<link href="ch8.html#s8.2.2" rel="subsection" title="8.2.2 Preferred variables">
+<link href="ch8.html#s8.2.3" rel="subsection" title="8.2.3 Suggested variables">
+
+</head>
+
+<body>
+
+<p><a name="index"></a></p>
+<hr>
+
+<p>
+[ <a href="ch8.html">previous</a> ]
+[ <a href="#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch1.html">next</a> ]
+</p>
+
+<hr>
+
+<h1>
+Debian Menu System
+<br></h1>
+
+<hr>
+
+<h2><a name="abstract"></a>Abstract</h2>
+
+<p>
+The <samp>menu</samp> package was inspired by the
+<code>install-fvwm2-menu</code> program from the old <code>fvwm2</code>
+package. However, <samp>menu</samp> tries to provide a more general interface
+for menu building. With the <code>update-menus</code> command from this
+package, no package needs to be modified for every X window manager again, and
+it provides a unified interface for both text- and X-oriented programs.
+</p>
+
+<hr>
+
+<h2><a name="copyright"></a>Copyright Notice</h2>
+
+<p>
+Copyright &copy;1997 Joost Witteveen, Joey Hess, Christian Schwarz. &copy;2002-2005 Bill Allombert.
+</p>
+
+<p>
+This manual is free software; you may redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2, or (at your option) any later version.
+</p>
+
+<p>
+This is distributed in the hope that it will be useful, but <em>without any
+warranty</em>; without even the implied warranty of merchantability or fitness
+for a particular purpose. See the GNU General Public License for more details.
+</p>
+
+<p>
+A copy of the GNU General Public License is available as
+<code>/usr/share/common-licenses/GPL</code> in the Debian GNU/Linux
+distribution or on the World Wide Web at
+<samp>http://www.gnu.org/copyleft/gpl.html</samp>. You can also obtain it by
+writing to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+Boston, MA 02110-1301 USA
+</p>
+
+<hr>
+
+<h2><a name="contents"></a>Contents</h2>
+
+<ul>
+<li><a href="ch1.html">1 Introduction</a><li><a href="ch2.html">2 Menu from the viewpoint of a user</a>
+ <ul>
+ <li><a href="ch2.html#s2.1">2.1 How/when do the window manager startup files get created?</a></li>
+ <li><a href="ch2.html#s2.2">2.2 Tuning of the generated window manager startup files</a></li>
+ <li><a href="ch2.html#s2.3">2.3 Optimization of menu tree: hints</a>
+ </ul></li>
+<li><a href="ch3.html">3 The menu file</a>
+ <ul>
+ <li><a href="ch3.html#s3.1">3.1 Location</a></li>
+ <li><a href="ch3.html#s3.2">3.2 Syntax</a></li>
+ <li><a href="ch3.html#s3.3">3.3 The <samp>title</samp> field</a></li>
+ <li><a href="ch3.html#s3.4">3.4 The <samp>needs</samp> field</a></li>
+ <li><a href="ch3.html#s3.5">3.5 The <samp>section</samp> field</a></li>
+ <li><a href="ch3.html#s3.6">3.6 The <samp>command</samp> field</a></li>
+ <li><a href="ch3.html#s3.7">3.7 The <samp>icon</samp> field</a></li>
+ <li><a href="ch3.html#s3.8">3.8 The <samp>hints</samp> field</a></li>
+ <li><a href="ch3.html#s3.9">3.9 Entries for menu sections.</a></li>
+ <li><a href="ch3.html#s3.10">3.10 Fvwm's task and title bars</a>
+ </ul></li>
+<li><a href="ch4.html">4 What packages with applications should do</a>
+ <ul>
+ <li><a href="ch4.html#s4.1">4.1 Providing a menu file</a></li>
+ <li><a href="ch4.html#s4.2">4.2 Adding a hook for dpkg in your packages</a>
+ </ul></li>
+<li><a href="ch5.html">5 What packages with menu managers should do</a><li><a href="ch6.html">6 How a user can override the menus</a>
+ <ul>
+ <li><a href="ch6.html#s6.1">6.1 Configuring the menus</a></li>
+ <li><a href="ch6.html#s6.2">6.2 Specifying that a menu entry should not be displayed</a></li>
+ <li><a href="ch6.html#s6.3">6.3 Including other files</a>
+ </ul></li>
+<li><a href="ch7.html">7 The internals of the menu package</a>
+ <ul>
+ <li><a href="ch7.html#s7.1">7.1 The update-menus program</a></li>
+ <li><a href="ch7.html#s7.2">7.2 The install-menu program</a></li>
+ <li><a href="ch7.html#s7.3">7.3 The install-menu config script definitions</a></li>
+ <li><a href="ch7.html#s7.4">7.4 Hints, tree optimization</a>
+ </ul></li>
+<li><a href="ch8.html">8 Variables and functions in the install-menu scripts</a>
+ <ul>
+ <li><a href="ch8.html#s8.1">8.1 String constants</a></li>
+ <li><a href="ch8.html#s8.2">8.2 Variables</a></li>
+ <li><a href="ch8.html#s8.3">8.3 Functions</a></li>
+ </ul></li>
+</ul>
+
+<hr>
+
+<p>
+[ <a href="ch8.html">previous</a> ]
+[ <a href="#contents">Contents</a> ]
+[ <a href="ch1.html">1</a> ]
+[ <a href="ch2.html">2</a> ]
+[ <a href="ch3.html">3</a> ]
+[ <a href="ch4.html">4</a> ]
+[ <a href="ch5.html">5</a> ]
+[ <a href="ch6.html">6</a> ]
+[ <a href="ch7.html">7</a> ]
+[ <a href="ch8.html">8</a> ]
+[ <a href="ch1.html">next</a> ]
+</p>
+
+<hr>
+
+<p>
+Debian Menu System
+</p>
+
+<address>
+version 1.4, 10 November 2011<br>
+<br>
+Joost Witteveen <code><a href="mailto:joostje@debian.org">joostje@debian.org</a></code><br>
+Joey Hess <code><a href="mailto:joeyh@debian.org">joeyh@debian.org</a></code><br>
+Christian Schwarz <code><a href="mailto:schwarz@debian.org">schwarz@debian.org</a></code><br>
+Bill Allombert <code><a href="mailto:ballombe@debian.org">ballombe@debian.org</a></code><br>
+<br>
+</address>
+<hr>
+
+</body>
+
+</html>
+