1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2% arabrep.cls 3% ArabTeX extension 4% Arabic version of report.cls 5% for use with ArabTeX Version 3.08 - 3.10 6% 7% Copyright (C) 1997 - 2003 by Klaus Lagally 8% 16.05.1997 9% 21.03.1999 10% 26.04.2003 11% 12% reusing report.cls (and book.cls) of 19 Jun 1995 13% reusing report.cls (and book.cls) of 26 May 1996 14% patches for pagenumbering 25 March 1999 15% 15.07.1999 16% 21.04.2000 % new font handling 17% 14.09.2001 % RTL footnotes, chapter names etc. 18%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 19 20\NeedsTeXFormat {LaTeX2e}[1996/06/01] 21\ProvidesClass {arabrep}[2003/04/26 v3.11 arabic report format] 22 23\newif\if@mainmatter \@mainmattertrue 24\newif\ifa@book \a@bookfalse 25\newif\ifa@article \a@articlefalse 26\DeclareOption {book}{\a@booktrue \@mainmattertrue } 27\DeclareOption {article}{\a@articletrue \@mainmattertrue } 28\DeclareOption* {\PassOptionsToClass {\CurrentOption}{report}} 29\ProcessOptions 30\LoadClass {report}[1996/05/26] % load the LaTeX standard class 31 32\ifa@book \@openrighttrue \fi 33%\input{bk1\@ptsize.clo} % collision on \small !! 34 35\ifa@article \@titlepagefalse \fi 36 37%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 38 39%\RequirePackage {arabtex}[1997/05/08] % load the ArabTeX processor 40\RequirePackage {arabtex}[2003/04/26] % load the ArabTeX processor 41 42\UsePackage {altxext} % load local patches for LaTeX 43 44% **************************************** 45% * PAGE STYLES * 46% **************************************** 47 48\if@twoside % If two-sided printing. 49 \def \ps@headings {% for arabic mode 50 \let \@mkboth \markboth \def\@oddfoot{}\def\@evenfoot{}% 51 \def \@evenhead {\edef \thep@ge {\nxp\RL{\thepage }}% left heading 52 \a@normalfont \leftmark \hfil \thep@ge }% 53 \def \@oddhead {\edef \thep@ge {\nxp\RL{\thepage }}% right heading 54 \a@normalfont \thep@ge \hfil \rightmark }% 55 \def \chaptermark ##1{\markboth {##1% 56 \ifnum \c@secnumdepth >\m@ne 57 \if@mainmatter 58 \hskip 1em\relax \RL{\@chapapp \space \thechapter. }% 59 \fi\fi }{}}% 60 \def \sectionmark ##1{\markleft {##1\ifnum \c@secnumdepth >\@ne 61 \hskip 1em\relax \RL{\thesection }\fi }}% 62 \ifa@article 63 \def \subsectionmark ##1{\markleft {##1\ifnum \c@secnumdepth >\@ne 64 \hskip 1em\relax \RL{\thesubsection }\fi }}% 65 \fi } 66\else % If one-sided printing. 67 \def \ps@headings {% for arabic mode 68 \let \@mkboth \markboth \def \@oddfoot{}\def \@evenfoot{}% 69 \def \@oddhead {\edef \thep@ge {\nxp\RL{\thepage }}% right heading 70 \a@normalfont \thep@ge \hfil \rightmark }% 71 \def \chaptermark ##1{\markright {##1% 72 \ifnum \c@secnumdepth >\m@ne 73 \if@mainmatter 74 \hskip 1em\relax \RL{\@chapapp\space \thechapter. }% 75 \fi\fi }}} 76\fi 77 78\def \ps@plain {% for arabic mode 79 \let \@mkboth\@gobbletwo \let\@oddhead\@empty \let\@evenhead\@empty 80 \def \@oddfoot {\edef \thep@ge {\nxp\RL{\thepage }}% right heading 81 \a@normalfont \hfil \thep@ge \hfil }% 82 \let \@evenfoot\@oddfoot } 83 84\def \ps@myheadings {% for arabic mode 85 \let\@oddfoot \@empty \let\@evenfoot \@empty 86 \def \@oddhead {\edef \thep@ge {\nxp\RL{\thepage }}% right heading 87 \a@normalfont \thep@ge \hfil \rightmark }% 88 \def \@evenhead {\edef \thep@ge {\nxp\RL{\thepage }}% left heading 89 \a@normalfont \leftmark \hfil \thep@ge }% 90 \let\@mkboth\@gobbletwo \let\subsectionmark\@gobble 91 \let\chaptermark\@gobble \let\sectionmark\@gobble } 92 93% **************************************** 94% * TITLE AND ABSTRACT * 95% **************************************** 96 97\iffalse %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%% 98 99\if@titlepage 100 \newcommand\maketitle{\begin{titlepage}% 101 \let\footnotesize\small 102 \let\footnoterule\relax 103 \null\vfil 104 \vskip 60\p@ 105 \begin{center}% 106 {\LARGE \@title \par}% 107 \vskip 3em% 108 {\large 109 \lineskip .75em% 110 \begin{tabular}[t]{c}% 111 \@author 112 \end{tabular}\par}% 113 \vskip 1.5em% 114 {\large \@date \par}% % Set date in \large size. 115 \end{center}\par 116 \@thanks 117 \vfil\null 118 \end{titlepage}% 119 \setcounter{footnote}{0}% 120 \let\thanks\relax\let\maketitle\relax 121 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}} 122\else 123 \newcommand\maketitle{\par 124 \begingroup 125 \renewcommand\thefootnote{\@fnsymbol\c@footnote}% 126 \def\@makefnmark{\hb@xt@\z@{$\m@th^{\@thefnmark}$\hss}}% 127 \long\def\@makefntext##1{\parindent 1em\noindent 128 \hb@xt@1.8em{\hss\@makefnmark}##1}% 129 \if@twocolumn 130 \ifnum \col@number=\@ne 131 \@maketitle 132 \else 133 \twocolumn[\@maketitle]% 134 \fi 135 \else 136 \newpage 137 \global\@topnum\z@ % Prevents figures from going at top of page. 138 \@maketitle 139 \fi 140 \thispagestyle{plain}\@thanks 141 \endgroup 142 \setcounter{footnote}{0}% 143 \let\thanks\relax 144 \let\maketitle\relax\let\@maketitle\relax 145 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}} 146 147 \def\@maketitle{% 148 \newpage 149 \null 150 \vskip 2em% 151 \begin{center}% 152 {\LARGE \@title \par}% 153 \vskip 1.5em% 154 {\large 155 \lineskip .5em% 156 \begin{tabular}[t]{c}% 157 \@author 158 \end{tabular}\par}% 159 \vskip 1em% 160 {\large \@date}% 161 \end{center}% 162 \par 163 \vskip 1.5em} 164\fi 165 166\else %============= arabart.cls ================================== 167\fi %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 168 169% **************************************** 170% * UNITS * 171% **************************************** 172 173\ifa@book 174\newcommand\frontmatter 175 {\cleardoublepage \@mainmatterfalse \pagenumbering{Abjad}} 176% {\cleardoublepage \@mainmatterfalse \pagenumbering{Abj}} 177\newcommand\mainmatter 178 {\cleardoublepage \@mainmattertrue \pagenumbering{arabic}} 179% {\cleardoublepage \@mainmattertrue \pagenumbering{arab}} 180\newcommand\backmatter 181 {\if@openright \cleardoublepage \else \clearpage 182 \fi \@mainmatterfalse } 183\fi 184 185\ifa@article 186\renewcommand\thesection {\@arabic\c@section} 187\fi 188 189%\allowarab \@chapapp 190 191% **************************************** 192% * PARTS * 193% **************************************** 194 195\renewcommand \thepart {\@arabic\c@part } 196 197\def \a@c@part {\a@@par 198\ifa@article \addvspace{4ex}\@afterindentfalse 199\else \cleardoublepage \thispagestyle{plain}% 200 \if@twocolumn \onecolumn \@tempswatrue 201 \else \@tempswafalse 202 \fi 203 \hbox{}\vfil 204\fi \secdef \a@part \a@spart } 205 206\ifa@article 207 208\def \a@part [#1]#2{% numbered part 209\ifnum \c@secnumdepth > \m@ne 210 \refstepcounter {part}% 211 \addcontentsline {toc}{part}{\protect\RL 212 {\protect\abjad {\thepart}\hspace {1em} #1 }}% 213\else \addcontentsline {toc}{part}{\protect\RL {#1}}% 214\fi 215\begingroup \let \end \a@@par \a@parindent \z@ \a@@raggedright 216 \a@normalfont \bfseries \interlinepenalty \@M 217\ifnum \c@secnumdepth >\m@ne 218 \Large \set@arabfont 219 \test@token \partname \abjad{\thepart } \end \nobreak 220\fi 221 \huge \set@arabfont \test@token #2 \end 222 \markboth {}{} 223\endgroup 224\nobreak \vskip 3ex 225\a@afterheading \test@token } 226 227\def \a@spart #1{% unnumbered part 228\begingroup \let \end \a@@par \a@@raggedright \a@parindent \z@ 229 \interlinepenalty \@M 230 \a@normalfont \huge \bffamily \set@arabfont \test@token #1 \end 231\endgroup 232\nobreak \vskip 3ex 233\a@afterheading \test@token } 234 235\else % report or book 236 237\def \a@part [#1]#2{% numbered part 238 \ifnum \c@secnumdepth > \ifa@article \m@ne \else -2 \fi 239 \refstepcounter {part}% 240 \addcontentsline {toc}{part}{\protect\RL 241 {\protect\abjad {\thepart}\hspace {1em} #1 }}% 242 \else \addcontentsline {toc}{part}{\protect\RL {#1}}% 243 \fi 244 \markboth{}{} 245\begingroup \let \end \a@@par \a@@centering \interlinepenalty \@M 246 \a@normalfont \bfseries 247 \ifnum \c@secnumdepth > -2\relax 248 \huge \set@arabfont 249 \test@token \partname \abjad{\thepart } \end 250 \vskip 20\p@ 251 \fi 252 \Huge \set@arabfont \test@token #2 \end 253\endgroup 254\@endpart \test@token } 255 256\def \a@spart #1{% unnumbered part 257\begingroup \let \end \a@@par \a@@centering \interlinepenalty \@M 258 \a@normalfont \Huge \bfseries \set@arabfont \test@token #1 \end 259\endgroup 260\@endpart \test@token } 261 262\fi % article, report or book 263 264\def\@part[#1]#2{% \part outside Arabic text 265\begin{arabtext} 266\a@part[\LR{#1}]{\LR{#2}} 267\end{arabtext}} 268 269\def\@spart#1{% \part* outside Arabic text 270\begin{arabtext} 271\a@spart {\LR{#1}} 272\end{arabtext}} 273 274% **************************************** 275% * CHAPTERS * 276% **************************************** 277 278 279\ifa@article \else % report or book 280\allowarab \thechapter 281 282\newcommand \a@c@chapter {\a@@par 283 \if@openright \cleardoublepage \else \clearpage \fi 284 \thispagestyle {plain}% 285 \global\@topnum \z@ \@afterindentfalse 286 \secdef \a@chapter \a@schapter } 287 288\def \a@chapter [#1]#2{% numbered chapter 289 \ifnum \c@secnumdepth >\m@ne 290 \if@mainmatter 291 \refstepcounter {chapter}% 292 \typeout {\@chapapp \space \thechapter.}% 293 \addcontentsline {toc}{chapter}% 294 {\protect\numberline {\thechapter }\protect\RL {#1}}% 295 \else \addcontentsline {toc}{chapter}{\protect\RL {#1}}% 296 \fi 297 \else \addcontentsline {toc}{chapter}{\protect\RL {#1}}% 298 \fi 299\chaptermark{\RL {#1}}% 300\addtocontents {lof}{\protect\addvspace {10\p@}}% 301\addtocontents {lot}{\protect\addvspace {10\p@}}% 302 \if@twocolumn \@topnewpage [\a@makechapterhead {#2}]% 303 \else \a@makechapterhead {#2}\a@afterheading 304 \fi 305\tracingmacros 0 306\test@token } 307 308\def\a@makechapterhead #1{% make heading with number 309 \null \vskip 50\p@ 310\begingroup \let \end \a@@par \a@@raggedright \interlinepenalty\@M 311 \a@normalfont \bfseries 312 \ifnum \c@secnumdepth >\m@ne 313 \if@mainmatter 314 \edef \thechapter {\@chapapp \space \thechapter . }% 315 \huge \set@arabfont \test@token {\thechapter } \end 316 \nobreak \vskip 20\p@ 317 \fi\fi 318 \Huge \set@arabfont \test@token #1 \end 319 \nobreak \vskip 40\p@ 320\endgroup } 321 322\def\a@schapter #1{% unnumbered chapter 323 \if@twocolumn \@topnewpage [\a@makeschapterhead {#1}]% 324 \else \a@makeschapterhead {#1}\a@afterheading 325 \fi 326\test@token } 327 328\def\a@makeschapterhead #1{% 329\null \vskip 50\p@ 330\begingroup \let \end \a@@par \a@@raggedright \interlinepenalty\@M 331 \a@normalfont \Huge \bfseries \set@arabfont \test@token #1 \end 332\endgroup 333\nobreak \vskip 40\p@ } 334 335\fi % report or book 336 337%********************************************************************* 338%********************************************************************* 339%************************* rest not yet adapted ********************** 340%********************************************************************* 341%********************************************************************* 342 343% **************************************** 344% * SECTIONS * 345% **************************************** 346 347\def \a@c@section {\a@startsection 348{section}{1}{\z@}{-3.5ex plus-1ex minus -.2ex}{2.3ex plus.2ex}% 349%{\reset@font \Large\setnashbf }} 350{\a@normalfont \Large \bfseries }} 351 352\def \a@c@subsection {\a@startsection 353{subsection}{2}{\z@}{-3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}% 354{\a@normalfont \large \bfseries }} 355 356\def \a@c@subsubsection {\a@startsection 357{subsubsection}{3}{\z@}{-3.25ex plus -1ex minus-.2ex}{1.5ex plus.2ex}% 358{\a@normalfont \normalsize \bfseries }} 359 360\def \a@c@paragraph {\a@startsection 361{paragraph}{4}{\z@}{3.25ex plus1ex minus.2ex}{-1em}% 362{\a@normalfont \normalsize \bfseries }} 363 364\def\a@c@subparagraph {\a@startsection 365{subparagraph}{5}{\parindent}{3.25ex plus1ex minus .2ex}{-1em}% 366{\a@normalfont \normalsize \bfseries }} 367 368% **************************************** 369% * LISTS * 370% **************************************** 371 372\at@arabtext {% switch to Arabic terms 373 \def\theenumii{\arabic{enumii}} 374 \def\theenumiii{\arabic{enumiii}} 375 \def\theenumiv{\arabic{enumiv}} 376% 377 \def\labelenumi{\theenumi\space-} 378 \def\labelenumii{\abj@d{\theenumii}-} 379 \def\labelenumiii{\theenumiii\nospace(} 380 \def\labelenumiv{\abj@d{\theenumiv}\nospace)} 381% 382 \def\labelitemi{$\circ$} 383 \def\labelitemii{$-$} 384 \def\labelitemiii{$\star$} 385 \def\labelitemiv{$+$} 386} 387 388% **************************************** 389% * OTHER ENVIRONMENTS * 390% **************************************** 391 392% DESCRIPTION 393 394\def \descriptionlabel #1{\setnashbf \RL{#1}\hskip \labelsep } 395\def \descriptionlabel #1{\bfseries \RL{#1}\hskip \labelsep } 396 397% THEOREM 398%%%%%%%%%%%%% NOT IMPLEMENTED 399 400% EQUATION and EQNARRAY 401%%%%%%%%%%%%% NOT IMPLEMENTED 402 403% TITLEPAGE 404%%%%%%%%%%%%% NOT IMPLEMENTED 405 406% TABBING 407%%%%%%%%%%%%% NOT IMPLEMENTED 408 409% MINIPAGE 410%%%%%%%%%%%%% NOT IMPLEMENTED 411 412% FRAMEBOX 413%%%%%%%%%%%%% NOT IMPLEMENTED 414 415% **************************************** 416% * ABSTRACT * 417% **************************************** 418 419\iffalse %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%% 420 421\ifa@book 422\else 423\if@titlepage 424 \newenvironment{abstract}{% 425 \titlepage 426 \null\vfil 427 \begin{center}% 428 \bfseries \abstractname 429 \@endparpenalty\@M 430 \end{center}}% 431 {\par\vfil\null\endtitlepage} 432\else 433 \newenvironment{abstract}{% 434 \if@twocolumn 435 \section*{\abstractname}% 436 \else 437 \small 438 \begin{center}% 439 {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% 440 \end{center}% 441 \quotation 442 \fi} 443 {\if@twocolumn\else\endquotation\fi} 444\fi 445\fi 446 447\else %============= arabart.cls ================================== 448 449\ifa@book 450\else 451\if@titlepage 452\iffalse 453\newenvironment{abstract}{% 454 \titlepage 455 \null\vfil 456 \begin{center}% 457 \bfseries \abstractname 458 \@endparpenalty\@M 459 \end{center}}% 460 {\par\vfil\null\endtitlepage} 461\fi 462\else 463 464\def \a@c@abstract{% 465\if@twocolumn \def \next 466 {\a@c@section*{\abstractname}}% 467\else \def \next 468 {\small 469 \begingroup \center 470% \setnashbf \abstractname 471 \a@normalfont \bfseries \abstractname 472 \vspace{-.5em}\vspace{\z@}% 473 \endcenter \endgroup 474 \a@c@quotation }% 475\fi 476 \def \endabstract 477 {\if@twocolumn\else\endquotation\fi}% 478\next } 479 480\fi 481\fi 482 483\fi %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 484 485% **************************************** 486% * OTHER ENVIRONMENTS * 487% **************************************** 488 489\iffalse %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%% 490 491\newenvironment{verse} 492 {\let\\=\@centercr 493 \list{}{\itemsep \z@ 494 \itemindent -1.5em% 495 \listparindent\itemindent 496 \rightmargin \leftmargin 497 \advance\leftmargin 1.5em}% 498 \item[]} 499 {\endlist} 500 501\newenvironment{quotation} 502 {\list{}{\listparindent 1.5em% 503 \itemindent \listparindent 504 \rightmargin \leftmargin 505 \parsep \z@ \@plus\p@}% 506 \item[]} 507 {\endlist} 508 509\newenvironment{quote} 510 {\list{}{\rightmargin\leftmargin}% 511 \item[]} 512 {\endlist} 513 514\else %============= arabart.cls ================================== 515 516\def \a@c@verse {% 517%\tracingmacros 1 518\let \endverse \a@@endtrivlist 519\a@@list{}{\itemsep\z@ \itemindent -1.5em \listparindent \itemindent 520 \rightmargin\leftmargin \advance\leftmargin 1.5em}\a@@item[]} 521 522\def \a@c@quotation {% 523%\tracingmacros 1 524\a@@list{}{\listparindent 1.5em \itemindent\listparindent 525 \rightmargin\leftmargin \parsep \z@ plus\p@}\a@@item[]} 526 527\def \a@c@quote {% 528%\tracingmacros 1 529\let \endquote \a@@endtrivlist 530\a@@list{}{\rightmargin\leftmargin}\a@@item[]} 531 532\fi %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 533 534% **************************************** 535% * TITLE PAGE * 536% **************************************** 537 538\iffalse %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%% 539 540\newenvironment{titlepage} 541{% \titlepage 542 \ifa@book 543 \cleardoublepage 544 \fi 545 \if@twocolumn 546 \@restonecoltrue\onecolumn 547 \else 548 \@restonecolfalse\newpage 549 \fi 550 \thispagestyle{empty}% 551 \if@compatibility 552 \setcounter{page}{0} 553 \else 554 \ifa@book \else 555 \setcounter{page}{1}% 556 \fi 557 \fi }% 558{% \endtitlepage 559 \if@restonecol\twocolumn \else \newpage \fi 560 \ifa@book \else 561 \setcounter{page}{1}% 562 \fi } 563 564\else %============= arabart.cls ================================== 565\fi %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 566 567% **************************************** 568% * APPENDIX * 569% **************************************** 570 571\def\a@c@appendix{%\par 572 \setcounter{section}{0}% 573 \renewcommand\@chapapp {\appendixname }% 574\ifa@article \renewcommand\thesection {\@Abjad \c@section }% 575 \setcounter{subsection}{0}% 576\else \renewcommand\thechapter {\@Abjad \c@chapter }% 577 \setcounter{chapter}{0}% 578\fi \test@token } 579 580% **************************************** 581% * FIGURES AND TABLES * 582% **************************************** 583 584\ifa@article 585 \renewcommand\theequation{\@arabic\c@equation} 586 \renewcommand\thefigure{\@arabic\c@figure} 587 \renewcommand\thetable{\@arabic\c@table} 588\fi 589 590\def\fnum@figure {\figurename \space \thefigure } 591 592\def\fnum@table {\tablename \space \thetable } 593 594\long\def \a@makecaption #1#2{% 595 \vskip\abovecaptionskip 596 \sbox\@tempboxa{#2 : #1}% 597 \ifdim \wd\@tempboxa >\hsize 598 #2 : #1\par 599 \else 600 \global \@minipagefalse 601 \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% 602 \fi 603 \vskip\belowcaptionskip } 604 605\let \@makecaption \a@makecaption 606 607\long\def \a@caption #1[#2]#3{\par 608 \addcontentsline {\csname ext@#1\endcsname}{#1} 609 {\protect\numberline {\csname the#1\endcsname}\protect #2}% 610\begingroup \@parboxrestore \normalsize 611 \edef \reserved@a {\csname fnum@#1\endcsname }% 612 \@makecaption {\xpa \RL \xpa {\reserved@a }}{#3}\par 613\endgroup} 614 615\let \@caption \a@caption 616 617\long\def \a@@caption #1[#2]#3{\par 618 \addcontentsline {\csname ext@#1\endcsname}{#1} 619 {\protect\numberline {\csname the#1\endcsname}\protect\RL {#2}}% 620\begingroup \@parboxrestore \normalsize 621 \edef \reserved@a {\csname fnum@#1\endcsname }% 622 \@makecaption {\xpa \RL \xpa {\reserved@a }}{\RL {#3}}\par 623\endgroup \test@token } 624 625\at@arabtext {\let \@caption \a@@caption } 626 627\let \a@c@caption \caption 628 629% **************************************** 630% * TABLE OF CONTENTS, ETC. * 631% **************************************** 632 633\ifa@article \setcounter{tocdepth}{3} 634\else \setcounter{tocdepth}{2} 635\fi 636 637\setcounter{tocdepth}{5} % for test only 638 639\def \a@c@tableofcontents {\a@t@ble {\contentsname }{toc}} 640%\def \a@c@tableofcontents {\a@t@ble {\RL{\contentsname }}{toc}} 641 642\def \a@c@starttoc #1{\endarabtext 643\the\arabtext@hook 644\@starttoc {#1}\arabtext } 645 646%\def \a@t@ble #1#2{% \tableofcontents etc. 647% \a@c@section *{#1}\@mkboth {#1}{#1}\starttoc {#2}} 648 649%\def \a@c@@mkboth #1#2{\@mkboth {\RL{#1}}{\RL{#2}}\test@token } 650 651\def \a@l@section #1#2{% for arabic mode 652\ifnum \c@tocdepth >\z@ 653 \addpenalty {\@secpenalty }\addvspace {1.0em plus\p@ } 654 \if@twocolumn \@tempdima 1.0em \else \@tempdima 1.5em \fi 655 \a@@lsection {#1}{#2}{\a@normalfont \bfseries }% 656\fi } 657 658\def \a@l@part #1#2{% for arabic mode 659\ifnum \c@tocdepth >-2\relax 660 \addpenalty {-\@highpenalty }\addvspace {2.25em plus\p@ } 661 \if@twocolumn \@tempdima 2.0em \else \@tempdima 3.0em \fi 662 \a@@lsection {#1}{#2}{\a@normalfont \large \bfseries }% 663\fi } 664 665\def \a@l@chapter #1#2{% for arabic mode 666\ifnum \c@tocdepth >\m@ne 667 \addpenalty {-\@highpenalty }\addvspace {1.0em plus\p@ } 668 \if@twocolumn \@tempdima 1.0em \else \@tempdima 1.5em \fi 669 \a@@lsection {#1}{#2}{\a@normalfont \bfseries }% 670 \penalty\@highpenalty 671\fi } 672 673\at@arabtext {% switch to Arabic terms 674 \let \l@part \a@l@part 675 \let \l@section \a@l@section 676 \let \l@chapter \a@l@chapter 677} 678 679\if@twocolumn 680 \def\l@subsection{\@dottedtocline{2}{1.0em}{1.5em}} 681 \def\l@subsubsection{\@dottedtocline{3}{2.5em}{2.3em}} 682 \def\l@paragraph{\@dottedtocline{4}{4.8em}{3.1em}} 683 \def\l@subparagraph{\@dottedtocline{5}{7.9em}{3.9em}} 684 \def\@tocrmarg {1.55em} 685\fi 686 687\def \a@c@listoffigures {\a@t@ble {\listfigurename }{lof}} 688 689\def \a@c@listoftables {\a@t@ble {\listtablename }{lot}} 690 691% **************************************** 692% * BIBLIOGRAPHY * 693% **************************************** 694 695\iffalse %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%% 696 697\newdimen\bibindent 698\bibindent=1.5em 699 700\newenvironment{thebibliography}[1] 701% {\chapter*{\bibname 702 {\section*{\bibname 703 \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}}% 704 \list{\@biblabel{\@arabic\c@enumiv}}% 705 {\settowidth\labelwidth{\@biblabel{#1}}% 706 \leftmargin\labelwidth 707 \advance\leftmargin\labelsep 708 \@openbib@code 709 \usecounter{enumiv}% 710 \let\p@enumiv\@empty 711 \renewcommand\theenumiv{\@arabic\c@enumiv}}% 712 \sloppy\clubpenalty4000\widowpenalty4000% 713 \sfcode`\.=\@m} 714 {\def\@noitemerr 715 {\@latex@warning{Empty `thebibliography' environment}}% 716 \endlist} 717 718%\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} 719%\let\@openbib@code\@empty 720 721\else %============= arabart.cls ================================== 722\fi %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 723 724% **************************************** 725% * THE INDEX * 726% **************************************** 727 728\iffalse %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%% 729 730\newcommand\newblock{} 731 732\newenvironment{theindex} 733 {\if@twocolumn 734 \@restonecolfalse 735 \else 736 \@restonecoltrue 737 \fi 738 \columnseprule \z@ 739 \columnsep 35\p@ 740 \twocolumn[\@makeschapterhead{\indexname}]% 741 \@mkboth{\MakeUppercase\indexname}% 742 {\MakeUppercase\indexname}% 743 \thispagestyle{plain}\parindent\z@ 744 \parskip\z@ \@plus .3\p@\relax 745 \let\item\@idxitem} 746 {\if@restonecol\onecolumn\else\clearpage\fi} 747 748\newcommand\@idxitem{\hangindent 40\p@} 749\newcommand\subitem{\par\hangindent 40\p@ \hspace*{20\p@}} 750\newcommand\subsubitem{\par\hangindent 40\p@ \hspace*{30\p@}} 751\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} 752 753\else %============= arabart.cls ================================== 754\fi %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 755 756% **************************************** 757% * FOOTNOTES * 758% **************************************** 759 760% Default definition 761\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}} 762 763\def \footnoterule{% 764 \kern-3\p@ 765 \hbox to \columnwidth{\hskip .6\columnwidth \hrulefill } 766 \kern2.6\p@} 767 768\RLfootnotes 769 770% see also "alatex.sty" 771 772% **************************************** 773% * LANGUAGE DEPENDENT NAMES * 774% **************************************** 775 776\iffalse %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%% 777 778\newcommand\contentsname{Contents} 779\newcommand\listfigurename{List of Figures} 780\newcommand\listtablename{List of Tables} 781\newcommand\bibname{Bibliography} 782\newcommand\refname{References} 783\newcommand\indexname{Index} 784\newcommand\figurename{Figure} 785\newcommand\tablename{Table} 786\newcommand\partname{Part} 787\newcommand\chaptername{Chapter} 788\newcommand\appendixname{Appendix} 789\newcommand\abstractname{Abstract} 790 791\else %============= arabart.cls ================================== 792 793% tableofcontents = al-mu.htawayAtu 794% listoffigures = qA'imaTu al-.suwaru 795% listoftables = qA'imaTu al-^gadAwilu 796% listofpictures = qA'imaTu al-rusUmu 797% bibliography = al-marA^gi`u 798% references = al-ma.sAdiru 799% index = al-fihrisu (al-fihristu) 800% chapter = al-fa.slu 801% appendix = al-mul.haqu 802% abstract = al-mula_h_ha.su 803% attachments = al-murfaqAtu 804% number = al-raqmu 805 806%\at@arabtext {% switch to Arabic terms 807 \def\bibname {\a@tok(al-marAGiPu)} 808 \def\refname {\a@tok(al-maSAdiru)} 809 \def\indexname {\a@tok(al-fihristu)} 810 \def\figurename {\a@tok(SUraTuN)} 811 \def\tablename {\a@tok(GadwaluN)} 812 \def\partname {\a@tok(al-GuzQzu)} 813 \def\chaptername {\a@tok(al-faSlu)} 814 \def\appendixname {\a@tok(al-mulHaqu)} 815 \def\abstractname {\a@tok(al-mulaXXaSu)} 816%} 817 818\allowarab \contentsname 819\allowarab \listfigurename 820\allowarab \listtablename 821\allowarab \bibname 822\allowarab \refname 823\allowarab \indexname 824\allowarab \figurename 825\allowarab \tablename 826\allowarab \partname 827\allowarab \chaptername 828\allowarab \appendixname 829\allowarab \abstractname 830 831\fi %%%%%%%%%%%%%%%% article.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 832 833% **************************************** 834% * INITIALIZATION * 835% **************************************** 836 837% Default initializations 838 839\ifa@book \pagestyle{headings} 840\else \pagestyle{plain} 841\fi 842 843\pagenumbering{arabic} % Arabic page numbers 844 845% **************************************** 846% * SIZE DEPENDENT PATCHES * 847% **************************************** 848 849\input {asize1\@ptsize.clo} 850 851\UsePackage {arabext} % load local patches for ArabTeX 852 853%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 854 855\gdef \contentsname{Contents} 856\gdef \listfigurename{List of Figures} 857\gdef \listtablename{List of Tables} 858 859\at@arabtext {% switch to Arabic terms 860 \def\contentsname {\a@tok(al-muHtawayAtu)} 861 \def\listfigurename {\a@tok(qAQAimaTu aS-Suwari)} 862 \def\listtablename {\a@tok(qAQAimaTu al-GadAwili)} 863 \def\chaptername {\a@tok(al-faSlu)} 864} 865 866\ifx \a@part \undefined \else 867 868% tableofcontents = al-mu.htawayAtu 869% listoffigures = qA'imaTu al-.suwaru 870% listoftables = qA'imaTu al-^gadAwilu 871% listofpictures = qA'imaTu al-rusUmu 872% bibliography = al-marA^gi`u 873% references = al-ma.sAdiru 874% index = al-fihrisu (al-fihristu) 875% chapter = al-fa.slu 876% appendix = al-mul.haqu 877% abstract = al-mula_h_ha.su 878% attachments = al-murfaqAtu 879% number = al-raqmu 880 881\def\bibname {\stdcode{al-marA^gi`u}} 882\def\refname {\stdcode{al-ma.sAdiru}} 883\def\indexname {\stdcode{al-fihristu}} 884\def\figurename {\stdcode{.sUraTuN}} 885\def\tablename {\stdcode{^gadwaluN}} 886\def\partname {\stdcode{al-^guz'u}} 887\def\chaptername {\stdcode{al-fa.slu}} 888\def\appendixname {\stdcode{al-mul.haqu}} 889\def\abstractname {\stdcode{al-mula_h_ha.su}} 890 891\at@arabtext {% switch to Arabic terms 892\def\contentsname {\stdcode{al-mu.htawayAtu}} 893\def\listfigurename {\stdcode{qA'imaTu al-.suwari}} 894\def\listtablename {\stdcode{qA'imaTu al-^gadAwili}} 895} 896\fi 897 898\def\a@makechapterhead #1{% make heading with number 899 \null \vskip 50\p@ 900\begingroup \let \end \a@@par \a@@raggedright \interlinepenalty\@M 901 \a@normalfont \bfseries 902 \ifnum \c@secnumdepth >\m@ne 903 \if@mainmatter 904 \edef \thechapter {\thechapter }% 905 \huge \set@arabfont \test@token \@chapapp {\thechapter} \end 906 \nobreak \vskip 20\p@ 907 \fi\fi 908 \Huge \set@arabfont \test@token #1 \end 909 \nobreak \vskip 40\p@ 910\endgroup } 911 912\allowarab \@chapapp 913 914\def\a@c@appendix{%\par 915 \setcounter{section}{0}% 916 \renewcommand\@chapapp {\appendixname }% 917\ifa@article \renewcommand\thesection {\@abjad \c@section }% 918 \setcounter{subsection}{0}% 919\else \renewcommand\thechapter {\@abjad \c@chapter }% 920 \setcounter{chapter}{0}% 921\fi \test@token } 922 923\def \a@chapter [#1]#2{% numbered chapter 924\ifnum \c@secnumdepth >\m@ne 925 \if@mainmatter 926 \refstepcounter {chapter}% 927 \typeout {\@chapapp \space \thechapter.}% 928 \addcontentsline {toc}{chapter}% 929 {\protect\numberline 930 {\protect\RL{\protect\stdcode{\thechapter }}}% 931 \protect\RL {#1}}% 932 \else \addcontentsline {toc}{chapter}{\protect\RL {#1}}% 933 \fi 934\else \addcontentsline {toc}{chapter}{\protect\RL {#1}}% 935\fi 936\chaptermark{\RL {#1}}% 937\addtocontents {lof}{\protect\addvspace {10\p@}}% 938\addtocontents {lot}{\protect\addvspace {10\p@}}% 939\if@twocolumn \@topnewpage [\a@makechapterhead {#2}]% 940\else \a@makechapterhead {#2}\a@afterheading 941\fi \test@token } 942 943\long\def \a@@caption #1[#2]#3{\par 944 \addcontentsline {\csname ext@#1\endcsname}{#1} 945 {\protect\numberline {\csname the#1\endcsname}\protect\RL {#2}}% 946\begingroup \@parboxrestore \normalsize 947 \def \protect {\nxp\protect\nxp} 948 \edef \thecaption {\csname fnum@#1\endcsname }% 949 \let \protect \relax 950 \@makecaption {\RL {\thecaption }}{\RL {#3}}\par 951\endgroup \test@token } 952 953\long\def \a@makecaption #1#2{% 954 \vskip\abovecaptionskip 955 \sbox\@tempboxa{\RL{#1: #2}}% 956 \ifdim \wd\@tempboxa >\hsize 957\begin{arabtext} #1: #2 958\end{arabtext} 959 \else 960 \global \@minipagefalse 961 \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% 962 \fi 963 \vskip\belowcaptionskip } 964 965\allowarab \caption 966\allowarab \thecaption 967 968\at@arabtext {\let \@caption \a@@caption 969\let \@makecaption \a@makecaption } 970 971%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 972 973\def \a@l@section #1#2{% Text, Pageno 974% for arabic mode 975\ifnum \c@tocdepth >\z@ 976 \addpenalty {\@secpenalty }% 977 \addvspace {1.0em plus\p@ }% 978% \@tempdima 1.5em 979 \@tempdima 1.0em 980% \@tempdima \if@twocolumn 1.0em \else 1.5em \fi \relax 981 \a@@lsection {#1}{#2}{\a@normalfont \bfseries }% 982\fi } 983 984\def \a@l@part #1#2{% Text, Pageno 985% for arabic mode 986\ifnum \c@tocdepth >-2\relax 987 \addpenalty {-\@highpenalty }% 988 \addvspace {2.25em plus\p@ }% 989 \@tempdima 2.0em 990% \@tempdima \if@twocolumn 2.0em \else 3.0em \fi \relax 991 \a@@lsection {#1}{#2}{\a@normalfont \large \bfseries }% 992\fi } 993 994\def \a@l@chapter #1#2{% Text, Pageno 995% for arabic mode 996\ifnum \c@tocdepth >\m@ne 997 \addpenalty {-\@highpenalty }% 998 \addvspace {1.0em plus\p@ }% 999% \@tempdima 1.5em 1000 \@tempdima 1.0em 1001% \@tempdima \if@twocolumn 1.0em \else 1.5em \fi \relax 1002 \a@@lsection {#1}{#2}{\a@normalfont \bfseries }% 1003 \penalty\@highpenalty 1004\fi } 1005 1006\def \a@x@sect {% arabic section TOC formats if article 1007 \def\a@l@subsection{\@dottedtocline{2}{1.0em}{1.5em}} 1008 \def\a@l@subsubsection{\@dottedtocline{3}{2.5em}{2.1em}} 1009 \def\a@l@paragraph{\@dottedtocline{4}{4.6em}{2.8em}} 1010 \def\a@l@subparagraph{\@dottedtocline{5}{9.4em}{3.4em}} 1011} 1012 1013\def \a@y@sect {% arabic section TOC formats if report or book 1014 \def\a@l@section{\@dottedtocline{1}{1.0em}{1.5em}} 1015 \def\a@l@subsection{\@dottedtocline{2}{2.5em}{2.1em}} 1016 \def\a@l@subsubsection{\@dottedtocline{3}{4.6em}{2.8em}} 1017 \def\a@l@paragraph{\@dottedtocline{4}{9.4em}{3.4em}} 1018 \def\a@l@subparagraph{\@dottedtocline{5}{23.8em}{4.1em}} 1019} 1020 1021\def \a@xy@sect {% arabic section TOC formats 1022\ifa@article \a@x@sect \else \a@y@sect \fi } 1023 1024\def \a@c@tableofcontents {\a@xy@sect % define arabic section TOC formats 1025\a@t@ble {\contentsname }{toc}} 1026 1027% CAUTION: \a@xy@sect must be executed before expanding \the\arabtex@hook 1028% and prior to \@starttoc within \a@t@ble, see arabrep.cls 1029 1030\def\a@l@figure{\@dottedtocline{1}{1.0em}{1.5em}} 1031\def\a@l@table{\@dottedtocline{1}{1.0em}{1.5em}} 1032 1033\at@arabtext {% switch to Arabic terms, execute from asect::a@t@ble 1034 \let \l@part \a@l@part 1035 \let \l@chapter \a@l@chapter 1036 \let \l@section \a@l@section 1037 \let \l@subsection \a@l@subsection 1038 \let \l@subsubsection \a@l@subsubsection 1039 \let \l@paragraph \a@l@paragraph 1040 \let \l@subparagraph \a@l@subparagraph 1041 \let \l@figure \a@l@figure 1042 \let \l@table \a@l@table 1043} 1044 1045%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1046 1047% restore LaTeX version, delete \a@caption! 1048 1049\long\def\@caption#1[#2]#3{% 1050 \par 1051 \addcontentsline{\csname ext@#1\endcsname}{#1}% 1052 {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% 1053 \begingroup 1054 \@parboxrestore 1055 \if@minipage 1056 \@setminipage 1057 \fi 1058 \normalsize 1059 \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par 1060 \endgroup} 1061 1062\long\def \a@caption #1[#2]#3{\par 1063 \addcontentsline {\csname ext@#1\endcsname}{#1} 1064 {\protect\numberline {\csname the#1\endcsname}\protect #2}% 1065\begingroup \@parboxrestore \normalsize 1066 \protected@edef \reserved@a {\csname fnum@#1\endcsname }% 1067 \xpa\@makecaption \xpa{\xpa\RL \xpa{\reserved@a }}{#3}\par 1068\endgroup} 1069 1070%\let \@caption \a@caption 1071 1072%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1073% end of file arabrep.cls 1074\endinput 1075%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1076 1077