From b77e75e69dd83e06261c50e6e720fceb485283e6 Mon Sep 17 00:00:00 2001 From: jepusto Date: Wed, 18 Mar 2026 11:09:26 -0500 Subject: [PATCH 1/8] Organizing auxiliary files like .css and .tex. --- Designing-Simulations-in-R.toc | 313 ------------------ style.css => css/style.css | 0 toc.css => css/toc.css | 0 latex/after_body.tex | 2 + latex/before_body.tex | 5 + preamble.tex => latex/preamble.tex | 12 +- .../performance-criteria-scraps.Rmd | 0 7 files changed, 17 insertions(+), 315 deletions(-) delete mode 100644 Designing-Simulations-in-R.toc rename style.css => css/style.css (100%) rename toc.css => css/toc.css (100%) create mode 100644 latex/after_body.tex create mode 100644 latex/before_body.tex rename preamble.tex => latex/preamble.tex (88%) rename performance-criteria-scraps => scraps/performance-criteria-scraps.Rmd (100%) diff --git a/Designing-Simulations-in-R.toc b/Designing-Simulations-in-R.toc deleted file mode 100644 index 21e8e2c..0000000 --- a/Designing-Simulations-in-R.toc +++ /dev/null @@ -1,313 +0,0 @@ -\contentsline {chapter}{Welcome}{9}{chapter*.2}% -\contentsline {section}{License}{10}{section*.3}% -\contentsline {section}{About the authors}{10}{section*.4}% -\contentsline {section}{Acknowledgements}{11}{section*.5}% -\contentsline {part}{I\hspace {1em}An Introductory Look}{13}{part.1}% -\contentsline {chapter}{\numberline {1}Introduction}{15}{chapter.1}% -\contentsline {section}{\numberline {1.1}Some of simulation's many uses}{16}{section.1.1}% -\contentsline {subsection}{\numberline {1.1.1}Comparing statistical approaches}{17}{subsection.1.1.1}% -\contentsline {subsection}{\numberline {1.1.2}Assessing performance of complex pipelines}{17}{subsection.1.1.2}% -\contentsline {subsection}{\numberline {1.1.3}Assessing performance under misspecification}{18}{subsection.1.1.3}% -\contentsline {subsection}{\numberline {1.1.4}Assessing the finite-sample performance of a statistical approach}{18}{subsection.1.1.4}% -\contentsline {subsection}{\numberline {1.1.5}Conducting Power Analyses}{19}{subsection.1.1.5}% -\contentsline {subsection}{\numberline {1.1.6}Simulating processess}{20}{subsection.1.1.6}% -\contentsline {section}{\numberline {1.2}The perils of simulation as evidence}{21}{section.1.2}% -\contentsline {section}{\numberline {1.3}Simulating to learn}{23}{section.1.3}% -\contentsline {section}{\numberline {1.4}Why R?}{24}{section.1.4}% -\contentsline {section}{\numberline {1.5}Organization of the text}{25}{section.1.5}% -\contentsline {chapter}{\numberline {2}Programming Preliminaries}{27}{chapter.2}% -\contentsline {section}{\numberline {2.1}Welcome to the tidyverse}{27}{section.2.1}% -\contentsline {section}{\numberline {2.2}Functions}{28}{section.2.2}% -\contentsline {subsection}{\numberline {2.2.1}Rolling your own}{28}{subsection.2.2.1}% -\contentsline {subsection}{\numberline {2.2.2}A dangerous function}{29}{subsection.2.2.2}% -\contentsline {subsection}{\numberline {2.2.3}Using Named Arguments}{32}{subsection.2.2.3}% -\contentsline {subsection}{\numberline {2.2.4}Argument Defaults}{33}{subsection.2.2.4}% -\contentsline {subsection}{\numberline {2.2.5}Function skeletons}{34}{subsection.2.2.5}% -\contentsline {section}{\numberline {2.3}\texttt {\textbackslash {}\textgreater {}} (Pipe) dreams}{34}{section.2.3}% -\contentsline {section}{\numberline {2.4}Recipes versus Patterns}{35}{section.2.4}% -\contentsline {section}{\numberline {2.5}Exercises}{36}{section.2.5}% -\contentsline {chapter}{\numberline {3}An initial simulation}{39}{chapter.3}% -\contentsline {section}{\numberline {3.1}Simulating a single scenario}{41}{section.3.1}% -\contentsline {section}{\numberline {3.2}A non-normal population distribution}{43}{section.3.2}% -\contentsline {section}{\numberline {3.3}Simulating across different scenarios}{44}{section.3.3}% -\contentsline {section}{\numberline {3.4}Extending the simulation design}{47}{section.3.4}% -\contentsline {section}{\numberline {3.5}Exercises}{47}{section.3.5}% -\contentsline {part}{II\hspace {1em}Structure and Mechanics of a Simulation Study}{51}{part.2}% -\contentsline {chapter}{\numberline {4}Structure of a simulation study}{53}{chapter.4}% -\contentsline {section}{\numberline {4.1}General structure of a simulation}{53}{section.4.1}% -\contentsline {section}{\numberline {4.2}Tidy, modular simulations}{55}{section.4.2}% -\contentsline {section}{\numberline {4.3}Skeleton of a simulation study}{56}{section.4.3}% -\contentsline {subsection}{\numberline {4.3.1}Data-Generating Process}{58}{subsection.4.3.1}% -\contentsline {subsection}{\numberline {4.3.2}Data Analysis Procedure}{58}{subsection.4.3.2}% -\contentsline {subsection}{\numberline {4.3.3}Repetition}{59}{subsection.4.3.3}% -\contentsline {subsection}{\numberline {4.3.4}Performance summaries}{60}{subsection.4.3.4}% -\contentsline {subsection}{\numberline {4.3.5}Multifactor simulations}{61}{subsection.4.3.5}% -\contentsline {section}{\numberline {4.4}Exercises}{62}{section.4.4}% -\contentsline {chapter}{\numberline {5}Case Study: Heteroskedastic ANOVA and Welch}{63}{chapter.5}% -\contentsline {section}{\numberline {5.1}The data-generating model}{66}{section.5.1}% -\contentsline {subsection}{\numberline {5.1.1}Now make a function}{68}{subsection.5.1.1}% -\contentsline {subsection}{\numberline {5.1.2}Cautious coding}{69}{subsection.5.1.2}% -\contentsline {section}{\numberline {5.2}The hypothesis testing procedures}{70}{section.5.2}% -\contentsline {section}{\numberline {5.3}Running the simulation}{71}{section.5.3}% -\contentsline {section}{\numberline {5.4}Summarizing test performance}{72}{section.5.4}% -\contentsline {section}{\numberline {5.5}Exercises}{74}{section.5.5}% -\contentsline {subsection}{\numberline {5.5.1}Other \(\alpha \)'s}{74}{subsection.5.5.1}% -\contentsline {subsection}{\numberline {5.5.2}Compare results}{74}{subsection.5.5.2}% -\contentsline {subsection}{\numberline {5.5.3}Power}{74}{subsection.5.5.3}% -\contentsline {subsection}{\numberline {5.5.4}Wide or long?}{74}{subsection.5.5.4}% -\contentsline {subsection}{\numberline {5.5.5}Other tests}{75}{subsection.5.5.5}% -\contentsline {subsection}{\numberline {5.5.6}Methodological extensions}{75}{subsection.5.5.6}% -\contentsline {subsection}{\numberline {5.5.7}Power analysis}{75}{subsection.5.5.7}% -\contentsline {chapter}{\numberline {6}Data-generating processes}{77}{chapter.6}% -\contentsline {section}{\numberline {6.1}Examples}{77}{section.6.1}% -\contentsline {subsection}{\numberline {6.1.1}Example 1: One-way analysis of variance}{78}{subsection.6.1.1}% -\contentsline {subsection}{\numberline {6.1.2}Example 2: Bivariate Poisson model}{78}{subsection.6.1.2}% -\contentsline {subsection}{\numberline {6.1.3}Example 3: Hierarchical linear model for a cluster-randomized trial}{78}{subsection.6.1.3}% -\contentsline {section}{\numberline {6.2}Components of a DGP}{79}{section.6.2}% -\contentsline {section}{\numberline {6.3}A statistical model is a recipe for data generation}{82}{section.6.3}% -\contentsline {section}{\numberline {6.4}Plot the artificial data}{84}{section.6.4}% -\contentsline {section}{\numberline {6.5}Check the data-generating function}{85}{section.6.5}% -\contentsline {section}{\numberline {6.6}Example: Simulating clustered data}{87}{section.6.6}% -\contentsline {subsection}{\numberline {6.6.1}A design decision: What do we want to manipulate?}{87}{subsection.6.6.1}% -\contentsline {subsection}{\numberline {6.6.2}A model for a cluster RCT}{88}{subsection.6.6.2}% -\contentsline {subsection}{\numberline {6.6.3}From equations to code}{91}{subsection.6.6.3}% -\contentsline {subsection}{\numberline {6.6.4}Standardization in the DGP}{93}{subsection.6.6.4}% -\contentsline {section}{\numberline {6.7}Sometimes a DGP is all you need}{95}{section.6.7}% -\contentsline {section}{\numberline {6.8}More to explore}{100}{section.6.8}% -\contentsline {section}{\numberline {6.9}Exercises}{101}{section.6.9}% -\contentsline {subsection}{\numberline {6.9.1}The Welch test on a shifted-and-scaled \(t\) distribution}{101}{subsection.6.9.1}% -\contentsline {subsection}{\numberline {6.9.2}Plot the bivariate Poisson}{101}{subsection.6.9.2}% -\contentsline {subsection}{\numberline {6.9.3}Check the bivariate Poisson function}{102}{subsection.6.9.3}% -\contentsline {subsection}{\numberline {6.9.4}Add error-catching to the bivariate Poisson function}{102}{subsection.6.9.4}% -\contentsline {subsection}{\numberline {6.9.5}A bivariate negative binomial distribution}{102}{subsection.6.9.5}% -\contentsline {subsection}{\numberline {6.9.6}Another bivariate negative binomial distribution}{104}{subsection.6.9.6}% -\contentsline {subsection}{\numberline {6.9.7}Plot the data from a cluster-randomized trial}{104}{subsection.6.9.7}% -\contentsline {subsection}{\numberline {6.9.8}Checking the Cluster RCT DGP}{105}{subsection.6.9.8}% -\contentsline {subsection}{\numberline {6.9.9}More school-level variation}{105}{subsection.6.9.9}% -\contentsline {subsection}{\numberline {6.9.10}Cluster-randomized trial with baseline predictors}{105}{subsection.6.9.10}% -\contentsline {subsection}{\numberline {6.9.11}3-parameter IRT datasets}{106}{subsection.6.9.11}% -\contentsline {subsection}{\numberline {6.9.12}Check the 3-parameter IRT DGP}{107}{subsection.6.9.12}% -\contentsline {subsection}{\numberline {6.9.13}Explore the 3-parameter IRT model}{107}{subsection.6.9.13}% -\contentsline {subsection}{\numberline {6.9.14}Random effects meta-regression}{107}{subsection.6.9.14}% -\contentsline {subsection}{\numberline {6.9.15}Meta-regression with selective reporting}{108}{subsection.6.9.15}% -\contentsline {chapter}{\numberline {7}Estimation procedures}{111}{chapter.7}% -\contentsline {section}{\numberline {7.1}Writing estimation functions}{112}{section.7.1}% -\contentsline {section}{\numberline {7.2}Including Multiple Data Analysis Procedures}{114}{section.7.2}% -\contentsline {section}{\numberline {7.3}Validating an Estimation Function}{118}{section.7.3}% -\contentsline {subsection}{\numberline {7.3.1}Checking against existing implementations}{118}{subsection.7.3.1}% -\contentsline {subsection}{\numberline {7.3.2}Checking novel procedures}{120}{subsection.7.3.2}% -\contentsline {subsection}{\numberline {7.3.3}Checking with simulations}{123}{subsection.7.3.3}% -\contentsline {section}{\numberline {7.4}Handling errors, warnings, and other hiccups}{124}{section.7.4}% -\contentsline {subsection}{\numberline {7.4.1}Capturing errors and warnings}{125}{subsection.7.4.1}% -\contentsline {subsection}{\numberline {7.4.2}Estimator processes that anticipate errors and warnings}{131}{subsection.7.4.2}% -\contentsline {subsection}{\numberline {7.4.3}The \texttt {safely()} option}{134}{subsection.7.4.3}% -\contentsline {section}{\numberline {7.5}Exercises}{137}{section.7.5}% -\contentsline {subsection}{\numberline {7.5.1}More Heteroskedastic ANOVA}{137}{subsection.7.5.1}% -\contentsline {subsection}{\numberline {7.5.2}Contingent testing}{137}{subsection.7.5.2}% -\contentsline {subsection}{\numberline {7.5.3}Check the cluster-RCT functions}{138}{subsection.7.5.3}% -\contentsline {subsection}{\numberline {7.5.4}Extending the cluster-RCT functions}{138}{subsection.7.5.4}% -\contentsline {subsection}{\numberline {7.5.5}Contingent estimator processing}{139}{subsection.7.5.5}% -\contentsline {subsection}{\numberline {7.5.6}Estimating 3-parameter item response theory models}{140}{subsection.7.5.6}% -\contentsline {subsection}{\numberline {7.5.7}Meta-regression with selective reporting}{140}{subsection.7.5.7}% -\contentsline {chapter}{\numberline {8}Running the Simulation Process}{143}{chapter.8}% -\contentsline {section}{\numberline {8.1}Repeating oneself}{143}{section.8.1}% -\contentsline {section}{\numberline {8.2}One run at a time}{144}{section.8.2}% -\contentsline {section}{\numberline {8.3}Reparameterizing}{147}{section.8.3}% -\contentsline {section}{\numberline {8.4}Bundling simulations with \texttt {simhelpers}}{148}{section.8.4}% -\contentsline {section}{\numberline {8.5}Seeds and pseudo-random number generators}{150}{section.8.5}% -\contentsline {section}{\numberline {8.6}Conclusions}{153}{section.8.6}% -\contentsline {section}{\numberline {8.7}Exercises}{153}{section.8.7}% -\contentsline {subsection}{\numberline {8.7.1}Welch simulations}{153}{subsection.8.7.1}% -\contentsline {subsection}{\numberline {8.7.2}Compare sampling distributions of Pearson's correlation coefficients}{153}{subsection.8.7.2}% -\contentsline {subsection}{\numberline {8.7.3}Reparameterization, redux}{154}{subsection.8.7.3}% -\contentsline {subsection}{\numberline {8.7.4}Fancy clustered RCT simulations}{154}{subsection.8.7.4}% -\contentsline {chapter}{\numberline {9}Performance Measures}{155}{chapter.9}% -\contentsline {section}{\numberline {9.1}Measures for Point Estimators}{157}{section.9.1}% -\contentsline {subsection}{\numberline {9.1.1}Comparing the Performance of the Cluster RCT Estimation Procedures}{160}{subsection.9.1.1}% -\contentsline {subsubsection}{Are the estimators biased?}{160}{section*.12}% -\contentsline {subsubsection}{Which method has the smallest standard error?}{161}{section*.13}% -\contentsline {subsubsection}{Which method has the smallest Root Mean Squared Error?}{161}{section*.14}% -\contentsline {subsection}{\numberline {9.1.2}Robust Performance Measures}{162}{subsection.9.1.2}% -\contentsline {section}{\numberline {9.2}Measures for Variance Estimators}{164}{section.9.2}% -\contentsline {subsection}{\numberline {9.2.1}Calibration}{165}{subsection.9.2.1}% -\contentsline {subsection}{\numberline {9.2.2}Stability}{166}{subsection.9.2.2}% -\contentsline {subsection}{\numberline {9.2.3}Assessing SEs for the Cluster RCT Simulation}{168}{subsection.9.2.3}% -\contentsline {section}{\numberline {9.3}Measures for Confidence Intervals}{169}{section.9.3}% -\contentsline {subsection}{\numberline {9.3.1}Confidence Intervals in the Cluster RCT Simulation}{170}{subsection.9.3.1}% -\contentsline {section}{\numberline {9.4}Measures for Inferential Procedures (Hypothesis Tests)}{171}{section.9.4}% -\contentsline {subsection}{\numberline {9.4.1}Validity}{172}{subsection.9.4.1}% -\contentsline {subsection}{\numberline {9.4.2}Power}{173}{subsection.9.4.2}% -\contentsline {subsection}{\numberline {9.4.3}Rejection Rates}{173}{subsection.9.4.3}% -\contentsline {subsection}{\numberline {9.4.4}Inference in the Cluster RCT Simulation}{174}{subsection.9.4.4}% -\contentsline {section}{\numberline {9.5}Relative or Absolute Measures?}{176}{section.9.5}% -\contentsline {subsection}{\numberline {9.5.1}Performance relative to the target parameter}{176}{subsection.9.5.1}% -\contentsline {subsection}{\numberline {9.5.2}Performance relative to a benchmark estimator}{178}{subsection.9.5.2}% -\contentsline {section}{\numberline {9.6}Estimands Not Represented By a Parameter}{179}{section.9.6}% -\contentsline {section}{\numberline {9.7}Uncertainty in Performance Estimates (the Monte Carlo Standard Error)}{182}{section.9.7}% -\contentsline {subsection}{\numberline {9.7.1}Conventional measures for point estimators}{182}{subsection.9.7.1}% -\contentsline {subsection}{\numberline {9.7.2}MCSEs for robust measures for point estimators}{184}{subsection.9.7.2}% -\contentsline {subsection}{\numberline {9.7.3}MCSE for Confidence Intervals and Hypothesis Tests}{185}{subsection.9.7.3}% -\contentsline {subsection}{\numberline {9.7.4}Using the Jackknife to obtain MCSEs (for relative variance estimators)}{186}{subsection.9.7.4}% -\contentsline {subsection}{\numberline {9.7.5}Bootstrapping MCSEs for relative performance measures}{187}{subsection.9.7.5}% -\contentsline {section}{\numberline {9.8}Performance Calculations with the \texttt {simhelpers} Package}{189}{section.9.8}% -\contentsline {subsection}{\numberline {9.8.1}Quick Performance Calculations for our Cluster RCT Example}{191}{subsection.9.8.1}% -\contentsline {section}{\numberline {9.9}Concluding thoughts}{192}{section.9.9}% -\contentsline {section}{\numberline {9.10}Exercises}{194}{section.9.10}% -\contentsline {subsection}{\numberline {9.10.1}Brown and Forsythe (1974) results}{194}{subsection.9.10.1}% -\contentsline {subsection}{\numberline {9.10.2}Size-adjusted power}{194}{subsection.9.10.2}% -\contentsline {subsection}{\numberline {9.10.3}Three correlation estimators}{195}{subsection.9.10.3}% -\contentsline {subsection}{\numberline {9.10.4}Confidence interval comparison}{196}{subsection.9.10.4}% -\contentsline {subsection}{\numberline {9.10.5}Jackknife calculation of MCSEs for RMSE}{197}{subsection.9.10.5}% -\contentsline {subsection}{\numberline {9.10.6}Jackknife calculation of MCSEs for RMSE ratios}{197}{subsection.9.10.6}% -\contentsline {subsection}{\numberline {9.10.7}Distribution theory for person-level average treatment effects}{197}{subsection.9.10.7}% -\contentsline {part}{III\hspace {1em}Systematic Simulations}{199}{part.3}% -\contentsline {chapter}{\numberline {10}Simulating across multiple scenarios}{201}{chapter.10}% -\contentsline {section}{\numberline {10.1}Simulating across levels of a single factor}{202}{section.10.1}% -\contentsline {subsection}{\numberline {10.1.1}A performance summary function}{205}{subsection.10.1.1}% -\contentsline {subsection}{\numberline {10.1.2}Adding performance calculations to the simulation driver}{206}{subsection.10.1.2}% -\contentsline {section}{\numberline {10.2}Simulating across multiple factors}{208}{section.10.2}% -\contentsline {section}{\numberline {10.3}Using pmap to run multifactor simulations}{210}{section.10.3}% -\contentsline {section}{\numberline {10.4}When to calculate performance metrics}{214}{section.10.4}% -\contentsline {subsection}{\numberline {10.4.1}Aggregate as you simulate (inside)}{214}{subsection.10.4.1}% -\contentsline {subsection}{\numberline {10.4.2}Keep all simulation runs (outside)}{215}{subsection.10.4.2}% -\contentsline {subsection}{\numberline {10.4.3}Getting raw results ready for analysis}{216}{subsection.10.4.3}% -\contentsline {section}{\numberline {10.5}Summary}{218}{section.10.5}% -\contentsline {section}{\numberline {10.6}Exercises}{219}{section.10.6}% -\contentsline {subsection}{\numberline {10.6.1}Extending Brown and Forsythe}{219}{subsection.10.6.1}% -\contentsline {subsection}{\numberline {10.6.2}Comparing the trimmed mean, median and mean}{219}{subsection.10.6.2}% -\contentsline {subsection}{\numberline {10.6.3}Estimating latent correlations}{220}{subsection.10.6.3}% -\contentsline {subsection}{\numberline {10.6.4}Meta-regression}{221}{subsection.10.6.4}% -\contentsline {subsection}{\numberline {10.6.5}Examine a multifactor simulation design}{221}{subsection.10.6.5}% -\contentsline {chapter}{\numberline {11}Designing multifactor simulations}{223}{chapter.11}% -\contentsline {section}{\numberline {11.1}Choosing parameter combinations}{224}{section.11.1}% -\contentsline {section}{\numberline {11.2}Case Study: A multifactor evaluation of cluster RCT estimators}{226}{section.11.2}% -\contentsline {subsection}{\numberline {11.2.1}Choosing parameters for the Clustered RCT}{226}{subsection.11.2.1}% -\contentsline {subsection}{\numberline {11.2.2}Redundant factor combinations}{228}{subsection.11.2.2}% -\contentsline {subsection}{\numberline {11.2.3}Running the simulations}{228}{subsection.11.2.3}% -\contentsline {subsection}{\numberline {11.2.4}Calculating performance metrics}{229}{subsection.11.2.4}% -\contentsline {section}{\numberline {11.3}Conclusions}{231}{section.11.3}% -\contentsline {chapter}{\numberline {12}Exploring and presenting simulation results}{233}{chapter.12}% -\contentsline {section}{\numberline {12.1}Tabulation}{234}{section.12.1}% -\contentsline {subsection}{\numberline {12.1.1}Example: estimators of treatment variation}{236}{subsection.12.1.1}% -\contentsline {section}{\numberline {12.2}Visualization}{237}{section.12.2}% -\contentsline {subsection}{\numberline {12.2.1}Example 0: RMSE in Cluster RCTs}{238}{subsection.12.2.1}% -\contentsline {subsection}{\numberline {12.2.2}Example 1: Biserial correlation estimation}{239}{subsection.12.2.2}% -\contentsline {subsection}{\numberline {12.2.3}Example 2: Variance estimation and Meta-regression}{239}{subsection.12.2.3}% -\contentsline {subsection}{\numberline {12.2.4}Example 3: Heat maps of coverage}{240}{subsection.12.2.4}% -\contentsline {subsection}{\numberline {12.2.5}Example 4: Relative performance of treatment effect estimators}{241}{subsection.12.2.5}% -\contentsline {section}{\numberline {12.3}Modeling}{243}{section.12.3}% -\contentsline {subsection}{\numberline {12.3.1}Example 1: Biserial, revisited}{244}{subsection.12.3.1}% -\contentsline {subsection}{\numberline {12.3.2}Example 2: Comparing methods for cross-classified data}{245}{subsection.12.3.2}% -\contentsline {section}{\numberline {12.4}Reporting}{246}{section.12.4}% -\contentsline {chapter}{\numberline {13}Building good visualizations}{249}{chapter.13}% -\contentsline {section}{\numberline {13.1}Subsetting and Many Small Multiples}{250}{section.13.1}% -\contentsline {section}{\numberline {13.2}Bundling}{253}{section.13.2}% -\contentsline {section}{\numberline {13.3}Aggregation}{256}{section.13.3}% -\contentsline {subsubsection}{\numberline {13.3.0.1}Some notes on how to aggregate}{259}{subsubsection.13.3.0.1}% -\contentsline {section}{\numberline {13.4}Comparing true SEs with standardization}{260}{section.13.4}% -\contentsline {section}{\numberline {13.5}The Bias-SE-RMSE plot}{264}{section.13.5}% -\contentsline {section}{\numberline {13.6}Assessing the quality of the estimated SEs}{266}{section.13.6}% -\contentsline {subsection}{\numberline {13.6.1}Stability of estimated SEs}{268}{subsection.13.6.1}% -\contentsline {section}{\numberline {13.7}Assessing confidence intervals}{270}{section.13.7}% -\contentsline {section}{\numberline {13.8}Conclusions}{272}{section.13.8}% -\contentsline {section}{\numberline {13.9}Exercises}{273}{section.13.9}% -\contentsline {subsection}{\numberline {13.9.1}Checking bias}{274}{subsection.13.9.1}% -\contentsline {subsection}{\numberline {13.9.2}Assessing uncertainty}{274}{subsection.13.9.2}% -\contentsline {subsection}{\numberline {13.9.3}Assessing power}{274}{subsection.13.9.3}% -\contentsline {subsection}{\numberline {13.9.4}Going deeper with coverage}{275}{subsection.13.9.4}% -\contentsline {subsection}{\numberline {13.9.5}Pearson correlations with a bivariate Poisson distribution}{275}{subsection.13.9.5}% -\contentsline {subsection}{\numberline {13.9.6}Making another plot for assessing SEs}{275}{subsection.13.9.6}% -\contentsline {chapter}{\numberline {14}Special Topics on Reporting Simulation Results}{277}{chapter.14}% -\contentsline {section}{\numberline {14.1}Using regression to analyze simulation results}{277}{section.14.1}% -\contentsline {subsection}{\numberline {14.1.1}Example 1: Biserial, revisited}{277}{subsection.14.1.1}% -\contentsline {subsection}{\numberline {14.1.2}Example 2: Cluster RCT example, revisited}{280}{subsection.14.1.2}% -\contentsline {subsubsection}{\numberline {14.1.2.1}Using LASSO to simplify the model}{281}{subsubsection.14.1.2.1}% -\contentsline {section}{\numberline {14.2}Using regression trees to find important factors}{286}{section.14.2}% -\contentsline {section}{\numberline {14.3}Analyzing results with few iterations per scenario}{288}{section.14.3}% -\contentsline {subsection}{\numberline {14.3.1}Example: ClusterRCT with only 25 replicates per scenario}{289}{subsection.14.3.1}% -\contentsline {section}{\numberline {14.4}What to do with warnings in simulations}{294}{section.14.4}% -\contentsline {section}{\numberline {14.5}Conclusions}{295}{section.14.5}% -\contentsline {chapter}{\numberline {15}Case study: Comparing different estimators}{297}{chapter.15}% -\contentsline {section}{\numberline {15.1}Bias-variance tradeoffs}{300}{section.15.1}% -\contentsline {chapter}{\numberline {16}Simulations as evidence}{305}{chapter.16}% -\contentsline {section}{\numberline {16.1}Break symmetries and regularities}{306}{section.16.1}% -\contentsline {section}{\numberline {16.2}Use extensive multi-factor simulations.}{307}{section.16.2}% -\contentsline {section}{\numberline {16.3}Use simulation DGPs from prior literature.}{307}{section.16.3}% -\contentsline {section}{\numberline {16.4}Pick simulation factors based on real data}{307}{section.16.4}% -\contentsline {section}{\numberline {16.5}Resample real data directly to get authentic distributions}{308}{section.16.5}% -\contentsline {section}{\numberline {16.6}Fully calibrated simulations}{308}{section.16.6}% -\contentsline {section}{\numberline {16.7}Generating calibrated data with a copula}{309}{section.16.7}% -\contentsline {subsection}{\numberline {16.7.1}Step 1. Predict the outcome given the covariates}{311}{subsection.16.7.1}% -\contentsline {subsection}{\numberline {16.7.2}Step 2. Tie \(\hat {Y}\) to \(Y\) with a copula}{311}{subsection.16.7.2}% -\contentsline {subsection}{\numberline {16.7.3}Step 3. Get some new Xs}{313}{subsection.16.7.3}% -\contentsline {subsection}{\numberline {16.7.4}Step 4. Generate a predicted \(\hat {Y}_i\) for each \(X_i\) using the machine learner.}{313}{subsection.16.7.4}% -\contentsline {subsection}{\numberline {16.7.5}Step 5. Generate the final, observed, \(Y_i\) using a copula that ties \(\hat {Y}_i\) to \(Y_i\).}{314}{subsection.16.7.5}% -\contentsline {subsection}{\numberline {16.7.6}How did we do?}{315}{subsection.16.7.6}% -\contentsline {subsection}{\numberline {16.7.7}Building a multifactor simulation from our calibrated DGP}{315}{subsection.16.7.7}% -\contentsline {part}{IV\hspace {1em}Computational Considerations}{317}{part.4}% -\contentsline {chapter}{\numberline {17}Organizing a simulation project}{319}{chapter.17}% -\contentsline {section}{\numberline {17.1}Simulation project structure}{319}{section.17.1}% -\contentsline {section}{\numberline {17.2}Well structured code files}{320}{section.17.2}% -\contentsline {subsection}{\numberline {17.2.1}Putting headers in your .R file}{321}{subsection.17.2.1}% -\contentsline {subsection}{\numberline {17.2.2}The source command}{321}{subsection.17.2.2}% -\contentsline {subsection}{\numberline {17.2.3}Storing testing code in your scripts}{323}{subsection.17.2.3}% -\contentsline {section}{\numberline {17.3}Principled directory structures}{324}{section.17.3}% -\contentsline {section}{\numberline {17.4}Saving simulation results}{325}{section.17.4}% -\contentsline {subsection}{\numberline {17.4.1}File formats}{325}{subsection.17.4.1}% -\contentsline {subsection}{\numberline {17.4.2}Saving simulations as you go}{327}{subsection.17.4.2}% -\contentsline {chapter}{\numberline {18}Parallel Processing}{331}{chapter.18}% -\contentsline {section}{\numberline {18.1}Parallel on your computer}{332}{section.18.1}% -\contentsline {section}{\numberline {18.2}Parallel on a virtual machine}{333}{section.18.2}% -\contentsline {section}{\numberline {18.3}Parallel on a cluster}{334}{section.18.3}% -\contentsline {subsection}{\numberline {18.3.1}Command-line interfaces and CMD mode in R}{334}{subsection.18.3.1}% -\contentsline {subsection}{\numberline {18.3.2}Task dispatchers and command line scripts}{336}{subsection.18.3.2}% -\contentsline {subsection}{\numberline {18.3.3}Moving files to and from a cluster}{338}{subsection.18.3.3}% -\contentsline {subsection}{\numberline {18.3.4}Checking on a job}{338}{subsection.18.3.4}% -\contentsline {subsection}{\numberline {18.3.5}Running lots of jobs on a cluster}{339}{subsection.18.3.5}% -\contentsline {subsection}{\numberline {18.3.6}Resources for Harvard's Odyssey}{341}{subsection.18.3.6}% -\contentsline {subsection}{\numberline {18.3.7}Acknowledgements}{341}{subsection.18.3.7}% -\contentsline {chapter}{\numberline {19}Debugging and Testing}{343}{chapter.19}% -\contentsline {section}{\numberline {19.1}Debugging with \texttt {print()}}{343}{section.19.1}% -\contentsline {section}{\numberline {19.2}Debugging with \texttt {browser()}}{344}{section.19.2}% -\contentsline {section}{\numberline {19.3}Debugging with \texttt {debug()}}{345}{section.19.3}% -\contentsline {section}{\numberline {19.4}Protecting functions with \texttt {stopifnot()}}{345}{section.19.4}% -\contentsline {section}{\numberline {19.5}Testing code}{346}{section.19.5}% -\contentsline {part}{V\hspace {1em}Complex Data Structures}{351}{part.5}% -\contentsline {chapter}{\numberline {20}Using simulation as a power calculator}{353}{chapter.20}% -\contentsline {section}{\numberline {20.1}Getting design parameters from pilot data}{354}{section.20.1}% -\contentsline {section}{\numberline {20.2}The data generating process}{355}{section.20.2}% -\contentsline {section}{\numberline {20.3}Running the simulation}{358}{section.20.3}% -\contentsline {section}{\numberline {20.4}Evaluating power}{359}{section.20.4}% -\contentsline {subsection}{\numberline {20.4.1}Checking validity of our models}{359}{subsection.20.4.1}% -\contentsline {subsection}{\numberline {20.4.2}Assessing Precision (SE)}{362}{subsection.20.4.2}% -\contentsline {subsection}{\numberline {20.4.3}Assessing power}{362}{subsection.20.4.3}% -\contentsline {subsection}{\numberline {20.4.4}Assessing Minimum Detectable Effects}{363}{subsection.20.4.4}% -\contentsline {section}{\numberline {20.5}Power for Multilevel Data}{364}{section.20.5}% -\contentsline {chapter}{\numberline {21}Simulation under the Potential Outcomes Framework}{369}{chapter.21}% -\contentsline {section}{\numberline {21.1}Finite vs.~Superpopulation inference}{370}{section.21.1}% -\contentsline {section}{\numberline {21.2}Data generation processes for potential outcomes}{370}{section.21.2}% -\contentsline {section}{\numberline {21.3}Finite sample performance measures}{373}{section.21.3}% -\contentsline {section}{\numberline {21.4}Nested finite simulation procedure}{376}{section.21.4}% -\contentsline {section}{\numberline {21.5}Calibrated simulations within the potential outcomes framework}{379}{section.21.5}% -\contentsline {subsection}{\numberline {21.5.1}Matching-based imputation}{380}{subsection.21.5.1}% -\contentsline {subsection}{\numberline {21.5.2}Model-based imputation}{380}{subsection.21.5.2}% -\contentsline {subsection}{\numberline {21.5.3}Using the imputed data}{381}{subsection.21.5.3}% -\contentsline {chapter}{\numberline {22}The Parametric bootstrap}{383}{chapter.22}% -\contentsline {section}{\numberline {22.1}Air conditioners: a stolen case study}{384}{section.22.1}% -\contentsline {chapter}{\numberline {A}Coding Reference}{387}{appendix.A}% -\contentsline {section}{\numberline {A.1}How to repeat yourself}{387}{section.A.1}% -\contentsline {subsection}{\numberline {A.1.1}Using \texttt {replicate()}}{387}{subsection.A.1.1}% -\contentsline {subsection}{\numberline {A.1.2}Using \texttt {map()}}{388}{subsection.A.1.2}% -\contentsline {subsection}{\numberline {A.1.3}map with no inputs}{390}{subsection.A.1.3}% -\contentsline {subsection}{\numberline {A.1.4}Other approaches for repetition}{390}{subsection.A.1.4}% -\contentsline {section}{\numberline {A.2}Default arguments for functions}{391}{section.A.2}% -\contentsline {section}{\numberline {A.3}Profiling Code}{392}{section.A.3}% -\contentsline {subsection}{\numberline {A.3.1}Using \texttt {Sys.time()} and \texttt {system.time()}}{392}{subsection.A.3.1}% -\contentsline {subsection}{\numberline {A.3.2}The \texttt {tictoc} package}{393}{subsection.A.3.2}% -\contentsline {subsection}{\numberline {A.3.3}The \texttt {bench} package}{393}{subsection.A.3.3}% -\contentsline {subsection}{\numberline {A.3.4}Profiling with \texttt {profvis}}{396}{subsection.A.3.4}% -\contentsline {section}{\numberline {A.4}Optimizing code (and why you often shouldn't)}{396}{section.A.4}% -\contentsline {subsection}{\numberline {A.4.1}Hand-building functions}{397}{subsection.A.4.1}% -\contentsline {subsection}{\numberline {A.4.2}Computational efficiency versus simplicity}{398}{subsection.A.4.2}% -\contentsline {subsection}{\numberline {A.4.3}Reusing code to speed up computation}{399}{subsection.A.4.3}% -\contentsline {chapter}{\numberline {B}Further readings and resources}{405}{appendix.B}% 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/latex/after_body.tex b/latex/after_body.tex new file mode 100644 index 0000000..72a0faa --- /dev/null +++ b/latex/after_body.tex @@ -0,0 +1,2 @@ +\backmatter +\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 88% rename from preamble.tex rename to latex/preamble.tex index 5df9cb1..521eece 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}} @@ -28,3 +34,5 @@ \newcommand{\mat}[1]{\mathbf{#1}} \newcommand{\bs}{\boldsymbol} \newcommand{\trace}{\text{tr}} + +\frontmatter \ No newline at end of file diff --git a/performance-criteria-scraps b/scraps/performance-criteria-scraps.Rmd similarity index 100% rename from performance-criteria-scraps rename to scraps/performance-criteria-scraps.Rmd From 686ae9e2c97966d1d8654df060d1919b862e346a Mon Sep 17 00:00:00 2001 From: jepusto Date: Wed, 18 Mar 2026 11:09:40 -0500 Subject: [PATCH 2/8] Add krantz document class. --- krantz.cls | 2395 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2395 insertions(+) create mode 100644 krantz.cls 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'. From fce68393edf4c7ccde159dea6a034906bae6924e Mon Sep 17 00:00:00 2001 From: jepusto Date: Wed, 18 Mar 2026 11:19:22 -0500 Subject: [PATCH 3/8] Changed date format on title page. --- index.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.Rmd b/index.Rmd index 77f615f..b02dc15 100644 --- a/index.Rmd +++ b/index.Rmd @@ -1,7 +1,7 @@ --- 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 bibliography: From 612a77d4cd1fe158c955a71702ae1bc6b70114a4 Mon Sep 17 00:00:00 2001 From: jepusto Date: Wed, 18 Mar 2026 11:20:36 -0500 Subject: [PATCH 4/8] Use krantz.cls --- _bookdown.yml | 2 +- _output.yml | 22 +++++++++++++++++----- index.Rmd | 1 - 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/_bookdown.yml b/_bookdown.yml index e1bf230..35df6ee 100644 --- a/_bookdown.yml +++ b/_bookdown.yml @@ -1,7 +1,7 @@ book_filename: "Designing-Simulations-in-R" +output_dir: "_book" delete_merged_file: true language: ui: chapter_name: "Chapter " new_session: no -output_dir: "_book" diff --git a/_output.yml b/_output.yml index c4760a2..46df6ef 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,20 @@ 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 + dev: "cairo_pdf" + latex_engine: xelatex citation_package: natbib - keep_tex: yes -bookdown::epub_book: default + template: null + documentclass: krantz + biblio-style: apalike + pandoc_args: --top-level-division=chapter + toc_depth: 3 + toc_unnumbered: false + toc_appendix: true + quote_footer: ["\\VA{", "}{}"] + highlight_bw: true +bookdown::epub_book: + stylesheet: css/style.css diff --git a/index.Rmd b/index.Rmd index b02dc15..e871aa0 100644 --- a/index.Rmd +++ b/index.Rmd @@ -3,7 +3,6 @@ title: "Designing Monte Carlo Simulations in R" author: "Luke W. Miratrix and James E. Pustejovsky\n(Equal authors)" date: "`r format(Sys.Date(), '%B %d, %Y')`" site: bookdown::bookdown_site -documentclass: book bibliography: - book.bib - packages.bib From 77e33f884f14d198e71738ca828d9094c1af150c Mon Sep 17 00:00:00 2001 From: jepusto Date: Wed, 18 Mar 2026 14:24:34 -0500 Subject: [PATCH 5/8] Setting up Krantz class for pdf output. --- 040-Performance-criteria.Rmd | 4 ++-- _bookdown.yml | 2 +- _output.yml | 7 ++----- index.Rmd | 2 ++ latex/after_body.tex | 1 - latex/preamble.tex | 2 -- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/040-Performance-criteria.Rmd b/040-Performance-criteria.Rmd index a2ab46d..908c479 100644 --- a/040-Performance-criteria.Rmd +++ b/040-Performance-criteria.Rmd @@ -455,7 +455,7 @@ $$ \begin{aligned} \widehat{\text{Relative Bias}}(V) &= \frac{\bar{V}}{S_T^2} . \\ \end{aligned} -(\#eq:relative-bias-SE-RMSE-estimators) +(\#eq:relative-bias-variance-estimators) $$ If we then take the square root of our estimate, we can obtain the estimated relative bias of the standard error. @@ -490,7 +490,7 @@ $$ \widehat{\text{Relative Var}}(V) &= \frac{S^2_V}{S_T^2} \\ \widehat{\text{Relative MSE}}(V) &= \frac{\frac{1}{R}\sum_{r=1}^R\left(V_r - S_T^2\right)^2}{S_T^2}. \end{aligned} -(\#eq:relative-bias-SE-RMSE-estimators) +(\#eq:relative-bias-MSE-estimators) $$ where the sample variance of $V$ is $$ diff --git a/_bookdown.yml b/_bookdown.yml index 35df6ee..e1bf230 100644 --- a/_bookdown.yml +++ b/_bookdown.yml @@ -1,7 +1,7 @@ book_filename: "Designing-Simulations-in-R" -output_dir: "_book" delete_merged_file: true language: ui: chapter_name: "Chapter " new_session: no +output_dir: "_book" diff --git a/_output.yml b/_output.yml index 46df6ef..9f32d6c 100644 --- a/_output.yml +++ b/_output.yml @@ -23,17 +23,14 @@ bookdown::pdf_book: in_header: latex/preamble.tex after_body: latex/after_body.tex keep_tex: true - dev: "cairo_pdf" - latex_engine: xelatex citation_package: natbib - template: null - documentclass: krantz biblio-style: apalike + dev: "cairo_pdf" + latex_engine: xelatex pandoc_args: --top-level-division=chapter toc_depth: 3 toc_unnumbered: false toc_appendix: true - quote_footer: ["\\VA{", "}{}"] highlight_bw: true bookdown::epub_book: stylesheet: css/style.css diff --git a/index.Rmd b/index.Rmd index e871aa0..ad535fc 100644 --- a/index.Rmd +++ b/index.Rmd @@ -3,6 +3,8 @@ title: "Designing Monte Carlo Simulations in R" author: "Luke W. Miratrix and James E. Pustejovsky\n(Equal authors)" date: "`r format(Sys.Date(), '%B %d, %Y')`" site: bookdown::bookdown_site +documentclass: krantz +classoption: krantz1 bibliography: - book.bib - packages.bib diff --git a/latex/after_body.tex b/latex/after_body.tex index 72a0faa..2aabf99 100644 --- a/latex/after_body.tex +++ b/latex/after_body.tex @@ -1,2 +1 @@ -\backmatter \printindex diff --git a/latex/preamble.tex b/latex/preamble.tex index 521eece..424cb70 100644 --- a/latex/preamble.tex +++ b/latex/preamble.tex @@ -34,5 +34,3 @@ \newcommand{\mat}[1]{\mathbf{#1}} \newcommand{\bs}{\boldsymbol} \newcommand{\trace}{\text{tr}} - -\frontmatter \ No newline at end of file From 1f967aa6da99e916e2e3a5ab0fab0fbab4ca2c28 Mon Sep 17 00:00:00 2001 From: jepusto Date: Wed, 18 Mar 2026 17:53:30 -0500 Subject: [PATCH 6/8] Fixed broken cross-refs. --- 035-running-simulation.Rmd | 2 +- 120-parallel-processing.Rmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/035-running-simulation.Rmd b/035-running-simulation.Rmd index 082d2bd..2e1566a 100644 --- a/035-running-simulation.Rmd +++ b/035-running-simulation.Rmd @@ -402,7 +402,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. +In 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. ### Compare sampling distributions of Pearson's correlation coefficients {#Pearson-sampling-distributions} diff --git a/120-parallel-processing.Rmd b/120-parallel-processing.Rmd index cfc2caa..74e9219 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 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. From 4ff9a67c810eaccbfbdf37190fa6fa982431deb4 Mon Sep 17 00:00:00 2001 From: jepusto Date: Sat, 28 Mar 2026 15:31:02 -0500 Subject: [PATCH 7/8] Whooops forgot to save before committing. --- 035-running-simulation.Rmd | 4 ---- 1 file changed, 4 deletions(-) diff --git a/035-running-simulation.Rmd b/035-running-simulation.Rmd index cabb3e7..62dbf04 100644 --- a/035-running-simulation.Rmd +++ b/035-running-simulation.Rmd @@ -405,11 +405,7 @@ With the tools of this chapter in place, we are now positioned to move from runn ### Welch simulations {#Welch-simulation} -<<<<<<< HEAD -In 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. -======= 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)} ->>>>>>> main ### Compare sampling distributions of Pearson's correlation coefficients {#Pearson-sampling-distributions} From d619d92daf94dc0e139b05c86b3b596bd3161753 Mon Sep 17 00:00:00 2001 From: jepusto Date: Sat, 28 Mar 2026 16:53:54 -0500 Subject: [PATCH 8/8] Fixed cross-references. --- 035-running-simulation.Rmd | 2 +- 080-simulations-as-evidence.Rmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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.