#LaTeX2HTML Version 96.1 : dot.latex2html-init
#

require "../common/latex2html-init";

sub custom_title_hook {
    my $title = shift;
    # Return is filename to associate with section "$title". Use
    # return ""; to get the default, which is of the form nodeN.html

    $title =~ s/<[^>]*>//g;
    if ($title eq "OOMMF Documentation") {
        $title = "userguide";
    } elsif ($title eq "Quick Start: Example OOMMF Session") {
        $title = "quickstart";
    } elsif ($title eq "File Formats") {
        $title = "fileformats";
    } elsif ($title =~ /.*mifconvert.*/) {
        $title = "mifconvert";
    } elsif ($title =~ /Vector field format.*/) {
        $title = "vectorfieldformat";
    } elsif ($title =~ /Bibliography.*/) {
        $title = "bibliography";
    } elsif ($title =~ /References.*/) {
        $title = "references";
    } elsif ($title =~ /Index/) {
        $title = "docindex";
    } else {
        my $small_words = "a|an|and|of|on|the|";
        $title =~ s/-/ /g;
        $title =~ s/\b($small_words)\b//gi;
        $title =~ s/\W+/_/g;
        $title =~ s/_+/_/g;
        $title =~ s/(^_|_$)//g;
    }

    return "$title";
}

#$DO_INCLUDE = "localmods";

1;	# This must be the last line
