From f5502351187fb03ee741013fe9fbc0a3a900a05b Mon Sep 17 00:00:00 2001
From: bringert
Date: Mon, 5 Nov 2007 22:39:33 +0000
Subject: [PATCH] Added image map links to the category overview picture in the
synopsis. It doesn't work for the nodes that have non-category names, like
the ones with multiple categories in them. This could be fixed in
categories.dot.
---
lib/resource-1.0/doc/Makefile | 4 ++
lib/resource-1.0/doc/MkSynopsis.hs | 1 +
lib/resource-1.0/doc/categories-imagemap.html | 50 ++++++++++++++++++
lib/resource-1.0/doc/categories-intro.txt | 4 +-
lib/resource-1.0/doc/categories.dot | 3 +-
lib/resource-1.0/doc/synopsis.html | 52 ++++++++++++++++++-
6 files changed, 111 insertions(+), 3 deletions(-)
create mode 100644 lib/resource-1.0/doc/categories-imagemap.html
diff --git a/lib/resource-1.0/doc/Makefile b/lib/resource-1.0/doc/Makefile
index 97bc0f099..088f37288 100644
--- a/lib/resource-1.0/doc/Makefile
+++ b/lib/resource-1.0/doc/Makefile
@@ -4,6 +4,10 @@ index:
txt2tags -thtml index.txt
synopsis:
runghc MkSynopsis.hs
+
+categories-imagemap.html: categories.dot
+ dot -Tcmapx $^ > $@
+
clt:
txt2tags clt2006.txt
htmls clt2006.html
diff --git a/lib/resource-1.0/doc/MkSynopsis.hs b/lib/resource-1.0/doc/MkSynopsis.hs
index be57e852b..21cb9b716 100644
--- a/lib/resource-1.0/doc/MkSynopsis.hs
+++ b/lib/resource-1.0/doc/MkSynopsis.hs
@@ -13,6 +13,7 @@ main = do
writeFile synopsis "GF Resource Grammar Library: Synopsis"
append "Aarne Ranta"
space
+ append "%!postproc(html): '(SRC=\"categories.png\")' '\\1 USEMAP=\"#categories\"'"
include "synopsis-intro.txt"
title "Categories"
space
diff --git a/lib/resource-1.0/doc/categories-imagemap.html b/lib/resource-1.0/doc/categories-imagemap.html
new file mode 100644
index 000000000..0f1c50ea9
--- /dev/null
+++ b/lib/resource-1.0/doc/categories-imagemap.html
@@ -0,0 +1,50 @@
+
diff --git a/lib/resource-1.0/doc/categories-intro.txt b/lib/resource-1.0/doc/categories-intro.txt
index 4ca6cc3a4..f5498fcfe 100644
--- a/lib/resource-1.0/doc/categories-intro.txt
+++ b/lib/resource-1.0/doc/categories-intro.txt
@@ -1,6 +1,5 @@
-
The chart below shows the categories in a hierarchical top-down order.
The edges do not define the complete dependency structure; if they did,
the graph would have many many more edges, and also many cycles. The precise
@@ -11,6 +10,9 @@ each category.
| [categories.png] |
+%!include(html): ''categories-imagemap.html''
+
+
The rectangular boxes mark open lexical categories, which have constructors
also in the ``Paradigms`` modules.
diff --git a/lib/resource-1.0/doc/categories.dot b/lib/resource-1.0/doc/categories.dot
index c837304b3..e41e78620 100644
--- a/lib/resource-1.0/doc/categories.dot
+++ b/lib/resource-1.0/doc/categories.dot
@@ -1,6 +1,7 @@
-digraph {
+digraph categories {
size = "11,11" ;
+node [href="#\N"];
Text [style = "solid", shape = "ellipse"];
Text -> Punct [style = "solid"];
diff --git a/lib/resource-1.0/doc/synopsis.html b/lib/resource-1.0/doc/synopsis.html
index df484bfc6..71ef9a5c2 100644
--- a/lib/resource-1.0/doc/synopsis.html
+++ b/lib/resource-1.0/doc/synopsis.html
@@ -174,10 +174,60 @@ each category.
- |
+ |
+
The rectangular boxes mark open lexical categories, which have constructors
also in the Paradigms modules.