' > $@
+ echo '
' > $@
dot -Tcmapx $^ >> $@
api-examples.gfs: api-examples.txt MkExx.hs
diff --git a/doc/synopsis/categories.dot b/doc/synopsis/categories.dot
index 69cf67e7..3bedfb17 100644
--- a/doc/synopsis/categories.dot
+++ b/doc/synopsis/categories.dot
@@ -1,5 +1,5 @@
-digraph categories {
+digraph categoriesmap {
size = "11,11" ;
node [href="#\N"];
diff --git a/doc/synopsis/intro.txt b/doc/synopsis/intro.txt
index 4c504243..7e205939 100644
--- a/doc/synopsis/intro.txt
+++ b/doc/synopsis/intro.txt
@@ -13,18 +13,16 @@ to the relevant source files, which give more information. Some of the files hav
not yet been prepared so that the machine generated documentation has the nicest
possible format.
+% These hardcoded TOC links (chapter 4 onwards) need to be updated as new languages are added.
+
The main contents are:
-- [Chapter 1 #toc2]: categories, with links to the functions for
-constructing trees in them.
-- [Chapter 2 #toc5]: syntactic construction functions, with cross-links and
-examples.
-- [Chapter 3 #toc85]: morphological paradigms.
-- [Chapter 4 #toc120]: additional libraries.
-- [Chapter 5 #toc126]: how to "browse" the library by
-loading the grammars into the ``gf`` command editor.
-- [Chapter 6 #toc127]: a brief example of how application grammars can
-use the resource modules.
-- [Detailed table of contents #toc128].
+- [Chapter 1 #toc2]: categories, with links to the functions for constructing trees in them.
+- [Chapter 2 #toc5]: syntactic construction functions, with cross-links and examples.
+- [Chapter 3 #toc85]: morphological (lexical) paradigms.
+- [Chapter 4 #toc121]: additional libraries.
+- [Chapter 5 #toc127]: how to "browse" the library by loading the grammars into the ``gf`` command editor.
+- [Chapter 6 #toc128]: a brief example of how application grammars can use the resource modules.
+- [Detailed table of contents #toc129].
The [RGL Browser http://www.grammaticalframework.org/~john/rgl-browser/] tool allows you to interactively browse through
diff --git a/doc/synopsis/template.html b/doc/synopsis/template.html
index b5384122..9b076f71 100644
--- a/doc/synopsis/template.html
+++ b/doc/synopsis/template.html
@@ -43,7 +43,7 @@ $endfor$
$if(title)$
of {
-- "++b.s++"