alpar@0: %%
alpar@0: %% pdfwidgets.sty
alpar@0: %%
alpar@0: %% $Id: pdfwidgets.sty,v 1.2 2007-10-22 09:45:17 cvr Exp $
alpar@0: %%    
alpar@0: %% (c) C. V. Radhakrishnan <cvr@river-valley.org>
alpar@0: %%
alpar@0: %% This package may be distributed under the terms of the LaTeX Project 
alpar@0: %% Public License, as described in lppl.txt in the base LaTeX distribution.
alpar@0: %% Either version 1.0 or, at your option, any later version.
alpar@0: %%
alpar@0: %\RequirePackage[oldstyle]{minion}
alpar@0: %\RequirePackage[scaled=.8]{prima}
alpar@0: %\RequirePackage[scaled=.9]{lfr}
alpar@0: \usepackage[dvipsnames,svgnames]{xcolor}
alpar@0: \RequirePackage{graphicx}
alpar@0: \RequirePackage{tikz}
alpar@0: \usetikzlibrary{backgrounds}
alpar@0: 
alpar@0: %\def\thesection{\ifnum\c@section<10
alpar@0: %    \protect\phantom{0}\fi\arabic{section}}
alpar@0: 
alpar@0: \newdimen\lmrgn
alpar@0: \def\rulecolor{orange}
alpar@0: \def\rulewidth{1pt}
alpar@0: \pgfdeclareshape{filledbox}{%
alpar@0:   \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
alpar@0:   \inheritanchorborder[from=rectangle]
alpar@0:   \inheritanchor[from=rectangle]{center}
alpar@0:   \inheritanchor[from=rectangle]{north}
alpar@0:   \inheritanchor[from=rectangle]{south}
alpar@0:   \inheritanchor[from=rectangle]{west}
alpar@0:   \inheritanchor[from=rectangle]{east}
alpar@0:   % ... and possibly more
alpar@0:   \backgroundpath{% this is new
alpar@0:     % store lower right in xa/ya and upper right in xb/yb
alpar@0:     \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
alpar@0:     \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
alpar@0:     % compute corner of ``flipped page''
alpar@0:     \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
alpar@0:     \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
alpar@0:     % construct main path
alpar@0:     \pgfsetlinewidth{\rulewidth}
alpar@0:     \pgfsetstrokecolor{\rulecolor}
alpar@0:     \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
alpar@0:   \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
alpar@0: %  \pgfsetcornersarced{\pgforigin}
alpar@0:   \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
alpar@0:   \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
alpar@0:   \pgfsetcornersarced{\pgforigin}
alpar@0:     \pgfpathclose ;
alpar@0: %  \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
alpar@0:  }%
alpar@0: }
alpar@0: \pgfdeclareshape{roundedbox}{%
alpar@0:   \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
alpar@0:   \inheritanchorborder[from=rectangle]
alpar@0:   \inheritanchor[from=rectangle]{center}
alpar@0:   \inheritanchor[from=rectangle]{north}
alpar@0:   \inheritanchor[from=rectangle]{south}
alpar@0:   \inheritanchor[from=rectangle]{west}
alpar@0:   \inheritanchor[from=rectangle]{east}
alpar@0:   % ... and possibly more
alpar@0:   \backgroundpath{% this is new
alpar@0:     % store lower right in xa/ya and upper right in xb/yb
alpar@0:     \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
alpar@0:     \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
alpar@0:     % compute corner of ``flipped page''
alpar@0:     \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
alpar@0:     \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
alpar@0:     % construct main path
alpar@0:     \pgfsetlinewidth{\rulewidth}
alpar@0:     \pgfsetstrokecolor{\rulecolor}
alpar@0:     \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
alpar@0:   \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
alpar@0: %  \pgfsetcornersarced{\pgforigin}
alpar@0:   \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
alpar@0:   \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
alpar@0: %  \pgfsetcornersarced{\pgforigin}
alpar@0:   \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
alpar@0:     \pgfpathclose ;
alpar@0: %  \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
alpar@0:  }%
alpar@0: }
alpar@0: 
alpar@0: 
alpar@0: 
alpar@0: 
alpar@0: \pgfdeclareshape{buttonbox}{%
alpar@0:   \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
alpar@0:   \inheritanchorborder[from=rectangle]
alpar@0:   \inheritanchor[from=rectangle]{center}
alpar@0:   \inheritanchor[from=rectangle]{north}
alpar@0:   \inheritanchor[from=rectangle]{south}
alpar@0:   \inheritanchor[from=rectangle]{west}
alpar@0:   \inheritanchor[from=rectangle]{east}
alpar@0:   % ... and possibly more
alpar@0:   \backgroundpath{% this is new
alpar@0:     % store lower right in xa/ya and upper right in xb/yb
alpar@0:     \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
alpar@0:     \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
alpar@0:     % compute corner of ``flipped page''
alpar@0:     \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
alpar@0:     \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
alpar@0:     % construct main path
alpar@0:     \pgfsetlinewidth{1pt}
alpar@0:     \pgfsetstrokecolor{blue!10}
alpar@0:     \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
alpar@0:   \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
alpar@0: %  \pgfsetcornersarced{\pgforigin}
alpar@0:   \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
alpar@0:   \pgfsetcornersarced{\pgforigin}
alpar@0: %  \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
alpar@0:   \pgfsetcornersarced{\pgforigin}
alpar@0:     \pgfpathclose ;
alpar@0: %  \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
alpar@0:  }%
alpar@0: }
alpar@0: \pgfdeclareshape{quotedbox}{%
alpar@0:   \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
alpar@0:   \inheritanchorborder[from=rectangle]
alpar@0:   \inheritanchor[from=rectangle]{center}
alpar@0:   \inheritanchor[from=rectangle]{north}
alpar@0:   \inheritanchor[from=rectangle]{south}
alpar@0:   \inheritanchor[from=rectangle]{west}
alpar@0:   \inheritanchor[from=rectangle]{east}
alpar@0:   % ... and possibly more
alpar@0:   \backgroundpath{% this is new
alpar@0:     % store lower right in xa/ya and upper right in xb/yb
alpar@0:     \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
alpar@0:     \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
alpar@0:     % compute corner of ``flipped page''
alpar@0:     \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
alpar@0:     \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
alpar@0:     % construct main path
alpar@0:     \pgfsetlinewidth{\rulewidth}
alpar@0:     \pgfsetstrokecolor{\rulecolor}
alpar@0:     \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
alpar@0:   \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
alpar@0:   \pgfsetcornersarced{\pgforigin}
alpar@0: %  \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
alpar@0:   \pgfsetcornersarced{\pgforigin}
alpar@0: %  \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
alpar@0:     \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
alpar@0:   \pgfsetcornersarced{\pgforigin}
alpar@0:     \pgfpathclose ;
alpar@0: %  \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
alpar@0:  }%
alpar@0: }
alpar@0: 
alpar@0: \newcounter{clip}
alpar@0: \newdimen\mywidth
alpar@0: \mywidth=\linewidth
alpar@0: 
alpar@0: \def\src#1{\gdef\@src{#1}}\let\@src\@empty
alpar@0: \def\includeclip{\@ifnextchar[{\@includeclip}{\@includeclip[]}}
alpar@0: \def\@includeclip[#1]#2#3#4{\par
alpar@0: %    \vskip.75\baselineskip plus 3pt minus 1pt
alpar@0:     \computeLinewidth{\mywidth}%
alpar@0:     \begingroup\color{white}%
alpar@0:      \noindent%
alpar@0:      \begin{tikzpicture}
alpar@0:       %\node[fill=black!10,draw,shape=filledbox,
alpar@0:       \node[fill=black!10,%
alpar@0: 			draw,
alpar@0: 			shade,%
alpar@0: 			top color=blue!10,
alpar@0: 			bottom color=cyan!5,
alpar@0: 			shape=filledbox,
alpar@0:       inner sep=\Sep,
alpar@0:       text width=\Linewidth] (x)
alpar@0:       {\parbox{\Linewidth}
alpar@0:       {\ifx\@src\@empty\else\refstepcounter{clip}\label{clip\theclip}%
alpar@0: 			  {\par\vskip6pt\color{orange}\sffamily\small
alpar@0: 				 ~Clip \theclip:\space\@src.}%
alpar@0: 			 \par\vskip3pt\fi\normalcolor
alpar@0: 			 \includegraphics[width=\Linewidth,page={#2},%
alpar@0:          viewport={#3},clip=true,#1]{#4}}
alpar@0:        \hspace*{-10pt}};
alpar@0:       \end{tikzpicture}
alpar@0:      \endgroup
alpar@0: %     \par\vskip.5\baselineskip
alpar@0: %         plus 3pt minus 1pt
alpar@0: 				 }
alpar@0: %%                                         
alpar@0: %% include clippings from a pdf document:
alpar@0: %% #1 => Optional argument for \includegraphics
alpar@0: %% #2 => page number
alpar@0: %% #3 => co-ordinates
alpar@0: %% #4 => file name
alpar@0: 
alpar@0: \newenvironment{quoted}{%\bigskip
alpar@0:     \computeLinewidth{.95\linewidth}%
alpar@0:     \global\setbox0=\hbox\bgroup
alpar@0: 	   \begin{minipage}{.95\linewidth}\color{brown}%
alpar@0: 		 \footnotesize\ttfamily\obeyspaces\obeylines}
alpar@0: 	{\end{minipage}\egroup
alpar@0:    \vskip12pt plus 3pt minus 3pt\noindent\begin{tikzpicture}
alpar@0: 	  \node[fill=blue!10,draw,shade,top color=orange!10,
alpar@0: 		      bottom color=white,shape=filledbox,
alpar@0: 		 inner sep=8pt,text width=\Linewidth] (x) {\box0} ;
alpar@0:  	  \end{tikzpicture}%
alpar@0: 	 \vskip12pt plus 3pt minus 3pt}
alpar@0: 
alpar@0: \newdimen\Linewidth
alpar@0: \newdimen\Sep
alpar@0: \def\computeLinewidth#1{\global\setlength\Linewidth{#1}%
alpar@0:    \global\addtolength{\Linewidth}{-2\Sep}}
alpar@0: 
alpar@0: \newdimen\npskip
alpar@0: \npskip=0mm
alpar@0: 
alpar@0: \long\def\NavigationPanel{%
alpar@0:    \global\setbox0=\hbox\bgroup
alpar@0: 	   \begin{minipage}[t][.8125\panelheight][t]{.9\panelwidth}\color{brown}%
alpar@0:      %\centering
alpar@0:      \ifx\@pinclude\empty\relax\par\vfill\else
alpar@0: 		 \@pinclude\fi
alpar@0: 		 %River Valley Technologies
alpar@0: 	   \end{minipage}\egroup
alpar@0: 		 \Sep=.5cm
alpar@0: 		 \@tempdima=\panelwidth
alpar@0: 		 \advance\@tempdima-1cm
alpar@0: 		 \computeLinewidth{\@tempdima}%
alpar@0: 		 \def\rulewidth{.2pt}%
alpar@0: 	 \noindent\begin{tikzpicture}
alpar@0: 	  \node[fill=blue!10,draw,shade,bottom color=brown!30,
alpar@0: 		      top color=white,shape=filledbox,
alpar@0: 		 inner sep=\the\Sep,text width=\Linewidth] (x) 
alpar@0: 		 {\hspace*{\npskip}\box0} ;
alpar@0:  	  \end{tikzpicture}%
alpar@0: 		\vspace*{.0125\panelheight}
alpar@0: }
alpar@0: 
alpar@0: \long\def\pinclude#1{\gdef\@pinclude{#1}}
alpar@0: \let\@pinclude\empty
alpar@0: 
alpar@0: \def\Strut{\vrule depth 2pt height 10pt width 0pt}
alpar@0: \def\pdfButton#1#2{\begin{tikzpicture}
alpar@0:      \node[fill=blue!10,draw,shade,top color=blue!50,
alpar@0: 		       bottom color=white,shape=buttonbox,
alpar@0: 					 inner sep=2pt,text width=#1](x) 
alpar@0: 					 {\parbox{#1}{\centering\Strut#2}}; \end{tikzpicture}}
alpar@0: 
alpar@0: \def\vpanel{\def\@linkcolor{blue}%
alpar@0:             \def\@urlcolor{blue}%
alpar@0: 						\def\@menucolor{blue}%
alpar@0:        \begin{minipage}[t][\vpanelheight][c]{\paperwidth}%
alpar@0:        \normalsfcodes%
alpar@0:    \hspace*{.25cm}
alpar@0: 	  \begin{minipage}[c][\vpanelheight][c]{17cm}
alpar@0: 		 \parbox[c][27mm][b]{15mm}%
alpar@0: %		  {\includegraphics[width=15mm]{logo4.pdf}}\hfill%\hspace{1cm}
alpar@0:      {\def\rulecolor{Goldenrod}%
alpar@0: 		  \def\rulewidth{1pt}%
alpar@0: 			\begin{tikzpicture}%
alpar@0:       %\node[fill=black!10,draw,shape=filledbox,
alpar@0:       \node[fill=white!10,%
alpar@0: 			 draw,
alpar@0: %			 shade,%
alpar@0: %			 top color=blue!10,
alpar@0: %			 bottom color=white,
alpar@0: 			 shape=roundedbox,
alpar@0:       inner sep=2mm,
alpar@0:       text width=13mm] (x)
alpar@0:       {\includegraphics[width=13mm]{els-logo.pdf}};
alpar@0: 			\end{tikzpicture}}\hfill
alpar@0: %
alpar@0:      \parbox[c][24mm][b]{145mm}%	
alpar@0: 	    {{\fontsize{30}{30}\selectfont\textsf{\color{white}elsarticle.cls}}
alpar@0: 			\quad{\fontsize{14}{14}\selectfont\sffamily\color{blue!50}
alpar@0: 			 A better way to format your submission}}
alpar@0:     \end{minipage} 
alpar@0: 	 \hfill
alpar@0: 	 \begin{minipage}[c][\vpanelheight][b]{7.9cm}
alpar@0: 	  \sffamily\footnotesize
alpar@0: 	  \pdfButton{2cm}{\href{mailto:elsarticle@river-valley.com}{BUGS}}
alpar@0: 	  \pdfButton{2cm}{\href{http://support.river-valley.com}{SUPPORT}}
alpar@0: 	  \pdfButton{2cm}%
alpar@0: 		 {\href{http://www.elsevier.com/locate/latex}%
alpar@0: 		  {RESOURCES}}
alpar@0: %		\pdfButton{2cm}{\Acrobatmenu{GoToPage}{GoTo}}
alpar@0: 	 \end{minipage}\\
alpar@0: 	 \rule{\paperwidth}{0.1pt}
alpar@0: 	 \end{minipage}%
alpar@0: }
alpar@0: 
alpar@0: \@ifundefined{backgroundcolor}%
alpar@0:   {\def\backgroundcolor#1{\gdef\@backgroundcolor{#1}}}{}
alpar@0: \colorlet{panelbackground}{orange!10}
alpar@0: \backgroundcolor{orange!10}
alpar@0: \def\@urlcolor{brown}
alpar@0: \def\@linkcolor{brown}
alpar@0: \def\@menucolor{brown}
alpar@0: 
alpar@0: \RequirePackage{moreverb}
alpar@0: 
alpar@0: \newenvironment{vquote}%
alpar@0:     {\medskip
alpar@0: 		 \verbatimwrite{tmp.tex}}
alpar@0:     {\endverbatimwrite
alpar@0: 		 \aftergroup\printBox}
alpar@0: 
alpar@0: \def\printBox{\bgroup\def\rulecolor{orange}%
alpar@0:     \def\rulewidth{.2pt}%
alpar@0: 		\noindent\begin{tikzpicture}
alpar@0: 	  \node[fill=blue!10,draw,shade,top color=white!10,
alpar@0: 		      bottom color=cyan!5,shape=quotedbox,
alpar@0: 		 inner sep=8pt,text width=.95\linewidth] (x) 
alpar@0: 		 {\color{orange}\verbatiminput{tmp.tex}%
alpar@0: 		 \vspace*{-\baselineskip}%
alpar@0: 		 } ;
alpar@0:  	  \end{tikzpicture}%
alpar@0: 		\egroup
alpar@0: 		\medskip
alpar@0: }
alpar@0: \def\red{\color{Sepia}}
alpar@0: \def\verbatim@font{\red\normalfont\ttfamily}
alpar@0: 
alpar@0: \def\verbatimcontinuewrite{%
alpar@0:   \@bsphack
alpar@0: %  \verbatim@out=#1
alpar@0:   \let\do\@makeother\dospecials
alpar@0:   \obeyspaces\catcode`\^^M\active \catcode`\^^I=12
alpar@0:   \def\verbatim@processline{%
alpar@0:     \immediate\write\verbatim@out
alpar@0:       {\the\verbatim@line}}%
alpar@0:   \verbatim@start}
alpar@0: 
alpar@0: \def\@@@lbr{\expandafter\@gobble\string\{}
alpar@0: \def\@@@rbr{\expandafter\@gobble\string\}}
alpar@0: \def\@@@pcr{\expandafter\@gobble\string\%}
alpar@0: 
alpar@0: 
alpar@0: %\immediate\write18{touch mytool.tex
alpar@0: %  ^^J rm mytool.tex ^^J touch mytool.tex}
alpar@0: 
alpar@0: \newenvironment{toolwrite}[1]%
alpar@0:   {\@tempdima=#1
alpar@0: 	 \verbatimwrite{xx}}
alpar@0: 	{\endverbatimwrite
alpar@0: 	 \immediate\write18{echo 
alpar@0: 	 "\string\Clear\@@@lbr\the\@tempdima\@@@rbr\@@@lbr\@@@pcr">>mytool.tex^^J
alpar@0: 	   cat xx.tex >> mytool.tex ^^J
alpar@0: 		 echo "\@@@rbr" >> mytool.tex}}
alpar@0: 
alpar@0: \tikzstyle{place}=[scale=.39,rectangle,draw=blue!90,fill=blue!30,thin,%
alpar@0:                    minimum height=1mm,minimum width=13mm]
alpar@0: \tikzstyle{trans}=[scale=.39,rectangle,draw=Olive,fill=Olive!20,thin,%
alpar@0:                    minimum height=1mm,minimum width=13mm]
alpar@0: \tikzstyle{past}=[scale=.39,rectangle,draw=Olive,fill=Olive!60,thin,%
alpar@0:                    minimum height=1mm,minimum width=13mm]
alpar@0: 
alpar@0: \def\printSq#1{\parbox{107mm}{\@tempcnta=1
alpar@0:    \let\printfill\@empty
alpar@0:    \loop\ifnum\@tempcnta<#1
alpar@0: 	  {\printfill\ifnum\c@page=\@tempcnta
alpar@0:     	 \tikz\node at(0,0) [place]{};\else
alpar@0: 			\ifnum\c@page<\@tempcnta
alpar@0: 		   \hyperlink{page.\the\@tempcnta}{\tikz\node at(0,0)
alpar@0: 			 [trans]{};}%
alpar@0: 			\else
alpar@0: 		   \hyperlink{page.\the\@tempcnta}{\tikz\node at(0,0)
alpar@0: 			 [past]{};}%
alpar@0: 			\fi\fi}%
alpar@0: 		\advance\@tempcnta 1 \let\printfill\,\repeat}}	
alpar@0: 
alpar@0: 
alpar@0: \endinput
alpar@0: 
alpar@0: