]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Also show a table of content for the plain listing, so that one can jump right to...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 Jan 2006 20:53:25 +0000 (20:53 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 Jan 2006 20:53:25 +0000 (20:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@12147 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/tutorial/chapter-2.step-by-step/Makefile
deal.II/doc/tutorial/chapter-2.step-by-step/head.html
deal.II/doc/tutorial/chapter-2.step-by-step/program2plain

index 1d7bebe9fd49b63cbd3c2f3c4d07a7a84fb71655..774e27615696c22ed7547209479d95c05ba9bdd2 100644 (file)
@@ -17,11 +17,13 @@ $(example-htmls):
        @TOC=`cat $D/examples/$(@:.html=)/$(@:.html=.cc) \
          | $(PERL) program2toc \
          | $(PERL) -pi -e 's/\"/\\\"/g;'` ; \
+        plainTOC=`echo $$TOC | $(PERL) -pi -e 's/href=.../href=\\\"\#plain-/g;'` ; \
         cat head.html \
          | $(PERL) -pi -e '$$step="$@";                     \
                          $$step=~s/step-(\d+).html/$$1/g; \
                          s/step xxx/step $$step/g;'       \
-         | $(PERL) -pi -e "s!TOC!$$TOC!g;" \
+         | $(PERL) -pi -e "s!commentedTOC!$$TOC!g;" \
+         | $(PERL) -pi -e "s!plainTOC!$$plainTOC!g;" \
          > $@
        @cat $(@:.html=.data/intro.html) >> $@
        @cat $D/examples/$(@:.html=)/$(@:.html=.cc) \
index ba932f060de9e3e5c305831d61339e950f2ea309..b4a6757cb3bce7ddcfe4930a02bef57ab6dad3b0 100644 (file)
 <h2>Overview of step xxx</h2>
 
 <ol>
-  <li> <a href="#Intro">Introduction</a>
-  <li> <a href="#CommProg">The commented program</a>
-TOC
-  <li> <a href="#Results">Results</a>
-  <li> <a href="#PlainProg">The plain program</a>
+  <li> <a href="#Intro" class=bold>Introduction</a>
+  <li> <a href="#CommProg" class=bold>The commented program</a>
+commentedTOC
+  <li> <a href="#Results" class=bold>Results</a>
+  <li> <a href="#PlainProg" class=bold>The plain program</a>
+plainTOC
 </ol>
 
index 52819ff606cda1eeee2f79c3d31c7ecc72f5c813..f6aded2746df083f175c9a5253b4cceee95e62b3 100644 (file)
@@ -32,7 +32,24 @@ do {
        s/\t/        /g;
 
        print "  $_";
-    }
+    } else {
+       # second, replace section headers, and generate addressable
+       # anchor
+       if ( /\@sect/ ) {
+          # replace quotation marks by the appropriate HTML quotation marks
+          s!``!&#8220;!g;
+          s!''!&#8221;!g;
+
+           # replace double dashes in comments by &mdash;
+          s!--!&mdash;!g;
+
+          m!\@sect(\d)\{(.*)\}\s*$!;
+          $sect_name = $2;
+          $sect_name =~ s/\s/_/g;
+          $_ = "\n<a name=\"plain-$sect_name\"></a>";
+          print;
+       }
+    }  
 } while (<>);
 
 print "</code></pre>\n</p>\n\n";

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.