diff --git a/035-running-simulation.Rmd b/035-running-simulation.Rmd index 62dbf04..33dfcd0 100644 --- a/035-running-simulation.Rmd +++ b/035-running-simulation.Rmd @@ -405,7 +405,7 @@ With the tools of this chapter in place, we are now positioned to move from runn ### Welch simulations {#Welch-simulation} -In the prior chapter's exercises (See \@ref(BFFs-forever)), you made a new `BF_F` function for the Welch simulation. Update the Welch simulation code to include your `BF_F` function, and then generate simulation results for this additional estimator. See Chapter @ref(case-ANOVA) for the original simulation and overall context.\index{example!heteroskedastic ANOVA (Welch)} +In Exercise \@ref(BFFs-forever) of Chapter \@ref(estimation-procedures), you made a new `BF_F` function for the Welch simulation. Update the Welch simulation code to include your `BF_F` function, and then generate simulation results for this additional estimator. See Chapter @ref(case-ANOVA) for the original simulation and overall context.\index{example!heteroskedastic ANOVA (Welch)} ### Compare sampling distributions of Pearson's correlation coefficients {#Pearson-sampling-distributions} diff --git a/080-simulations-as-evidence.Rmd b/080-simulations-as-evidence.Rmd index e5d8951..43d3f02 100644 --- a/080-simulations-as-evidence.Rmd +++ b/080-simulations-as-evidence.Rmd @@ -618,7 +618,7 @@ All of this said, as a rule of thumb, $B = 1000$ is often good enough. #### How many factors? -Start with a few factors, run $R=10$ or so iterations, and time your code to see how long your simulation runs (see @\ref(profiling-code) for how). +Start with a few factors, run $R=10$ or so iterations, and time your code to see how long your simulation runs (see \@ref(profiling-code) for how). If your simulation runs quickly, you can add more factors in addition to scaling up the number of replications, and you probably should. diff --git a/120-parallel-processing.Rmd b/120-parallel-processing.Rmd index bc8eb3a..7415963 100644 --- a/120-parallel-processing.Rmd +++ b/120-parallel-processing.Rmd @@ -19,7 +19,7 @@ library(furrr) Especially if you take our advice of "when in doubt, go more general" and if are running enough replicates to get nice and samll Monte Carlo\index{Monte Carlo simulation} errors, you will quickly come up against the computational limits of your computer. Simulations can be incredibly computationally intensive, and there are a few means for dealing with that. The first is to optimize code by removing extraneous calculation (e.g., by writing methods from scratch rather than using the safety-checking and thus sometimes slower methods in R, or by saving calculations that are shared across different estimation approaches) to make it run faster. -This approach is usually quite hard, and the benefits often minimal; see Appendix @ref(optimize-code) for further discussion and examples. +This approach is usually quite hard, and the benefits often minimal; see Appendix \@ref(optimize-code) for further discussion and examples. The second is to use more computing power by making the simulation _parallel_. This latter approach is the topic of this chapter. diff --git a/_output.yml b/_output.yml index c4760a2..9f32d6c 100644 --- a/_output.yml +++ b/_output.yml @@ -1,5 +1,5 @@ bookdown::gitbook: - css: style.css + css: css/style.css includes: in_header: mathjax-preamble.html config: @@ -20,8 +20,17 @@ bookdown::gitbook: download: ["pdf", "epub"] bookdown::pdf_book: includes: - in_header: preamble.tex - biblio-style: apalike + in_header: latex/preamble.tex + after_body: latex/after_body.tex + keep_tex: true citation_package: natbib - keep_tex: yes -bookdown::epub_book: default + biblio-style: apalike + dev: "cairo_pdf" + latex_engine: xelatex + pandoc_args: --top-level-division=chapter + toc_depth: 3 + toc_unnumbered: false + toc_appendix: true + highlight_bw: true +bookdown::epub_book: + stylesheet: css/style.css diff --git a/attic/performance-criteria-scraps.Rmd b/attic/performance-criteria-scraps.Rmd new file mode 100644 index 0000000..f79ae26 --- /dev/null +++ b/attic/performance-criteria-scraps.Rmd @@ -0,0 +1,54 @@ +## Different kinds of performance + +There are several classes of performance criteria we might be interested in, depending on what we are evaluating. +In particular, we can as how well we are +We talk through them in the following sections after giving a high-level overview. + +**Point Estimation.** +Point estimation is when we try to measure the size of an estimand such as an actual average treatment effect $\gamma_1$. +Estimation has two major components, the point estimator and the uncertainty estimator. +We generally evaluate both the \emph{actual} properties of the point estimator and the performance of the \emph{estimated} properties of the point estimator. + +For the point estimate, we generally need to know our target _estimand_, which is the "right answer" that we are trying to estimate in our scenario. +Continuing our running example of exploring best practices for analyzing a cluster randomized experiment, we might want to assess how well our estimate of the treatment effect $\hat\gamma_1$ does for the _estimand_ of the site-average treatment effect, $\gamma_1$, for example. + +Given our estimate $\hat{\gamma_1}$ and our estimand $\gamma_1$, we can ask whether we will get the right answer on average (if not, we have _bias_). +We can also ask how variable our estimate will tend to be (this is estimating the _variance_ or _true standard error_ of our estimator). +For estimation, we generally are concerned with two things: bias and variance. +An estimator is biased if it would generally give estimates that are systematically higher (or lower) than the parameter being estimated in a given scenario. +The variance of an estimator is a measure of how much the estimates vary from trial to trial. +The variance is the true standard error, squared. +We can ask how far off the truth we are likely to be on average (this is the _root mean squared error_). +These are its actual properties. + +**Uncertainty Estimation.** +Point estimates also usually come with estimates of uncertainty: when we estimate the average treatment effect, we will also get an estimated standard error, $\widehat{SE}$, that tells us how far we are likely to be from our target. +We need to understand the properties of $\widehat{SE}$ as well. +We can ask whether our standard error estimator tends to be too large or too small, when compared to the true standard error. We can also assess whether the estimated standard error is usually accurate, or unstable across our simulation scenarios. + + +**Inference.** +Inference is when we do hypothesis testing, asking whether there is evidence for some sort of effect, or asking whether there is evidence that some coefficient is greater than or less than some specified value. +In particular, for our example, to know if there is evidence that there is an average treatment effect at all we would test the null of $H_0: \gamma_1 = 0$. +We would then + +For inference, we first might ask whether our methods are valid, i.e., ask whether the methods work correctly when we test for a treatment effect when there is none. +For example, we might wonder whether using multilevel models could open the door to inference problems if we had model misspecification, such as in a scenario where the residuals had some non-normal distribution. +These sorts of questions are questions of validity. + +Also for inference, we might ask which method is better for detecting an effect when there is one. +Here, we want to know how our estimators perform in circumstances with a non-zero average treatment effect. +Do they reject the null often, or rarely? +How much does using aggregation decrease (or increase?) our chances of rejection? +These are questions about power. + + +**Final thoughts.** +Inference and estimation are clearly highly related--if we have a good estimate of the treatment effect and it is not zero (this is estimation), then we are willing to say that there is a treatment effect (this is inference)--but depending on the framing, the way you would set up a simulation to investigate the behavior of your estimators could be different. +For example, if you were interested in inference, you might want to know how often you would reject the null hypothesis of no treatment effect---if just focused on estimation, you may not have a simulation that looks at this question of validity as directly. + +In the above, we discussed how to assess the performance of a single procedure, but in general we often have different methods for obtaining some estimate, and want to know which is best. +For example, we want to identify which estimation strategy (aggregation, linear regression, or multilevel modeling) we should generally use when analyzing cluster randomized trial data---this is comparison. +The goals for a simulation comparing different approaches should be to identify whether the strategies are different, when and how one is superior to the other, and what the salient differences are driven by. +To fully understand the trade-offs and benefits, we will generally need to compare the different approaches with respect to a variety of metrics of success. + diff --git a/style.css b/css/style.css similarity index 100% rename from style.css rename to css/style.css diff --git a/toc.css b/css/toc.css similarity index 100% rename from toc.css rename to css/toc.css diff --git a/index.Rmd b/index.Rmd index 77f615f..ad535fc 100644 --- a/index.Rmd +++ b/index.Rmd @@ -1,9 +1,10 @@ --- title: "Designing Monte Carlo Simulations in R" author: "Luke W. Miratrix and James E. Pustejovsky\n(Equal authors)" -date: "`r Sys.Date()`" +date: "`r format(Sys.Date(), '%B %d, %Y')`" site: bookdown::bookdown_site -documentclass: book +documentclass: krantz +classoption: krantz1 bibliography: - book.bib - packages.bib diff --git a/krantz.cls b/krantz.cls new file mode 100644 index 0000000..160f1f7 --- /dev/null +++ b/krantz.cls @@ -0,0 +1,2395 @@ +%% +%% This is file `Krantz.cls' +%%% Created by Shashi Kumar / KGL [Jan 2023] + + +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesClass{krantz} + [2021/10/04 v1.4n + Standard LaTeX document class] +\newcommand\@ptsize{} +\newif\if@restonecol +\newif\if@titlepage +\@titlepagetrue +\newif\if@openright +\newif\if@mainmatter \@mainmattertrue +\if@compatibility\else + \DeclareOption{a4paper} + {\setlength\paperheight {297mm}% + \setlength\paperwidth {210mm}} + \DeclareOption{a5paper} + {\setlength\paperheight {210mm}% + \setlength\paperwidth {148mm}} + \DeclareOption{b5paper} + {\setlength\paperheight {250mm}% + \setlength\paperwidth {176mm}} + \DeclareOption{letterpaper} + {\setlength\paperheight {11in}% + \setlength\paperwidth {8.5in}} + \DeclareOption{legalpaper} + {\setlength\paperheight {14in}% + \setlength\paperwidth {8.5in}} + \DeclareOption{executivepaper} + {\setlength\paperheight {10.5in}% + \setlength\paperwidth {7.25in}} + \DeclareOption{landscape} + {\setlength\@tempdima {\paperheight}% + \setlength\paperheight {\paperwidth}% + \setlength\paperwidth {\@tempdima}} +\fi +\if@compatibility + \renewcommand\@ptsize{0} +\else + \DeclareOption{10pt}{\renewcommand\@ptsize{0}} +\fi +\DeclareOption{11pt}{\renewcommand\@ptsize{1}} +\DeclareOption{12pt}{\renewcommand\@ptsize{2}} +\if@compatibility\else + \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} +\fi +\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} +\DeclareOption{draft}{\setlength\overfullrule{5pt}} +\if@compatibility\else + \DeclareOption{final}{\setlength\overfullrule{0pt}} +\fi +\DeclareOption{titlepage}{\@titlepagetrue} +\if@compatibility\else + \DeclareOption{notitlepage}{\@titlepagefalse} +\fi +\if@compatibility +\@openrighttrue +\else +\DeclareOption{openright}{\@openrighttrue} +\DeclareOption{openany}{\@openrightfalse} +\fi +\if@compatibility\else + \DeclareOption{onecolumn}{\@twocolumnfalse} +\fi +\DeclareOption{twocolumn}{\@twocolumntrue} +\DeclareOption{leqno}{\input{leqno.clo}} +\DeclareOption{fleqn}{\input{fleqn.clo}} +\DeclareOption{openbib}{% + \AtEndOfPackage{% + \renewcommand\@openbib@code{% + \advance\leftmargin\bibindent + \itemindent -\bibindent + \listparindent \itemindent + \parsep \z@ + }% + \renewcommand\newblock{\par}}% +} + + +%%%%%%%%%%% +\newif\if@numbysec +\DeclareOption{numbysec}{\@numbysectrue} +\newif\if@numberinsequence +\DeclareOption{numberinsequence}{\@numberinsequencetrue} +\newif\if@nocaptionbreak +\DeclareOption{NoCaptionBreak}{\@nocaptionbreaktrue} +\newif\if@sevenbyten +\DeclareOption{sevenbyten}{\@sevenbytentrue} +\newif\if@cip +\DeclareOption{cip}{\@ciptrue} +\newif\if@times +\DeclareOption{times}{\@timestrue} +\newif\if@chapnumonly +\DeclareOption{chapnumonly}{\@chapnumonlytrue} +\newif\if@ChapterResetsPage +\DeclareOption{ChapterResetsPage}{\@ChapterResetsPagetrue} +\newif\if@ChapterTOCs +\DeclareOption{ChapterTOCs}{\@ChapterTOCstrue} +\newif\if@EOCRefs +\DeclareOption{EOCRefs}{\@EOCRefstrue}% +\newif\if@SuperscriptCites +\DeclareOption{SuperscriptCites}{\@SuperscriptCitestrue}% +\newif\if@UnnumberedReferences +\DeclareOption{UnnumberedReferences}{\@UnnumberedReferencestrue}% +\newif\if@pdf +\DeclareOption{pdf}{\@pdftrue} +\DeclareOption{krantz1}{\@krantzatrue} +\newif\if@krantza +\DeclareOption{krantz2}{\@krantzbtrue} +\newif\if@krantzb +%%%%%%%%%%%%%%%%%% + + +\ExecuteOptions{letterpaper,10pt,twoside,onecolumn,final,openright} +\ProcessOptions + + +%%%%%%%%%%%%%%%%%%% + +\def\helv@scale{.82} +% +\DeclareFontFamily{T1}{helvetica}{}% +\DeclareFontShape{T1}{helvetica}{m}{n}{<->s*[\helv@scale]phvr8t}{}% +\DeclareFontShape{T1}{helvetica}{m}{it}{<->s*[\helv@scale]phvro8t}{}% +\DeclareFontShape{T1}{helvetica}{m}{sc}{<->s*[\helv@scale]phvrc8t}{}% +\DeclareFontShape{T1}{helvetica}{b}{n}{<->s*[\helv@scale]phvb8t}{}% +\DeclareFontShape{T1}{helvetica}{b}{it}{<->s*[\helv@scale]phvbo8t}{}% +\DeclareFontShape{T1}{helvetica}{m}{sl}{<->s*[\helv@scale]phvro8t}{}% +\DeclareFontShape{T1}{helvetica}{b}{sc}{<->s*[\helv@scale]phvbc8t}{}% +\DeclareFontShape{T1}{helvetica}{b}{sl}{<->s*[\helv@scale]phvbo8t}{}% +\DeclareFontShape{T1}{helvetica}{bx}{n}{<->s*[\helv@scale]phvb8t}{}% +\DeclareFontShape{T1}{helvetica}{bx}{it}{<->s*[\helv@scale]phvbo8t}{}% +\DeclareFontShape{T1}{helvetica}{bx}{sc}{<->s*[\helv@scale]phvbc8t}{}% +\DeclareFontShape{T1}{helvetica}{bx}{sl}{<->ssub * helvetica/b/it}{}% + +\DeclareFontFamily{OT1}{helvetica}{}% +\DeclareFontShape{OT1}{helvetica}{m}{n}{<->s*[\helv@scale]phvr7t}{}% +\DeclareFontShape{OT1}{helvetica}{m}{it}{<->s*[\helv@scale]phvro7t}{}% +\DeclareFontShape{OT1}{helvetica}{m}{sc}{<->s*[\helv@scale]phvrc7t}{}% +\DeclareFontShape{OT1}{helvetica}{b}{n}{<->s*[\helv@scale]phvb7t}{}% +\DeclareFontShape{OT1}{helvetica}{b}{it}{<->s*[\helv@scale]phvbo7t}{}% +\DeclareFontShape{OT1}{helvetica}{m}{sl}{<->s*[\helv@scale]phvro7t}{}% +\DeclareFontShape{OT1}{helvetica}{b}{sc}{<->s*[\helv@scale]phvbc8t}{}% +\DeclareFontShape{OT1}{helvetica}{b}{sl}{<->s*[\helv@scale]phvbo7t}{}% +\DeclareFontShape{OT1}{helvetica}{bx}{n}{<->s*[\helv@scale]phvb7t}{}% +\DeclareFontShape{OT1}{helvetica}{bx}{it}{<->s*[\helv@scale]phvbo7t}{}% +\DeclareFontShape{OT1}{helvetica}{bx}{sc}{<->s*[\helv@scale]phvbc8t}{}% +\DeclareFontShape{OT1}{helvetica}{bx}{sl}{<->s*[\helv@scale]phvbo7t}{}% + +%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%% Font Defined %%%%%%%%%%%%%%%%% + + \def\@xipt{11} + \def\@xviiipt{18} + \def\@xxivpt{24} + + +\newcommand\ContributorAffiliationFont{\reset@font\fontsize{10}{12}\raggedright\selectfont} +\newcommand\ContributorNameFont{\reset@font\fontsize{10}{12}\bfseries\raggedright\selectfont} + +\newcommand\TitlePageTitleFont{\fontsize{24}{28}\slshape\bfseries\selectfont} +\newcommand\TitlePageSubtitleFont{\fontsize{21}{26}\slshape\selectfont} +\newcommand\PageNumFont{\reset@font\fontsize{10}{12}\selectfont} +\newcommand\ChapNumFont{\reset@font\fontsize{24}{24}\bfseries\selectfont} +\newcommand\ChapTitleFont{\reset@font\fontsize{24}{26}\slshape\selectfont} +\newcommand\SectionHeadFont{\fontsize{12}{14}\bfseries\selectfont} +\newcommand\SubsectionHeadFont{\fontsize{11}{13}\bfseries\selectfont} +\newcommand\SubsubsectionHeadFont{\fontsize{10}{12}\bfseries\selectfont} +\newcommand\ParagraphHeadFont{\fontsize{10}{12}\itshape\selectfont} +\newcommand\SubParagraphHeadFont{\fontsize{10}{12}\itshape\selectfont} +\newcommand\FMHeadFont{\reset@font\fontsize{18}{20}\slshape\bfseries\selectfont} +\newcommand\RunningHeadFont{\fontsize{10}{12}\itshape\selectfont} +\newcommand\NameFont{\fontsize{14}{18}\itshape\selectfont} +\newcommand\EdFont{\fontsize{14}{18}\selectfont} +\newcommand\AffiliationFont{\fontsize{8}{10}\selectfont} +\newcommand\FigCapFont{\fontsize{10}{12}\bfseries\selectfont} +\newcommand\FigCapBIFont{\fontsize{10}{12}\bfseries\itshape\selectfont} +\newcommand\TableColHeadFont{\fontsize{10}{12}\bfseries\selectfont} +\newcommand\TableTitleFont{\fontsize{10}{12}\selectfont} +\newcommand\TableNumberFont{\fontsize{11}{13}\bfseries\selectfont} +\newcommand\TableBodyFont{\reset@font\fontsize{9}{11}\selectfont} +\newcommand\TableSubheadFont{\reset@font\fontsize{9}{11}\selectfont} +\newcommand\TableFootnoteFont{\reset@font\fontsize{8}{10}\selectfont} +\newcommand\CAPlusOneFont{\fontsize{10}{12}\bfseries\selectfont} +\newcommand\CAAPlusOneFont{\fontsize{10}{12}\itshape\selectfont} +\newcommand\tocfont{\fontsize{10}{12}\selectfont} +\newcommand\extraFont{\fontsize{24}{28}\selectfont} +\newcommand\VfFont{\fontsize{10}{12}\selectfont} + +%%%%%%%%%%%%%%%%% + + + +\input{bk1\@ptsize.clo} +\setlength\lineskip{1\p@} +\setlength\normallineskip{1\p@} +\renewcommand\baselinestretch{} +\setlength\parskip{0\p@ \@plus \p@} +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 +\setcounter{topnumber}{2} +\renewcommand\topfraction{.7} +\setcounter{bottomnumber}{1} +\renewcommand\bottomfraction{.3} +\setcounter{totalnumber}{3} +\renewcommand\textfraction{.2} +\renewcommand\floatpagefraction{.5} +\setcounter{dbltopnumber}{2} +\renewcommand\dbltopfraction{.7} +\renewcommand\dblfloatpagefraction{.5} + + +% **************************************** +% * PAGE LAYOUT * +% **************************************** +% +% All margin dimensions measured from a point one inch from top and side +% of page. +% +% SIDE MARGINS: +% +\oddsidemargin 6pc %5pc +\evensidemargin 5.7pc %5pc +\marginparwidth 4pc +\marginparsep 1pc +\topmargin 12pt %0pt +\headheight 12pt +\headsep 12pt +\footskip 2pc +% +% DIMENSION OF TEXT: +\newdimen\trimheight +\newdimen\trimwidth +\newdimen\normaltextheight +\newdimen\tempa +\newdimen\tempdimen +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Parameter Initializaton %%%%%%%%%%%%%%%%%%%%%%%%%% +% +\newdimen\htrim +\newdimen\vtrimtop +\newdimen\vtrimbot + +\setlength\trimheight{9.21in} +\setlength\trimwidth{6.14in} +% + +% +\if@krantza +\textheight = 45pc + %\advance\textheight by \topskip +\addtolength\textheight{3pt} + \textwidth 28pc +\addtolength\textwidth{.5pt} + \topmargin0in + \oddsidemargin1.1875in + \evensidemargin1.1875in + \htrim.7365in + \vtrimtop1.068in + \vtrimbot1.068in + \hoffset-15pt + \voffset39pt +\let\normaltextheight\textheight +\else\if@krantzb + \textheight = 51pc +% \advance\textheight by \topskip + \textwidth 33pc + \topmargin0in + \oddsidemargin.5in + \evensidemargin.5in + \htrim.75in + \vtrimtop.8607in + \vtrimbot1.027in + \hoffset-.1in + \voffset-.15in%.04in +\let\normaltextheight\textheight +\else +%%%Uncomment to get 6x9 trim +%%%%\textheight = 43pc +%%%% %\advance\textheight by \topskip +%%%%\addtolength\textheight{3pt} +%%%% \textwidth 26pc +%%%%\addtolength\textwidth{.5pt} +%%%% \topmargin0in +%%%% \oddsidemargin1.1875in +%%%% \evensidemargin1.1875in +%%%% \htrim5.05pc +%%%% \vtrimtop7.7pc +%%%% \vtrimbot5.44pc +%%%%% \hoffset-5pt +%%%% \voffset45pt +%%%%\let\normaltextheight\textheight +\textheight = 45pc + %\advance\textheight by \topskip +\addtolength\textheight{3pt} + \textwidth 28pc +\addtolength\textwidth{.5pt} + \topmargin0in + \oddsidemargin1.1875in + \evensidemargin1.1875in + \htrim.7365in + \vtrimtop1.068in + \vtrimbot1.068in + \hoffset-15pt + \voffset39pt +\let\normaltextheight\textheight + + \fi +\fi +% +\columnsep 1pc +\columnseprule 0pt +% +% FOOTNOTES +% +\footnotesep 6.65pt +\skip\footins 12pt plus 3pt minus 1.5pt +% + +%%%% Trim marks %%%%%%%%%%% +\newsavebox\ul@box +\newsavebox\ur@box +\newsavebox\ll@box +\newsavebox\lr@box +\def\top@cornermarks{% + \hskip-\htrim + \vbox to 0\p@{\vskip-\vtrimtop\llap{\copy\ul@box}\vss}% + \vbox to 0\p@{\vskip-\vtrimtop\rlap{\hskip\textwidth\hskip2\htrim\copy\ur@box}\vss}% + \vbox to 0\p@{\vskip\textheight\vskip\vtrimbot\llap{\copy\ll@box}\vss}% + \vbox to 0\p@{\vskip\textheight\vskip\vtrimbot\rlap{\hskip\textwidth\hskip2\htrim\copy\lr@box}\vss}% + \hskip\htrim} +\def\make@cornermarks{% + \sbox\ul@box{\rule{18\p@}{.25\p@}\hskip8\p@\hbox to.25\p@{\vbox to26\p@{\noindent\rule{.25\p@}{18\p@}}}}% + \sbox\ur@box{\hbox to.25\p@{\vbox to26\p@{\noindent\rule{.25\p@}{18\p@}}}\hskip8\p@\rule{18\p@}{.25\p@}}% + \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@}}}}% + \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@}}} + +%%%%%%%%%%%%%%%%%%%% End Trim Marks %%%%%%%%%%%% + + +\def\ps@plain{\let\@mkboth\@gobbletwo + \let\@oddhead\top@cornermarks%\@empty + \def\@oddfoot{\reset@font\hfil\thepage + \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot} + +%%%% + + +\if@twoside + \def\ps@headings{% + \let\@mkboth\@gobbletwo + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\top@cornermarks{\PageNumFont\thepage}\hfil\RunningHeadFont\leftmark}% + \def\@oddhead{\top@cornermarks{\RunningHeadFont\rightmark}\hfil{\PageNumFont\thepage}}% + \let\@mkboth\markboth +% \def\chaptermark##1{% +% \markboth {{%\MakeUppercase +% \ifnum \c@secnumdepth >\m@ne +% \if@mainmatter +%% \@chapapp\ \thechapter. \ % +% \fi +% \fi +% ##1}}{}}% +% \def\sectionmark##1{% +% \markright {{%\MakeUppercase +% \ifnum \c@secnumdepth >\z@ +%% \thesection. \ % +% \fi +% ##1}}} + } +\else + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markright {{%\MakeUppercase + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \@chapapp\ \thechapter. \ % + \fi + \fi + ##1}}}} +\fi +\def\ps@myheadings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\thepage\hfil\slshape\leftmark}% + \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\@gobbletwo + \let\chaptermark\@gobble + \let\sectionmark\@gobble + } + + +\def\ps@empty{% + \let\@mkboth\@gobbletwo + \if@pdf + \let\@evenhead\@empty + \let\@oddhead\@empty + \def\@oddfoot{\@cip\hfil}% + \def\@evenfoot{\@cip\hfil}% + \else + \make@cornermarks + \let\@oddhead\top@cornermarks + \let\@evenhead\top@cornermarks + \let\@oddfoot\@empty + \let\@evenfoot\@empty + \fi + } +\def\ps@folio{% + \let\@mkboth\@gobbletwo\make@cornermarks + \if@pdf + \let\@evenhead\@empty + \let\@oddhead\@empty + \def\@oddfoot{\@cip\hfil}% + \def\@evenfoot{\@cip\hfil}% + \else +\let\@oddhead\top@cornermarks + \def\@oddfoot{% + \parindent\z@ + \baselineskip7\p@ + \hbox{% + \textwidth\@ciprulewidth + \vbox{% + \if@cip\rule{\@ciprulewidth}{.25pt}\par + \hbox{\vbox{\noindent\copy\@cipboxa\par\noindent\copy\@cipboxb}}\fi}} + \hfill\thepage} + \let\@evenhead\top@cornermarks%\odd@head + \let\@evenfoot\@oddfoot + \fi + } +\newcommand\HeadingsBookChapter{% + \def\chaptermark##1{% + \markboth{\@title}{% + ##1}}% + \def\sectionmark##1{}} +\def\HeadingsChapterSection{% + \def\chaptermark##1{% + \markboth{% + ##1}{}}% + \def\sectionmark##1{% + \markright{% + ##1}}} +\def\pdfon{\@pdftrue} +\def\pdfoff{\@pdffalse} +\if@pdf + \def\@cip{{\fontsize{6\p@}{8\p@}\selectfont\copyright 2001 by CRC Press LLC}} +\else + \newsavebox\@cipboxa + \newsavebox\@cipboxb + \newdimen\@ciprulewidth + \def\@cip#1#2{% + \sbox\@cipboxa{\fontsize{6\p@}{8\p@}\selectfont #1}% + \sbox\@cipboxb{\fontsize{6\p@}{8\p@}\selectfont #2}% + \@ciprulewidth\wd\@cipboxa + \ifnum\@ciprulewidth<\wd\@cipboxb\@ciprulewidth\wd\@cipboxb\fi}% +\fi +\if@pdf +\else + \AtBeginDocument{% + \@cip{\rule{0pt}{9pt}0-8493-0052-5/00/\$0.00+\$.50}% + {\copyright\ \ 2001 by CRC Press LLC}}% +\fi + +\DeclareRobustCommand\subtitle[1]{\gdef\@subtitle{#1}} +\DeclareRobustCommand\edition[1]{\gdef\@edition{#1}} +\DeclareRobustCommand\editor[1]{\gdef\@editor{Edited by #1}} +\def\@subtitle{} +\def\@editor{} +\def\@edition{} + + +\if@titlepage + \newcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks +{\parindent \z@ \raggedright \baselineskip \z@ \lineskip \z@ \parskip \z@ + \vbox{ +% \crcrule +% \vskip 22bp + {\baselineskip 24bp\lineskip 24bp\TitlePageTitleFont\@title\par} + \vskip 27bp + {\baselineskip 10bp\lineskip 10bp\TitlePageSubtitleFont{\@subtitle}\par} + \vskip 107bp + {\baselineskip 10bp\lineskip 10bp\EdFont{\@edition}\par} + \vskip 127bp + {\baselineskip 10bp\lineskip 10bp\NameFont{\@author}\par} + {\baselineskip 10bp\lineskip 10bp\NameFont{\@editor}\par} + \vskip 6bp + \AffiliationFont \@affiliation + \vskip -2bp}} + \@thanks + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty +% \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } +\else + \newcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{empty}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } +\def\@maketitle{% + \newpage + \null + \vskip 2em% + \begin{center}% + \let \footnote \thanks + {\LARGE \@title \par}% + \vskip 1.5em% + {\large + \lineskip .5em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1em% + {\large \@date}% + \end{center}% + \par + \vskip 1.5em} +\fi +\newcommand*\chaptermark[1]{} +\setcounter{secnumdepth}{3} +\newcounter {part} +\newcounter {chapter} +\newcounter {section}[chapter] +\newcounter {subsection}[section] +\newcounter {subsubsection}[subsection] +\newcounter {paragraph}[subsubsection] +\newcounter {subparagraph}[paragraph] +\renewcommand \thepart {\@Roman\c@part} +\renewcommand \thechapter {\@arabic\c@chapter} +\renewcommand \thesection {\thechapter.\@arabic\c@section} +\renewcommand\thesubsection {\thesection.\@arabic\c@subsection} +\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection} +\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} +\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} +\newcommand\@chapapp{\chaptername} + +\newbox\tempbox% +\newdimen\tempdimen% + + +\newcommand\frontmatter{% + \cleardoublepage + \@mainmatterfalse + \pagenumbering{roman}} +\newcommand\mainmatter{% + \cleardoublepage + \@mainmattertrue + \pagenumbering{arabic}} +\newcommand\backmatter{% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \@mainmatterfalse} +\newcommand\part{% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \thispagestyle{empty}% + \if@twocolumn + \onecolumn + \@tempswatrue + \else + \@tempswafalse + \fi + \null\vfil + \secdef\@part\@spart} + +\def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \partname\nobreakspace\thepart + \par + \vskip 20\p@ + \fi + \Huge \bfseries #2\par}% + \@endpart} +\def\@spart#1{% + {\centering + \interlinepenalty \@M + \normalfont + \Huge \bfseries #1\par}% + \@endpart} +\def\@endpart{\vfil\newpage + \if@twoside + \if@openright + \null + \thispagestyle{empty}% + \newpage + \fi + \fi + \if@tempswa + \twocolumn + \fi} + + +\if@ChapterTOCs + \newwrite\@chaptoc + \def\secnumwidth{21pt}\def\subsecnumwidth{30pt}\def\ssubsecnumwidth{36pt}\def\subsubsecnumwidth{66pt}\fi +\long\def\@trplarg#1{\@ifnextchar[{\@xtrplarg{#1}}{\@ztrplarg{#1}}} +\long\def\@xtrplarg#1[#2]{\@ifnextchar[{#1[#2]}{\@ytrplarg{#1}[{#2}]}} +\long\def\@ytrplarg#1[#2]#3{#1[{#2}][{#2}]{#3}} +\long\def\@ztrplarg#1#2{#1[{#2}][{#2}]{#2}} + +\newcommand\halftitle[2]{\cleardoublepage\thispagestyle{empty}% + {\parindent \z@ \raggedright \baselineskip \z@ \lineskip \z@ \parskip \z@ + \vbox{ + \vskip -2\p@ + \ChapNumFont + {\baselineskip 20\p@\lineskip 20\p@\ChapTitleFont #1\par\vskip15pt}% + {\normalsize\normalfont #2} +% \noindent\hbox{\vrule height.5pt width84pt} + \vskip28\p@} + \vskip 19.3\p@} + }% + +\newcommand\seriespg[1]{\clearpage\thispagestyle{empty}% + {\parindent \z@ \raggedright \baselineskip \z@ \lineskip \z@ \parskip \z@ + \vbox{ + \vskip -2\p@ + \ChapNumFont + {\baselineskip 20\p@\lineskip 20\p@\Large #1\par\vskip15pt}% +% {\normalsize #2} +% \noindent\hbox{\vrule height.5pt width84pt} + \vskip28\p@} + \vskip 19.3\p@} + }% + +\newcommand\booktitle[2]{\cleardoublepage\thispagestyle{empty}% + {\parindent \z@ \raggedright \baselineskip \z@ \lineskip \z@ \parskip \z@ + \vbox{ + \vskip -2\p@ + \ChapNumFont + \vskip 6\p@ + {\baselineskip 20\p@\lineskip 20\p@\ChapTitleFont #1\par\vskip-15pt}% +% \noindent\hbox{\vrule height.5pt width84pt} +{#2} + \vskip28\p@} + \vskip 19.3\p@} + }% + +\def\locpage{\clearpage\thispagestyle{empty}% + {\parindent \z@ \raggedright \baselineskip \z@ \lineskip \z@ \parskip \z@ + \vbox{ + \vskip -2\p@ + \ChapNumFont + {\baselineskip 20\p@\lineskip 20\p@\Large Imprint page here; PE will provide text\par\vskip-15pt}% +% \noindent\hbox{\vrule height.5pt width84pt} + \vskip28\p@} + \vskip 19.3\p@} +}% + + + +%\newif\if@afterindent \@afterindenttrue +\def\@afterheading{% + \@nobreaktrue + \everypar{% + \if@nobreak + \@nobreakfalse + \clubpenalty \@M + \if@afterindent \else + {\setbox\z@\lastbox}% + \fi + \else + \clubpenalty \@clubpenalty + \everypar{}% + \fi}} + + +\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi +\make@cornermarks + \cleardoublepage + \if@ChapterTOCs\if@filesw\immediate\closeout\@chaptoc\fi\fi + \pagestyle{headings}% + \thispagestyle{folio}% +\if@ChapterResetsPage\global\c@page\@ne\fi + \global\@topnum\z@ + \gdef\chapterauthor{\@ca}% + \gdef\endchapterauthors{\end@cas}% + \@afterindentfalse + \secdef\@chapter\@schapter} +\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi + \if@ChapterTOCs\if@filesw\immediate\openout\@chaptoc\thechapter.toc\fi\fi + } +\def\@makechapterhead#1{% +%% \vspace*{50\p@}% +%% {\parindent \z@ \raggedright \normalfont +%% \ifnum \c@secnumdepth >\m@ne +%% \if@mainmatter +%% \huge\bfseries \@chapapp\space \thechapter +%% \par\nobreak +%% \vskip 20\p@ +%% \fi +%% \fi +%% \interlinepenalty\@M +%% \Huge \bfseries #1\par\nobreak +%% \vskip 40\p@} + {\parindent \z@ \raggedright \baselineskip \z@ \lineskip \z@ \parskip \z@ + \vbox{ + \vskip -2\p@ + \ChapNumFont +%Remove comment if "Chapter" word required before Number +%\if@chapnumonly\else +% \@chapapp\ +%\fi + \thechapter + \vskip -15\p@ + \chap@rule + \vskip 6\p@ + {\baselineskip 20\p@\lineskip 20\p@\ChapTitleFont #1\par\vskip-15pt}% + \noindent\hbox{\vrule height.5pt width84pt} + \vskip28\p@} + \if@ChapterTOCs + \make@chaptoc + \else +\fi + \vskip 19.3\p@} + \def\theequation{\thechapter.\arabic{equation}} + } +\def\@schapter#1{\if@twocolumn + \@topnewpage[\@makeschapterhead{#1}]% + \else + \@makeschapterhead{#1}% + \addcontentsline{toc}{fm}{#1} + \markboth{#1}{#1} + \@afterheading + \fi} +\def\@makeschapterhead#1{% +%% \vspace*{50\p@}% +%% {\parindent \z@ \raggedright +%% \normalfont +%% \interlinepenalty\@M +%% \Huge \bfseries #1\par\nobreak +%% \vskip 40\p@} + {\parindent \z@ \raggedright \baselineskip 6\p@ \lineskip \z@ \parskip \z@ + \vbox{ + \vskip 22\p@ + \unnumchap@rule + \vskip 5\p@ + \FMHeadFont #1\par\vskip-12pt + \noindent\hbox{\vrule height.5pt width84pt} + \vskip 41\p@}}% + \def\theequation{\thechapter.\arabic{equation}} + } +%%\newcommand\section{\@startsection {section}{1}{\z@}% +%% {-3.5ex \@plus -1ex \@minus -.2ex}% +%% {2.3ex \@plus.2ex}% +%% {\normalfont\Large\bfseries}} +%%\newcommand\subsection{\@startsection{subsection}{2}{\z@}% +%% {-3.25ex\@plus -1ex \@minus -.2ex}% +%% {1.5ex \@plus .2ex}% +%% {\normalfont\large\bfseries}} +%%\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% +%% {-3.25ex\@plus -1ex \@minus -.2ex}% +%% {1.5ex \@plus .2ex}% +%% {\normalfont\normalsize\bfseries}} +%%\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% +%% {3.25ex \@plus1ex \@minus.2ex}% +%% {-1em}% +%% {\normalfont\normalsize\bfseries}} +%%\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% +%% {3.25ex \@plus1ex \@minus .2ex}% +%% {-1em}% +%% {\normalfont\normalsize\bfseries}} + + + +%%Change mydotted also +\newdimen\secwd +\newdimen\subsecwd +\newdimen\subsubsecwd + +\def\secwd{31pt} +\def\subsecwd{36pt} +\def\subsubsecwd{46pt} + + +\def\ssubnumberline#1{\@hangfrom{\hbox to \secwd{#1\hfill}}} +\def\subnumberline#1{\@hangfrom{\hskip\subsecnumwidth\hbox to \subsecwd{#1\hfill}}} +\def\subsubnumberline#1{\@hangfrom{\hskip\subsubsecnumwidth\hbox to \subsubsecwd{#1\hfill}}} + + +\newcommand\section{% + \gdef\chapterauthor{\@caplusone}% + \gdef\endchapterauthors{\end@casplusone}% + \@ifstar{\@ssection}{\@trplarg{\@section}}} +\def\@ssection#1{% + \if@ChapterTOCs + \myaddcontentsline{\@chaptoc}{chapsection}{\protect\ssubnumberline{}#1}\fi + \@startsection{section}{1}{\z@}{-30\p@}{6\p@}{\sec@rule\nopagebreak\vskip9.5\p@\nopagebreak\SectionHeadFont}*{#1}} +\def\@section[#1][#2]#3{% + \if@ChapterTOCs + \addtocounter{section}{1}% + \myaddcontentsline{\@chaptoc}{chapsection}{\protect\ssubnumberline{\thesection}#1}% + \addtocounter{section}{-1}\fi + \@startsection{section}{1}{\z@}{-30\p@}{6\p@}{\sec@rule\nopagebreak\vskip9.5\p@\nopagebreak\SectionHeadFont\ignorespaces\noindent}[#2]{#3}} +\def\sectionauthor#1{\hfill{\ChapTOCAuthorFont #1}} + +\newcommand\subsection{\@ifstar{\@ssubsection}{\@trplarg{\@subsection}}} +\def\@ssubsection#1{% + \if@ChapterTOCs + \myaddcontentsline{\@chaptoc}{chapsubsection}{\protect\subnumberline{ }#1}\fi + \@startsection{subsection}{2}{\z@}{-18\p@}{6\p@}{\SubsectionHeadFont}*{#1}} +\def\@subsection[#1][#2]#3{% + \if@ChapterTOCs + \addtocounter{subsection}{1}% + \myaddcontentsline{\@chaptoc}{chapsubsection}{\protect\subnumberline{\thesubsection}#1}% + \addtocounter{subsection}{-1}\fi + \@startsection{subsection}{2}{\z@}{-18\p@}{6\p@}{\ignorespaces\noindent\SubsectionHeadFont}[#2]{#3}} + +\newcommand\subsubsection{\@ifstar{\@ssubsubsection}{\@trplarg{\@subsubsection}}} +\def\@ssubsubsection#1{% + \if@ChapterTOCs + \myaddcontentsline{\@chaptoc}{chapsubsubsection}{\protect\subsubnumberline{}#1}\fi + \@startsection{subsubsection}{3}{\z@}{-12\p@}{6\p@}{% + \SubsubsectionHeadFont}*{#1}} +\def\@subsubsection[#1][#2]#3{% + \if@ChapterTOCs + \addtocounter{subsubsection}{1}% + \myaddcontentsline{\@chaptoc}{chapsubsubsection}{\protect\subsubnumberline{\thesubsubsection}#1}% + \addtocounter{subsubsection}{-1}\fi + \@startsection{subsubsection}{3}{\z@}{-12\p@}{6\p@}{% + \SubsubsectionHeadFont}[#2]{#3}} + +\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% +{-12\p@}{6\p@}{\ParagraphHeadFont}} + +\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% +{-12\p@}{6\p@}{\SubParagraphHeadFont}} + + + +\if@twocolumn + \setlength\leftmargini {2em} +\else + \setlength\leftmargini {2.5em} +\fi +\leftmargin \leftmargini +\setlength\leftmarginii {2.2em} +\setlength\leftmarginiii {1.87em} +\setlength\leftmarginiv {1.7em} +\if@twocolumn + \setlength\leftmarginv {.5em} + \setlength\leftmarginvi {.5em} +\else + \setlength\leftmarginv {1em} + \setlength\leftmarginvi {1em} +\fi +\setlength \labelsep {.5em} +\setlength \labelwidth{\leftmargini} +\addtolength\labelwidth{-\labelsep} +\@beginparpenalty -\@lowpenalty +\@endparpenalty -\@lowpenalty +\@itempenalty -\@lowpenalty +\renewcommand\theenumi{\@arabic\c@enumi} +\renewcommand\theenumii{\@alph\c@enumii} +\renewcommand\theenumiii{\@roman\c@enumiii} +\renewcommand\theenumiv{\@Alph\c@enumiv} +\newcommand\labelenumi{\theenumi.} +\newcommand\labelenumii{(\theenumii)} +\newcommand\labelenumiii{\theenumiii.} +\newcommand\labelenumiv{\theenumiv.} +\renewcommand\p@enumii{\theenumi} +\renewcommand\p@enumiii{\theenumi(\theenumii)} +\renewcommand\p@enumiv{\p@enumiii\theenumiii} +\newcommand\labelitemi {\labelitemfont \textbullet} +\newcommand\labelitemii {\labelitemfont \bfseries \textendash} +\newcommand\labelitemiii{\labelitemfont \textasteriskcentered} +\newcommand\labelitemiv {\labelitemfont \textperiodcentered} +\newcommand\labelitemfont{\normalfont} +\newenvironment{description} + {\list{}{\labelwidth\z@ \itemindent-\leftmargin + \let\makelabel\descriptionlabel}} + {\endlist} +\newcommand*\descriptionlabel[1]{\hspace\labelsep + \normalfont\bfseries #1} +\newenvironment{verse} + {\let\\\@centercr + \list{}{\itemsep \z@ + \itemindent -1.5em% + \listparindent\itemindent + \rightmargin \leftmargin + \advance\leftmargin 1.5em}% + \item\relax} + {\endlist} +\newenvironment{quotation} + {\list{}{\listparindent 1.5em% + \itemindent \listparindent + \rightmargin \leftmargin + \parsep \z@ \@plus\p@}% + \item\relax} + {\endlist} +\newenvironment{quote} + {\list{}{\rightmargin\leftmargin}% + \item\relax} + {\endlist} +\if@compatibility + \newenvironment{titlepage} + {% + \cleardoublepage + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse\newpage + \fi + \thispagestyle{empty}% + \setcounter{page}\z@ + }% + {\if@restonecol\twocolumn \else \newpage \fi + } +\else + \newenvironment{titlepage} + {% + \cleardoublepage + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse\newpage + \fi + \thispagestyle{empty}% + \setcounter{page}\@ne + }% + {\if@restonecol\twocolumn \else \newpage \fi + \if@twoside\else + \setcounter{page}\@ne + \fi + } +\fi +\newcommand\appendix{\par + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@Alph\c@chapter}} +\setlength\arraycolsep{5\p@} +\setlength\tabcolsep{6\p@} +\setlength\arrayrulewidth{.4\p@} +\setlength\doublerulesep{2\p@} +\setlength\tabbingsep{\labelsep} +\skip\@mpfootins = \skip\footins +\setlength\fboxsep{3\p@} +\setlength\fboxrule{.4\p@} +\@addtoreset {equation}{chapter} +\renewcommand\theequation + {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation} +\newcounter{figure}[chapter] +\renewcommand \thefigure + {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure} +\def\fps@figure{tbp} +\def\ftype@figure{1} +\def\ext@figure{lof} +\def\fnum@figure{\figurename\nobreakspace\thefigure} +\newenvironment{figure} + {\@float{figure}} + {\end@float} +\newenvironment{figure*} + {\@dblfloat{figure}} + {\end@dblfloat} +\newcounter{table}[chapter] +\renewcommand \thetable + {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table} +\def\fps@table{tbp} +\def\ftype@table{2} +\def\ext@table{lot} +\def\fnum@table{\tablename\nobreakspace\thetable} +\newenvironment{table} + {\@float{table}} + {\end@float} +\newenvironment{table*} + {\@dblfloat{table}} + {\end@dblfloat} +\newlength\abovecaptionskip +\newlength\belowcaptionskip +\setlength\abovecaptionskip{10\p@} +\setlength\belowcaptionskip{0\p@} + +\def\Fig{figure} +\long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \ifx\@captype\Fig + \sbox\@tempboxa{{\FigCapFont #1}\par #2}% + \ifdim \wd\@tempboxa >\hsize + {\FigCapFont #1}\par #2\par + \else +% \global \@minipagefalse +% \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + {\FigCapFont #1}\par #2\par + \fi + \else + \let\caption\tabletitle +% \@tablecaption{#1}{#2} + \fi + \vskip\belowcaptionskip} + +%%\def\@tablecaption#1#2{% +%%{\FigCapFont#1}\hskip6.5pt{#2}\par\vskip-6pt +%%\noindent\vbox{\hrule width\textwidth height.5pt} +%%} + +\tabcolsep 5pt +\arrayrulewidth .5pt +\doublerulesep 1pt +%\newcounter{subtable}[table] +\newif\if@tablerules\@tablerulestrue +\newif\if@centertable\@centertabletrue +\newif\if@centertabletitle\@centertabletitletrue +\newbox\@tablebox +\newbox\@tabletitlebox +\newdimen\@tablewidth +\newdimen\@tabletitlewidth +\newdimen\max@tablewidth +\newcommand\automaticrules{\@tablerulestrue} +\newcommand\noautomaticrules{\@tablerulesfalse} +\def\thetable{% +\thechapter.% +\@arabic\c@table} +\def\thesubtable{% +\thechapter.% +\@arabic\c@table\alph{subtable}} +\def\resettableletter{\setcounter{subtable}{0}} +\def\@Tabletitle{} +\newcommand\tabletitle{\@ifnextchar[{\@xtabletitle}{\@tabletitlewidth\z@\@ytabletitle}} +\def\@@tabletitle{} +\newif\ifshorttabletitle +\global\shorttabletitlefalse +%\def\@xtabletitle#1{\@tabletitlewidth#1\@ytabletitle} +% +\def\@xtabletitle[#1]#2{% + \gdef\@@tabletitle{#1}% + \gdef\@tabletitle{#2}% + \let\@Tabletitle\@TableTitle + \refstepcounter{table}% + {\let\footnotemark\@empty + \let\footnote\@gobble + \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{\@@tabletitle}}}} +%%%% +%\long\def\@xtabletitle[#1]#2{% +% \setbox\@ttbox\hbox{#1}\global\shorttabletitletrue +% \def\@@tabletitle{\ifx\@ttbox\@empty\else#1\fi}% +% \def\@tabletitle{#2}% +% \let\@Tabletitle\@TableTitle +% \refstepcounter{table}% +% {\let\footnotemark\@empty +% \let\footnote\@gobble +% \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{% +%\ifshorttabletitle\@@tabletitle\else\@tabletitle\fi}}}} + +%%% +% +\long\def\@ytabletitle#1{% + \def\@tabletitle{#1}% + \let\@Tabletitle\@TableTitle + \refstepcounter{table}% + {\let\footnotemark\@empty + \let\footnote\@gobble + \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{\@tabletitle}}}} +\def\tabletitlelet{\@ifnextchar[{\@xtabletitlelet}{\@tabletitlewidth\z@\@ytabletitlelet}} +\def\@xtabletitlelet[#1]{\@tabletitlewidth#1\@ytabletitlelet} +\long\def\@ytabletitlelet#1{% + \def\@tabletitle{#1}% + \let\@Tabletitle\@TableTitle + \ifnum\c@subtable=0\stepcounter{table}\fi + \let\@currentlabel\thesubtable + {\let\footnotemark\@empty + \let\footnote\@gobble + \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{\@tabletitle}}}} +\def\@TableTitle{% + \noindent + {% + \vbox{{\TableNumberFont TABLE\ \thetable}}\par\TableTitleFont\@tabletitle}} +\def\table{% + %\long\def\caption##1{\tabletitle{##1}\@TableTitle\par}% + \@float{table}} +\@namedef{table*}{% + \long\def\caption##1{\tabletitle{##1}\@TableTitle\par}% + \@dblfloat{table}} + +\def\@tabular{% + \leavevmode + \if@centertable\hfil\fi + \vbox\bgroup + \setbox\@tablebox\hbox\bgroup + \baselineskip11pt + \global\let\@fn\@empty + \def\footnote##1{\footnotemark\gdef\@fn{##1}} + \renewcommand{\arraystretch}{.916666666667}% + $\let\@acol\@tabacol + \let\@classz\@tabclassz + \let\@classiv\@tabclassiv + \let\\\@tabularcr + \@tabarray} +\def\endtabular{% + \crcr\egroup\egroup $\egroup + \@tablewidth\wd\@tablebox + \ifnum\@tabletitlewidth>0 + {\hsize\@tabletitlewidth\raggedright\global\setbox\@tabletitlebox\vbox{\@Tabletitle}}% + \else + \setbox\@tabletitlebox\hbox{\@Tabletitle}% + \ifnum\wd\@tabletitlebox>\@tablewidth + {\hsize\@tablewidth\raggedright\global\setbox\@tabletitlebox\vbox{\@Tabletitle}}\fi + \@tabletitlewidth\wd\@tabletitlebox\fi + \ifnum\@tabletitlewidth>0 + \ifnum\@tabletitlewidth>\@tablewidth\@tablewidth\@tabletitlewidth\fi + \hbox to\@tabletitlewidth{\if@centertabletitle\hfil\fi\box\@tabletitlebox\hfil}\par\fi + \max@tablewidth\@tablewidth + \ifnum\@tabletitlewidth>\max@tablewidth\max@tablewidth\@tabletitlewidth\fi + \if@tablerules + \ifnum\@tabletitlewidth>0\vskip-6pt\fi + \hbox to\max@tablewidth{\if@centertable\hfil\fi\rule{\@tablewidth}{1pt}\hfil}\par\fi + \hbox to\max@tablewidth{\if@centertable\hfil\fi\box\@tablebox\hfil}\vskip1pt + \if@tablerules\hbox to\max@tablewidth{\if@centertable\hfil\fi\rule{\@tablewidth}{1pt}\hfil}\par\fi + \ifx\@fn\@empty\else\FootnoteFont\parindent\z@\noindent\@makefnmark\@fn\par\fi + \egroup\hfil + \vskip 0pt plus 12pt + \gdef\@Tabletitle{}} + + + + +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} +\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} +\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} +\newcommand\@pnumwidth{1.55em} +\newcommand\@tocrmarg{2.55em} +\newcommand\@dotsep{4.5} +\setcounter{tocdepth}{3} + + +\newcounter{numauthors} +\newif\if@break +\newif\if@firstauthor +\newcommand\tableofcontents{\cleardoublepage\markboth{Contents}{Contents}%% + \gdef\chapterauthor{\@caplusone}% + \gdef\endchapterauthors{\end@casplusone}% + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse + \fi + {\parindent \z@ \raggedright \baselineskip 6\p@ \lineskip \z@ \parskip \z@ + \vbox{ + \vskip 22\p@ + \unnumchap@rule + \vskip 5\p@ + \FMHeadFont \contentsname\par\vskip-12pt + \noindent\hbox{\vrule height.5pt width84pt} + \vskip 41\p@}} +%% \chapter*{\contentsname +%% \@mkboth{%\MakeUppercase +%% \contentsname}{\contentsname}}%\MakeUppercase + \pagestyle{headings}\thispagestyle{folio} + {\let\break\space + \let\author\toc@author + \reset@authors + \let\toc@draw\relax + \@starttoc{toc} + \toc@draw + } + \if@restonecol\twocolumn\fi + } + +%%\newcounter{numauthors} +%%\newif\if@break +%%\newif\if@firstauthor +%%\newcommand\tableofcontents{\cleardoublepage\markboth{Contents}{Contents}% +%% \make@cornermarks +%% \gdef\chapterauthor{\@caplusone}% +%% \gdef\endchapterauthors{\end@casplusone}% +%% \if@twocolumn +%% \@restonecoltrue\onecolumn +%% \else +%% \@restonecolfalse +%% \fi +%% {\parindent \z@ \raggedright \baselineskip 6\p@ \lineskip \z@ \parskip \z@ +%% \vbox{ +%% \vskip 22\p@ +%% \unnumchap@rule +%% \vskip 5\p@ +%% \FMHeadFont \contentsname\par\vskip-12pt +%% \noindent\hbox{\vrule height.5pt width84pt} +%% \vskip 41\p@}} +%%%%% \chapter*{\contentsname +%%%%% \@mkboth{% +%%%%% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% +%% \pagestyle{headings}\thispagestyle{folio} +%% {\let\break\space +%% \let\author\toc@author +%% \reset@authors +%% \let\toc@draw\relax +%% \@starttoc{toc} +%% \toc@draw +%% } +%% \if@restonecol\twocolumn\fi +%% } + + + +\newcommand*\l@part[2]{% + \ifnum \c@tocdepth >-2\relax + \addpenalty{-\@highpenalty}% + \addvspace{2.25em \@plus\p@}% + \setlength\@tempdima{3em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + {\leavevmode + \large \bfseries #1\hfil + \hb@xt@\@pnumwidth{\hss #2% + \kern-\p@\kern\p@}}\par + \nobreak + \global\@nobreaktrue + \everypar{\global\@nobreakfalse\everypar{}}% + \endgroup + \fi} + +\newcommand*\l@fm[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil + \nobreak\hb@xt@\@pnumwidth{\hss #2% + \kern-\p@\kern\p@}\par + \penalty\@highpenalty + \endgroup + \fi} + +\newcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil + \nobreak\hb@xt@\@pnumwidth{\hss #2% + \kern-\p@\kern\p@}\par +\if@ChapterTOCs {\it\draw@authors}\fi% + \penalty\@highpenalty + \endgroup + \fi} + +\def\toc@author#1#2{% + \if@firstauthor + \@firstauthorfalse + \else + \ifx\@authors\@empty + \xdef\@authors{\last@author}% + \else + \@cons{\@authors}{, \last@author}\fi\fi + \stepcounter{numauthors}% +%%%%%%% commented and deleted below the second part to aviod inaccessible error % shashi % September-2008 +%% \gdef\last@author{#1 {\rm\fontsize{9\p@}{11\p@}\selectfont #2}} +\gdef\last@author{#1} +} +\def\draw@authors{% + \let\@t\@authors + \ifx\@t\@empty + \let\@t\last@author\fi + \ifx\@t\@empty\else + \hskip\leftskip + \ifx\@authors\@empty + \else + \@authors + \ifnum\c@numauthors>2,\fi + \if@break\break\fi + \ and \fi + \last@author\break\fi + \reset@authors} +\def\reset@authors{% + \gdef\@authors{}% + \gdef\last@author{}% + \@firstauthortrue + \setcounter{numauthors}{0}} + + +\newcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}} +\newcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} +\newcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} +\newcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}} +\newcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}} + +\def\@dottedtocline#1#2#3#4#5{% + \ifnum #1>\c@tocdepth + \else + \vskip \z@ \@plus.2\p@ + {\leftskip #2\relax\rightskip\@tocrmarg\parfillskip-\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\leftskip\@tempdima\null\hskip-\leftskip + {#4\hfil}\nobreak + \if@pdf + \else + \leaders\hbox{$\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}\hfill + \nobreak + \hb@xt@\@pnumwidth{\hfil\normalfont\normalcolor #5}% +\fi + \par}\fi} + + + \newcommand\chapterauthors{% + \def\break{\string\break\ }% + \def\protect##1{\string ##1 }} +\def\end@cas{} +\def\end@casplusone{\vskip4pt\@doendpe} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\make@chaptoc{% chapter author % + {\parindent\z@ + \def\FolioBoldFont{}% + \let\@b\bullet + \def\bullet{\raisebox{2pt}{$\scriptscriptstyle\@b$}}% + \let\SubsectionItalicFont\it +%\ifx\chapter@author\@empty\else +{\rm\fontsize{10\p@}{10\p@}\bfseries\selectfont +%\the\c@numauthors + \ifnum\c@numauthors=1 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \fi + \ifnum\c@numauthors=2 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo} + \fi + \ifnum\c@numauthors=3 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree} + \fi + \ifnum\c@numauthors=4 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour} + \fi + \ifnum\c@numauthors=5 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive} + \fi + \ifnum\c@numauthors=6 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix} + \fi + \ifnum\c@numauthors=7 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix}\vskip12\p@ + \chapter@authorseven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationseven} + \fi + \ifnum\c@numauthors=8 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix}\vskip12\p@ + \chapter@authorseven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationseven}\vskip12\p@ + \chapter@authoreight\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeight} + \fi + \ifnum\c@numauthors=9 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix}\vskip12\p@ + \chapter@authorseven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationseven}\vskip12\p@ + \chapter@authoreight\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeight}\vskip12\p@ + \chapter@authornine\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationnine} + \fi + \ifnum\c@numauthors=10 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix}\vskip12\p@ + \chapter@authorseven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationseven}\vskip12\p@ + \chapter@authoreight\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeight}\vskip12\p@ + \chapter@authornine\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationnine}\vskip12\p@ + \chapter@authorten\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationten} + \fi + \ifnum\c@numauthors=11 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix}\vskip12\p@ + \chapter@authorseven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationseven}\vskip12\p@ + \chapter@authoreight\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeight}\vskip12\p@ + \chapter@authornine\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationnine}\vskip12\p@ + \chapter@authorten\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationten}\vskip12\p@ + \chapter@authoreleven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeleven} + \fi + \ifnum\c@numauthors=12 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix}\vskip12\p@ + \chapter@authorseven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationseven}\vskip12\p@ + \chapter@authoreight\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeight}\vskip12\p@ + \chapter@authornine\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationnine}\vskip12\p@ + \chapter@authorten\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationten}\vskip12\p@ + \chapter@authoreleven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeleven}\vskip12\p@ + \chapter@authortwelve\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwelve} + \fi + \ifnum\c@numauthors=13 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix}\vskip12\p@ + \chapter@authorseven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationseven}\vskip12\p@ + \chapter@authoreight\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeight}\vskip12\p@ + \chapter@authornine\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationnine}\vskip12\p@ + \chapter@authorten\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationten}\vskip12\p@ + \chapter@authoreleven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeleven}\vskip12\p@ + \chapter@authortwelve\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwelve}\vskip12\p@ + \chapter@authorthirteen\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthirteen} \fi + \ifnum\c@numauthors=14 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix}\vskip12\p@ + \chapter@authorseven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationseven}\vskip12\p@ + \chapter@authoreight\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeight}\vskip12\p@ + \chapter@authornine\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationnine}\vskip12\p@ + \chapter@authorten\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationten}\vskip12\p@ + \chapter@authoreleven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeleven}\vskip12\p@ + \chapter@authortwelve\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwelve}\vskip12\p@ + \chapter@authorthirteen\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthirteen}\vskip12\p@ \chapter@authorfourteen\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfourteen} + \fi + \ifnum\c@numauthors=15 + \chapter@authorone\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationone}\vskip12\p@ + \chapter@authortwo\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwo}\vskip12\p@ + \chapter@authorthree\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthree}\vskip12\p@ + \chapter@authorfour\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfour}\vskip12\p@ + \chapter@authorfive\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfive}\vskip12\p@ + \chapter@authorsix\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationsix}\vskip12\p@ + \chapter@authorseven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationseven}\vskip12\p@ + \chapter@authoreight\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeight}\vskip12\p@ + \chapter@authornine\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationnine}\vskip12\p@ + \chapter@authorten\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationten}\vskip12\p@ + \chapter@authoreleven\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationeleven}\vskip12\p@ + \chapter@authortwelve\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationtwelve}\vskip12\p@ + \chapter@authorthirteen\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationthirteen}\vskip12\p@ \chapter@authorfourteen\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfourteen}\vskip12\p@ + \chapter@authorfifteen\vskip6\p@ + {\it\fontsize{10\p@}{10\p@}\selectfont\chapter@affiliationfifteen} + \fi + +} + \gdef\chapter@authorone{}\gdef\chapter@affiliationone{}% + \gdef\chapter@authortwo{}\gdef\chapter@affiliationtwo{}% + \gdef\chapter@authorthree{}\gdef\chapter@affiliationthree{}% + \gdef\chapter@authorfour{}\gdef\chapter@affiliationfour{}% + \gdef\chapter@authorfive{}\gdef\chapter@affiliationfive{}% + \gdef\chapter@authorsix{}\gdef\chapter@affiliationsix{}% + \gdef\chapter@authorseven{}\gdef\chapter@affiliationseven{}% + \gdef\chapter@authoreight{}\gdef\chapter@affiliationeight{}% + \gdef\chapter@authornine{}\gdef\chapter@affiliationnine{}% + \gdef\chapter@authorten{}\gdef\chapter@affiliationten{}% + \gdef\chapter@authoreleven{}\gdef\chapter@affiliationeleven{}% + \gdef\chapter@authortwelve{}\gdef\chapter@affiliationtwelve{}% + \gdef\chapter@authorthirteen{}\gdef\chapter@affiliationthirteen{}% + \gdef\chapter@authorfourteen{}\gdef\chapter@affiliationfourteen{}% + \gdef\chapter@authorfifteen{}\gdef\chapter@affiliationfifteen{}% + + \vskip 14.6\p@ +{\leftskip\secnumwidth\def\author##1##2{}\@input{\thechapter.toc}\par}% + } +\reset@authors} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newif\iffinishedfromone +\global\finishedfromonefalse +% +\newif\iffinishedfromtwo +\global\finishedfromtwofalse +% +\newif\iffinishedfromthree +\global\finishedfromthreefalse +% +\newif\iffinishedfromfour +\global\finishedfromfourfalse +% +\newif\iffinishedfromfive +\global\finishedfromfivefalse +% +\newif\iffinishedfromsix +\global\finishedfromsixfalse +% +\newif\iffinishedfromseven +\global\finishedfromsevenfalse +% +\newif\iffinishedfromeight +\global\finishedfromeightfalse +% +\newif\iffinishedfromnine +\global\finishedfromninefalse +% +\newif\iffinishedfromten +\global\finishedfromtenfalse +% +\newif\iffinishedfromeleven +\global\finishedfromelevenfalse +% +\newif\iffinishedfromtwelve +\global\finishedfromtwelvefalse +% +\newif\iffinishedfromthirteen +\global\finishedfromthirteenfalse +% +\newif\iffinishedfromfourteen +\global\finishedfromfourteenfalse +% +\newif\iffinishedfromfifteen +\global\finishedfromfifteenfalse +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +\def\singleauthorchapter{\finishedfromonetrue} +\def\twoauthorchapter{\finishedfromtwotrue} +\def\threeauthorchapter{\finishedfromthreetrue} +\def\fourauthorchapter{\finishedfromfourtrue} +\def\fiveauthorchapter{\finishedfromfivetrue} +\def\sixauthorchapter{\finishedfromsixtrue} +\def\sevenauthorchapter{\finishedfromseventrue} +\def\eightauthorchapter{\finishedfromeighttrue} +\def\nineauthorchapter{\finishedfromninetrue} +\def\tenauthorchapter{\finishedfromtentrue} +\def\elevenauthorchapter{\finishedfromeleventrue} +\def\twelveauthorchapter{\finishedfromtwelvetrue} +\def\thirteenauthorchapter{\finishedfromthirteentrue} +\def\fourteenauthorchapter{\finishedfromfourteentrue} +\def\fifteenauthorchapter{\finishedfromfifteentrue} +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newif\iffinish +\global\finishfalse +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newsavebox\@AUonebox +\newsavebox\@AUtwobox +\newsavebox\@AUthreebox +\newsavebox\@AUfourbox +\newsavebox\@AUfivebox +\newsavebox\@AUsixbox +\newsavebox\@AUsevenbox +\newsavebox\@AUeightbox +\newsavebox\@AUninebox +\newsavebox\@AUtenbox +\newsavebox\@AUelevenbox +\newsavebox\@AUtwelvebox +\newsavebox\@AUthirteenbox +\newsavebox\@AUfourteenbox +\newsavebox\@AUfifteenbox + +% +\newsavebox\@AUaffonebox +\newsavebox\@AUafftwobox +\newsavebox\@AUaffthreebox +\newsavebox\@AUafffourbox +\newsavebox\@AUafffivebox +\newsavebox\@AUaffsixbox +\newsavebox\@AUaffsevenbox +\newsavebox\@AUaffeightbox +\newsavebox\@AUaffninebox +\newsavebox\@AUafftenbox +\newsavebox\@AUaffelevenbox +\newsavebox\@AUafftwelvebox +\newsavebox\@AUaffthirteenbox +\newsavebox\@AUafffourteenbox +\newsavebox\@AUafffifteenbox + +% +\newsavebox\@finalAUboxfromone +\newsavebox\@finalAUboxfromtwo +\newsavebox\@finalAUboxfromthree +\newsavebox\@finalAUboxfromfour +\newsavebox\@finalAUboxfromfive +\newsavebox\@finalAUboxfromsix +\newsavebox\@finalAUboxfromseven +\newsavebox\@finalAUboxfromeight +\newsavebox\@finalAUboxfromnine +\newsavebox\@finalAUboxfromten +\newsavebox\@finalAUboxfromeleven +\newsavebox\@finalAUboxfromtwelve +\newsavebox\@finalAUboxfromthirteen +\newsavebox\@finalAUboxfromfourteen +\newsavebox\@finalAUboxfromfifteen +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\@ca#1#2{% +% \def\chapter@author{#1}% +% \def\chapter@affiliation{#2}% + \if@filesw% + \write\@auxout{% +\string\@writefile{toc}{\string\author{#1}{}}% +}% + \fi +%%%%%%%%%%%%%%% + +\ifnum\c@numauthors>15 + \resetcounter{numauthors} +\fi +\stepcounter{numauthors} +%%\the\c@numauthors +\ifnum\c@numauthors=1 % + \sbox\@AUonebox{\CAPlusOneFont#1} + \sbox\@AUaffonebox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromone{\copy\@AUonebox} + \def\chapter@authorone{\copy\@finalAUboxfromone} + \def\chapter@affiliationone{\copy\@AUaffonebox} +\fi \ifnum\c@numauthors=2 + \sbox\@AUtwobox{\CAPlusOneFont#1} + \sbox\@AUafftwobox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromtwo{\copy\@AUtwobox} + \def\chapter@authortwo{\copy\@finalAUboxfromtwo} + \def\chapter@affiliationtwo{\copy\@AUafftwobox} +\fi \ifnum\c@numauthors=3 + \sbox\@AUthreebox{\CAPlusOneFont#1} + \sbox\@AUaffthreebox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromthree{\copy\@AUthreebox} + \def\chapter@authorthree{\copy\@finalAUboxfromthree} + \def\chapter@affiliationthree{\copy\@AUaffthreebox} +\fi \ifnum\c@numauthors=4 + \sbox\@AUfourbox{\CAPlusOneFont#1} + \sbox\@AUafffourbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromfour{\copy\@AUfourbox} + \def\chapter@authorfour{\copy\@finalAUboxfromfour} + \def\chapter@affiliationfour{\copy\@AUafffourbox} +\fi \ifnum\c@numauthors=5 + \sbox\@AUfivebox{\CAPlusOneFont#1} + \sbox\@AUafffivebox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromfive{\copy\@AUfivebox} + \def\chapter@authorfive{\copy\@finalAUboxfromfive} + \def\chapter@affiliationfive{\copy\@AUafffivebox} +\fi \ifnum\c@numauthors=6 + \sbox\@AUsixbox{\CAPlusOneFont#1} + \sbox\@AUaffsixbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromsix{\copy\@AUsixbox} + \def\chapter@authorsix{\copy\@finalAUboxfromsix} + \def\chapter@affiliationsix{\copy\@AUaffsixbox} +\fi \ifnum\c@numauthors=7 + \sbox\@AUsevenbox{\CAPlusOneFont#1} + \sbox\@AUaffsevenbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromseven{\copy\@AUsevenbox} + \def\chapter@authorseven{\copy\@finalAUboxfromseven} + \def\chapter@affiliationseven{\copy\@AUaffsevenbox} +\fi \ifnum\c@numauthors=8 + \sbox\@AUeightbox{\CAPlusOneFont#1} + \sbox\@AUaffeightbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromeight{\copy\@AUeightbox} + \def\chapter@authoreight{\copy\@finalAUboxfromeight} + \def\chapter@affiliationeight{\copy\@AUaffeightbox} +\fi \ifnum\c@numauthors=9 + \sbox\@AUninebox{\CAPlusOneFont#1} + \sbox\@AUaffninebox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromnine{\copy\@AUninebox} + \def\chapter@authornine{\copy\@finalAUboxfromnine} + \def\chapter@affiliationnine{\copy\@AUaffninebox} +\fi \ifnum\c@numauthors=10 + \sbox\@AUtenbox{\CAPlusOneFont#1} + \sbox\@AUafftenbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromten{\copy\@AUtenbox} + \def\chapter@authorten{\copy\@finalAUboxfromten} + \def\chapter@affiliationten{\copy\@AUafftenbox} +\fi \ifnum\c@numauthors=11 + \sbox\@AUelevenbox{\CAPlusOneFont#1} + \sbox\@AUaffelevenbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromeleven{\copy\@AUelevenbox} + \def\chapter@authoreleven{\copy\@finalAUboxfromeleven} + \def\chapter@affiliationeleven{\copy\@AUaffelevenbox} +\fi \ifnum\c@numauthors=12 + \sbox\@AUtwelvebox{\CAPlusOneFont#1} + \sbox\@AUafftwelvebox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromtwelve{\copy\@AUtwelvebox} + \def\chapter@authortwelve{\copy\@finalAUboxfromtwelve} + \def\chapter@affiliationtwelve{\copy\@AUafftwelvebox} +\fi \ifnum\c@numauthors=13 + \sbox\@AUthirteenbox{\CAPlusOneFont#1} + \sbox\@AUaffthirteenbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromthirteen{\copy\@AUthirteenbox} + \def\chapter@authorthirteen{\copy\@finalAUboxfromthirteen} + \def\chapter@affiliationthirteen{\copy\@AUaffthirteenbox} +\fi\ifnum\c@numauthors=14 + \sbox\@AUfourteenbox{\CAPlusOneFont#1} + \sbox\@AUafffourteenbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromfourteen{\copy\@AUfourteenbox} + \def\chapter@authorfourteen{\copy\@finalAUboxfromfourteen} + \def\chapter@affiliationfourteen{\copy\@AUafffourteenbox} +\fi\ifnum\c@numauthors=15 + \sbox\@AUfifteenbox{\CAPlusOneFont#1} + \sbox\@AUafffifteenbox{\vbox{\hsize\textwidth\CAAPlusOneFont\noindent #2\par}} + \sbox\@finalAUboxfromfifteen{\copy\@AUfifteenbox} + \def\chapter@authorfifteen{\copy\@finalAUboxfromfifteen} + \def\chapter@affiliationfifteen{\copy\@AUafffifteenbox} +\fi} + + + +\def\@caplusone{\@ifstar{\@scaplusone}{\@ifnextchar[{\@xcaplusone}{\@xcaplusone[]}}} +\def\@xcaplusone[#1]#2#3{% + \def\@@empty{#1}\ifx\@empty\@@empty\@ca{#2}{#3}\else\@ca{#2}{#1}\fi\@scaplusone{#2}{#3}} +\def\@scaplusone#1#2{% + \ifhmode\vskip-12pt\fi +%%Shashi Commented +%%% \noindent\hskip3pc{\CAPlusOneFont\baselineskip14pt #1\def\@t{#2}\ifx\@t\@empty\else,\fi}\hskip6pt{\CAAPlusOneFont #2}\par +} + +\def\chapterauthoronly#1#2{\@ca{#1}{}\@scaplusone{#1}{#2}} +\def\myaddcontentsline#1#2#3{% + \if@filesw + \begingroup + \let\label\@gobble\let\index\@gobble\let\glossary\@gobble + \def\break{\ }% + \def\protect##1{\string ##1 }% + \@temptokena{\thepage}% + \edef\@tempa{\write#1{\string\chapcontentsline{#2}{\string\raggedright\space #3}{\the\@temptokena}}}\@tempa +% \if@nobreak\ifvmode\nobreak\fi\fi%%%nobreak error + \endgroup + \fi} +\def\chapcontentsline#1{\csname l@#1\endcsname} +\def\l@chapsection{\@mydottedtocline{1}{\z@}{6pt}} +\def\l@chapsubsection{\@mydottedtocline{2}{\secnumwidth}{6pt}} +\def\l@chapsubsubsection{\@mydottedtocline{3}{\subsecnumwidth}{36pt}} +\newcount\c@chaptocdepth +\setcounter{chaptocdepth}{3} +\def\@mytocline#1#2#3#4#5{% + \ifnum #1>\c@chaptocdepth + \else + \vskip 2pt plus.2\p@ + \ifnum #1=1\ifnum\c@chaptocdepth>1\addvspace{12pt}\fi\fi + {\leftskip #2\relax% \rightskip \@tocrmarg \parfillskip -\rightskip + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \rightskip\z@ + \vbox{\ChapTOCFont #4\nobreak}% + \par}\fi} +\def\@mydottedtocline#1#2#3#4#5{% + \ifnum #1>\c@chaptocdepth + \else +\fontsize{10}{12}\selectfont +{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + % \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \def\@dotsep{1.2}% + \@tempdima #3\relax + \rightskip\z@ +% \advance\hsize-\secnumwidth +% \hskip-\secnumwidth +\if@krantzb +\hangindent\secnumwidth\hsize372pt\else\hangindent\secnumwidth\hsize312pt\fi +#4 + \if@pdf + \hfill + \else + \nobreak\leaders\hbox{$\m@th\mkern\@dotsep mu.\mkern\@dotsep mu$}\hfill\nobreak + \hbox to24\p@{\hfil #5}\fi + \par}\fi} + + +\newcommand\listoffigures{% + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse + \fi + \chapter*{\listfigurename}% + \@mkboth{\MakeUppercase\listfigurename}% + {\MakeUppercase\listfigurename}% + \@starttoc{lof}% + \if@restonecol\twocolumn\fi + } +\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} +\newcommand\listoftables{% + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse + \fi + \chapter*{\listtablename}% + \@mkboth{% + \MakeUppercase\listtablename}% + {\MakeUppercase\listtablename}% + \@starttoc{lot}% + \if@restonecol\twocolumn\fi + } +\let\l@table\l@figure +\newdimen\bibindent +\setlength\bibindent{1.5em} +\newenvironment{thebibliography}[1] + {\chapter*{\bibname}%\MakeUppercase + \@mkboth{\bibname}{\bibname}%\MakeUppercase + \list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist} +\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} +\let\@openbib@code\@empty +\newenvironment{theindex} + {\if@twocolumn + \@restonecolfalse + \else + \@restonecoltrue + \fi + \twocolumn[\@makeschapterhead{\indexname}]% + \@mkboth{\indexname}%\MakeUppercase + {\indexname}%\MakeUppercase + \thispagestyle{folio}\parindent\z@\pagestyle{headings} + \addcontentsline{toc}{chapter}{\indexname} + \parskip\z@ \@plus .3\p@\relax\raggedright + \columnseprule \z@ + \columnsep 35\p@ + \let\item\@idxitem} + {\if@restonecol\onecolumn\else\clearpage\fi} +\newcommand\@idxitem{\par\hangindent 40\p@} +\newcommand\subitem{\@idxitem \hspace*{20\p@}} +\newcommand\subsubitem{\@idxitem \hspace*{30\p@}} +\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} +\renewcommand\footnoterule{% + \kern-3\p@ + \hrule\@width.4\columnwidth + \kern2.6\p@} +\@addtoreset{footnote}{chapter} +\newcommand\@makefntext[1]{% + \parindent 1em% + \noindent + \hb@xt@1.8em{\hss\@makefnmark}#1} + +\def\grayink{\special{color cmyk 0 0 0 0.2}} +\def\blackink{\special{color cmyk 0 0 0 1.0}} % +\def\whiteink{\special{color cmyk 0 0 0 0}} % 0% + +\usepackage{color} +\usepackage{framed} + +\definecolor{shadecolor}{cmyk}{0, 0, 0, 0.2} + +\newenvironment{shadebox}{ +\begin{shaded*} +}{\end{shaded*}} + +\newenvironment{shortbox}{ +\begin{oframed}}{\end{oframed}} + + +\def\tch#1{\TableColHeadFont #1\llstrut\hfill} +\def\tsh#1{\TableSubheadFont #1\hfill} +\newcommand\llstrut{\rule[-6pt]{0pt}{14pt}} +\newcommand\flstrut{\rule{0pt}{10pt}} +\newcommand\tabletitlestrut{\rule{0pt}{20pt}} + +\def\Boxhead#1{\par\addvspace{3pt plus2pt}\noindent{\centering\bfseries#1\par}\vskip3pt} + + +%%%%%%%%%% Note %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newbox\tempbox +\newdimen\notewidth +\newenvironment{notelist}[1]{% +\addvspace{6pt} + \setbox\tempbox\hbox{#1\hskip.57em}% + \global\notewidth\wd\tempbox +}{% + \par\addvspace{6pt}} + +\def\notes#1#2{\par\noindent\@hangfrom{\hbox to \notewidth{\bf #1\hss}}#2\par} +%%%%%%%%%%%%%%%% wherelist %%%%%%%%%%%%%%%% +\newbox\wherebox +\newdimen\wherewidth +\newenvironment{wherelist}[1]{\leftskip10pt% +\addvspace{6pt} + \setbox\wherebox\hbox{#1\hskip1em}% + \global\wherewidth\wd\wherebox +\noindent\hspace*{-14pt} where +}{% +\par\addvspace{6pt}} +\def\whereentry#1#2#3{\par\noindent\@hangfrom{\hbox to \wherewidth{#1\hss}#2\hskip6pt}#3\par} +%%%%%%%%%%%% +\newenvironment{unnumlist}{% + \ifnum \@enumdepth >3 \@toodeep\else + \advance\@enumdepth\@ne + \list{}{% +\leftmargini27.5pt \leftmarginii17.5pt\leftmarginiv17.5pt +% \leftmargin\parindent + \advance\leftmargin-.2em + \advance\leftmarginii.2em + \advance\leftmarginiii.1em + \advance\leftmarginiv.2em + \def\makelabel##1{\hss\llap{##1}}} + \fi% +}{% + \endlist} + % +\newenvironment{extract}{% + \par\addvspace{11.5pt minus2pt}% + \leftskip2em\rightskip\leftskip + \noindent\ignorespaces +}{% + \par\addvspace{11.5pt minus2pt}% + \@endparenv} +% +% +\def\VA#1#2{\addvspace{12pt}\raggedleft #1\rightskip3em\par #2\rightskip3em} +% +\newenvironment{VF}{\VfFont% + \par\addvspace{12pt minus2pt}% +\noindent{\vrule height2pt width\textwidth}\par\vskip7.3pt + \leftskip3em\rightskip\leftskip + \noindent\ignorespaces +}{% +\par\vskip6pt\leftskip0pt\noindent{{\vrule height2pt width\textwidth}}\par\addvspace{12pt minus2pt}% + \@endparenv} +% +\def\VTA#1#2{\addvspace{12pt}\raggedleft #1\rightskip3em\par {\it #2}\rightskip3em} +% +% +\def\VT{\par\addvspace{3.5pt}\noindent} + +\def\VH#1{{\normalfont\fontsize{12.5}{14.5}\itshape\centering\selectfont #1\par}\addvspace{5.5pt}} +% +\newenvironment{VT1}{\VfFont% + \par\addvspace{12pt minus2pt}% +\noindent{\vrule height2pt width\textwidth}\par\vskip7.5pt + \leftskip3em\rightskip\leftskip +%\@afterheading +\parindent0pt + \noindent\ignorespaces +}{% +\par\vskip6pt\leftskip0pt\noindent{{\vrule height2pt width\textwidth}}\par\addvspace{10pt minus2pt}% + \@endparenv} +% +%%%%%%%%%%%% Glossary %%%%%%%%%%%%%%%%%%%%%%% +\newenvironment{Glossary} + {\list{}{\labelwidth\z@\leftmargin18pt \itemindent-18pt + \let\makelabel\glosslabel}} + {\endlist} +\newcommand\glosslabel[1]{\hspace\labelsep\normalfont\bfseries #1:} + +%%%%%%%%%%%% +\newif\iffnalpha +\global\fnalphafalse + +\newskip\listtextleftmargin\listtextleftmargin 20pt%24pt +\newskip\listtextleftmarginii\listtextleftmarginii0pt% 24pt +\newskip\listtextleftmarginiii\listtextleftmarginiii0pt% 24pt + +\newskip\listtextrightmargin\listtextrightmargin12pt%.5pc +\newskip\listlabelleftskip \listlabelleftskip4pt%3.3pt +\newskip\listlabelleftskipii \listlabelleftskipii0pt%3.3pt +\newskip\listlabelleftskipiii \listlabelleftskipiii0pt%3.3pt + +\newskip\abovelistskipi\abovelistskipi6pt plus2pt +\newskip\belowlistskipi\belowlistskipi6pt plus2pt +\newskip\abovelistskipii\abovelistskipii0pt plus2pt +\newskip\belowlistskipii\belowlistskipii0pt plus2pt +\newskip\abovelistskipiii\abovelistskipiii0pt plus2pt +\newskip\belowlistskipiii\belowlistskipiii0pt plus2pt + +\newskip\labelsepi \labelsepi6pt +\newskip\labelsepii \labelsepii6pt +\newskip\labelsepiii \labelsepiii6pt%\z@ + +\newskip\itemsepi \itemsepi0pt%10pt +\newskip\itemsepii \itemsepii0pt +\newskip\itemsepiii \itemsepiii0pt + + +\newdimen\enumdimwd +\newif\iflabelrightalign\labelrightaligntrue +\newdimen\enumdim% +% +\def\enummax#1{% + \labelsep\csname labelsep\romannumeral\the\@enumdepth\endcsname + \ifdim\listtextleftmargin>\z@\labelsepi0pt\fi + \ifdim\listtextleftmarginii>\z@\labelsepii0pt\fi + \ifdim\listtextleftmarginiii>\z@\labelsepiii0pt\fi + \setbox\tempbox\hbox{\csname listdevicefont\romannumeral\the\@enumdepth\endcsname#1\hskip\labelsep}% + \enumdim\wd\tempbox + \setbox\tempbox\hbox{\csname listdevicefont\romannumeral\the\@enumdepth\endcsname#1}% + \enumdimwd\wd\tempbox + \expandafter\global\csname leftmargin\romannumeral\the\@enumdepth\endcsname\enumdim + \ifdim\listtextleftmargin>\z@ + \leftmargini\listtextleftmargin + \ifdim\listlabelleftskip>\z@ + \advance\leftmargini-\listlabelleftskip + \fi + \fi + \ifdim\listtextleftmarginii>\z@ + \leftmarginii\listtextleftmarginii + \ifdim\listlabelleftskipii>\z@ + \advance\leftmarginii-\listlabelleftskipii + \fi + \fi + \ifdim\listtextleftmarginiii>\z@ + \leftmarginiii\listtextleftmarginiii + \ifdim\listlabelleftskipiii>\z@ + \advance\leftmarginiii-\listlabelleftskipiii + \fi + \fi +} +% +\enummax{1.} +% +\def\enumerate{\@ifnextchar[{\@enumerate}{\@enumerate[\csname label\@enumctr\endcsname]}}%% +% + +\def\@enumerate[#1]{\par + \ifnum \@enumdepth >3 \@toodeep + \else + \advance\@enumdepth\@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \setcounter{\@enumctr}{1}\enummax{#1}% + \list + {\csname label\@enumctr\endcsname}{\usecounter{\@enumctr}% + \topsep\csname abovelistskip\romannumeral\the\@enumdepth\endcsname + \itemsep\csname itemsep\romannumeral\the\@enumdepth\endcsname +% \listfont %\listparindent18.25pt + \ifnum \@enumdepth=1 \leftmargin32.7pt + \rightmargin\listtextrightmargin + \advance\rightmargin\rightskip + \advance\leftmargin\leftskip + \tempdimen\leftmargini + \advance\tempdimen-\labelsep + %%%%%%%%%%% + \iffnalpha + \def\makelabel##1{{\hskip\listlabelleftskip{\csname listdevicefont\romannumeral\the\@enumdepth\endcsname{\iflabelrightalign\hss\fi\textlistlabel##1}}}}% + \global\fnalphafalse + \else + \def\makelabel##1{\hbox to \tempdimen{\hskip\listlabelleftskip{\csname listdevicefont\romannumeral\the\@enumdepth\endcsname\hbox to \enumdimwd{\iflabelrightalign\hss\fi\textlistlabel##1}}\blackink}}% + \fi + %%%%%%%%%%%%%%%%%%%%%%%%%%% + \else + \ifnum \@enumdepth=2 + \tempdimen\leftmarginii + \advance\tempdimen-\labelsep + \def\makelabel##1{\hbox to \tempdimen{\hskip\listlabelleftskipii{\csname listdevicefont\romannumeral\the\@enumdepth\endcsname\hbox to \enumdimwd{\iflabelrightalign\hss\fi##1}\blackink}}}% + \else + \ifnum \@enumdepth=3 + \tempdimen\leftmarginiii + \advance\tempdimen-\labelsep + \def\makelabel##1{\hbox to \tempdimen{\hskip\listlabelleftskipiii{\csname listdevicefont\romannumeral\the\@enumdepth\endcsname\hbox to \enumdimwd{\iflabelrightalign\hss\fi##1}\blackink}}}% + \else + \def\makelabel##1{\hss\llap{\csname listdevicefont\romannumeral\the\@enumdepth\endcsname##1}}% + \fi + \fi + \fi} + \fi} +% +\def\endenumerate{\@topsepadd\csname belowlistskip\romannumeral\the\@enumdepth\endcsname\endlist}% +% + +\def\textlistlabel{} + +%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newdimen\concolwidth +\newbox\stempbox +\def\contributor#1#2#3{\addvspace{10pt}{% +\setbox\stempbox\hbox{\ContributorAffiliationFont #2} +\concolwidth\wd\stempbox + \noindent{\ContributorNameFont #1}\par + \ifdim\concolwidth>\columnwidth \vspace*{3pt} \else \fi + \noindent{\vbox{\hangindent12pt\ContributorAffiliationFont #2}}\vskip-1\p@ + \noindent{\vbox{\hangindent12pt\ContributorAffiliationFont #3}}}} + +%%\def\contributors{% +%% \twocolumn[\contributorshead] +%% \pagestyle{empty} +%% \leftskip1pc +%% \parindent-1pc} +%%\def\contributorshead{% +%% \vbox{}\vskip2pc +%% {\centering\HeadFont CONTRIBUTORS\vskip2\p@} +%% \noindent\rule{\textwidth}{1\p@}\vskip25\p@} + +\newenvironment{contributorlist} + {\cleardoublepage\if@twocolumn + \@restonecolfalse + \else + \@restonecoltrue + \fi + \twocolumn[\@makeschapterhead{Contributors}]% + \@mkboth{\MakeUppercase\indexname}% + {\MakeUppercase\indexname}% + \markboth{Contributors}{Contributors} + \pagestyle{headings} + \addcontentsline{toc}{fm}{Contributors} + \thispagestyle{folio}\parindent\z@\raggedright + \parskip\z@ \@plus .3\p@\relax + \columnseprule \z@ + \columnsep 35\p@ + \let\contau\@conitem} + {\if@restonecol\onecolumn\else\clearpage\fi} +\newcommand\@conitem{\par\addvspace{10pt}\ContributorNameFont\hangindent 40\p@} +\newcommand\contaff{\par\ContributorAffiliationFont\hangindent 12\p@} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else + \hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi} + +\frenchspacing +\tolerance=5000 +\raggedbottom + + + +\newcommand\contentsname{Contents} +\newcommand\listfigurename{List of Figures} +\newcommand\listtablename{List of Tables} +\newcommand\bibname{Bibliography} +\newcommand\indexname{Index} +\newcommand\figurename{FIGURE} +\newcommand\tablename{TABLE} +\newcommand\partname{Part} +\newcommand\chaptername{Chapter} +\newcommand\appendixname{Appendix} +\def\today{\ifcase\month\or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi + \space\number\day, \number\year} +\setlength\columnsep{10\p@} +\setlength\columnseprule{0\p@} +\pagestyle{headings} +\pagenumbering{arabic} +\if@twoside +\else + \raggedbottom +\fi +\if@twocolumn + \twocolumn + \sloppy + \flushbottom +\else + \onecolumn +\fi +\newcommand\unnumcrcrule{\hbox to\textwidth{\rlap{\rule[-3.5\p@]{84\p@}{4\p@}}}} +\newcommand\unnumchap@rule{\unnumcrcrule} +\newcommand\crcrule{\hbox to\textwidth{\rlap{\rule[-3.5\p@]{84\p@}{4\p@}}\rule{\textwidth}{.5\p@}}} +\newcommand\chap@rule{\crcrule} +\newcommand\sec@rule{\crcrule} +\def\@affiliate[#1]{\gdef\@affiliation{#1}} +\def\@affiliation{} + +\@centertabletitlefalse +%\HeadingsBookChapter +\HeadingsChapterSection + + +\endinput +%% +%% End of file `krantz.cls'. diff --git a/latex/after_body.tex b/latex/after_body.tex new file mode 100644 index 0000000..2aabf99 --- /dev/null +++ b/latex/after_body.tex @@ -0,0 +1 @@ +\printindex diff --git a/latex/before_body.tex b/latex/before_body.tex new file mode 100644 index 0000000..e3f3ddb --- /dev/null +++ b/latex/before_body.tex @@ -0,0 +1,5 @@ +% you may need to leave a few empty pages before the dedication page + +%\cleardoublepage\newpage\thispagestyle{empty}\null +%\cleardoublepage\newpage\thispagestyle{empty}\null +%\cleardoublepage\newpage diff --git a/preamble.tex b/latex/preamble.tex similarity index 90% rename from preamble.tex rename to latex/preamble.tex index 74da1f3..7086e21 100644 --- a/preamble.tex +++ b/latex/preamble.tex @@ -7,14 +7,20 @@ } \makeatother -% Added by Miratrix \usepackage{color} +\usepackage{subfig} + +\usepackage{makeidx} +\makeindex + + +% Shortcodes for editing \newcommand\cmnt[2]{\qquad{{\color{red} \em #1---#2} \qquad}} \newcommand\cmntM[1]{\cmnt{#1}{Miratrix}} \newcommand\awk{{{\color{red} {$\leftarrow$ Awkward phrasing}}\qquad}} \newcommand\cmntMp[1]{{\color{red} $\leftarrow$ {\em #1 -Miratrix} \qquad}} -\usepackage{subfig} +% Shortcodes for math and probability \newcommand{\Prob}{\text{Pr}} \newcommand{\E}{\mathbb{E}} \newcommand{\M}{\mathbb{M}}