$toc$toggle
" . "<$sc id='$tocid'><$l>\$List$l>$s>
";
}
// calculate the outline in order to generate the toc
$outline = CreateOutline($text);
$indextree = $outline[0];
$records = $outline[1];
$r = GenerateToc($indextree, $records, $l, $sc, $s);
if ($r!='') {
// insert the toc
$r = str_replace('$List',$r,$toc);
}
return $r;
}
?>