% % % File: rvdtx.sty % % Auxiliary package to format *.dtx documents. % % Copyright (c) 2008, CV Radhakrishnan , % % This file may be distributed and/or modified under the conditions % of the LaTeX Project Public License, either version 1.2 of this % license or (at your option) any later version. The latest version % of this license is in: % % http://www.latex-project.org/lppl.txt % % and version 1.2 or later is part of all distributions of LaTeX % version 1999/12/01 or later. % % \newcounter{colorscheme} \DeclareOption{red}{\setcounter{colorscheme}{0}} \DeclareOption{green}{\setcounter{colorscheme}{2}} \DeclareOption{orange}{\setcounter{colorscheme}{1}} \ProcessOptions \RequirePackage[dvipsnames,svgnames]{xcolor} \ifcase\thecolorscheme % % Red color spec (default) % \colorlet{itemcolor}{DarkRed} \colorlet{verbcolor}{Sepia} \colorlet{botrulecolor}{DarkRed} \colorlet{botbgcolor}{DarkRed} \colorlet{botcolor}{white} \colorlet{pgrulecolor}{DarkRed!10} \colorlet{pgbgcolor}{DarkRed!50} \colorlet{quicklinkrulecolor}{white} \colorlet{quicklinkcolor}{white} \colorlet{topverticalrule}{white} \colorlet{titlecolor}{white} \colorlet{hlinkcolor}{white} \colorlet{hlinktricolor}{white} \colorlet{linkcolor}{orange} \colorlet{urlcolor}{orange} \colorlet{arrayrulecolor}{olive!30} \colorlet{seccolor}{brown} \colorlet{toprulecolor}{DarkRed} \colorlet{topbgcolor}{DarkRed} \colorlet{topcolor}{orange} \or % % Orange color spec (default) % \colorlet{itemcolor}{brown} \colorlet{verbcolor}{Sepia} \colorlet{botrulecolor}{orange!25} \colorlet{botbgcolor}{orange!15} \colorlet{botcolor}{orange!80} \colorlet{pgrulecolor}{orange} \colorlet{pgbgcolor}{white} \colorlet{quicklinkrulecolor}{orange!40} \colorlet{quicklinkcolor}{brown} \colorlet{topverticalrule}{brown} \colorlet{titlecolor}{brown} \colorlet{hlinkcolor}{brown} \colorlet{hlinktricolor}{orange!70} \colorlet{linkcolor}{brown} \colorlet{urlcolor}{brown} \colorlet{arrayrulecolor}{olive!30} \colorlet{seccolor}{brown} \colorlet{toprulecolor}{orange!30} \colorlet{topbgcolor}{orange!10} \colorlet{topcolor}{brown!80} % % \or% Green color specs % % \colorlet{itemcolor}{OliveGreen} \colorlet{verbcolor}{OliveGreen} \colorlet{botrulecolor}{GreenYellow!25} \colorlet{botbgcolor}{GreenYellow!30} \colorlet{botcolor}{Green!80} \colorlet{pgrulecolor}{GreenYellow} \colorlet{pgbgcolor}{white} \colorlet{quicklinkrulecolor}{Green!40} \colorlet{quicklinkcolor}{Green} \colorlet{topverticalrule}{Green} \colorlet{titlecolor}{DarkOliveGreen} \colorlet{hlinkcolor}{DarkOliveGreen} \colorlet{hlinktricolor}{Green!70} \colorlet{linkcolor}{OliveGreen} \colorlet{urlcolor}{OliveGreen} \colorlet{arrayrulecolor}{olive!30} \colorlet{seccolor}{OliveGreen} \colorlet{toprulecolor}{GreenYellow!50} \colorlet{topbgcolor}{GreenYellow!20} \colorlet{topcolor}{GreenYellow!80} \fi % \def\floatpagefraction{.99} \usepackage{geometry} \geometry{top=2in, bottom=1in, left=2in, right=1in, a4paper} \RequirePackage{comment,xspace} \def\pdftex{pdf\TeX\xspace} \def\defmacro#1{\texttt{\@bsl#1}} \def\thanh{H\`an Th\^e Th\`anh\xspace} \def\Thanh{H\`an Th\'{\^e} Th\`anh\xspace} \let\@DRAFTout@Hook\@empty \newcommand{\DRAFTout}{\g@addto@macro\@DRAFTout@Hook} \newcommand{\@DRAFTout@Out}{% \afterassignment\@DRAFTout@Test \global\setbox\@cclv= % } \newcommand{\@DRAFTout@Test}{% \ifvoid\@cclv\relax \aftergroup\@DRAFTout@Output \else \@DRAFTout@Output \fi% } \newcommand{\@DRAFTout@Output}{% \@DRAFTout@Hook% \@DRAFTout@Org@Out\box\@cclv% } \newcommand{\@DRAFTout@Org@Out}{} \newcommand*{\@DRAFTout@Init}{% \let\@DRAFTout@Org@Out\shipout \let\shipout\@DRAFTout@Out } \newdimen\OHeight \setlength\OHeight{\textheight} \addtolength\OHeight{\headheight} \addtolength\OHeight{\headsep} \addtolength\OHeight{\footskip} \newif\ifoverlay\overlayfalse \AtBeginDocument{\@DRAFTout@Init} \newcommand{\@DraftOverlay@Hook}{} \newcommand{\AddToDraftOverlay}{\g@addto@macro\@DraftOverlay@Hook} \newcommand{\ClearDraftOverlay}{\let\@DraftOverlay@Hook\@empty} \newcommand{\@DraftOverlay}{% \ifx\@DraftOverlay@Hook\@empty \else \bgroup \@tempdima=1in \@tempcnta=\@tempdima \@tempcntb=-\@tempdima \advance\@tempcntb\paperheight \ifoverlay \global\setbox\@cclv\vbox{% \box\@cclv \vbox{\let\protect\relax% \unitlength=1pt% \pictur@(0,0)(\strip@pt\@tempdima,\strip@pt\@tempdimb)% \@DraftOverlay@Hook% \endpicture}}% \else \global\setbox\@cclv\vbox{% \vbox{\let\protect\relax% \unitlength=1sp% \pictur@(0,0)(\@tempcnta,\@tempcntb)% \@DraftOverlay@Hook% \endpicture}% \box\@cclv}% \fi \egroup \fi } \definecolor{gray30}{gray}{.7} \definecolor{gray20}{gray}{.8} \definecolor{gray10}{gray}{.9} \DRAFTout{\@DraftOverlay} \long\def\puttext(#1)#2{\AddToDraftOverlay{% \setlength{\unitlength}{1pt}\thinlines% \put(#1){#2}}} \MakeShortVerb{\|} \IfFileExists{libertine.sty}{\RequirePackage[osf,tt]{libertine}}{} \IfFileExists{sourcesanspro.sty} {\RequirePackage[osf,light,semibold]{sourcesanspro}}{} \IfFileExists{inconsolata.sty}{\RequirePackage[scaled=.95]{inconsolata} %\IfFileExists{inconsolata.sty}{\RequirePackage[scaled=.95,noupquote]{inconsolata} \def\ttdefault{zi4}}{\def\ttdefault{cmtt}} \def\theCodelineNo{\reset@font\tiny\arabic{CodelineNo}} \def\@seccntformat#1{\llap{\csname the#1\endcsname.\hspace*{6pt}}} \def\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\large\bfseries\color{seccolor}}} \def\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries\color{seccolor}}} \def\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries\color{seccolor}}} \let\sv@section\section \newwrite\qlinkwrite \immediate\openout\qlinkwrite=\jobname.links \renewcommand\section{\@ifstar{\star@section}{\normal@section}} \def\star@section#1{\def\next{#1} \sv@section*{#1}% \immediate\write\qlinkwrite{\string\fxmark{section.\thesection}% {\expandafter\strip@prefix\meaning\next}}% } \newcommand\normal@section[2][]{\def\next{#1} \ifx\next\@empty\def\next{#2}\else\if#1*\def\next{#1}\fi\fi \sv@section[#1]{#2}% \immediate\write\qlinkwrite{\string\fxmark{section.\thesection}% {\expandafter\strip@prefix\meaning\next}}% } %\RequirePackage[draft]{pdfdraftcopy} % \draftstring{} \puttext(0,36){\botstring}% \puttext(0,842){\copy\topbox} \RequirePackage{colortbl} \arrayrulecolor{arrayrulecolor} \let\shline\hline \def\hline{\noalign{\vskip3pt}\shline\noalign{\vskip4pt}} \RequirePackage{hyperref} \hypersetup{pdftex,colorlinks} \def\Hlink#1#2{\hyperlink{#2}{\color{hlinktricolor}% $\blacktriangleright$~\color{hlinkcolor}#1}} \def\@linkcolor{linkcolor} \def\@urlcolor{urlcolor} \pagestyle{empty} \def\version#1{\gdef\@version{#1}} \def\@version{1.0} \def\contact#1{\gdef\@contact{\texttt{#1}}} \def\author#1{\gdef\@author{#1}} \def\@author{River Valley Technologies} \def\@contact{\texttt{support@river-valley.com}} \def\keywords#1{\gdef\@keywords{#1}} \def\@keywords{\LaTeX, \xml} \long\def\Hrule{\\[-4pt]\hspace*{-3em}% {\color{quicklinkrulecolor}\rule{\linewidth}{0pt}}\\} \long\def\fxmark#1#2{\Hlink{#2}{#1}\Hrule} \newbox\topbox \long\def\maketitle{\global\setbox\topbox=\vbox{\hsize=\paperwidth \parindent=0pt \fcolorbox{toprulecolor}{topbgcolor}% {\parbox[t][1.5in][c]{\paperwidth}% {\hspace*{15mm}% \parbox[c]{.475\paperwidth}{\fontsize{18pt}{20pt}% \raggedright\normalfont\sffamily \selectfont \color{titlecolor} \@title\\[12pt] \parbox{\linewidth}{\fontsize{12}{13.5}\fontseries{m}% \sffamily\upshape\selectfont\@author\strut}% }% \hfill \parbox[c][1.5in][c]{1mm}{\color{topverticalrule}% \rule{.1pt}{1.5in}}% \hfill \parbox[c][1.5in][c]{.35\paperwidth}% {\normalfont\footnotesize\sffamily\color{quicklinkcolor}% \raggedcolumns\sffamily\fontsize{7.5}{8}\fontseries{m}\selectfont \begin{multicols}{2}[QUICK LINKS] \IfFileExists{tmp.links}{\input tmp.links}{}% \end{multicols}% }\hspace*{5mm}% }% }% }% } \gdef\botstring{\fcolorbox{botrulecolor}{botbgcolor}% {\parbox[t][.5in][t]{\paperwidth}% {\normalfont\sffamily\fontseries{m}\footnotesize\selectfont% \color{botcolor}% \hspace*{5mm}\parbox[c][.5in][c]{.45\paperwidth}% {\raggedright River Valley Technologies, \href{http://www.river-valley.com}{% \texttt{http://www.river-valley.com}}\\ \textsc{jwra} 34, Jagathy, Trivandrum 695014, India }\hfill% \parbox[c][.5in][c]{1cm} {\centering\sffamily\fontseries{m}\selectfont \fcolorbox{pgrulecolor}{pgbgcolor}{\thepage}% }\hfill \parbox[c][.5in][c]{.45\paperwidth} {\raggedleft\sffamily\fontsize{7.5}{8}\fontseries{m}\selectfont \begin{tabular}{rl}% Version:&\@version/\@date\\[3pt] Contacts:&\parbox{.3\paperwidth}{\@contact} \end{tabular}\hspace*{5mm}% }% }% }% } \RequirePackage{enumitem,amsfonts,amssymb} \setitemize[1]{label={\small\color{itemcolor}$\blacktriangleright$},itemsep=0pt} \setitemize[2]{label={\small\color{itemcolor}$\triangleright$},itemsep=0pt} \setenumerate[1]{label={\small\color{itemcolor}\arabic*.},itemsep=0pt} \def\MacroFont{\fontencoding\encodingdefault \fontfamily\ttdefault \fontseries\mddefault \fontshape\updefault \color{verbcolor}\selectfont}% \def\verbatim@font{\normalfont\color{verbcolor}\fontfamily{zi4}\selectfont} \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi \bgroup \verb@eol@error \let\do\@makeother \dospecials \verbatim@font\@noligs \@ifstar\@sverb\@verb} \def\@lbr{\expandafter\@gobble\string\{} \def\@rbr{\expandafter\@gobble\string\}} \def\@bsl{\expandafter\@gobble\string\\} \def\@Bsl#1{\texttt{\@bsl#1}\xspace} \def\trics#1{\protect\@Bsl{#1}} \def\onecs#1{\protect\@Bsl{#1}} %\let\trics\onecs \c@GlossaryColumns=1 \c@IndexColumns=2 \def\index@prologue{\section[Index]{Index}% \markboth{Index}{Index}% Numbers written in italic refer to the page where the corresponding entry is described; numbers underlined refer to the \ifcodeline@index code line of the \fi definition; numbers in roman refer to the \ifcodeline@index code lines \else pages \fi where the entry is used. } \renewcommand\glossary@prologue{% \section[Change History]{Change History}\markboth {{Change History}}{{Change History}} } \renewenvironment{theglossary}{% \glossary@prologue%][\GlossaryMin]% \GlossaryParms \let\item\@idxitem \ignorespaces}% {} \newenvironment{decl}[1][]% {\par\small\addvspace{1.5ex plus 1ex}% \vskip -\parskip \ifx\relax#1\relax \def\@decl@date{}% \else \def\@decl@date{\NEWfeature{#1}}% \fi \noindent%\hspace{-\leftmargini}% \begin{tabular}{l}\hline\ignorespaces}% {\\\hline\end{tabular}\nobreak\@decl@date\par\nobreak \vspace{0.75ex}\vskip -\parskip\ignorespacesafterend\noindent} \def\Small{\fontsize{8.5}{9.5}\selectfont} \def\PDF{\@ifnextchar/{\@PDF}{\@@PDF}} \def\@PDF/#1{{\Small PDF/#1}} \def\PDFVT{{\Small PDF/VT}\xspace} \def\@@PDF{{\Small PDF}\xspace} \def\ISO{{\Small ISO}\xspace} \def\tsc#1{{\Small#1}\xspace} \endinput %% %% End of file 'rvdtx.sty' %%