# jsbook.perl by Masao Takaku <masao@ulis.ac.jp>
# copied from:
# jreport.perl by Kenshi Muto <kmuto@debian.org>
# report.perl by Ross Moore <ross@mpce.mq.edu.au>  09-14-97
#
# Extension to LaTeX2HTML V97.1 to support the "report" document class
# and standard LaTeX2e class options.
#
# Change Log:
# ===========

package main;

require "$LATEX2HTMLSTYLES${dd}luatexja.perl";

# Suppress option-warning messages:
sub do_ltjsbook_a4paper{}
sub do_ltjsbook_a5paper{}
sub do_ltjsbook_a6paper{}
sub do_ltjsbook_b4paper{}
sub do_ltjsbook_b5paper{}
sub do_ltjsbook_a4j{}
sub do_ltjsbook_a5j{}
sub do_ltjsbook_b4j{}
sub do_ltjsbook_b5j{}
sub do_ltjsbook_b5var{}
sub do_ltjsbook_letterpaper{}
sub do_ltjsbook_legalpaper{}
sub do_ltjsbook_executivepaper{}
sub do_ltjsbook_landscape{}
sub do_ltjsbook_tombo{}
sub do_ltjsbook_mentuke{}
sub do_ltjsbook_oneside{}
sub do_ltjsbook_twoside{}
sub do_ltjsbook_onecolumn{}
sub do_ltjsbook_twocolumn{}
sub do_ltjsbook_notitlepage{}
sub do_ltjsbook_titlepage{}
sub do_ltjsbook_openright{}
sub do_ltjsbook_openany{}
sub do_ltjsbook_final{}
sub do_ltjsbook_draft{}
sub do_ltjsbook_disablejfam{}
sub do_ltjsbook_mingoth{}
sub do_ltjsbook_papersize{}
sub do_ltjsbook_openbib{}

sub do_ltjsbook_9pt{ $LATEX_FONT_SIZE = '9pt' unless $LATEX_FONT_SIZE; }
sub do_ltjsbook_10pt{ $LATEX_FONT_SIZE = '10pt' unless $LATEX_FONT_SIZE; }
sub do_ltjsbook_11pt{ $LATEX_FONT_SIZE = '11pt' unless $LATEX_FONT_SIZE; }
sub do_ltjsbook_12pt{ $LATEX_FONT_SIZE = '12pt' unless $LATEX_FONT_SIZE; }
sub do_ltjsbook_14pt{ $LATEX_FONT_SIZE = '14pt' unless $LATEX_FONT_SIZE; }
sub do_ltjsbook_17pt{ $LATEX_FONT_SIZE = '17pt' unless $LATEX_FONT_SIZE; }
sub do_ltjsbook_21pt{ $LATEX_FONT_SIZE = '21pt' unless $LATEX_FONT_SIZE; }

sub do_ltjsbook_leqno{ $EQN_TAGS = 'L'; }
sub do_ltjsbook_reqno{ $EQN_TAGS = 'R'; }
sub do_ltjsbook_fleqn{ $FLUSH_EQN = 1; }

sub do_cmd_thepart {
    join('', &do_cmd_Roman("${O}0${C}part${O}0$C"), ".", @_[0]) }

sub do_cmd_thechapter {
    join('', &do_cmd_arabic("${O}0${C}chapter${O}0$C"), ".", @_[0]) }

sub do_cmd_thesection {
    join('',&translate_commands("\\thechapter")
	, &do_cmd_arabic("${O}0${C}section${O}0$C"), @_[0]) }

sub do_cmd_thesubsection {
    join('',&translate_commands("\\thesection")
	,"." , &do_cmd_arabic("${O}0${C}subsection${O}0$C"), @_[0]) }

sub do_cmd_thesubsubsection {
    join('',&translate_commands("\\thesubsection")
	,"." , &do_cmd_arabic("${O}0${C}subsubsection${O}0$C"), @_[0]) }

sub do_cmd_theparagraph {
    join('',&translate_commands("\\thesubsubsection")
	,"." , &do_cmd_arabic("${O}0${C}paragraph${O}0$C"), @_[0]) }

sub do_cmd_thesubparagraph {
    join('',&translate_commands("\\theparagraph")
	,"." , &do_cmd_arabic("${O}0${C}subparagraph${O}0$C"), @_[0]) }

&addto_dependents('chapter','equation');
&addto_dependents('chapter','footnote');
&addto_dependents('chapter','figure');
&addto_dependents('chapter','table');

sub do_cmd_theequation {
    local($chap) =  &translate_commands("\\thechapter");
    join('', (($chap =~ /^(0\.)?$/)? '' : $chap)
        , &do_cmd_arabic("${O}0${C}equation${O}0$C"), @_[0]) }

sub do_cmd_thefootnote {
    local($chap) =  &translate_commands("\\thechapter");
    join('', (($chap =~ /^(0\.)?$/)? '' : $chap)
        , &do_cmd_arabic("${O}0${C}footnote${O}0$C"), @_[0]) }

sub do_cmd_thefigure {
    local($chap) =  &translate_commands("\\thechapter");
    join('', (($chap =~ /^(0\.)?$/)? '' : $chap)
        , &do_cmd_arabic("${O}0${C}figure${O}0$C"), @_[0]) }

sub do_cmd_thetable {
    local($chap) =  &translate_commands("\\thechapter");
    join('', (($chap =~ /^(0\.)?$/)? '' : $chap)
        , &do_cmd_arabic("${O}0${C}table${O}0$C"), @_[0]) }

1;	# Must be last line
