Remove commented-out code
[orchestrallily.git] / Documentation / orchestrallily.init
blobea2270b1c2f6cd0c97a8c12cdf0f703912eb435a
1 #!/usr/bin/env perl
3 # {
4 package Texi2HTML::Config;
6 my $lastfilename;
7 my $docnr = 0;
8 my $page_toc_depth = 2;
10 use Data::Dumper;
11 $Data::Dumper::Maxdepth = 2;
13 sub print_element_info($)
15 my $element = shift;
16 print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
17 print "Element: $element\n";
18 print Dumper($element);
22 # This function makes sure that files are only generated for numbered sections,
23 # but not for unnumbered ones. It is called after texi2html has done its own
24 # splitting and simply returns the filename for the node given as first argument
25 # Nodes with the same filename will be printed out to the same filename, so
26 # this really all we need. Also, make sure that the file names for sections
27 # are derived from the section title. We also might want to name the anchors
28 # according to node titles, which works by simply overriding the id element of
29 # the $element hash.
30 sub oly_element_file_name($$$)
32 my $element = shift;
33 my $type = shift;
34 my $docu_name = shift;
35 my $docu_ext = $Texi2HTML::Config::EXTENSION;
37 # if ($$element{number} eq "1.1") {
38 # print_element_info ($element);
39 # }
41 # TOC, footer, about etc. are called with undefined $element and $type == "toc"|"stoc"|"foot"|"about"
42 if ($type eq "toc" or $type eq "stoc" or $type eq "foot" or $type eq "about") {
43 return;
44 } else {
45 # print Dumper ($element);
46 # derive the name of the anchor (i.e. the part after # in the links!),
47 # don't use texi2html's SECx.x default!
48 my $anchor = main::remove_texi($$element{texi});
49 if ($$element{translationof}) {
50 $anchor = main::remove_texi($$element{translationof});
52 $anchor =~ tr/\ \/?:'/-/d;
53 $$element{id} = $anchor;
54 # Numbered sections will get a filename Section_1.1.2, unnumbered sections will use
55 # the file name of the previous numbered section:
56 if ($$element{number} and $$element{level}<2) {
57 my $filename = $anchor;
58 $filename .= ".$docu_ext" if (defined($docu_ext));
59 $docnr += 1;
60 $$element{doc_nr} = $docnr;
61 $lastfilename = $filename;
62 return $filename;
63 } else {
64 $$element{doc_nr} = $docnr;
65 return $lastfilename;
69 return;
71 $Texi2HTML::Config::element_file_name = \&oly_element_file_name;
73 return 1;