%%
%% This is file 'pdfpagediff-doc.sty'.
%%
%% A supplementary package with auxiliary macros needed to typeset
%% the documentation file, pdfpagediff-doc.tex.
%% 
%% File: pdfpagediff-doc.sty Copyright (c) 2010-2015, CV Radhakrishnan
%%       JWRA 34, Jagathy, Trivandrum 695014
%%       http://www.cvr.cc  Email: <cvr@cvr.cc>
%%       
%% This package may be distributed under the terms of the LaTeX Project 
%% Public License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
%% $Id: pdfpagediff-doc.sty,v 1.3 2015/07/24 09:46:59 cvr Exp cvr $
%% 
%%
\RequirePackage[dvipsnames,svgnames]{xcolor}
\RequirePackage{graphicx}
\RequirePackage{tikz}
\usetikzlibrary{backgrounds}
\newdimen\lmrgn
\def\rulecolor{seccolor}
\def\rulewidth{1pt}
\pgfdeclareshape{filledbox}{%
  \inheritsavedanchors[from=rectangle] % 
  \inheritanchorborder[from=rectangle]
  \inheritanchor[from=rectangle]{center}
  \inheritanchor[from=rectangle]{north}
  \inheritanchor[from=rectangle]{south}
  \inheritanchor[from=rectangle]{west}
  \inheritanchor[from=rectangle]{east}
  \backgroundpath{% 
    \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
    \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
    \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt 
    \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
    \pgfsetlinewidth{.2pt}
    \pgfsetstrokecolor{seccolor}
    \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
  \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
    \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
  \pgfsetcornersarced{\pgforigin}
    \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
  \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
    \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
  \pgfsetcornersarced{\pgforigin}
    \pgfpathclose ;
 }%
}

\newdimen\Linewidth
\setlength\Linewidth{\textwidth}
\addtolength{\Linewidth}{-17pt}
\newcounter{clip}
\def\src#1{\gdef\@src{#1}}\let\@src\@empty
\def\includeclip{\@ifnextchar[{\@includeclip}{\@includeclip[]}}
\def\@includeclip[#1]#2#3#4{\par
    \vskip.75\baselineskip plus 3pt minus 1pt
     \begingroup\color{white}%
     \noindent%
     \begin{tikzpicture}
      %\node[fill=black!10,draw,shape=filledbox,
      \node[fill=white,%
             draw,
             shade,%
             top color=white!10,
             bottom color=white,
             shape=filledbox,
             inner sep=8pt,
      text width=\Linewidth] (x)
      {\parbox{\Linewidth}
      {\ifx\@src\@empty\else\refstepcounter{clip}\label{clip\theclip}%
              {\color{seccolor}\sffamily\scriptsize
                Clip \theclip\space\@src, p.\,#2}%
             \par\vskip3pt\fi\normalcolor
             \includegraphics[width=\Linewidth,page={#2},%
         viewport={#3},clip=true,#1]{#4}}
       \hspace*{-10pt}};
      \end{tikzpicture}
     \endgroup
     \par\vskip.5\baselineskip
         plus 3pt minus 1pt}
%%                                         
%% include clippings from a pdf document:
%% #1 => Optional argument for \includegraphics
%% #2 => page number
%% #3 => co-ordinates
%% #4 => file name

 \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}
%
%
\def\floatpagefraction{.99}
\RequirePackage{geometry}
\geometry{top=2in,
  bottom=1in,
  left=2in,
  right=1in,
  a4paper}

\DeclareRobustCommand{\LaTeX}{L\kern-.25em%
  {\sbox\z@ T%
         \vbox to\ht\z@{%
           \hbox{%
             \check@mathfonts
              \fontsize\sf@size\z@
              \math@fontsfalse\selectfont
              A}%
          \vss}%
        }%
   \kern-.10em%
   \TeX}

\RequirePackage{comment,xspace}
\def\xml{\textsc{xml}\xspace}
\def\latex{{\small\LaTeX}\xspace}
\def\pdf{\textsc{pdf}\xspace}
\def\pdfa{\textsc{pdf/a-1}b\xspace}
\def\pdfx{\textsc{pdf/x-1}a\xspace}
\def\xmp{\textsc{xmp}\xspace}
\def\pdftex{\textsc{pdf{\small\TeX}}\xspace}
\def\defmacro#1{\texttt{\bsl#1}}
\def\thanh{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh\xspace}
\def\gnulinux{\textsc{gnu/linux}\xspace}
\def\bsl{\expandafter\@gobble\string\\}
\def\tex{{\small\TeX}\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}}}

\RequirePackage{shortvrb}
\MakeShortVerb{\|}
\RequirePackage{amsfonts,amssymb}
\IfFileExists{mathpazo.sty}{\RequirePackage{mathpazo}}{}
\IfFileExists{charter.sty}{\RequirePackage{charter}}{}
\IfFileExists{sourcesanspro.sty}{\RequirePackage[osf,light,default]{sourcesanspro}}{}
\IfFileExists{inconsolata.sty}{\RequirePackage[scaled=.9]{inconsolata}}{}

\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@}%
      {-2.25ex\@plus -1ex \@minus -.2ex}%
      {1.5ex \@plus .2ex}%
      {\normalfont\normalsize\bfseries\color{seccolor}}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
      {-1.25ex\@plus -1ex \@minus -.2ex}%
      {1.5ex \@plus .2ex}%
      {\normalfont\normalsize\bfseries\color{seccolor}}}

\puttext(0,36){\botstring}%
 \puttext(0,840){\copy\topbox}

\RequirePackage{colortbl}
\arrayrulecolor{arrayrulecolor}
\let\shline\hline
\def\hline{\noalign{\vskip3pt}\shline\noalign{\vskip4pt}}

\RequirePackage[pdftex,colorlinks]{hyperref}
\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{#1}}
\def\author#1{\gdef\@author{#1}}
\def\@author{CV Radhakrishnan}
\def\@contact{\texttt{cvr@cvr.cc}}
\def\keywords#1{\gdef\@keywords{#1}}
\def\@keywords{\LaTeX, \xml}

\long\def\Hrule{\\[-4pt]\hspace*{-3em}%
     {\color{quicklinkrulecolor}\rule{\linewidth}{.1pt}}\\}

\long\def\dtxmarkone[#1][#2]#3#4#5{\def\next{#1}%
     \ifcase\next\or\Hlink{#4}{#3}\Hrule \fi}

\newcounter{dtx}

\long\def\dtxmarktwo[#1][#2]#3#4#5{\def\next{#1}%
   \stepcounter{dtx}\parbox{.45\linewidth}%
    {\ifcase\next\or\Hlink{#4}{#3}\fi}%
   \ifodd\thedtx\relax\else\Hrule\fi}

%\let\dtxmark\dtxmarkone
\let\dtxmark\dtxmarktwo

\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]{.35\paperwidth}{\fontsize{18pt}{20pt}%
          \raggedright\normalfont\sffamily \selectfont
          \color{titlecolor} \@title\\[6pt]
          {\normalsize\rmfamily\scshape\@author}\\%
          {\footnotesize\textsc{keywords:} \@keywords}}%
        \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}%
           \vspace*{6pt} QUICK LINKS\Hrule
            \IfFileExists{tmp.out}{\input tmp.out}{}%
         }\hspace*{5mm}%
      }%
    }%
  }%
}
\gdef\botstring{\fcolorbox{botrulecolor}{botbgcolor}%
    {\parbox[t][.5in][t]{\paperwidth}%
      {\normalfont\sffamily\footnotesize%
        \color{botcolor}%
        \hspace*{5mm}\parbox[c][.5in][c]{.45\paperwidth}%
         {\raggedright CVR.CC,
           \href{http://www.cvr.cc}{%
            http://www.cvr.cc}\\
            JWRA 34, Jagathy, Trivandrum
           695014, India          
        }\hfill%
       \parbox[c][.5in][c]{1cm}
        {\centering\sffamily\mdseries
          \fcolorbox{pgrulecolor}{pgbgcolor}{\thepage}%
        }\hfill
       \parbox[c][.5in][c]{.45\paperwidth}
        {\raggedleft\begin{tabular}{rl}%
          Version:&\@version\\
          Date:&\@date\\
          Contact:&\@contact
         \end{tabular}\hspace*{5mm}%
        }%
      }%
    }%
  }

\RequirePackage{enumitem}
\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}\small}%

\def\verbatim@font{\normalfont\color{verbcolor}\ttfamily}

\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
  \bgroup
    \verb@eol@error \let\do\@makeother \dospecials
    \verbatim@font\@noligs
    \@ifstar\@sverb\@verb}

\endinput

%%
%% End of file 'pdfpagediff-doc.sty'
%% 