sub print_story {
my ($source,$html) = @_;
my $tab = $html ? 3 : 4;
start_html() if $html;
while (my $line = <$source>) {
chomp($line);
if ($line =~ m/^) {
line($tab,$line);
}
elsif ($line =~ /^[1-6]\s/) {
my ($heading,$text) = split(/ /,$line,2);
line($tab,qq(
$line
)); } } line($tab,qq( )) if $tab == 3; end_html if $html; } sub print_definitions { my (%opt) = @_; my $tab = exists($opt{html}) ? 3 : 4; my %definition_list; get_hash( hash => \%definition_list, file => exists($opt{file}) ? $opt{file} : get_data, headings => [@{$opt{headings}}], sort => 'yes', ); start_html() if exists($opt{html}); unless (exists($opt{html}) || exists($opt{heading})) { line(3,qq(