diff --git a/bibtexbrowser.php b/bibtexbrowser.php index aa5fa40..c2bb04c 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -118,6 +118,8 @@ function bibtexbrowser_configure($key, $value) { // Which is the first html level that should be used in embedded mode? @define('BIBTEXBROWSER_HTMLHEADINGLEVEL', 2); +@define('BIBTEXBROWSER_ACADEMIC_TOC', true); + @define('BIBTEXBROWSER_DEBUG',false); @define('COMMA_NAMES',false);// do have authors in a comma separated form? @@ -2816,11 +2818,45 @@ class AcademicDisplay { $this->db = createBibDataBase(); $this->db->bibdb = $this->entries; - foreach (_DefaultBibliographySections() as $section) { - $this->search2html($section['query'],$section['title']); + if (BIBTEXBROWSER_ACADEMIC_TOC != true) { + foreach (_DefaultBibliographySections() as $section) { + $this->search2html($section['query'],$section['title']); + } + } else { + $sections = array(); + echo ""; + + foreach ($sections as $section) { + echo "\n"; + echo ""; + echo $section['title']." (".$section['count'].")"; + echo "\n", + $section['display']->display(); + } } } - }