alpar@0: % alpar@0: % alpar@0: % File: rvdtx.sty alpar@0: % alpar@0: % Auxiliary package to format *.dtx documents. alpar@0: % alpar@0: % Copyright (c) 2008, 2009 CV Radhakrishnan , alpar@0: % alpar@0: % This file may be distributed and/or modified under the conditions alpar@0: % of the LaTeX Project Public License, either version 1.2 of this alpar@0: % license or (at your option) any later version. The latest version alpar@0: % of this license is in: alpar@0: % alpar@0: % http://www.latex-project.org/lppl.txt alpar@0: % alpar@0: % and version 1.2 or later is part of all distributions of LaTeX alpar@0: % version 1999/12/01 or later. alpar@0: % alpar@0: % alpar@0: \newcounter{colorscheme} alpar@0: alpar@0: \newif\if@xcolor \@xcolorfalse alpar@0: \newif\if@mylogo \@mylogofalse alpar@0: alpar@0: \DeclareOption{mylogo}{\global\@mylogotrue} alpar@0: \DeclareOption{green}{\setcounter{colorscheme}{1}} alpar@0: \DeclareOption{orange}{\setcounter{colorscheme}{0}} alpar@0: \DeclareOption{xcolor}{\global\@xcolortrue} alpar@0: \DeclareOption{qone}{\AtEndOfPackage{\global\let\dtxmark\dtxmarkone}} alpar@0: \DeclareOption{qtwo}{\AtEndOfPackage{\global\let\dtxmark\dtxmarktwo}} alpar@0: alpar@0: \ProcessOptions alpar@0: \def\loadXcolor{\if@xcolor\RequirePackage[dvipsnames,svgnames]{xcolor}\fi} alpar@0: alpar@0: \loadXcolor alpar@0: \ifcase\thecolorscheme alpar@0: % alpar@0: % Orange color spec (default) alpar@0: % alpar@0: \colorlet{itemcolor}{brown} alpar@0: \colorlet{verbcolor}{Sepia} alpar@0: \colorlet{botrulecolor}{orange!25} alpar@0: \colorlet{botbgcolor}{orange!15} alpar@0: \colorlet{botcolor}{orange!80} alpar@0: \colorlet{pgrulecolor}{orange} alpar@0: \colorlet{pgbgcolor}{white} alpar@0: alpar@0: \colorlet{quicklinkrulecolor}{orange!40} alpar@0: \colorlet{quicklinkcolor}{brown} alpar@0: \colorlet{topverticalrule}{brown} alpar@0: \colorlet{titlecolor}{brown} alpar@0: \colorlet{hlinkcolor}{brown} alpar@0: \colorlet{hlinktricolor}{orange!70} alpar@0: \colorlet{linkcolor}{brown} alpar@0: \colorlet{urlcolor}{brown} alpar@0: alpar@0: % \colorlet{arrayrulecolor}{olive!30} alpar@0: \colorlet{seccolor}{brown} alpar@0: alpar@0: \colorlet{toprulecolor}{orange!30} alpar@0: \colorlet{topbgcolor}{orange!10} alpar@0: \colorlet{topcolor}{brown!80} alpar@0: % alpar@0: % alpar@0: \or% Green color specs alpar@0: % alpar@0: % alpar@0: \colorlet{itemcolor}{OliveGreen} alpar@0: \colorlet{verbcolor}{OliveGreen} alpar@0: \colorlet{botrulecolor}{GreenYellow!25} alpar@0: \colorlet{botbgcolor}{GreenYellow!30} alpar@0: \colorlet{botcolor}{Green!80} alpar@0: \colorlet{pgrulecolor}{GreenYellow} alpar@0: \colorlet{pgbgcolor}{white} alpar@0: alpar@0: \colorlet{quicklinkrulecolor}{Green!40} alpar@0: \colorlet{quicklinkcolor}{Green} alpar@0: \colorlet{topverticalrule}{Green} alpar@0: \colorlet{titlecolor}{DarkOliveGreen} alpar@0: \colorlet{hlinkcolor}{DarkOliveGreen} alpar@0: \colorlet{hlinktricolor}{Green!70} alpar@0: \colorlet{linkcolor}{OliveGreen} alpar@0: \colorlet{urlcolor}{OliveGreen} alpar@0: alpar@0: % \colorlet{arrayrulecolor}{olive!30} alpar@0: \colorlet{seccolor}{OliveGreen} alpar@0: alpar@0: \colorlet{toprulecolor}{GreenYellow!50} alpar@0: \colorlet{topbgcolor}{GreenYellow!20} alpar@0: \colorlet{topcolor}{GreenYellow!80} alpar@0: \fi alpar@0: alpar@0: \def\floatpagefraction{.99} alpar@0: \usepackage{geometry} alpar@0: \geometry{top=2in, alpar@0: bottom=1in, alpar@0: left=2in, alpar@0: right=1in, alpar@0: a4paper} alpar@0: alpar@0: %\DeclareRobustCommand{\LaTeX}{L\kern-.25em% alpar@0: % {\sbox\z@ T% alpar@0: % \vbox to\ht\z@{% alpar@0: % {\check@mathfonts alpar@0: % \fontsize\sf@size\z@ alpar@0: % \math@fontsfalse\selectfont alpar@0: % A}% alpar@0: % \vss}% alpar@0: % }%-.10em% alpar@0: % \TeX alpar@0: %} alpar@0: \DeclareRobustCommand{\LaTeX}{L\kern-.25em% alpar@0: {\sbox\z@ T% alpar@0: \vbox to\ht\z@{% alpar@0: \hbox{% alpar@0: \check@mathfonts alpar@0: \fontsize\sf@size\z@ alpar@0: \math@fontsfalse\selectfont alpar@0: A}% alpar@0: \vss}% alpar@0: }% alpar@0: \kern-.10em% alpar@0: \TeX} alpar@0: alpar@0: \RequirePackage{pdfwidgets} alpar@0: alpar@0: \RequirePackage{comment,xspace} alpar@0: \def\xml{\textsc{xml}\xspace} alpar@0: \def\latex{\LaTeX\xspace} alpar@0: \def\pdf{\textsc{pdf}\xspace} alpar@0: \def\pdfa{\textsc{pdf/a-1}b\xspace} alpar@0: \def\pdfx{\textsc{pdf/x-1}a\xspace} alpar@0: \def\xmp{\textsc{xmp}\xspace} alpar@0: \def\pdftex{\textsc{pdf\TeX}\xspace} alpar@0: \def\defmacro#1{\texttt{\@bsl#1}} alpar@0: \def\thanh{H\`an Th\^e Th\`anh\xspace} alpar@0: \def\gnulinux{\textsc{gnu/linux}\xspace} alpar@0: alpar@0: \let\@DRAFTout@Hook\@empty alpar@0: \newcommand{\DRAFTout}{\g@addto@macro\@DRAFTout@Hook} alpar@0: \newcommand{\@DRAFTout@Out}{% alpar@0: \afterassignment\@DRAFTout@Test alpar@0: \global\setbox\@cclv= alpar@0: } alpar@0: \newcommand{\@DRAFTout@Test}{% alpar@0: \ifvoid\@cclv\relax alpar@0: \aftergroup\@DRAFTout@Output alpar@0: \else alpar@0: \@DRAFTout@Output alpar@0: \fi% alpar@0: } alpar@0: \newcommand{\@DRAFTout@Output}{% alpar@0: \@DRAFTout@Hook% alpar@0: \@DRAFTout@Org@Out\box\@cclv% alpar@0: } alpar@0: \newcommand{\@DRAFTout@Org@Out}{} alpar@0: \newcommand*{\@DRAFTout@Init}{% alpar@0: \let\@DRAFTout@Org@Out\shipout alpar@0: \let\shipout\@DRAFTout@Out alpar@0: } alpar@0: \newdimen\OHeight alpar@0: \setlength\OHeight{\textheight} alpar@0: \addtolength\OHeight{\headheight} alpar@0: \addtolength\OHeight{\headsep} alpar@0: \addtolength\OHeight{\footskip} alpar@0: alpar@0: alpar@0: \newif\ifoverlay\overlayfalse alpar@0: alpar@0: \AtBeginDocument{\@DRAFTout@Init} alpar@0: \newcommand{\@DraftOverlay@Hook}{} alpar@0: \newcommand{\AddToDraftOverlay}{\g@addto@macro\@DraftOverlay@Hook} alpar@0: \newcommand{\ClearDraftOverlay}{\let\@DraftOverlay@Hook\@empty} alpar@0: \newcommand{\@DraftOverlay}{% alpar@0: \ifx\@DraftOverlay@Hook\@empty alpar@0: \else alpar@0: \bgroup alpar@0: \@tempdima=1in alpar@0: \@tempcnta=\@tempdima alpar@0: \@tempcntb=-\@tempdima alpar@0: \advance\@tempcntb\paperheight alpar@0: \ifoverlay alpar@0: \global\setbox\@cclv\vbox{% alpar@0: \box\@cclv alpar@0: \vbox{\let\protect\relax% alpar@0: \unitlength=1pt% alpar@0: \pictur@(0,0)(\strip@pt\@tempdima,\strip@pt\@tempdimb)% alpar@0: \@DraftOverlay@Hook% alpar@0: \endpicture}}% alpar@0: \else alpar@0: \global\setbox\@cclv\vbox{% alpar@0: \vbox{\let\protect\relax% alpar@0: \unitlength=1sp% alpar@0: \pictur@(0,0)(\@tempcnta,\@tempcntb)% alpar@0: \@DraftOverlay@Hook% alpar@0: \endpicture}% alpar@0: \box\@cclv}% alpar@0: \fi alpar@0: \egroup alpar@0: \fi alpar@0: } alpar@0: alpar@0: \definecolor{gray30}{gray}{.7} alpar@0: \definecolor{gray20}{gray}{.8} alpar@0: \definecolor{gray10}{gray}{.9} alpar@0: alpar@0: \DRAFTout{\@DraftOverlay} alpar@0: \long\def\puttext(#1)#2{\AddToDraftOverlay{% alpar@0: \setlength{\unitlength}{1pt}\thinlines% alpar@0: \put(#1){#2}}} alpar@0: alpar@0: \RequirePackage{shortvrb} alpar@0: \MakeShortVerb{\|} alpar@0: \RequirePackage{amsfonts,amssymb} alpar@0: \IfFileExists{pxfonts.sty}{\RequirePackage{pxfonts}}{} alpar@0: %\IfFileExists{charter.sty}{\RequirePackage{charter}}{} alpar@0: \IfFileExists{lfr.sty}{\RequirePackage[scaled=.85]{lfr}}{} alpar@0: %\IfFileExists{prima.sty}{\RequirePackage[scaled=.8]{prima}}{} alpar@0: alpar@0: \def\theCodelineNo{\reset@font\tiny\arabic{CodelineNo}} alpar@0: alpar@0: \def\@seccntformat#1{\llap{\csname the#1\endcsname.\hspace*{6pt}}} alpar@0: \def\section{\@startsection {section}{1}{\z@}% alpar@0: {-3.5ex \@plus -1ex \@minus -.2ex}% alpar@0: {2.3ex \@plus.2ex}% alpar@0: {\normalfont\large\bfseries\color{seccolor}}} alpar@0: \def\subsection{\@startsection{subsection}{2}{\z@}% alpar@0: {-2.25ex\@plus -1ex \@minus -.2ex}% alpar@0: {1.5ex \@plus .2ex}% alpar@0: {\normalfont\normalsize\bfseries\color{seccolor}}} alpar@0: \def\subsubsection{\@startsection{subsubsection}{3}{\z@}% alpar@0: {-1.25ex\@plus -1ex \@minus -.2ex}% alpar@0: {1.5ex \@plus .2ex}% alpar@0: {\normalfont\normalsize\bfseries\color{seccolor}}} alpar@0: alpar@0: %\RequirePackage[draft]{pdfdraftcopy} alpar@0: % \draftstring{} alpar@0: \puttext(0,36){\botstring}% alpar@0: \puttext(0,840){\copy\topbox} alpar@0: \if@mylogo alpar@0: \puttext(531,829){\cvrlogo} alpar@0: \fi alpar@0: alpar@0: \RequirePackage{colortbl} alpar@0: %\arrayrulecolor{arrayrulecolor} alpar@0: \let\shline\hline alpar@0: \def\hline{\noalign{\vskip3pt}\shline\noalign{\vskip4pt}} alpar@0: alpar@0: \RequirePackage[pdftex,colorlinks]{hyperref} alpar@0: \def\Hlink#1#2{\hyperlink{#2}{\color{hlinktricolor}% alpar@0: $\blacktriangleright$~\color{hlinkcolor}#1}} alpar@0: \def\@linkcolor{linkcolor} alpar@0: \def\@urlcolor{urlcolor} alpar@0: alpar@0: \pagestyle{empty} alpar@0: \def\version#1{\gdef\@version{#1}} alpar@0: \def\@version{1.0} alpar@0: \def\contact#1{\gdef\@contact{#1}} alpar@0: \def\author#1{\gdef\@author{#1}} alpar@0: \def\@author{River Valley Technologies} alpar@0: \def\@contact{\texttt{support@river-valley.com}} alpar@0: \def\keywords#1{\gdef\@keywords{#1}} alpar@0: \def\@keywords{\LaTeX, \xml} alpar@0: alpar@0: \long\def\Hrule{\\[-4pt]\hspace*{-3em}% alpar@0: {\color{quicklinkrulecolor}\rule{\linewidth}{.1pt}}\\} alpar@0: alpar@0: \long\def\dtxmarkone[#1][#2]#3#4#5{\def\next{#1}% alpar@0: \ifcase\next\or\Hlink{#4}{#3}\Hrule \fi} alpar@0: alpar@0: \newcounter{dtx} alpar@0: alpar@0: \long\def\dtxmarktwo[#1][#2]#3#4#5{\def\next{#1}% alpar@0: \stepcounter{dtx}\parbox{.45\linewidth}% alpar@0: {\ifcase\next\or\Hlink{#4}{#3}\fi}% alpar@0: \ifodd\thedtx\relax\else\Hrule\fi} alpar@0: alpar@0: \let\dtxmark\dtxmarkone alpar@0: alpar@0: \newbox\topbox alpar@0: \long\def\maketitle{\global\setbox\topbox=\vbox{\hsize=\paperwidth alpar@0: \parindent=0pt alpar@0: \fcolorbox{toprulecolor}{topbgcolor}% alpar@0: {\parbox[t][2in][c]{\paperwidth}% alpar@0: {\hspace*{15mm}% alpar@0: \parbox[c]{.35\paperwidth}{\fontsize{18pt}{20pt}% alpar@0: \raggedright\normalfont\sffamily \selectfont alpar@0: \color{titlecolor} \@title\\[6pt] alpar@0: {\normalsize\rmfamily\scshape\@author}}% alpar@0: % {\footnotesize\textsc{keywords:} \@keywords}}% alpar@0: \hfill alpar@0: \parbox[c][2in][c]{1mm}{\color{topverticalrule}% alpar@0: \rule{.1pt}{2in}}% alpar@0: \hfill alpar@0: \parbox[c][2in][c]{.35\paperwidth}% alpar@0: {\normalfont\footnotesize\sffamily\color{quicklinkcolor}% alpar@0: \vspace*{6pt} QUICK LINKS\Hrule alpar@0: \IfFileExists{tmp.out}{\input tmp.out}{}% alpar@0: }\hspace*{5mm}% alpar@0: }% alpar@0: }% alpar@0: }% alpar@0: } alpar@0: \gdef\botstring{\fcolorbox{botrulecolor}{botbgcolor}% alpar@0: {\parbox[t][.5in][t]{\paperwidth}% alpar@0: {\normalfont\sffamily\footnotesize% alpar@0: \color{botcolor}% alpar@0: \hspace*{5mm}\parbox[c][.5in][c]{.45\paperwidth}% alpar@0: {\raggedright \textcopyright\ 2009, Elsevier Ltd. alpar@0: % \href{http://www.river-valley.com}{% alpar@0: % http://www.river-valley.com}\\ alpar@0: % \textsc{sjp} Building, Cotton Hills, Trivandrum alpar@0: % 695014, India\\ 9, Browns Court, Kennford, alpar@0: % Exeter, United Kingdom alpar@0: Bugs, feature requests, suggestions and comments\\ alpar@0: shall be mailed to \href{mailto:elsarticle@river-valley.com} alpar@0: {$<$elsarticle@river-valley.com$>$}. alpar@0: }\hfill% alpar@0: \parbox[c][.5in][c]{1cm} alpar@0: {\centering\sffamily\mdseries alpar@0: \fcolorbox{pgrulecolor}{pgbgcolor}{\thepage}% alpar@0: }\hfill alpar@0: \parbox[c][.5in][c]{.45\paperwidth} alpar@0: {\raggedleft\begin{tabular}{rl}% alpar@0: Version:&\@version\\ alpar@0: Date:&\@date\\ alpar@0: Contact:&\@contact alpar@0: \end{tabular}\hspace*{5mm}% alpar@0: }% alpar@0: }% alpar@0: }% alpar@0: } alpar@0: alpar@0: \def\MacroFont{\fontencoding\encodingdefault alpar@0: \fontfamily\ttdefault alpar@0: \fontseries\mddefault alpar@0: \fontshape\updefault alpar@0: \color{verbcolor}\small}% alpar@0: alpar@0: \def\verbatim@font{\normalfont\color{verbcolor}\ttfamily} alpar@0: alpar@0: \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi alpar@0: \bgroup alpar@0: \verb@eol@error \let\do\@makeother \dospecials alpar@0: \verbatim@font\@noligs alpar@0: \@ifstar\@sverb\@verb} alpar@0: alpar@0: alpar@0: \def\@lbr{\expandafter\@gobble\string\{} alpar@0: \def\@rbr{\expandafter\@gobble\string\}} alpar@0: \def\@bsl{\expandafter\@gobble\string\\} alpar@0: \def\@Bsl#1{\texttt{\@bsl#1}\xspace} alpar@0: \def\trics#1{\protect\@Bsl{#1}} alpar@0: \def\onecs#1{\protect\@Bsl{#1}} alpar@0: %\let\trics\onecs alpar@0: \@ifundefined{c@Glossary}{}{\c@GlossaryColumns=1 alpar@0: \c@IndexColumns=2} alpar@0: alpar@0: \def\index@prologue{\section{Index}% alpar@0: \markboth{Index}{Index}% alpar@0: % Numbers written in italic refer to the page alpar@0: % where the corresponding entry is described; alpar@0: % numbers underlined refer to the alpar@0: % \ifcodeline@index alpar@0: % code line of the alpar@0: % \fi alpar@0: % definition; numbers in roman refer to the alpar@0: % \ifcodeline@index alpar@0: % code lines alpar@0: % \else alpar@0: % pages alpar@0: % \fi alpar@0: % where the entry is used. alpar@0: } alpar@0: alpar@0: \@ifundefined{theglossary}{}{% alpar@0: \renewenvironment{theglossary}{% alpar@0: \glossary@prologue%][\GlossaryMin]% alpar@0: \GlossaryParms \let\item\@idxitem \ignorespaces}% alpar@0: {}} alpar@0: alpar@0: \newenvironment{decl}[1][]% alpar@0: {\par\small\addvspace{1.5ex plus 1ex}% alpar@0: \vskip -\parskip alpar@0: \ifx\relax#1\relax alpar@0: \def\@decl@date{}% alpar@0: \else alpar@0: \def\@decl@date{\NEWfeature{#1}}% alpar@0: \fi alpar@0: \noindent%\hspace{-\leftmargini}% alpar@0: \begin{tabular}{l}\hline\ignorespaces}% alpar@0: {\\\hline\end{tabular}\nobreak\@decl@date\par\nobreak alpar@0: \vspace{0.75ex}\vskip -\parskip\ignorespacesafterend\noindent} alpar@0: alpar@0: \newif\ifhave@multicol alpar@0: \newif\ifcodeline@index alpar@0: alpar@0: \IfFileExists{multicol.sty}{\have@multicoltrue alpar@0: \RequirePackage{multicol}% alpar@0: }{} alpar@0: alpar@0: \newdimen\IndexMin \IndexMin = 80pt alpar@0: \newcount\c@IndexColumns \c@IndexColumns = 2 alpar@0: \ifhave@multicol alpar@0: \renewenvironment{theindex} alpar@0: {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]% alpar@0: \IndexParms \let\item\@idxitem \ignorespaces}% alpar@0: {\end{multicols}} alpar@0: \else alpar@0: \typeout{Can't find multicol.sty -- will use normal index layout if alpar@0: necessary.} alpar@0: \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi alpar@0: \columnseprule \z@ \columnsep 35\p@ alpar@0: \twocolumn[\index@prologue]% alpar@0: \IndexParms \let\item\@idxitem \ignorespaces} alpar@0: \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi} alpar@0: \fi alpar@0: \long\def\IndexPrologue#1{\@bsphack\def\index@prologue{#1}\@esphack} alpar@0: \@ifundefined{index@prologue} alpar@0: {\def\index@prologue{\section{Index}% alpar@0: \markboth{Index}{Index}% alpar@0: % Numbers written in italic refer to the page alpar@0: % where the corresponding entry is described; alpar@0: % numbers underlined refer to the alpar@0: % \ifcodeline@index alpar@0: % code line of the alpar@0: % \fi alpar@0: % definition; numbers in roman refer to the alpar@0: % \ifcodeline@index alpar@0: % code lines alpar@0: % \else alpar@0: % pages alpar@0: % \fi alpar@0: % where the entry is used. alpar@0: }}{} alpar@0: \@ifundefined{IndexParms} alpar@0: {\def\IndexParms{% alpar@0: \parindent \z@ alpar@0: \columnsep 15pt alpar@0: \parskip 0pt plus 1pt alpar@0: \rightskip 15pt alpar@0: \mathsurround \z@ alpar@0: \parfillskip=-15pt alpar@0: \footnotesize alpar@0: \def\@idxitem{\par\hangindent 30pt}% alpar@0: \def\subitem{\@idxitem\hspace*{15pt}}% alpar@0: \def\subsubitem{\@idxitem\hspace*{25pt}}% alpar@0: \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}% alpar@0: }}{} alpar@0: \def\efill{\hfill\nopagebreak}% alpar@0: \def\dotfill{\leaders\hbox to.6em{\hss .\hss}\hskip\z@ plus 1fill}% alpar@0: \def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil}% alpar@0: \def\pfill{\unskip~\dotfill\penalty500\strut\nobreak alpar@0: \dotfil~\ignorespaces}% alpar@0: alpar@0: \let\scan@allowedfalse\relax alpar@0: alpar@0: \def\tlformat#1{\begingroup\Large alpar@0: \parbox[c][1.25em][c]{1.25em}{\centering\fontfamily{phv} alpar@0: \fontseries{m}% alpar@0: \selectfont\color{white}\huge#1}% alpar@0: \endgroup} alpar@0: \def\tlFormat#1{\begingroup\Large alpar@0: \parbox[c][1.25em][c]{1.25em}{\centering\fontfamily{phv} alpar@0: \fontseries{m}% alpar@0: \selectfont\color{black}\huge#1}% alpar@0: \endgroup} alpar@0: \def\cvrlogo{\begingroup\fboxsep=2pt alpar@0: \colorbox{olive}{\tlformat{c}}% alpar@0: \colorbox{blue}{\tlformat{v}}% alpar@0: \colorbox{red}{\tlformat{r}} alpar@0: \endgroup} alpar@0: alpar@0: alpar@0: \endinput alpar@0: alpar@0: %% alpar@0: %% End of file 'rvdtx.sty' alpar@0: %%