From: bangerth Date: Mon, 6 Aug 2007 03:33:31 +0000 (+0000) Subject: Show subsections of introduction and results section also in the table of contents... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=321af4a48dd54bea597a2f4051a675c6adaa62f5;p=dealii-svn.git Show subsections of introduction and results section also in the table of contents of tutorial programs git-svn-id: https://svn.dealii.org/trunk@14904 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/doxygen/tutorial/Makefile b/deal.II/doc/doxygen/tutorial/Makefile index 3bae031185..4e06291fe4 100644 --- a/deal.II/doc/doxygen/tutorial/Makefile +++ b/deal.II/doc/doxygen/tutorial/Makefile @@ -16,6 +16,8 @@ gen-example-names = $(addprefix generated/, $(example-names)) # and commented and plain versions of the program as well as a combined one example-toc-prog = $(addsuffix _toc.prog,$(gen-example-names)) example-toc-plain = $(addsuffix _toc.plain,$(gen-example-names)) +example-toc-intro = $(addsuffix _toc.intro,$(gen-example-names)) +example-toc-results= $(addsuffix _toc.results,$(gen-example-names)) example-toc = $(addsuffix _toc.combined,$(gen-example-names)) # same for intermediate files for doxygen output @@ -52,14 +54,32 @@ $(example-toc-plain): > $@ +$(example-toc-intro): + @echo ================== Making $@ + @cat $D/examples/$(call get_basename, $@)/doc/intro.dox \ + | egrep -i ".*" \ + | $(PERL) ./intro2toc \ + > $@ + + +$(example-toc-results): + @echo ================== Making $@ + @cat $D/examples/$(call get_basename, $@)/doc/results.dox \ + | egrep -i ".*" \ + | $(PERL) ./intro2toc \ + > $@ + + $(example-toc): @echo ================== Making $@ @echo "
" > $@ @echo "
    " >> $@ @echo "
  1. Introduction" >> $@ + @cat generated/$(call get_basename, $@)_toc.intro >> $@ @echo "
  2. The commented program" >> $@ @cat generated/$(call get_basename, $@)_toc.prog >> $@ @echo "
  3. Results" >> $@ + @cat generated/$(call get_basename, $@)_toc.results >> $@ @echo "
  4. The plain program" >> $@ @cat generated/$(call get_basename, $@)_toc.plain >> $@ @echo "
" >> $@ @@ -96,9 +116,11 @@ $(example-doxygen): @echo "@htmlonly" >> $@ @cat generated/$(call get_basename, $@)_toc.combined >> $@ @echo "@endhtmlonly" >> $@ - @cat $D/examples/$(call get_basename, $@)/doc/intro.dox >> $@ + @cat $D/examples/$(call get_basename, $@)/doc/intro.dox \ + | $(PERL) create_anchors >> $@ @cat generated/$(call get_basename, $@)_prog.dox >> $@ - @cat $D/examples/$(call get_basename, $@)/doc/results.dox >> $@ + @cat $D/examples/$(call get_basename, $@)/doc/results.dox \ + | $(PERL) create_anchors >> $@ @cat generated/$(call get_basename, $@)_plain.dox >> $@ @echo " */" >> $@ @@ -111,7 +133,8 @@ validate-xrefs: clean: -rm -f $(example-toc) \ - $(example-toc-prog) $(example-toc-plain) \ + $(example-toc-prog) $(example-toc-plain) \ + $(example-toc-intro) $(example-toc-results) \ $(example-dox-prog) $(example-dox-plain) $(example-doxygen) -rm -f Makefile.dep @@ -128,12 +151,21 @@ Makefile.dep: $(shell echo $D/examples/*/*.cc) Makefile `echo $D/examples/$${i}/*.cc` ; \ echo generated/$${i}_toc.plain : generated/$${i}_toc.prog ; \ echo generated/$${i}_toc.combined : \ - generated/$${i}_toc.prog generated/$${i}_toc.plain ; \ + generated/$${i}_toc.intro \ + generated/$${i}_toc.results \ + generated/$${i}_toc.prog \ + generated/$${i}_toc.plain ; \ echo doxygen/$$i.h : generated/$${i}_prog.dox generated/$${i}_plain.dox \ generated/$${i}_toc.combined \ $D/examples/$$i/doc/intro.dox \ $D/examples/$$i/doc/results.dox \ - ; \ + ; \ + echo generated/$${i}_toc.intro : \ + $D/examples/$$i/doc/intro.dox \ + ; \ + echo generated/$${i}_toc.results : \ + $D/examples/$$i/doc/results.dox \ + ; \ done \ > $@ diff --git a/deal.II/doc/doxygen/tutorial/create_anchors b/deal.II/doc/doxygen/tutorial/create_anchors new file mode 100644 index 0000000000..0fd0614f7b --- /dev/null +++ b/deal.II/doc/doxygen/tutorial/create_anchors @@ -0,0 +1,29 @@ +#--------------------------------------------------------------------------- +# $Id: create_anchors 14782 2007-06-15 16:37:12Z kanschat $ +# Version: $Name$ +# +# Copyright (C) 2007 by the deal.II authors +# +# This file is subject to QPL and may not be distributed +# without copyright and license information. Please refer +# to the file deal.II/doc/license.html for the text and +# further information on this license. +# +#--------------------------------------------------------------------------- + + +# If we find a a heading in a .dox file, create an HTML anchor for it. + +while (<>) { + if ( /(.*)<\/h.>\s*/ ) { + $reftext = $1; + + # for the anchor, use the name of the section but discard + # everything except for letters, numbers, and underscores + $reftext =~ s/[^a-zA-Z0-9_]//g; + + print "$_\n"; + } else { + print; + } +} diff --git a/deal.II/doc/doxygen/tutorial/intro2toc b/deal.II/doc/doxygen/tutorial/intro2toc new file mode 100644 index 0000000000..2330a29d60 --- /dev/null +++ b/deal.II/doc/doxygen/tutorial/intro2toc @@ -0,0 +1,61 @@ +#--------------------------------------------------------------------------- +# $Id: intro2toc 14782 2007-06-15 16:37:12Z kanschat $ +# Version: $Name$ +# +# Copyright (C) 2006, 2007 by the deal.II authors +# +# This file is subject to QPL and may not be distributed +# without copyright and license information. Please refer +# to the file deal.II/doc/license.html for the text and +# further information on this license. +# +#--------------------------------------------------------------------------- + +print " \n"; +} diff --git a/deal.II/doc/news/changes.html b/deal.II/doc/news/changes.html index 57a95adebd..423144f31a 100644 --- a/deal.II/doc/news/changes.html +++ b/deal.II/doc/news/changes.html @@ -230,6 +230,13 @@ inconvenience this causes.

General

    +
  1. + Improved: The table of contents of tutorial programs now also shows + subsections of introduction and results. +
    + (WB 2007/08/05) +

    +
  2. Extended: Up to now, in 3D only 'orientable' meshes could be used in deal.II, i.e. all lines are in standard orientation and the faces can be