1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 % customization for the ALICE Technical Design and Physics Performance Reports
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 \def\filedate{1998/07/31}
8 \def\docdate{1994/01/10}
9 \NeedsTeXFormat{LaTeX2e}
10 \ProvidesClass{alicetdr}[\filedate]
11 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
12 \PassOptionsToClass{a4paper,twoside,11pt}{report}
15 \RequirePackage{graphicx}
16 \RequirePackage{pifont}
17 \RequirePackage{array,tabularx}
18 \RequirePackage{verbatim}
19 \RequirePackage{graphicx,epsfig}
20 \RequirePackage{varioref}
21 \RequirePackage{subfigure}
22 \RequirePackage{amsmath,amssymb}
24 %\RequirePackage{bibunits}
26 \RequirePackage{xspace}
27 \RequirePackage{calc,ifthen}
28 \RequirePackage{makeidx}
29 \RequirePackage{rotating}
30 %\RequirePackage{mathptm}
31 \RequirePackage{multirow}
32 \RequirePackage{pstricks,pst-plot}
33 \renewcommand{\rmdefault}{ptm}
35 %%% Comment next lines to get black on white %%%
37 %\renewcommand{\ref}[1]{{\red\oldref{#1}}}
40 % typeset caption contents in small
41 \long\def\@makecaption#1#2{%
43 \setbox\@tempboxa\hbox{{\sl\bf #1:} {\small\rm #2}}%
44 \ifdim \wd\@tempboxa >\hsize
45 {\sl\bf #1:} {\small\rm #2}\par
47 \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
50 \setcounter{dbltopnumber}{3}
51 \renewcommand{\dbltopfraction}{.9}
52 \renewcommand{\dblfloatpagefraction}{.85}
54 \def\@makechapterhead#1{%
56 \noindent\begin{minipage}{\textwidth}%
58 \huge\bf \thechapter\quad #1\par
60 \rule{\textwidth}{0.8pt}%
66 \def\@makeschapterhead#1{%
68 \noindent\begin{minipage}{\textwidth}%
72 \rule{\textwidth}{0.8pt}%
78 \def\chapter{\thispagestyle{plain}\secdef\@chapter\@schapter}
80 \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
81 \refstepcounter{chapter}%
82 \typeout{\@chapapp\space\thechapter.}%
83 \addcontentsline{toc}{chapter}{\protect
84 \numberline{\thechapter}#1}\else
85 \addcontentsline{toc}{chapter}{#1}\fi
88 {\protect\addvspace{10\p@}}
90 {\protect\addvspace{10\p@}}
94 \def\Chapter#1{\addcontentsline{toc}{chapter}{#1}%
95 \markboth{}{}\noindent
96 \begin{minipage}{\textwidth}%
100 \rule{\textwidth}{0.8pt}%
103 \thispagestyle{plain}%
106 \def\@schapter#1{\@makeschapterhead{#1}}
108 \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus-1ex minus
109 -.2ex}{2.3ex plus.2ex}{\reset@font\Large\raggedright\bf}}
110 \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus-1ex
111 minus-.2ex}{1.5ex plus.2ex}{\reset@font\large\raggedright\bf}}
112 \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
113 -1ex minus-.2ex}{1.5ex plus.2ex}{\reset@font\normalsize
115 \def\paragraph{\@startsection
116 {paragraph}{4}{\z@}{3.25ex plus1ex minus.2ex}{-1em}{\reset@font
118 \def\subparagraph{\@startsection
119 {subparagraph}{4}{\parindent}{3.25ex plus1ex minus
120 .2ex}{-1em}{\reset@font\normalsize\bf}}
122 \setcounter{secnumdepth}{3}
123 % allows 3 levels of sections, e.g. '5.3.2 The Blablabla'
124 % sequence: \section \subsection \subsubsection \paragraph
126 \def\ps@headings{\let\@mkboth\markboth
127 \def\@oddfoot{}\def\@evenfoot{}% No feet.
128 \def\@evenhead{\upshape\thepage\hfil \itshape\leftmark}% Left heading.
129 \def\@oddhead{{\itshape\rightmark}\hfil \upshape\thepage}% Right heading.
130 \def\chaptermark##1{\markboth {%\uppercase
132 \thechapter\hskip 1em\relax ##1}}{}}%
133 \def\sectionmark##1{\markright {%
134 \thesection\hskip 1em\relax ##1}}}
135 \def\ps@plain{\let\@mkboth\markboth
136 \def\@oddfoot{}\def\@evenfoot{}% No feet.
137 \def\@evenhead{\upshape\thepage\hfill}% Left heading.
138 \def\@oddhead{\hfill \upshape\thepage}% Right heading.
139 \def\chaptermark##1{\markboth {%\uppercase
141 % \thechapter\hskip 1em\relax ##1}}{}}%
142 \thechapter\relax ##1}}{}}%
143 \def\sectionmark##1{\markright {%
144 % \thesection\hskip 1em\relax ##1}}}
145 \thesection\relax ##1}}}
147 \pagenumbering{arabic}
149 \setlength{\voffset}{-15mm}
150 \setlength{\oddsidemargin}{15pt} %%%%
151 \setlength{\evensidemargin}{15pt} %%%%
152 \setlength{\textwidth}{160mm}
153 \setlength{\textheight}{240mm}
155 \def\bibname{References}
156 \def\thebibliography#1{\par\list
157 {\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}%
158 \leftmargin\labelwidth
159 \advance\leftmargin\labelsep
162 \def\theenumiv{\arabic{enumiv}}}%
163 \def\newblock{\hskip .11em plus.33em minus.07em}%
164 \sloppy\clubpenalty4000\widowpenalty4000
165 \sfcode`\.=1000\relax}
168 \renewcommand*\l@chapter[2]{%
169 %mg\addpenalty{-\@highpenalty}%
170 \vskip 1.0em \@plus\p@
171 \setlength\@tempdima{1.5em}%
173 \parindent \z@ \rightskip \@pnumwidth
174 \parfillskip -\@pnumwidth
175 \leavevmode \bfseries
176 \advance\leftskip\@tempdima
178 #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
179 \penalty\@highpenalty
183 % adjust indent for table of content
184 \renewcommand{\l@section}{\@dottedtocline{1}{0.6em}{2.9em}}
185 \renewcommand{\l@subsection}{\@dottedtocline{2}{1.2em}{3.8em}}
186 \renewcommand{\l@subsubsection}{\@dottedtocline{3}{2.5em}{4.0em}}
187 \renewcommand{\l@paragraph}{\@dottedtocline{4}{3.5em}{4.5em}}
188 \renewcommand{\l@subparagraph}{\@dottedtocline{5}{4.5em}{5.0em}}
190 % adjust spacing between rows in tables
191 \renewcommand{\arraystretch}{1.05}
193 %\def\tableofcontents{%
194 %\chapter*{Table of Contents}\pagestyle{empty}\@starttoc{toc}}