]> AND Private Git Repository - book_gpu.git/blob - BookGPU/sunil.cls
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
ch8
[book_gpu.git] / BookGPU / sunil.cls
1 %% This is file `sunil.cls', modified version of `Book.cls'
2
3 %%% Created by Shashi Kumar / ITC [August 2008]
4
5
6 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
7 \ProvidesClass{sunil}
8               [2005/09/16 v1.4f
9  Standard LaTeX document class]
10 \newcommand\@ptsize{}
11 \newif\if@restonecol
12 \newif\if@titlepage
13 \@titlepagetrue
14 \newif\if@openright
15 \newif\if@mainmatter \@mainmattertrue
16 \if@compatibility\else
17 \DeclareOption{a4paper}
18    {\setlength\paperheight {297mm}%
19     \setlength\paperwidth  {210mm}}
20 \DeclareOption{a5paper}
21    {\setlength\paperheight {210mm}%
22     \setlength\paperwidth  {148mm}}
23 \DeclareOption{b5paper}
24    {\setlength\paperheight {250mm}%
25     \setlength\paperwidth  {176mm}}
26 \DeclareOption{letterpaper}
27    {\setlength\paperheight {11in}%
28     \setlength\paperwidth  {8.5in}}
29 \DeclareOption{legalpaper}
30    {\setlength\paperheight {14in}%
31     \setlength\paperwidth  {8.5in}}
32 \DeclareOption{executivepaper}
33    {\setlength\paperheight {10.5in}%
34     \setlength\paperwidth  {7.25in}}
35 \DeclareOption{landscape}
36    {\setlength\@tempdima   {\paperheight}%
37     \setlength\paperheight {\paperwidth}%
38     \setlength\paperwidth  {\@tempdima}}
39 \fi
40 \if@compatibility
41   \renewcommand\@ptsize{0}
42 \else
43 \DeclareOption{10pt}{\renewcommand\@ptsize{0}}
44 \fi
45 \DeclareOption{11pt}{\renewcommand\@ptsize{1}}
46 \DeclareOption{12pt}{\renewcommand\@ptsize{2}}
47 \if@compatibility\else
48 \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
49 \fi
50 \DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
51 \DeclareOption{draft}{\setlength\overfullrule{5pt}}
52 \if@compatibility\else
53 \DeclareOption{final}{\setlength\overfullrule{0pt}}
54 \fi
55 \DeclareOption{titlepage}{\@titlepagetrue}
56 \if@compatibility\else
57 \DeclareOption{notitlepage}{\@titlepagefalse}
58 \fi
59 \if@compatibility
60 \@openrighttrue
61 \else
62 \DeclareOption{openright}{\@openrighttrue}
63 \DeclareOption{openany}{\@openrightfalse}
64 \fi
65 \if@compatibility\else
66 \DeclareOption{onecolumn}{\@twocolumnfalse}
67 \fi
68 \DeclareOption{twocolumn}{\@twocolumntrue}
69 \DeclareOption{leqno}{\input{leqno.clo}}
70 \DeclareOption{fleqn}{\input{fleqn.clo}}
71 \DeclareOption{openbib}{%
72   \AtEndOfPackage{%
73    \renewcommand\@openbib@code{%
74       \advance\leftmargin\bibindent
75       \itemindent -\bibindent
76       \listparindent \itemindent
77       \parsep \z@
78       }%
79    \renewcommand\newblock{\par}}%
80 }
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82 \newif\if@numbysec
83 \DeclareOption{numbysec}{\@numbysectrue}
84 \newif\if@numberinsequence
85 \DeclareOption{numberinsequence}{\@numberinsequencetrue}
86 \newif\if@nocaptionbreak
87 \DeclareOption{NoCaptionBreak}{\@nocaptionbreaktrue}
88 \newif\if@sevenbyten
89 \DeclareOption{sevenbyten}{\@sevenbytentrue}
90 \newif\if@cip
91 \DeclareOption{cip}{\@ciptrue}
92 \newif\if@times
93 \DeclareOption{times}{\@timestrue}
94 \newif\if@chapnumonly
95 \DeclareOption{chapnumonly}{\@chapnumonlytrue}
96 \newif\if@ChapterResetsPage
97 \DeclareOption{ChapterResetsPage}{\@ChapterResetsPagetrue}
98 \newif\if@ChapterTOCs
99 \DeclareOption{ChapterTOCs}{\@ChapterTOCstrue}
100 \newif\if@EOCRefs
101 \DeclareOption{EOCRefs}{\@EOCRefstrue}%
102 \newif\if@SuperscriptCites
103 \DeclareOption{SuperscriptCites}{\@SuperscriptCitestrue}%
104 \newif\if@UnnumberedReferences
105 \DeclareOption{UnnumberedReferences}{\@UnnumberedReferencestrue}%
106 \newif\if@pdf
107 \DeclareOption{pdf}{\@pdftrue}
108 \DeclareOption{sunil1}{\@sunilatrue}
109 \newif\if@sunila
110 \DeclareOption{sunil2}{\@sunilbtrue}
111 \newif\if@sunilb
112 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
113
114
115 \ExecuteOptions{letterpaper,10pt,twoside,onecolumn,final,openright}
116 \ProcessOptions
117
118 %%%%%%%%%%%%%%%%%%%
119
120 \def\helv@scale{.82}
121 %
122 \DeclareFontFamily{T1}{helvetica}{}%
123 \DeclareFontShape{T1}{helvetica}{m}{n}{<->s*[\helv@scale]phvr8t}{}%
124 \DeclareFontShape{T1}{helvetica}{m}{it}{<->s*[\helv@scale]phvro8t}{}%
125 \DeclareFontShape{T1}{helvetica}{m}{sc}{<->s*[\helv@scale]phvrc8t}{}%
126 \DeclareFontShape{T1}{helvetica}{b}{n}{<->s*[\helv@scale]phvb8t}{}%
127 \DeclareFontShape{T1}{helvetica}{b}{it}{<->s*[\helv@scale]phvbo8t}{}%
128 \DeclareFontShape{T1}{helvetica}{m}{sl}{<->s*[\helv@scale]phvro8t}{}%
129 \DeclareFontShape{T1}{helvetica}{b}{sc}{<->s*[\helv@scale]phvbc8t}{}%
130 \DeclareFontShape{T1}{helvetica}{b}{sl}{<->s*[\helv@scale]phvbo8t}{}%
131 \DeclareFontShape{T1}{helvetica}{bx}{n}{<->s*[\helv@scale]phvb8t}{}%
132 \DeclareFontShape{T1}{helvetica}{bx}{it}{<->s*[\helv@scale]phvbo8t}{}%
133 \DeclareFontShape{T1}{helvetica}{bx}{sc}{<->s*[\helv@scale]phvbc8t}{}%
134 \DeclareFontShape{T1}{helvetica}{bx}{sl}{<->ssub * helvetica/b/it}{}%
135
136 \DeclareFontFamily{OT1}{helvetica}{}%
137 \DeclareFontShape{OT1}{helvetica}{m}{n}{<->s*[\helv@scale]phvr7t}{}%
138 \DeclareFontShape{OT1}{helvetica}{m}{it}{<->s*[\helv@scale]phvro7t}{}%
139 \DeclareFontShape{OT1}{helvetica}{m}{sc}{<->s*[\helv@scale]phvrc7t}{}%
140 \DeclareFontShape{OT1}{helvetica}{b}{n}{<->s*[\helv@scale]phvb7t}{}%
141 \DeclareFontShape{OT1}{helvetica}{b}{it}{<->s*[\helv@scale]phvbo7t}{}%
142 \DeclareFontShape{OT1}{helvetica}{m}{sl}{<->s*[\helv@scale]phvro7t}{}%
143 \DeclareFontShape{OT1}{helvetica}{b}{sc}{<->s*[\helv@scale]phvbc8t}{}%
144 \DeclareFontShape{OT1}{helvetica}{b}{sl}{<->s*[\helv@scale]phvbo7t}{}%
145 \DeclareFontShape{OT1}{helvetica}{bx}{n}{<->s*[\helv@scale]phvb7t}{}%
146 \DeclareFontShape{OT1}{helvetica}{bx}{it}{<->s*[\helv@scale]phvbo7t}{}%
147 \DeclareFontShape{OT1}{helvetica}{bx}{sc}{<->s*[\helv@scale]phvbc8t}{}%
148 \DeclareFontShape{OT1}{helvetica}{bx}{sl}{<->s*[\helv@scale]phvbo7t}{}%
149
150 %%%%%%%%%%%%%%%%%%%%%
151
152
153 \input{bk1\@ptsize.clo}
154 \setlength\lineskip{1\p@}
155 \setlength\normallineskip{1\p@}
156 \renewcommand\baselinestretch{}
157 \setlength\parskip{0\p@ \@plus \p@}
158 \@lowpenalty   51
159 \@medpenalty  151
160 \@highpenalty 301
161 \@beginparpenalty -\@lowpenalty
162 \@endparpenalty   -\@lowpenalty
163 \@itempenalty     -\@lowpenalty
164 %
165 \clubpenalty=0         % 'Club line'  at bottom of page.
166 \widowpenalty=10000    % 'Widow line' at top of page.
167 \setcounter{topnumber}{2}
168 \renewcommand\topfraction{.7}
169 \setcounter{bottomnumber}{1}
170 \renewcommand\bottomfraction{.3}
171 \setcounter{totalnumber}{3}
172 \renewcommand\textfraction{.2}
173 \renewcommand\floatpagefraction{.5}
174 \setcounter{dbltopnumber}{2}
175 \renewcommand\dbltopfraction{.7}
176 \renewcommand\dblfloatpagefraction{.5}
177
178 %  ****************************************
179 %  *            PAGE LAYOUT               *
180 %  ****************************************
181 %
182 % All margin dimensions measured from a point one inch from top and side
183 % of page.
184 %
185 % SIDE MARGINS:
186 %
187 \oddsidemargin  6pc %5pc
188 \evensidemargin 5.7pc %5pc
189 \marginparwidth 4pc
190 \marginparsep   1pc
191 \topmargin  12pt %0pt
192 \headheight 12pt
193 \headsep    12pt
194 \footskip   2pc
195 %
196 % DIMENSION OF TEXT:
197 \newdimen\trimheight
198 \newdimen\trimwidth
199 \newdimen\normaltextheight
200 \newdimen\tempa
201 \newdimen\tempdimen
202 %
203 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  Parameter Initializaton %%%%%%%%%%%%%%%%%%%%%%%%%%
204
205 \newdimen\htrim
206 \newdimen\vtrimtop
207 \newdimen\vtrimbot
208
209 \setlength\trimheight{9in}
210 \setlength\trimwidth{6in}
211 %
212 %
213 \if@sunila
214 \textheight = 45\baselineskip
215   %\advance\textheight by \topskip
216 \addtolength\textheight{3pt}
217   \textwidth 28pc
218 \addtolength\textwidth{.5pt}
219   \topmargin0in
220   \oddsidemargin1.1875in
221   \evensidemargin1.1875in
222   \htrim.7365in
223   \vtrimtop1.068in
224   \vtrimbot1.068in
225   \hoffset-15pt
226   \voffset39pt
227 \let\normaltextheight\textheight
228 \else\if@sunilb
229   \textheight = 51pc
230 %  \advance\textheight by \topskip
231   \textwidth 33pc
232   \topmargin0in
233   \oddsidemargin.5in
234   \evensidemargin.5in
235   \htrim.75in
236   \vtrimtop.8607in
237   \vtrimbot1.027in
238   \hoffset-.1in
239   \voffset-.15in%.04in
240 \let\normaltextheight\textheight
241 \else
242 \textheight = 43\baselineskip
243   %\advance\textheight by \topskip
244 \addtolength\textheight{3pt}
245   \textwidth 26pc
246 \addtolength\textwidth{.5pt}
247  \topmargin0in
248   \oddsidemargin1.1875in
249   \evensidemargin1.1875in
250   \htrim5.05pc
251   \vtrimtop7.7pc
252   \vtrimbot5.44pc
253 %  \hoffset-5pt
254   \voffset45pt
255 \let\normaltextheight\textheight
256   \fi
257 \fi
258 %
259 \columnsep 1pc
260 \columnseprule 0pt
261 %
262 % FOOTNOTES
263 %
264 \footnotesep 6.65pt
265 \skip\footins 12pt plus 3pt minus 1.5pt
266 %
267
268 %%%%  Trim marks %%%%%%%%%%%
269 \newsavebox\ul@box
270 \newsavebox\ur@box
271 \newsavebox\ll@box
272 \newsavebox\lr@box
273 \def\top@cornermarks{%
274   \hskip-\htrim
275   \vbox to 0\p@{\vskip-\vtrimtop\llap{\copy\ul@box}\vss}%
276   \vbox to 0\p@{\vskip-\vtrimtop\rlap{\hskip\textwidth\hskip2\htrim\copy\ur@box}\vss}%
277   \vbox to 0\p@{\vskip\textheight\vskip\vtrimbot\llap{\copy\ll@box}\vss}%
278   \vbox to 0\p@{\vskip\textheight\vskip\vtrimbot\rlap{\hskip\textwidth\hskip2\htrim\copy\lr@box}\vss}%
279   \hskip\htrim}
280 \def\make@cornermarks{%
281   \sbox\ul@box{\rule{18\p@}{.25\p@}\hskip8\p@\hbox to.25\p@{\vbox to26\p@{\noindent\rule{.25\p@}{18\p@}}}}%
282   \sbox\ur@box{\hbox to.25\p@{\vbox to26\p@{\noindent\rule{.25\p@}{18\p@}}}\hskip8\p@\rule{18\p@}{.25\p@}}%
283   \sbox\ll@box{\rule{18\p@}{.25\p@}\hskip8\p@\lower34\p@\hbox to.25\p@{\vbox to26\p@{\noindent\rule{.25\p@}{18\p@}}}}%
284   \sbox\lr@box{\lower34\p@\hbox to.25\p@{\vbox to26\p@{\noindent\rule{.25\p@}{18\p@}}}\hskip8\p@\rule{18\p@}{.25\p@}}}
285
286 %%%%%%%%%%%%%%%%%%%%  End Trim Marks %%%%%%%%%%%%
287
288
289 \def\ps@plain{\let\@mkboth\@gobbletwo
290      \let\@oddhead\top@cornermarks%\@empty
291      \def\@oddfoot{\reset@font\hfil\thepage
292      \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
293
294
295
296 \def\even@head{%
297 \top@cornermarks
298   {\@the@page\RunningHeadFont
299     \hfil
300 \leftmark
301     }\hfil}
302 \def\odd@head{%
303 \top@cornermarks
304   \hfil{\RunningHeadFont
305 \rightmark
306     }
307 \hfil
308     \@the@page
309   }
310 \def\@the@page{{\PageNumFont\thepage}}
311
312
313 \if@twoside
314 \def\ps@headings{%
315   \let\@mkboth\@gobbletwo
316   \if@pdf
317     \let\@evenhead\@empty
318     \let\@oddhead\@empty
319     \def\@oddfoot{\@cip\hfil}%
320     \def\@evenfoot{\@cip\hfil}%
321   \else
322 \let\@oddfoot\@empty
323 \let\@evenfoot\@empty
324     \let\@evenhead\even@head
325     \let\@oddhead\odd@head
326   \fi
327   }
328 \else
329   \def\ps@headings{\let\@mkboth\@gobbletwo%
330 \if@pdf
331     \let\@evenhead\@empty
332     \let\@oddhead\@empty
333     \def\@oddfoot{\@cip\hfil}%
334     \def\@evenfoot{\@cip\hfil}%
335   \else
336 \let\@oddfoot\@empty
337 \let\@evenfoot\@empty
338     \let\@evenhead\even@head
339     \let\@oddhead\odd@head
340   \fi
341 }
342 \fi
343 \def\ps@myheadings{%
344     \let\@oddfoot\@empty\let\@evenfoot\@empty
345     \def\@evenhead{\thepage\hfil\slshape\leftmark}%
346     \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
347     \let\@mkboth\@gobbletwo
348     \let\chaptermark\@gobble
349     \let\sectionmark\@gobble
350     }
351 \def\ps@empty{%
352   \let\@mkboth\@gobbletwo
353   \if@pdf
354     \let\@evenhead\@empty
355     \let\@oddhead\@empty
356     \def\@oddfoot{\@cip\hfil}%
357     \def\@evenfoot{\@cip\hfil}%
358   \else
359     \make@cornermarks
360     \let\@oddhead\top@cornermarks
361     \let\@evenhead\top@cornermarks
362     \let\@oddfoot\@empty
363     \let\@evenfoot\@empty
364   \fi
365   }
366 \def\ps@folio{%
367   \let\@mkboth\@gobbletwo
368   \if@pdf
369     \let\@evenhead\@empty
370     \let\@oddhead\@empty
371     \def\@oddfoot{\@cip\hfil}%
372     \def\@evenfoot{\@cip\hfil}%
373   \else
374 \let\@oddhead\top@cornermarks
375     \def\@oddfoot{%
376       \parindent\z@
377       \baselineskip7\p@
378       \hbox{%
379         \textwidth\@ciprulewidth
380         \vbox{%
381           \if@cip\rule{\@ciprulewidth}{.25pt}\par
382             \hbox{\vbox{\noindent\copy\@cipboxa\par\noindent\copy\@cipboxb}}\fi}}
383       \hfill\@the@page}
384     \let\@evenhead\top@cornermarks%\odd@head
385     \let\@evenfoot\@oddfoot
386   \fi
387   }
388 \newcommand\HeadingsBookChapter{%
389   \def\chaptermark##1{%
390     \markboth{\@title}{%
391       ##1}}%
392   \def\sectionmark##1{}}
393 \def\HeadingsChapterSection{%
394   \def\chaptermark##1{%
395     \markboth{%
396       ##1}{}}%
397   \def\sectionmark##1{%
398     \markright{%
399       ##1}}}
400 \def\pdfon{\@pdftrue}
401 \def\pdfoff{\@pdffalse}
402 \if@pdf
403   \def\@cip{{\fontsize{6\p@}{8\p@}\selectfont\copyright 2001 by CRC Press LLC}}
404 \else
405   \newsavebox\@cipboxa
406   \newsavebox\@cipboxb
407   \newdimen\@ciprulewidth
408   \def\@cip#1#2{%
409     \sbox\@cipboxa{\fontsize{6\p@}{8\p@}\selectfont #1}%
410     \sbox\@cipboxb{\fontsize{6\p@}{8\p@}\selectfont #2}%
411     \@ciprulewidth\wd\@cipboxa
412     \ifnum\@ciprulewidth<\wd\@cipboxb\@ciprulewidth\wd\@cipboxb\fi}%
413 \fi
414 \if@pdf
415 \else
416   \AtBeginDocument{%
417     \@cip{\rule{0pt}{9pt}0-8493-0052-5/00/\$0.00+\$.50}%
418       {\copyright\ \ 2001 by CRC Press LLC}}%
419 \fi
420   \if@titlepage
421   \newcommand\maketitle{\begin{titlepage}%
422   \let\footnotesize\small
423   \let\footnoterule\relax
424   \let \footnote \thanks
425 {\parindent \z@ \raggedright \baselineskip \z@ \lineskip \z@ \parskip \z@
426     \vbox{
427     \vskip -7bp
428     {\baselineskip 10bp\lineskip 10bp\NameFont\uppercase{\@author}\par}
429     \vskip 6bp
430     \AffiliationFont \@affiliation
431     \vskip -2bp
432     \crcrule
433     \vskip 22bp
434     {\baselineskip 24bp\lineskip 24bp\TitlePageTitleFont\@title\par}}}
435   \@thanks
436   \vfil\null
437   \end{titlepage}%
438   \setcounter{footnote}{0}%
439   \global\let\thanks\relax
440   \global\let\maketitle\relax
441   \global\let\@thanks\@empty
442   \global\let\@author\@empty
443   \global\let\@date\@empty
444 %  \global\let\@title\@empty
445   \global\let\title\relax
446   \global\let\author\relax
447   \global\let\date\relax
448   \global\let\and\relax
449 }
450 \else
451 \newcommand\maketitle{\par
452   \begingroup
453     \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
454     \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
455     \long\def\@makefntext##1{\parindent 1em\noindent
456             \hb@xt@1.8em{%
457                 \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
458     \if@twocolumn
459       \ifnum \col@number=\@ne
460         \@maketitle
461       \else
462         \twocolumn[\@maketitle]%
463       \fi
464     \else
465       \newpage
466       \global\@topnum\z@   % Prevents figures from going at top of page.
467       \@maketitle
468     \fi
469     \thispagestyle{empty}\@thanks
470   \endgroup
471   \setcounter{footnote}{0}%
472   \global\let\thanks\relax
473   \global\let\maketitle\relax
474   \global\let\@maketitle\relax
475   \global\let\@thanks\@empty
476   \global\let\@author\@empty
477   \global\let\@date\@empty
478   \global\let\@title\@empty
479   \global\let\title\relax
480   \global\let\author\relax
481   \global\let\date\relax
482   \global\let\and\relax
483 }
484 \def\@maketitle{%
485   \newpage
486   \null
487   \vskip 2em%
488 {\parindent \z@ \raggedright \baselineskip \z@ \lineskip \z@ \parskip \z@
489     \vbox{
490     \vskip -7bp
491     {\baselineskip 10bp\lineskip 10bp\NameFont\uppercase{\@author}\par}
492     \vskip 6bp
493     \AffiliationFont \@affiliation
494     \vskip 10bp
495     \crcrule
496     \vskip 26bp
497     {\baselineskip 24bp\lineskip 24bp\TitlePageTitleFont\@title\par}}}
498   \par
499   \vskip 1.5em}
500 \fi
501
502 %%%%%%%%%%%%%% Font Defined %%%%%%%%%%%%%%%%%
503
504  \def\@xipt{11}
505   \def\@xviiipt{18}
506  \def\@xxivpt{24}
507
508 \newcommand\SectionHeadFont{\fontsize{12}{14}\bfseries\selectfont}
509 \newcommand\SubsectionHeadFont{\fontsize{11}{13}\bfseries\selectfont}
510 \newcommand\SubsubsectionHeadFont{\fontsize{10}{12}\bfseries\selectfont}
511 \newcommand\PageNumFont{\fontsize{10}{12}\selectfont}
512 \newcommand\ChapNumFont{\fontsize{24}{24}\slshape\bfseries\selectfont}
513 \newcommand\ChapTitleFont{\fontsize{18}{20}\slshape\bfseries\selectfont}
514 \newcommand\FMHeadFont{\fontsize{18}{20}\slshape\bfseries\selectfont}
515 \newcommand\RunningHeadFont{\fontsize{10}{12}\itshape\selectfont}
516 \newcommand\NameFont{\fontsize{10}{12}\itshape\selectfont}
517 \newcommand\AffiliationFont{\fontsize{8}{10}\selectfont}
518 \newcommand\TitlePageTitleFont{\fontsize{24}{28}\slshape\bfseries\selectfont}
519 \newcommand\FigCapFont{\fontsize{10}{12}\bfseries\selectfont}
520 \newcommand\TableColHeadFont{\fontsize{10}{12}\bfseries\selectfont}
521 \newcommand\TableTitleFont{\fontsize{10}{12}\selectfont}
522 \newcommand\TableNumberFont{\fontsize{11}{13}\bfseries\selectfont}
523 \newcommand\TableBodyFont{\fontsize{9}{11}\bfseries\selectfont}
524 \newcommand\CAPlusOneFont{\fontsize{10}{12}\bfseries\selectfont}
525 \newcommand\CAAPlusOneFont{\fontsize{10}{12}\itshape\selectfont}
526 \newcommand\tocfont{\fontsize{10}{12}\selectfont}
527 \newcommand\extraFont{\fontsize{24}{28}\selectfont}
528 \newcommand\VfFont{\fontsize{10.5}{12.5}\selectfont}
529
530
531 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
532
533
534 \newcommand*\chaptermark[1]{}
535 \setcounter{secnumdepth}{3}
536 \newcounter {part}
537 \newcounter {chapter}
538 \newcounter {section}[chapter]
539 \newcounter {subsection}[section]
540 \newcounter {subsubsection}[subsection]
541 \newcounter {paragraph}[subsubsection]
542 \newcounter {subparagraph}[paragraph]
543 \renewcommand \thepart {\@Roman\c@part}
544 \renewcommand \thechapter {\@arabic\c@chapter}
545 \renewcommand \thesection {\thechapter.\@arabic\c@section}
546 \renewcommand\thesubsection   {\thesection.\@arabic\c@subsection}
547 \renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection}
548 \renewcommand\theparagraph    {\thesubsubsection.\@arabic\c@paragraph}
549 \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
550 \newcommand\@chapapp{\chaptername}
551 \newcommand\frontmatter{%
552     \cleardoublepage
553   \@mainmatterfalse
554   \pagenumbering{roman}}
555 \newcommand\mainmatter{%
556     \cleardoublepage
557   \@mainmattertrue
558   \pagenumbering{arabic}}
559 \newcommand\backmatter{%
560   \if@openright
561     \cleardoublepage
562   \else
563     \clearpage
564   \fi
565   \@mainmatterfalse}
566 \newcommand\part{\make@cornermarks%
567   \if@openright
568     \cleardoublepage
569   \else
570     \clearpage
571   \fi
572   \thispagestyle{plain}%
573   \if@twocolumn
574     \onecolumn
575     \@tempswatrue
576   \else
577     \@tempswafalse
578   \fi
579   \null\vfil
580   \secdef\@part\@spart}
581
582 \def\@part[#1]#2{%
583     \ifnum \c@secnumdepth >-2\relax
584       \refstepcounter{part}%
585       \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
586     \else
587       \addcontentsline{toc}{part}{#1}%
588     \fi
589     \markboth{}{}%
590     {\centering
591      \interlinepenalty \@M
592      \normalfont
593      \ifnum \c@secnumdepth >-2\relax
594        \huge\bfseries \partname\nobreakspace\thepart
595        \par
596        \vskip 20\p@
597      \fi
598      \Huge \bfseries #2\par}%
599     \@endpart}
600 \def\@spart#1{%
601     {\centering
602      \interlinepenalty \@M
603      \normalfont
604      \Huge \bfseries #1\par}%
605     \@endpart}
606 \def\@endpart{\vfil\newpage
607               \if@twoside
608                \if@openright
609                 \null
610                 \thispagestyle{empty}%
611                 \newpage
612                \fi
613               \fi
614               \if@tempswa
615                 \twocolumn
616               \fi}
617
618 \if@ChapterTOCs
619   \newwrite\@chaptoc
620   \def\secnumwidth{21pt}\def\subsecnumwidth{30pt}\def\ssubsecnumwidth{36pt}\fi
621 \long\def\@trplarg#1{\@ifnextchar[{\@xtrplarg{#1}}{\@ztrplarg{#1}}}
622 \long\def\@xtrplarg#1[#2]{\@ifnextchar[{#1[#2]}{\@ytrplarg{#1}[{#2}]}}
623 \long\def\@ytrplarg#1[#2]#3{#1[{#2}][{#2}]{#3}}
624 \long\def\@ztrplarg#1#2{#1[{#2}][{#2}]{#2}}
625
626
627 \newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
628   \make@cornermarks
629   \cleardoublepage
630   \if@ChapterTOCs\if@filesw\immediate\closeout\@chaptoc\fi\fi
631   \pagestyle{headings}%
632   \thispagestyle{folio}%
633 \if@ChapterResetsPage\global\c@page\@ne\fi
634                     \global\@topnum\z@
635                       \gdef\chapterauthor{\@ca}%
636   \gdef\endchapterauthors{\end@cas}%
637                     \@afterindentfalse
638 %                    \secdef\@chapter\@schapter
639                      \@ifstar{\@schapter}{\@trplarg{\@chapter}}}
640
641
642 \def\@chapter[#1][#2]#3{%
643   \ifnum\c@secnumdepth>\m@ne
644     \if@mainmatter
645       \refstepcounter{chapter}%
646       \typeout{\@chapapp\space\thechapter.}%
647       \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
648     \else
649       \addcontentsline{toc}{chapter}{#1}\fi
650   \else
651     \addcontentsline{toc}{chapter}{#1}\fi
652   \chaptermark{%
653     #2}%
654   \addtocontents{lof}{\protect\addvspace{10\p@}}%
655   \addtocontents{lot}{\protect\addvspace{10\p@}}%
656   \if@twocolumn
657     \@topnewpage[\@makechapterhead{#3}]%
658   \else
659     \@makechapterhead{#3}%
660     \@afterheading\fi
661   \if@ChapterTOCs\if@filesw\immediate\openout\@chaptoc\thechapter.toc\fi\fi
662 }
663 \def\@makechapterhead#1{%
664   {\parindent \z@ \raggedright \baselineskip \z@ \lineskip \z@ \parskip \z@
665     \vbox{
666     \vskip -2\p@
667     \ChapNumFont
668 \if@chapnumonly\else
669     \@chapapp\
670 \fi
671     \thechapter
672     \vskip -11\p@
673     \chap@rule
674     \vskip 5\p@
675     {\baselineskip 20\p@\lineskip 20\p@\ChapTitleFont #1\par}%
676     \vskip32\p@}
677             \if@ChapterTOCs
678       \make@chaptoc
679     \else
680 \fi
681     \vskip 19.3\p@}
682     \def\theequation{\thechapter.\arabic{equation}}}%
683
684
685 \def\@schapter#1{\if@twocolumn
686                    \@topnewpage[\@makeschapterhead{#1}]%
687                  \else
688                    \@makeschapterhead{#1}%
689                    \@afterheading
690                  \fi}
691                  
692 \def\@makeschapterhead#1{%
693   {\parindent \z@ \raggedright \baselineskip 6\p@ \lineskip \z@ \parskip \z@
694     \vbox{
695     \vskip 22\p@
696     \chap@rule
697     \vskip -1\p@
698     \FMHeadFont #1
699     \vskip 59\p@}}%
700   \def\theequation{\thechapter.\arabic{equation}}}
701
702 \def\@startsection#1#2#3#4#5#6{%
703   \if@noskipsec\leavevmode\fi
704   \par
705   \@tempskipa #4\relax
706   \@afterindenttrue
707   \ifdim \@tempskipa <\z@
708     \@tempskipa -\@tempskipa \@afterindentfalse
709   \fi
710   \if@nobreak
711     \everypar{}%
712   \else
713     \addpenalty\@secpenalty\addvspace\@tempskipa
714   \fi
715   \@ifstar
716     {\@ssect{#1}{#3}{#4}{#5}{#6}}%
717     {\@trplarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
718 \def\@ssect#1#2#3#4#5#6{%
719   \@tempskipa #4\relax
720   \ifdim \@tempskipa>\z@
721     \begingroup
722       #5{%
723         \@hangfrom{\hskip #2}%
724           \interlinepenalty \@M #6\@@par}%
725     \endgroup
726     \csname #1mark\endcsname{#6}%
727   \else
728     \def\@svsechd{#5{\hskip #2\relax #6}\csname #1mark\endcsname{#6}}%
729   \fi
730   \@xsect{#4}}
731 \def\@sect#1#2#3#4#5#6[#7][#8]#9{%
732   \ifnum #2>\c@secnumdepth
733     \let\@svsec\@empty
734   \else
735     \refstepcounter{#1}%
736 \protected@edef\@svsec{\@seccntformat{#1}\relax}%
737   \fi
738   \@tempskipa #5\relax
739   \ifdim \@tempskipa>\z@
740     \begingroup
741       #6{%
742 \@hangfrom{\hskip #3\relax\@svsec}\interlinepenalty \@M %
743           #9\@@par}%
744     \endgroup
745     \csname #1mark\endcsname{%
746       #8}%
747     \addcontentsline{toc}{#1}{%
748       \ifnum #2>\c@secnumdepth \else
749         \protect\numberline{\csname the#1\endcsname}%
750       \fi
751       #7}%
752   \else
753     \def\@svsechd{%
754       #6{\hskip #3\relax
755       \@svsec #9}%
756       \csname #1mark\endcsname{%
757         #8}%
758       \addcontentsline{toc}{#1}{%
759         \ifnum #2>\c@secnumdepth \else
760           \protect\numberline{\csname the#1\endcsname}%
761         \fi
762         #7}}%
763   \fi
764   \@xsect{#5}}
765
766 \newcommand\section{%
767   \gdef\chapterauthor{\@caplusone}%
768   \gdef\endchapterauthors{\end@casplusone}%
769   \@ifstar{\@ssection}{\@trplarg{\@section}}}
770 \def\@ssection#1{%
771   \if@ChapterTOCs
772     \myaddcontentsline{\@chaptoc}{chapsection}{\string\makebox[\secnumwidth][l]{}#1}\fi
773   \@startsection{section}{1}{\z@}{30\p@}{6\p@}{\sec@rule\nopagebreak\vskip13.5\p@\nopagebreak\SectionHeadFont}*{#1}}
774 \def\@section[#1][#2]#3{%
775   \if@ChapterTOCs
776     \addtocounter{section}{1}%
777     \myaddcontentsline{\@chaptoc}{chapsection}{\string\makebox[\secnumwidth][l]{\thesection}#1}%
778     \addtocounter{section}{-1}\fi
779   \@startsection{section}{1}{\z@}{30\p@}{6\p@}{\sec@rule\nopagebreak\vskip13.5\p@\nopagebreak\SectionHeadFont}[#2]{#3}}
780 \def\sectionauthor#1{\hfill{\ChapTOCAuthorFont #1}}
781
782 \newcommand\subsection{\@ifstar{\@ssubsection}{\@trplarg{\@subsection}}}
783 \def\@ssubsection#1{%
784   \if@ChapterTOCs
785     \myaddcontentsline{\@chaptoc}{chapsubsection}{\string\makebox[\subsecnumwidth][l]{}#1}\fi
786   \@startsection{subsection}{2}{\z@}{18\p@}{6\p@}{%
787     \SubsectionHeadFont}*{#1}}
788 \def\@subsection[#1][#2]#3{%
789   \if@ChapterTOCs
790     \addtocounter{subsection}{1}%
791     \myaddcontentsline{\@chaptoc}{chapsubsection}{\string\makebox[\subsecnumwidth][l]{\thesubsection}#1}%
792     \addtocounter{subsection}{-1}\fi
793   \@startsection{subsection}{2}{\z@}{18\p@}{6\p@}{%
794     \SubsectionHeadFont}[#2]{#3}}
795
796 \newcommand\subsubsection{\@ifstar{\@ssubsubsection}{\@trplarg{\@subsubsection}}}
797 \def\@ssubsubsection#1{%
798   \if@ChapterTOCs
799     \myaddcontentsline{\@chaptoc}{chapsubsubsection}{\string\makebox[\subsecnumwidth][l]{}#1}\fi
800   \@startsection{subsubsection}{3}{\z@}{12\p@}{6\p@}{%
801     \SubsubsectionHeadFont}*{#1}}
802 \def\@subsubsection[#1][#2]#3{%
803   \if@ChapterTOCs
804     \addtocounter{subsubsection}{1}%
805     \myaddcontentsline{\@chaptoc}{chapsubsubsection}{\hskip21pt\string\makebox[\ssubsecnumwidth][l]{\thesubsubsection}#1}%
806     \addtocounter{subsubsection}{-1}\fi
807   \@startsection{subsubsection}{3}{\z@}{12\p@}{6\p@}{%
808     \SubsubsectionHeadFont}[#2]{#3}}
809
810
811 \if@twocolumn
812   \setlength\leftmargini  {2em}
813 \else
814   \setlength\leftmargini  {2.5em}
815 \fi
816 \leftmargin  \leftmargini
817 \setlength\leftmarginii  {2.2em}
818 \setlength\leftmarginiii {1.87em}
819 \setlength\leftmarginiv  {1.7em}
820 \if@twocolumn
821   \setlength\leftmarginv  {.5em}
822   \setlength\leftmarginvi {.5em}
823 \else
824   \setlength\leftmarginv  {1em}
825   \setlength\leftmarginvi {1em}
826 \fi
827 \setlength  \labelsep  {.5em}
828 \setlength  \labelwidth{\leftmargini}
829 \addtolength\labelwidth{-\labelsep}
830 \@beginparpenalty -\@lowpenalty
831 \@endparpenalty   -\@lowpenalty
832 \@itempenalty     -\@lowpenalty
833 \renewcommand\theenumi{\@arabic\c@enumi}
834 \renewcommand\theenumii{\@alph\c@enumii}
835 \renewcommand\theenumiii{\@roman\c@enumiii}
836 \renewcommand\theenumiv{\@Alph\c@enumiv}
837 \newcommand\labelenumi{\theenumi.}
838 \newcommand\labelenumii{(\theenumii)}
839 \newcommand\labelenumiii{\theenumiii.}
840 \newcommand\labelenumiv{\theenumiv.}
841 \renewcommand\p@enumii{\theenumi}
842 \renewcommand\p@enumiii{\theenumi(\theenumii)}
843 \renewcommand\p@enumiv{\p@enumiii\theenumiii}
844 \newcommand\labelitemi{\textbullet}
845 \newcommand\labelitemii{\normalfont\bfseries \textendash}
846 \newcommand\labelitemiii{\textasteriskcentered}
847 \newcommand\labelitemiv{\textperiodcentered}
848 \newenvironment{description}
849                {\list{}{\labelwidth\z@ \itemindent-\leftmargin
850                         \let\makelabel\descriptionlabel}}
851                {\endlist}
852 \newcommand*\descriptionlabel[1]{\hspace\labelsep
853                                 \normalfont\bfseries #1}
854 \newenvironment{verse}
855                {\let\\\@centercr
856                 \list{}{\itemsep      \z@
857                         \itemindent   -1.5em%
858                         \listparindent\itemindent
859                         \rightmargin  \leftmargin
860                         \advance\leftmargin 1.5em}%
861                 \item\relax}
862                {\endlist}
863 \newenvironment{quotation}
864                {\list{}{\listparindent 1.5em%
865                         \itemindent    \listparindent
866                         \rightmargin   \leftmargin
867                         \parsep        \z@ \@plus\p@}%
868                 \item\relax}
869                {\endlist}
870 \newenvironment{quote}
871                {\list{}{\rightmargin\leftmargin}%
872                 \item\relax}
873                {\endlist}
874 \if@compatibility
875 \newenvironment{titlepage}
876     {%
877       \cleardoublepage
878       \if@twocolumn
879         \@restonecoltrue\onecolumn
880       \else
881         \@restonecolfalse\newpage
882       \fi
883       \thispagestyle{empty}%
884       \setcounter{page}\z@
885     }%
886     {\if@restonecol\twocolumn \else \newpage \fi
887     }
888 \else
889 \newenvironment{titlepage}
890     {%
891       \cleardoublepage
892       \if@twocolumn
893         \@restonecoltrue\onecolumn
894       \else
895         \@restonecolfalse\newpage
896       \fi
897       \thispagestyle{empty}%
898       \setcounter{page}\@ne
899     }%
900     {\if@restonecol\twocolumn \else \newpage \fi
901      \if@twoside\else
902         \setcounter{page}\@ne
903      \fi
904     }
905 \fi
906 \newcommand\appendix{\par
907   \setcounter{chapter}{0}%
908   \setcounter{section}{0}%
909   \gdef\@chapapp{\appendixname}%
910   \gdef\thechapter{\@Alph\c@chapter}}
911 \setlength\arraycolsep{5\p@}
912 \setlength\tabcolsep{6\p@}
913 \setlength\arrayrulewidth{.4\p@}
914 \setlength\doublerulesep{2\p@}
915 \setlength\tabbingsep{\labelsep}
916 \skip\@mpfootins = \skip\footins
917 \setlength\fboxsep{3\p@}
918 \setlength\fboxrule{.4\p@}
919 \@addtoreset {equation}{chapter}
920 \renewcommand\theequation
921   {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}
922 \newcounter{figure}[chapter]
923 \renewcommand \thefigure
924      {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure}
925 \def\fps@figure{tbp}
926 \def\ftype@figure{1}
927 \def\ext@figure{lof}
928 \def\fnum@figure{\figurename\nobreakspace\thefigure}
929 \newenvironment{figure}
930                {\@float{figure}}
931                {\end@float}
932 \newenvironment{figure*}
933                {\@dblfloat{figure}}
934                {\end@dblfloat}
935 \newcounter{table}[chapter]
936 \renewcommand \thetable
937      {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table}
938 \def\fps@table{tbp}
939 \def\ftype@table{2}
940 \def\ext@table{lot}
941 \def\fnum@table{\tablename\nobreakspace\thetable}
942 \newenvironment{table}
943                {\@float{table}}
944                {\end@float}
945 \newenvironment{table*}
946                {\@dblfloat{table}}
947                {\end@dblfloat}
948 \newlength\abovecaptionskip
949 \newlength\belowcaptionskip
950 \setlength\abovecaptionskip{10\p@}
951 \setlength\belowcaptionskip{0\p@}
952 \long\def\@makecaption#1#2{%
953   \vskip\abovecaptionskip
954   \sbox\@tempboxa{#1: #2}%
955   \ifdim \wd\@tempboxa >\hsize
956     {\FigCapFont #1}: #2\par
957   \else
958     \global \@minipagefalse
959     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
960   \fi
961   \vskip\belowcaptionskip}
962 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
963 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
964 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
965 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
966 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
967 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
968 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
969 \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
970 \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
971 \newcommand\@pnumwidth{1.55em}
972 \newcommand\@tocrmarg{2.55em}
973 \newcommand\@dotsep{4.5}
974 \setcounter{tocdepth}{3}
975
976
977 \newcounter{numauthors}
978 \newif\if@break
979 \newif\if@firstauthor
980 \newcommand\tableofcontents{%
981     \if@twocolumn
982       \@restonecoltrue\onecolumn
983     \else
984       \@restonecolfalse
985     \fi
986     \chapter*{\contentsname
987         \@mkboth{%
988            \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
989              {\let\break\space
990     \let\author\toc@author
991     \reset@authors
992     \let\toc@draw\relax
993     \@starttoc{toc}
994     \toc@draw
995     }
996     \if@restonecol\twocolumn\fi
997     }
998
999 \def\draw@part#1#2{%
1000   \addpenalty{-\@highpenalty}%
1001   \vskip1em plus\p@
1002   \@tempdima1.5em
1003   \begingroup
1004     \parindent\z@\rightskip\@pnumwidth
1005     \parfillskip-\rightskip
1006     \bfseries
1007     \leavevmode
1008     \advance\leftskip\@tempdima
1009     \hskip-\leftskip
1010     {#1\hfil}\nobreak
1011       \if@pdf
1012       \else
1013         \hfil\nobreak\hb@xt@\@pnumwidth{\hss #2}%
1014 \fi
1015     \par
1016     \penalty\@highpenalty\endgroup}
1017
1018 \let\toc@draw\relax
1019 %
1020 \def\l@part#1#2{% 
1021 \toc@draw
1022  \gdef\toc@draw{\draw@part{\large #1}{\large #2}}}
1023
1024
1025   \def\l@chapter#1#2{%
1026   \toc@draw
1027   \gdef\toc@draw{\draw@chapter{#1}{#2}}}
1028 \def\@pnumwidth{1.8em}
1029 \def\draw@chapter#1#2{%
1030   \addpenalty{-\@highpenalty}%
1031   \vskip1em plus\p@
1032   \@tempdima1.5em
1033   \begingroup
1034     \parindent\z@\rightskip\@pnumwidth
1035     \parfillskip-\rightskip
1036     \bfseries
1037     \leavevmode
1038     \advance\leftskip\@tempdima
1039     \hskip-\leftskip
1040     {#1\hfil}\nobreak
1041       \if@pdf
1042       \else
1043         \hfil\nobreak\hb@xt@\@pnumwidth{\hss #2}%
1044 \fi
1045     \par
1046     {\it\draw@authors}%
1047     \penalty\@highpenalty\endgroup}
1048 \def\toc@author#1#2{%
1049   \if@firstauthor
1050     \@firstauthorfalse
1051   \else
1052     \ifx\@authors\@empty
1053       \xdef\@authors{\last@author}%
1054     \else
1055       \@cons{\@authors}{, \last@author}\fi\fi
1056   \stepcounter{numauthors}%
1057 %%%%%%% commented and deleted below the second part to aviod inaccessible error % shashi % September-2008
1058 %%  \gdef\last@author{#1 {\rm\fontsize{9\p@}{11\p@}\selectfont #2}}
1059 \gdef\last@author{#1}
1060 }
1061 \def\draw@authors{%
1062   \let\@t\@authors
1063   \ifx\@t\@empty
1064     \let\@t\last@author\fi
1065   \ifx\@t\@empty\else
1066     \hskip\leftskip
1067     \ifx\@authors\@empty
1068     \else
1069       \@authors
1070       \ifnum\c@numauthors>2,\fi
1071       \if@break\break\fi
1072       \ and \fi
1073     \last@author\break\fi
1074   \reset@authors}
1075 \def\reset@authors{%
1076   \gdef\@authors{}%
1077   \gdef\last@author{}%
1078   \@firstauthortrue
1079   \setcounter{numauthors}{0}}
1080 \newlength\section@toc@skip
1081 \section@toc@skip1.5em
1082 \newlength\SectionTOCWidth
1083 \SectionTOCWidth2.3em
1084 \def\l@section#1#2{%
1085   \toc@draw
1086   \gdef\toc@draw{\draw@section{#1}{#2}}}
1087 \def\draw@section#1#2{%
1088   \@dottedtocline{1}{\section@toc@skip}{\SectionTOCWidth}{#1 }{{
1089 \tocfont #2}}}
1090 \newlength\subsection@toc@skip
1091 \subsection@toc@skip\section@toc@skip
1092 \advance\subsection@toc@skip\SectionTOCWidth
1093 \newlength\SubSectionTOCWidth
1094 \SubSectionTOCWidth3.2em
1095 \def\l@subsection#1#2{%
1096   \toc@draw
1097   \gdef\toc@draw{\draw@subsection{#1}{#2}}}
1098 \def\draw@subsection#1#2{%
1099   \@dottedtocline{2}{\subsection@toc@skip}{\SubSectionTOCWidth}{#1}{{
1100 \tocfont #2}}}
1101 \newlength\subsubsection@toc@skip
1102 \subsubsection@toc@skip\subsection@toc@skip
1103 \advance\subsubsection@toc@skip\SubSectionTOCWidth
1104 \newlength\SubSubSectionTOCWidth
1105 \SubSubSectionTOCWidth4.1em
1106 \def\l@subsubsection#1#2{%
1107   \toc@draw
1108   \gdef\toc@draw{\draw@subsubsection{#1}{#2}}}
1109 \def\draw@subsubsection#1#2{%
1110   \@dottedtocline{3}{\subsubsection@toc@skip}{\SubSubSectionTOCWidth}{#1}{{
1111 \tocfont #2}}}
1112 \newlength\paragraph@toc@skip
1113 \paragraph@toc@skip\subsubsection@toc@skip
1114 \advance\paragraph@toc@skip\SubSubSectionTOCWidth
1115 \newlength\ParagraphTOCWidth
1116 \ParagraphTOCWidth4.1em
1117 \def\l@paragraph#1#2{%
1118   \toc@draw
1119   \gdef\toc@draw{\draw@paragraph{#1}{#2}}}
1120 \def\draw@paragraph#1#2{%
1121   \@dottedtocline{4}{\paragraph@toc@skip}{\ParagraphTOCWidth}{#1}{{
1122 \tocfont #2}}}
1123 \newlength\subparagraph@toc@skip
1124 \subparagraph@toc@skip\paragraph@toc@skip
1125 \advance\subparagraph@toc@skip\ParagraphTOCWidth
1126 \def\l@subparagraph#1#2{%
1127   \toc@draw
1128   \gdef\toc@draw{\draw@subparagraph{#1}{#2}}}
1129 \def\draw@subparagraph#1#2{%
1130   \@dottedtocline{5}{\subparagraph@toc@skip}{6em}{#1}{{
1131 \tocfont #2}}}
1132
1133 \def\@dottedtocline#1#2#3#4#5{%
1134   \ifnum #1>\c@tocdepth
1135   \else
1136     \vskip \z@ \@plus.2\p@
1137     {\leftskip #2\relax\rightskip\@tocrmarg\parfillskip-\rightskip
1138       \parindent #2\relax\@afterindenttrue
1139       \interlinepenalty\@M
1140       \leavevmode
1141       \@tempdima #3\relax
1142       \advance\leftskip\@tempdima\null\hskip-\leftskip
1143       {#4\hfil}\nobreak
1144       \if@pdf
1145       \else
1146         \leaders\hbox{$\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}\hfill
1147         \nobreak
1148         \hb@xt@\@pnumwidth{\hfil\normalfont\normalcolor #5}%
1149 \fi
1150       \par}\fi}
1151       
1152 \newcommand\chapterauthors{%
1153   \def\break{\string\break\ }%
1154   \def\protect##1{\string ##1 }}
1155 \def\end@cas{}
1156 \def\end@casplusone{\vskip4pt\@doendpe}
1157
1158 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
1159 \def\make@chaptoc{% chapter author 
1160   {\parindent\z@
1161   \newcommand\FolioBoldFont{}%
1162   \let\@b\bullet
1163   \def\bullet{\raisebox{2pt}{$\scriptscriptstyle\@b$}}%
1164   \let\SubsectionItalicFont\it
1165 %\ifx\chapter@author\@empty\else
1166 {\rm\fontsize{10\p@}{10\p@}\bfseries\selectfont
1167 %\the\c@numauthors
1168     \ifnum\c@numauthors=1
1169         \chapter@authorone\vskip6\p@
1170         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@
1171             \fi
1172         \ifnum\c@numauthors=2
1173                     \chapter@authorone\vskip6\p@
1174         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@
1175                         \chapter@authortwo\vskip6\p@
1176         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}
1177                             \fi
1178                                 \ifnum\c@numauthors=3
1179                                     \chapter@authorone\vskip6\p@
1180         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@
1181                                         \chapter@authortwo\vskip6\p@
1182         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@
1183                                             \chapter@authorthree\vskip6\p@
1184         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}
1185                                                 \fi
1186                                                     \ifnum\c@numauthors=4
1187                                                         \chapter@authorone\vskip6\p@
1188         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@
1189                                                             \chapter@authortwo\vskip6\p@
1190         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@
1191                                                                 \chapter@authorthree\vskip6\p@
1192         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@
1193                                                                     \chapter@authorfour\vskip6\p@
1194         {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}
1195                                                                         \fi
1196 }
1197  \gdef\chapter@authorone{}\gdef\chapter@affiliationone{}%
1198  \gdef\chapter@authortwo{}\gdef\chapter@affiliationtwo{}%
1199  \gdef\chapter@authorthree{}\gdef\chapter@affiliationthree{}%
1200  \gdef\chapter@authorfour{}\gdef\chapter@affiliationfour{}%
1201   \vskip 14.6\p@
1202 {\leftskip\secnumwidth\def\author##1##2{}\@input{\thechapter.toc}\par}%
1203   }
1204 \reset@authors}
1205 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1206 \newif\iffinishedfromone
1207 \global\finishedfromonefalse
1208 %
1209 \newif\iffinishedfromtwo
1210 \global\finishedfromtwofalse
1211 %
1212 \newif\iffinishedfromthree
1213 \global\finishedfromthreefalse
1214 %
1215 \newif\iffinishedfromfour
1216 \global\finishedfromfourfalse
1217 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1218 %
1219 \newcommand\singleauthorchapter{\finishedfromonetrue}
1220 \newcommand\twoauthorchapter{\finishedfromtwotrue}
1221 \newcommand\threeauthorchapter{\finishedfromthreetrue}
1222 \newcommand\fourauthorchapter{\finishedfromfourtrue}
1223 %
1224 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1225 \newif\iffinish
1226 \global\finishfalse
1227 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1228 \newsavebox\@AUonebox
1229 \newsavebox\@AUtwobox
1230 \newsavebox\@AUthreebox
1231 \newsavebox\@AUfourbox
1232 %
1233 \newsavebox\@AUaffonebox
1234 \newsavebox\@AUafftwobox
1235 \newsavebox\@AUaffthreebox
1236 \newsavebox\@AUafffourbox
1237 %
1238 \newsavebox\@finalAUboxfromone
1239 \newsavebox\@finalAUboxfromtwo
1240 \newsavebox\@finalAUboxfromthree
1241 \newsavebox\@finalAUboxfromfour
1242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1243
1244 \def\@ca#1#2{%
1245 %  \def\chapter@author{#1}%
1246 %  \def\chapter@affiliation{#2}%
1247   \if@filesw%
1248     \write\@auxout{%
1249 \string\@writefile{toc}{\string\author{#1}{}}%
1250 }%
1251   \fi
1252 %%%%%%%%%%%%%%%
1253
1254 \ifnum\c@numauthors>4
1255     \resetcounter{numauthors}
1256 \fi 
1257 \stepcounter{numauthors}
1258 %%\the\c@numauthors
1259 \ifnum\c@numauthors=1 % 
1260     \sbox\@AUonebox{\CAPlusOneFont#1}
1261     \sbox\@AUaffonebox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}}
1262     \sbox\@finalAUboxfromone{\copy\@AUonebox}
1263     \def\chapter@authorone{\copy\@finalAUboxfromone}
1264     \def\chapter@affiliationone{\copy\@AUaffonebox}
1265 \fi \ifnum\c@numauthors=2
1266     \sbox\@AUtwobox{\CAPlusOneFont#1}
1267     \sbox\@AUafftwobox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}}
1268     \sbox\@finalAUboxfromtwo{\copy\@AUtwobox}
1269     \def\chapter@authortwo{\copy\@finalAUboxfromtwo}
1270     \def\chapter@affiliationtwo{\copy\@AUafftwobox}
1271 \fi \ifnum\c@numauthors=3
1272     \sbox\@AUthreebox{\CAPlusOneFont#1}
1273     \sbox\@AUaffthreebox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}}
1274     \sbox\@finalAUboxfromthree{\copy\@AUthreebox}
1275     \def\chapter@authorthree{\copy\@finalAUboxfromthree}
1276     \def\chapter@affiliationthree{\copy\@AUaffthreebox}
1277 \fi \ifnum\c@numauthors=4
1278     \sbox\@AUfourbox{\CAPlusOneFont#1}
1279     \sbox\@AUafffourbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}}
1280     \sbox\@finalAUboxfromfour{\copy\@AUfourbox}
1281     \def\chapter@authorfour{\copy\@finalAUboxfromfour}
1282     \def\chapter@affiliationfour{\copy\@AUafffourbox}
1283 \fi}
1284
1285
1286 \def\@caplusone{\@ifstar{\@scaplusone}{\@ifnextchar[{\@xcaplusone}{\@xcaplusone[]}}}
1287 \def\@xcaplusone[#1]#2#3{%
1288   \def\@@empty{#1}\ifx\@empty\@@empty\@ca{#2}{#3}\else\@ca{#2}{#1}\fi\@scaplusone{#2}{#3}}
1289 \def\@scaplusone#1#2{%
1290   \ifhmode\vskip-12pt\fi
1291 %%Shashi Commented
1292 %%%  \noindent\hskip3pc{\CAPlusOneFont\baselineskip14pt #1\def\@t{#2}\ifx\@t\@empty\else,\fi}\hskip6pt{\CAAPlusOneFont #2}\par
1293 }
1294
1295 \def\chapterauthoronly#1#2{\@ca{#1}{}\@scaplusone{#1}{#2}}
1296 \def\myaddcontentsline#1#2#3{%
1297   \if@filesw
1298     \begingroup
1299     \let\label\@gobble\let\index\@gobble\let\glossary\@gobble
1300     \def\break{\ }%
1301     \def\protect##1{\string ##1 }%
1302     \@temptokena{\thepage}%
1303     \edef\@tempa{\write#1{\string\chapcontentsline{#2}{\string\raggedright\space #3}{\the\@temptokena}}}\@tempa
1304     \if@nobreak\ifvmode\nobreak\fi\fi
1305     \endgroup
1306   \fi}
1307 \def\chapcontentsline#1{\csname l@#1\endcsname}
1308 \def\l@chapsection{\@mydottedtocline{1}{\z@}{6pt}}
1309 \def\l@chapsubsection{\@mydottedtocline{2}{\secnumwidth}{6pt}}
1310 \def\l@chapsubsubsection{\@mydottedtocline{3}{\subsecnumwidth}{36pt}}
1311 \newcount\c@chaptocdepth
1312 \setcounter{chaptocdepth}{3}
1313 \def\@mytocline#1#2#3#4#5{%
1314   \ifnum #1>\c@chaptocdepth
1315   \else
1316     \vskip 2pt plus.2\p@
1317     \ifnum #1=1\ifnum\c@chaptocdepth>1\addvspace{12pt}\fi\fi
1318     {\leftskip #2\relax% \rightskip \@tocrmarg \parfillskip -\rightskip
1319       \interlinepenalty\@M
1320       \leavevmode
1321       \@tempdima #3\relax
1322       \rightskip\z@
1323       \vbox{\ChapTOCFont #4\nobreak}%
1324       \par}\fi}
1325 \def\@mydottedtocline#1#2#3#4#5{%
1326   \ifnum #1>\c@chaptocdepth
1327   \else
1328     \vskip 2pt plus.2\p@
1329 {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -21pt %-\rightskip
1330 %      \parindent #2\relax\@afterindenttrue
1331       \interlinepenalty\@M
1332       \leavevmode
1333       \def\@dotsep{1.2}%
1334       \@tempdima #3\relax
1335       \rightskip\z@
1336       \advance\hsize-\secnumwidth
1337       {\fontsize{9.5\p@}{\baselineskip}\selectfont #4
1338          \nobreak\leaders\hbox{$\m@th\mkern\@dotsep mu.\mkern\@dotsep mu$}
1339 \hfill\hbox to 1.5pc{\hfill#5}}
1340       \par}\fi}
1341
1342 \newcommand\listoffigures{%
1343     \if@twocolumn
1344       \@restonecoltrue\onecolumn
1345     \else
1346       \@restonecolfalse
1347     \fi
1348     \chapter*{\listfigurename}%
1349       \@mkboth{\MakeUppercase\listfigurename}%
1350               {\MakeUppercase\listfigurename}%
1351     \@starttoc{lof}%
1352     \if@restonecol\twocolumn\fi
1353     }
1354 \newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
1355 \newcommand\listoftables{%
1356     \if@twocolumn
1357       \@restonecoltrue\onecolumn
1358     \else
1359       \@restonecolfalse
1360     \fi
1361     \chapter*{\listtablename}%
1362       \@mkboth{%
1363           \MakeUppercase\listtablename}%
1364          {\MakeUppercase\listtablename}%
1365     \@starttoc{lot}%
1366     \if@restonecol\twocolumn\fi
1367     }
1368 \let\l@table\l@figure
1369 \newdimen\bibindent
1370 \setlength\bibindent{1.5em}
1371 \newenvironment{thebibliography}[1]
1372      {\chapter*{\bibname}%
1373       \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
1374        \addcontentsline{toc}{section}{\bibname}
1375       \list{\@biblabel{\@arabic\c@enumiv}}%
1376            {\settowidth\labelwidth{\@biblabel{#1}}%
1377             \leftmargin\labelwidth
1378             \advance\leftmargin\labelsep
1379             \@openbib@code
1380             \usecounter{enumiv}%
1381             \let\p@enumiv\@empty
1382             \renewcommand\theenumiv{\@arabic\c@enumiv}}%
1383       \sloppy
1384       \clubpenalty4000
1385       \@clubpenalty \clubpenalty
1386       \widowpenalty4000%
1387       \sfcode`\.\@m}
1388      {\def\@noitemerr
1389        {\@latex@warning{Empty `thebibliography' environment}}%
1390       \endlist}
1391 \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
1392 \let\@openbib@code\@empty
1393 \newenvironment{theindex}
1394                {\cleardoublepage\if@twocolumn
1395                   \@restonecolfalse
1396                 \else
1397                   \@restonecoltrue
1398                 \fi
1399                 \twocolumn[\@makeschapterhead{\indexname}]%
1400                 \@mkboth{\MakeUppercase\indexname}%
1401                         {\MakeUppercase\indexname}%
1402                         \pagestyle{headings}
1403                         \addcontentsline{toc}{chapter}{\indexname}
1404                 \thispagestyle{folio}\parindent\z@
1405                 \parskip\z@ \@plus .3\p@\relax
1406                 \columnseprule \z@
1407                 \columnsep 35\p@
1408                 \let\item\@idxitem}
1409                {\if@restonecol\onecolumn\else\clearpage\fi}
1410 \newcommand\@idxitem{\par\hangindent 40\p@}
1411 \newcommand\subitem{\@idxitem \hspace*{20\p@}}
1412 \newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
1413 \newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
1414 \renewcommand\footnoterule{%
1415   \kern-3\p@
1416   \hrule\@width.4\columnwidth
1417   \kern2.6\p@}
1418 \@addtoreset{footnote}{chapter}
1419 \newcommand\@makefntext[1]{%
1420     \parindent 1em%
1421     \noindent
1422     \hb@xt@1.8em{\hss\@makefnmark}#1}
1423 \newcommand\contentsname{Contents}
1424 \newcommand\listfigurename{List of Figures}
1425 \newcommand\listtablename{List of Tables}
1426 \newcommand\bibname{Bibliography}
1427 \newcommand\indexname{Index}
1428 \newcommand\figurename{FIGURE}
1429 \newcommand\tablename{TABLE}
1430 \newcommand\partname{Part}
1431 \newcommand\chaptername{Chapter}
1432 \newcommand\appendixname{Appendix}
1433 \def\today{\ifcase\month\or
1434   January\or February\or March\or April\or May\or June\or
1435   July\or August\or September\or October\or November\or December\fi
1436   \space\number\day, \number\year}
1437 \setlength\columnsep{10\p@}
1438 \setlength\columnseprule{0\p@}
1439 \pagestyle{headings}
1440 \pagenumbering{arabic}
1441 \if@twoside
1442 \else
1443   \raggedbottom
1444 \fi
1445 \if@twocolumn
1446   \twocolumn
1447   \sloppy
1448   \flushbottom
1449 \else
1450   \onecolumn
1451 \fi
1452 \newcommand\crcrule{\hbox to\textwidth{\rule{\textwidth}{.5\p@}}}
1453 \newcommand\chap@rule{\crcrule}
1454 \newcommand\sec@rule{\crcrule}
1455 \def\@affiliate[#1]{\gdef\@affiliation{#1}}
1456 \def\@affiliation{}
1457
1458 \def\def@theequation{%
1459   \if@numberinsequence
1460     \def\theequation{%
1461 \if@numbysec\thesection\else\thechapter\fi.%
1462 \@arabic\c@shared}%
1463   \else
1464     \def\theequation{%
1465 \if@numbysec\thesection\else\thechapter\fi.%
1466 \@arabic\c@equation}\fi}
1467
1468 \def\affiliation#1{{\AffiliationFont\noindent #1\vskip 36bp}}
1469 \newbox\tempbox
1470
1471 \newdimen\nomenwidth
1472
1473 \newenvironment{symbollist}[1]{%
1474 \addvspace{12pt}
1475                         \setbox\tempbox\hbox{#1\hskip1em}%
1476    \global\nomenwidth\wd\tempbox
1477    %\section*{Sumbol Description}
1478 \noindent{\SectionHeadFont Symbol Description}\vskip6pt
1479 \begin{multicols}{2}}{%
1480                 \end{multicols}\par\addvspace{12pt}}
1481 \def\symbolentry#1#2{\par\noindent\@hangfrom{\hbox to \nomenwidth{#1\hss}}#2\par}
1482
1483 %%%%%%%%%%%%%%%%%%%%
1484
1485 \def\Boxhead#1{\par\addvspace{3pt plus2pt}\noindent{\centering\bfseries#1\par}\vskip3pt}
1486
1487
1488 \newbox\tempbox%
1489 \newdimen\tempdimen%
1490 %
1491 \newenvironment{shortbox}{\par\addvspace{12pt plus2pt}%
1492 \if@sunila
1493 \setbox\tempbox\vbox\bgroup\hsize27pc%
1494 \else\if@sunilb
1495 \setbox\tempbox\vbox\bgroup\hsize32pc%
1496 \else
1497 \setbox\tempbox\vbox\bgroup\hsize25pc%
1498 \fi\fi
1499 }{%
1500 \egroup%
1501 \noindent\fboxsep6pt\fboxrule.5pt\hspace*{0pt}\fbox{\box\tempbox}
1502 \par\addvspace{12pt plus2pt}}%
1503 %
1504
1505
1506 \def\grayink{\special{color cmyk 0 0 0 0.2}}
1507 \def\blackink{\special{color cmyk 0 0 0 1.0}} %  
1508 \def\whiteink{\special{color cmyk 0 0 0 0}} % 0%
1509
1510 \newenvironment{shadebox}{%
1511 \setbox\tempbox\hbox\bgroup\vbox\bgroup\leftskip12pt\rightskip\leftskip}{\par\addvspace{12pt}
1512 \egroup\egroup\par\addvspace{25pt} 
1513 \tempdimen\ht\tempbox
1514 \advance\tempdimen by 1pc
1515 \noindent{\hbox to \wd\tempbox{\vbox to \ht\tempbox{\hsize\textwidth{\special{color push}\grayink\vspace*{-12pt}\noindent\vrule height\tempdimen width\textwidth 
1516 \special{color pop}\blackink}}}}%
1517 \llap{\unhbox\tempbox}\par\addvspace{12pt}}
1518
1519
1520 %%%%%%%%%% Note %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1521 \newbox\tempbox
1522 \newdimen\notewidth
1523 \newenvironment{notelist}[1]{%
1524 \addvspace{6pt}
1525                         \setbox\tempbox\hbox{#1\hskip.57em}%
1526    \global\notewidth\wd\tempbox
1527 }{%
1528                 \par\addvspace{6pt}}
1529
1530 \def\notes#1#2{\par\noindent\@hangfrom{\hbox to \notewidth{\bf #1\hss}}#2\par}
1531 %%%%%%%%%%%%%%%% wherelist %%%%%%%%%%%%%%%%
1532 \newbox\wherebox
1533 \newdimen\wherewidth
1534 \newenvironment{wherelist}[1]{\leftskip10pt%
1535 \addvspace{6pt}
1536                         \setbox\wherebox\hbox{#1\hskip1em}%
1537    \global\wherewidth\wd\wherebox
1538 \noindent\hspace*{-14pt} where
1539 }{%
1540 \par\addvspace{6pt}}
1541 \def\whereentry#1#2#3{\par\noindent\@hangfrom{\hbox to \wherewidth{#1\hss}#2\hskip6pt}#3\par}
1542 %%%%%%%%%%%%
1543 \newenvironment{unnumlist}{%
1544   \ifnum \@enumdepth >3 \@toodeep\else
1545     \advance\@enumdepth\@ne
1546     \list{}{%
1547 \leftmargini27.5pt \leftmarginii17.5pt\leftmarginiv17.5pt
1548 %    \leftmargin\parindent
1549     \advance\leftmargin-.2em
1550     \advance\leftmarginii.2em
1551     \advance\leftmarginiii.1em
1552     \advance\leftmarginiv.2em
1553     \def\makelabel##1{\hss\llap{##1}}}
1554     \fi%
1555 }{%
1556   \endlist}
1557   %
1558 \newenvironment{extract}{%
1559                 \par\addvspace{11.5pt minus2pt}%
1560   \leftskip2em\rightskip\leftskip
1561  \noindent\ignorespaces
1562 }{%
1563                 \par\addvspace{11.5pt minus2pt}%
1564   \@endparenv}
1565 %
1566 %
1567 \def\VA#1#2{\addvspace{12pt}\raggedleft #1\rightskip3em\par #2\rightskip3em}
1568 %
1569 \newenvironment{VF}{\VfFont%
1570                 \par\addvspace{12pt minus2pt}%
1571 \noindent{\vrule height2pt width\textwidth}\par\vskip7.3pt
1572   \leftskip3em\rightskip\leftskip
1573  \noindent\ignorespaces
1574 }{%
1575 \par\vskip6pt\leftskip0pt\noindent{{\vrule height2pt width\textwidth}}\par\addvspace{12pt minus2pt}%
1576   \@endparenv}
1577 %
1578 \def\VTA#1#2{\addvspace{12pt}\raggedleft #1\rightskip3em\par {\it #2}\rightskip3em}
1579 %
1580 %
1581 \def\VT{\par\addvspace{3.5pt}\noindent}
1582
1583 \def\VH#1{{\normalfont\fontsize{12.5}{14.5}\itshape\centering\selectfont #1\par}\addvspace{5.5pt}}
1584 %
1585 \newenvironment{VT1}{\VfFont%
1586                 \par\addvspace{12pt minus2pt}%
1587 \noindent{\vrule height2pt width\textwidth}\par\vskip7.5pt
1588   \leftskip3em\rightskip\leftskip
1589 %\@afterheading
1590 \parindent0pt
1591  \noindent\ignorespaces
1592 }{%
1593 \par\vskip6pt\leftskip0pt\noindent{{\vrule height2pt width\textwidth}}\par\addvspace{10pt minus2pt}%
1594   \@endparenv}
1595 %
1596
1597 %%%%%%%%%%%% Glossary %%%%%%%%%%%%%%%%%%%%%%%
1598 \newenvironment{Glossary}
1599                {\list{}{\labelwidth\z@\leftmargin18pt \itemindent-18pt
1600                         \let\makelabel\glosslabel}}
1601                {\endlist}
1602 \newcommand\glosslabel[1]{\hspace\labelsep\normalfont\bfseries #1:}
1603
1604
1605 \tabcolsep 5pt
1606 \arrayrulewidth .5pt
1607 \doublerulesep 1pt
1608 %\newcounter{subtable}[table]
1609 \newif\if@tablerules\@tablerulestrue
1610 \newif\if@centertable\@centertabletrue
1611 \newif\if@centertabletitle\@centertabletitletrue
1612 \newbox\@tablebox
1613 \newbox\@tabletitlebox
1614 \newdimen\@tablewidth
1615 \newdimen\@tabletitlewidth
1616 \newdimen\max@tablewidth
1617 \newcommand\automaticrules{\@tablerulestrue}
1618 \newcommand\noautomaticrules{\@tablerulesfalse}
1619 \def\thetable{%
1620 \thechapter.%
1621 \@arabic\c@table}
1622 \def\thesubtable{%
1623 \thechapter.%
1624 \@arabic\c@table\alph{subtable}}
1625 \def\resettableletter{\setcounter{subtable}{0}}
1626 \def\@Tabletitle{}
1627 \newcommand\tabletitle{\@ifnextchar[{\@xtabletitle}{\@tabletitlewidth\z@\@ytabletitle}}
1628 \def\@@tabletitle{}
1629 \newif\ifshorttabletitle
1630 \global\shorttabletitlefalse
1631 %\def\@xtabletitle#1{\@tabletitlewidth#1\@ytabletitle}
1632 %
1633 \def\@xtabletitle[#1]#2{%
1634   \gdef\@@tabletitle{#1}%
1635   \gdef\@tabletitle{#2}%
1636   \let\@Tabletitle\@TableTitle
1637   \refstepcounter{table}%
1638   {\let\footnotemark\@empty
1639     \let\footnote\@gobble
1640     \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{\@@tabletitle}}}}
1641 %%%%
1642 %\long\def\@xtabletitle[#1]#2{%
1643 %  \setbox\@ttbox\hbox{#1}\global\shorttabletitletrue
1644 %  \def\@@tabletitle{\ifx\@ttbox\@empty\else#1\fi}%
1645 %  \def\@tabletitle{#2}%
1646 %  \let\@Tabletitle\@TableTitle
1647 %  \refstepcounter{table}%
1648 %  {\let\footnotemark\@empty
1649 %    \let\footnote\@gobble
1650 %    \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{%
1651 %\ifshorttabletitle\@@tabletitle\else\@tabletitle\fi}}}}
1652
1653 %%%
1654 %
1655 \long\def\@ytabletitle#1{%
1656   \def\@tabletitle{#1}%
1657   \let\@Tabletitle\@TableTitle
1658   \refstepcounter{table}%
1659   {\let\footnotemark\@empty
1660     \let\footnote\@gobble
1661     \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{\@tabletitle}}}}
1662 \def\tabletitlelet{\@ifnextchar[{\@xtabletitlelet}{\@tabletitlewidth\z@\@ytabletitlelet}}
1663 \def\@xtabletitlelet[#1]{\@tabletitlewidth#1\@ytabletitlelet}
1664 \long\def\@ytabletitlelet#1{%
1665   \def\@tabletitle{#1}%
1666   \let\@Tabletitle\@TableTitle
1667   \ifnum\c@subtable=0\stepcounter{table}\fi
1668   \let\@currentlabel\thesubtable
1669   {\let\footnotemark\@empty
1670     \let\footnote\@gobble
1671     \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{\@tabletitle}}}}
1672 \def\@TableTitle{%
1673   \noindent
1674   {%
1675     {{\TableNumberFont TABLE \thetable:\quad}}\TableTitleFont\@tabletitle}}
1676 \def\table{%
1677   %\long\def\caption##1{\tabletitle{##1}\@TableTitle\par}%
1678   \@float{table}}
1679 \@namedef{table*}{%
1680   \long\def\caption##1{\tabletitle{##1}\@TableTitle\par}%
1681   \@dblfloat{table}}
1682
1683 \def\@tabular{%
1684   \leavevmode
1685   \if@centertable\hfil\fi
1686   \vbox\bgroup
1687   \setbox\@tablebox\hbox\bgroup
1688   \baselineskip11pt
1689   \global\let\@fn\@empty
1690   \def\footnote##1{\footnotemark\gdef\@fn{##1}}
1691   \renewcommand{\arraystretch}{.916666666667}%
1692   $\let\@acol\@tabacol
1693   \let\@classz\@tabclassz
1694   \let\@classiv\@tabclassiv
1695   \let\\\@tabularcr
1696   \@tabarray}
1697 \def\endtabular{%
1698   \crcr\egroup\egroup $\egroup
1699   \@tablewidth\wd\@tablebox
1700   \ifnum\@tabletitlewidth>0
1701     {\hsize\@tabletitlewidth\raggedright\global\setbox\@tabletitlebox\vbox{\@Tabletitle}}%
1702   \else
1703     \setbox\@tabletitlebox\hbox{\@Tabletitle}%
1704     \ifnum\wd\@tabletitlebox>\@tablewidth
1705       {\hsize\@tablewidth\raggedright\global\setbox\@tabletitlebox\vbox{\@Tabletitle}}\fi
1706     \@tabletitlewidth\wd\@tabletitlebox\fi
1707   \ifnum\@tabletitlewidth>0
1708     \ifnum\@tabletitlewidth>\@tablewidth\@tablewidth\@tabletitlewidth\fi
1709     \hbox to\@tabletitlewidth{\if@centertabletitle\hfil\fi\box\@tabletitlebox\hfil}\par\fi
1710   \max@tablewidth\@tablewidth
1711   \ifnum\@tabletitlewidth>\max@tablewidth\max@tablewidth\@tabletitlewidth\fi
1712   \if@tablerules
1713     \ifnum\@tabletitlewidth>0\vskip-6pt\fi
1714     \hbox to\max@tablewidth{\if@centertable\hfil\fi\rule{\@tablewidth}{1pt}\hfil}\par\fi
1715   \hbox to\max@tablewidth{\if@centertable\hfil\fi\box\@tablebox\hfil}\vskip1pt
1716   \if@tablerules\hbox to\max@tablewidth{\if@centertable\hfil\fi\rule{\@tablewidth}{1pt}\hfil}\par\fi
1717   \ifx\@fn\@empty\else\FootnoteFont\parindent\z@\noindent\@makefnmark\@fn\par\fi
1718   \egroup\hfil
1719   \vskip 0pt plus 12pt
1720   \gdef\@Tabletitle{}}
1721
1722 \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
1723     \hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
1724     
1725 \frenchspacing
1726 \tolerance=5000    
1727 \raggedbottom
1728
1729 \def\tch#1{\TableColHeadFont #1\llstrut\hfill}
1730 \def\tsh#1{\TableSubheadFont #1\hfill}
1731 \newcommand\llstrut{\rule[-6pt]{0pt}{14pt}}
1732 \newcommand\flstrut{\rule{0pt}{10pt}}
1733 \newcommand\tabletitlestrut{\rule{0pt}{20pt}}
1734 \@centertabletitlefalse
1735 \HeadingsBookChapter
1736 %\HeadingsChapterSection
1737 \endinput
1738 %%
1739 %% End of file `sunil.cls'.
1740 \0\0\0\0\0\0\0\0\0