aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/book-html.sty
blob: 27eaeefa81792c2de848bac7072dc234615f9b6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
\newcounter {part}
\newcounter {chapter}
\newcounter {section}[chapter]
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {paragraph}[subsubsection]
\newcounter {subparagraph}[paragraph]
\renewcommand \thepart {\Roman{part}}
\renewcommand \thesection {\thechapter.\arabic{section}}
\renewcommand\thesubsection   {\thesection.\arabic{subsection}}
\renewcommand\thesubsubsection{\thesubsection .\arabic{subsubsection}}
\renewcommand\theparagraph    {\thesubsubsection.\arabic{paragraph}}
\renewcommand\thesubparagraph {\theparagraph.\arabic{subparagraph}}
\newcommand{\partname}{Part}
\newcommand{\chaptername}{Chapter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\appendix}{%
\renewcommand{\chaptername}{Appendix}%
\setcounter{chapter}{0}%
\renewcommand{\thechapter}{\Alph{chapter}}%
}
\newcounter{figure}[chapter]
\renewcommand{\thefigure}{\thechapter.\arabic{figure}}

\newcommand{\part}[1]{%
\@print{<!--CUT PART-->}
\@open{H1}{ALIGN=center}
\refstepcounter{part}
\partname:~\thepart\\
#1
\@close{H1}
}
\newcommand{\part*}[1]{%
\@print{<!--CUT CHAPTER-->}
\@open{H1}{ALIGN=center}
#1
\@close{H1}
}

\newcommand{\chapter}[1]{%
\@print{<!--CUT CHAPTER-->}
\@open{H1}{}
\refstepcounter{chapter}
\chaptername~\thechapter: #1
\@close{H1}
}
\newcommand{\chapter*}[1]{%
\@print{<!--CUT CHAPTER-->}
\@open{H1}{}
#1
\@close{H1}
}

\newcommand{\section}[1]{%
\@print{<!--CUT SECTION-->}
\@open{H2}{}
\refstepcounter{section}
\thesection~#1
\@close{H2}
}
\newcommand{\section*}[1]{%
\@print{<!--CUT SECTION-->}
\@open{H2}{}
#1
\@close{H2}
}


\newcommand{\subsection}[1]{%
\@open{H3}{}
\refstepcounter{subsection}
\thesubsection~#1
\@close{H3}
}
\newcommand{\subsection*}[1]{%
\@open{H3}{}
#1
\@close{H3}
}


\newcommand{\subsubsection}[1]{%
\@open{H4}{}
%  \refstepcounter{subsubsection}
%  \thesubsubsection~
#1
\@close{H4}
}
\newcommand{\subsubsection*}[1]{%
\@open{H4}{}
#1
\@close{H4}
}

\newcommand{\paragraph}[1]{%
\@open{H5}{}
%  \refstepcounter{paragraph}
%  \theparagraph~
#1
\@close{H5}
}
\newcommand{\paragraph*}[1]{%
\@open{H5}{}
#1
\@close{H5}
}

\renewenvironment{thebibliography}[1]{%
\@print{
<!--CUT BIBLIOGRAPHY-->
}
\@open{H1}{}
\bibname\@close{H1}\@open{DL}{}}{%

\@close{DL}
}
\renewcommand{\bibitem}[1]{\item[{\purple[\@bibref{#1}]\label{#1}}]}
% \renewcommand{\index}[2][default]{\@index[#1]{#2}}
\renewcommand{\printindex}[1][default]{%
\@print{
<!--CUT INDEX-->
}
\@printindex[#1]
}

\renewcommand{\addtocontents}[2]{}

\newcommand{\tophtml}{%
\@print{
<!--CUT TOP-->
}}

\newcommand{\atableofcontents}{}