Hi Bill,

Just create a patch and send it to me.

OK.
Here's a patch for cmDocumentationFormatterHTML.cxx

It adds, at the beginning of each section, a list with hyperlinks to each entry in it.

Unfortunately, adding a similar list to the whole document is more difficult given the current documentation arquitecture, so it will take me some more (free) time to di it, but this is a good start. At least within each section you can easily see all entries (options,commands,properties,modules) at once, and jump directly to the one you are interested in.



--- cmDocumentationFormatterHTML - Copy.cxx 2007-10-22 13:48:39.000000000 -0300
+++ cmDocumentationFormatterHTML.cxx 2007-10-22 19:33:45.794000000 -0300
@@ -97,6 +97,20 @@

  const std::vector<cmDocumentationEntry> &entries =
    section.GetEntries();
+
+  os << "<ul>\n";
+ for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
+      op != entries.end(); ++ op )
+    {
+    if(op->Name.size())
+      {
+ os << " <li><a href=\"#command_"<< op->Name.c_str() << "\"><b><code>";
+          this->PrintHTMLEscapes(os, op->Name.c_str());
+          os << "</code></b></a></li>";
+      }
+    }
+  os << "</ul>\n" ;
+
for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
      op != entries.end();)
    {
@@ -108,9 +122,9 @@
        os << "  <li>\n";
        if(op->Name.size())
          {
-          os << "    <b><code>";
+ os << " <a name=\"command_"<< op->Name.c_str() << "\"><b><code>";
          this->PrintHTMLEscapes(os, op->Name.c_str());
-          os << "</code></b>: ";
+          os << "</code></b></a>: ";
          }
        this->PrintHTMLEscapes(os, op->Brief.c_str());
        if(op->Full.size())


I compiled and tested it locally and it works AFAICT.

Best


--
Fernando Cacciola
SciSoft
http://fcacciola.50webs.com


_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to