1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/elsarticle/doc/pdfwidgets.sty Fri Nov 18 16:18:02 2016 +0100
1.3 @@ -0,0 +1,382 @@
1.4 +%%
1.5 +%% pdfwidgets.sty
1.6 +%%
1.7 +%% $Id: pdfwidgets.sty,v 1.2 2007-10-22 09:45:17 cvr Exp $
1.8 +%%
1.9 +%% (c) C. V. Radhakrishnan <cvr@river-valley.org>
1.10 +%%
1.11 +%% This package may be distributed under the terms of the LaTeX Project
1.12 +%% Public License, as described in lppl.txt in the base LaTeX distribution.
1.13 +%% Either version 1.0 or, at your option, any later version.
1.14 +%%
1.15 +%\RequirePackage[oldstyle]{minion}
1.16 +%\RequirePackage[scaled=.8]{prima}
1.17 +%\RequirePackage[scaled=.9]{lfr}
1.18 +\usepackage[dvipsnames,svgnames]{xcolor}
1.19 +\RequirePackage{graphicx}
1.20 +\RequirePackage{tikz}
1.21 +\usetikzlibrary{backgrounds}
1.22 +
1.23 +%\def\thesection{\ifnum\c@section<10
1.24 +% \protect\phantom{0}\fi\arabic{section}}
1.25 +
1.26 +\newdimen\lmrgn
1.27 +\def\rulecolor{orange}
1.28 +\def\rulewidth{1pt}
1.29 +\pgfdeclareshape{filledbox}{%
1.30 + \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
1.31 + \inheritanchorborder[from=rectangle]
1.32 + \inheritanchor[from=rectangle]{center}
1.33 + \inheritanchor[from=rectangle]{north}
1.34 + \inheritanchor[from=rectangle]{south}
1.35 + \inheritanchor[from=rectangle]{west}
1.36 + \inheritanchor[from=rectangle]{east}
1.37 + % ... and possibly more
1.38 + \backgroundpath{% this is new
1.39 + % store lower right in xa/ya and upper right in xb/yb
1.40 + \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
1.41 + \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
1.42 + % compute corner of ``flipped page''
1.43 + \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
1.44 + \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
1.45 + % construct main path
1.46 + \pgfsetlinewidth{\rulewidth}
1.47 + \pgfsetstrokecolor{\rulecolor}
1.48 + \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
1.49 + \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
1.50 + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
1.51 +% \pgfsetcornersarced{\pgforigin}
1.52 + \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
1.53 + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
1.54 + \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
1.55 + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
1.56 + \pgfsetcornersarced{\pgforigin}
1.57 + \pgfpathclose ;
1.58 +% \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
1.59 + }%
1.60 +}
1.61 +\pgfdeclareshape{roundedbox}{%
1.62 + \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
1.63 + \inheritanchorborder[from=rectangle]
1.64 + \inheritanchor[from=rectangle]{center}
1.65 + \inheritanchor[from=rectangle]{north}
1.66 + \inheritanchor[from=rectangle]{south}
1.67 + \inheritanchor[from=rectangle]{west}
1.68 + \inheritanchor[from=rectangle]{east}
1.69 + % ... and possibly more
1.70 + \backgroundpath{% this is new
1.71 + % store lower right in xa/ya and upper right in xb/yb
1.72 + \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
1.73 + \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
1.74 + % compute corner of ``flipped page''
1.75 + \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
1.76 + \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
1.77 + % construct main path
1.78 + \pgfsetlinewidth{\rulewidth}
1.79 + \pgfsetstrokecolor{\rulecolor}
1.80 + \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
1.81 + \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
1.82 + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
1.83 +% \pgfsetcornersarced{\pgforigin}
1.84 + \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
1.85 + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
1.86 + \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
1.87 + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
1.88 +% \pgfsetcornersarced{\pgforigin}
1.89 + \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
1.90 + \pgfpathclose ;
1.91 +% \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
1.92 + }%
1.93 +}
1.94 +
1.95 +
1.96 +
1.97 +
1.98 +\pgfdeclareshape{buttonbox}{%
1.99 + \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
1.100 + \inheritanchorborder[from=rectangle]
1.101 + \inheritanchor[from=rectangle]{center}
1.102 + \inheritanchor[from=rectangle]{north}
1.103 + \inheritanchor[from=rectangle]{south}
1.104 + \inheritanchor[from=rectangle]{west}
1.105 + \inheritanchor[from=rectangle]{east}
1.106 + % ... and possibly more
1.107 + \backgroundpath{% this is new
1.108 + % store lower right in xa/ya and upper right in xb/yb
1.109 + \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
1.110 + \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
1.111 + % compute corner of ``flipped page''
1.112 + \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
1.113 + \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
1.114 + % construct main path
1.115 + \pgfsetlinewidth{1pt}
1.116 + \pgfsetstrokecolor{blue!10}
1.117 + \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
1.118 + \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
1.119 + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
1.120 +% \pgfsetcornersarced{\pgforigin}
1.121 + \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
1.122 + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
1.123 + \pgfsetcornersarced{\pgforigin}
1.124 +% \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
1.125 + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
1.126 + \pgfsetcornersarced{\pgforigin}
1.127 + \pgfpathclose ;
1.128 +% \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
1.129 + }%
1.130 +}
1.131 +\pgfdeclareshape{quotedbox}{%
1.132 + \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
1.133 + \inheritanchorborder[from=rectangle]
1.134 + \inheritanchor[from=rectangle]{center}
1.135 + \inheritanchor[from=rectangle]{north}
1.136 + \inheritanchor[from=rectangle]{south}
1.137 + \inheritanchor[from=rectangle]{west}
1.138 + \inheritanchor[from=rectangle]{east}
1.139 + % ... and possibly more
1.140 + \backgroundpath{% this is new
1.141 + % store lower right in xa/ya and upper right in xb/yb
1.142 + \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
1.143 + \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
1.144 + % compute corner of ``flipped page''
1.145 + \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
1.146 + \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
1.147 + % construct main path
1.148 + \pgfsetlinewidth{\rulewidth}
1.149 + \pgfsetstrokecolor{\rulecolor}
1.150 + \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
1.151 + \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
1.152 + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
1.153 + \pgfsetcornersarced{\pgforigin}
1.154 +% \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
1.155 + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
1.156 + \pgfsetcornersarced{\pgforigin}
1.157 +% \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
1.158 + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
1.159 + \pgfsetcornersarced{\pgforigin}
1.160 + \pgfpathclose ;
1.161 +% \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
1.162 + }%
1.163 +}
1.164 +
1.165 +\newcounter{clip}
1.166 +\newdimen\mywidth
1.167 +\mywidth=\linewidth
1.168 +
1.169 +\def\src#1{\gdef\@src{#1}}\let\@src\@empty
1.170 +\def\includeclip{\@ifnextchar[{\@includeclip}{\@includeclip[]}}
1.171 +\def\@includeclip[#1]#2#3#4{\par
1.172 +% \vskip.75\baselineskip plus 3pt minus 1pt
1.173 + \computeLinewidth{\mywidth}%
1.174 + \begingroup\color{white}%
1.175 + \noindent%
1.176 + \begin{tikzpicture}
1.177 + %\node[fill=black!10,draw,shape=filledbox,
1.178 + \node[fill=black!10,%
1.179 + draw,
1.180 + shade,%
1.181 + top color=blue!10,
1.182 + bottom color=cyan!5,
1.183 + shape=filledbox,
1.184 + inner sep=\Sep,
1.185 + text width=\Linewidth] (x)
1.186 + {\parbox{\Linewidth}
1.187 + {\ifx\@src\@empty\else\refstepcounter{clip}\label{clip\theclip}%
1.188 + {\par\vskip6pt\color{orange}\sffamily\small
1.189 + ~Clip \theclip:\space\@src.}%
1.190 + \par\vskip3pt\fi\normalcolor
1.191 + \includegraphics[width=\Linewidth,page={#2},%
1.192 + viewport={#3},clip=true,#1]{#4}}
1.193 + \hspace*{-10pt}};
1.194 + \end{tikzpicture}
1.195 + \endgroup
1.196 +% \par\vskip.5\baselineskip
1.197 +% plus 3pt minus 1pt
1.198 + }
1.199 +%%
1.200 +%% include clippings from a pdf document:
1.201 +%% #1 => Optional argument for \includegraphics
1.202 +%% #2 => page number
1.203 +%% #3 => co-ordinates
1.204 +%% #4 => file name
1.205 +
1.206 +\newenvironment{quoted}{%\bigskip
1.207 + \computeLinewidth{.95\linewidth}%
1.208 + \global\setbox0=\hbox\bgroup
1.209 + \begin{minipage}{.95\linewidth}\color{brown}%
1.210 + \footnotesize\ttfamily\obeyspaces\obeylines}
1.211 + {\end{minipage}\egroup
1.212 + \vskip12pt plus 3pt minus 3pt\noindent\begin{tikzpicture}
1.213 + \node[fill=blue!10,draw,shade,top color=orange!10,
1.214 + bottom color=white,shape=filledbox,
1.215 + inner sep=8pt,text width=\Linewidth] (x) {\box0} ;
1.216 + \end{tikzpicture}%
1.217 + \vskip12pt plus 3pt minus 3pt}
1.218 +
1.219 +\newdimen\Linewidth
1.220 +\newdimen\Sep
1.221 +\def\computeLinewidth#1{\global\setlength\Linewidth{#1}%
1.222 + \global\addtolength{\Linewidth}{-2\Sep}}
1.223 +
1.224 +\newdimen\npskip
1.225 +\npskip=0mm
1.226 +
1.227 +\long\def\NavigationPanel{%
1.228 + \global\setbox0=\hbox\bgroup
1.229 + \begin{minipage}[t][.8125\panelheight][t]{.9\panelwidth}\color{brown}%
1.230 + %\centering
1.231 + \ifx\@pinclude\empty\relax\par\vfill\else
1.232 + \@pinclude\fi
1.233 + %River Valley Technologies
1.234 + \end{minipage}\egroup
1.235 + \Sep=.5cm
1.236 + \@tempdima=\panelwidth
1.237 + \advance\@tempdima-1cm
1.238 + \computeLinewidth{\@tempdima}%
1.239 + \def\rulewidth{.2pt}%
1.240 + \noindent\begin{tikzpicture}
1.241 + \node[fill=blue!10,draw,shade,bottom color=brown!30,
1.242 + top color=white,shape=filledbox,
1.243 + inner sep=\the\Sep,text width=\Linewidth] (x)
1.244 + {\hspace*{\npskip}\box0} ;
1.245 + \end{tikzpicture}%
1.246 + \vspace*{.0125\panelheight}
1.247 +}
1.248 +
1.249 +\long\def\pinclude#1{\gdef\@pinclude{#1}}
1.250 +\let\@pinclude\empty
1.251 +
1.252 +\def\Strut{\vrule depth 2pt height 10pt width 0pt}
1.253 +\def\pdfButton#1#2{\begin{tikzpicture}
1.254 + \node[fill=blue!10,draw,shade,top color=blue!50,
1.255 + bottom color=white,shape=buttonbox,
1.256 + inner sep=2pt,text width=#1](x)
1.257 + {\parbox{#1}{\centering\Strut#2}}; \end{tikzpicture}}
1.258 +
1.259 +\def\vpanel{\def\@linkcolor{blue}%
1.260 + \def\@urlcolor{blue}%
1.261 + \def\@menucolor{blue}%
1.262 + \begin{minipage}[t][\vpanelheight][c]{\paperwidth}%
1.263 + \normalsfcodes%
1.264 + \hspace*{.25cm}
1.265 + \begin{minipage}[c][\vpanelheight][c]{17cm}
1.266 + \parbox[c][27mm][b]{15mm}%
1.267 +% {\includegraphics[width=15mm]{logo4.pdf}}\hfill%\hspace{1cm}
1.268 + {\def\rulecolor{Goldenrod}%
1.269 + \def\rulewidth{1pt}%
1.270 + \begin{tikzpicture}%
1.271 + %\node[fill=black!10,draw,shape=filledbox,
1.272 + \node[fill=white!10,%
1.273 + draw,
1.274 +% shade,%
1.275 +% top color=blue!10,
1.276 +% bottom color=white,
1.277 + shape=roundedbox,
1.278 + inner sep=2mm,
1.279 + text width=13mm] (x)
1.280 + {\includegraphics[width=13mm]{els-logo.pdf}};
1.281 + \end{tikzpicture}}\hfill
1.282 +%
1.283 + \parbox[c][24mm][b]{145mm}%
1.284 + {{\fontsize{30}{30}\selectfont\textsf{\color{white}elsarticle.cls}}
1.285 + \quad{\fontsize{14}{14}\selectfont\sffamily\color{blue!50}
1.286 + A better way to format your submission}}
1.287 + \end{minipage}
1.288 + \hfill
1.289 + \begin{minipage}[c][\vpanelheight][b]{7.9cm}
1.290 + \sffamily\footnotesize
1.291 + \pdfButton{2cm}{\href{mailto:elsarticle@river-valley.com}{BUGS}}
1.292 + \pdfButton{2cm}{\href{http://support.river-valley.com}{SUPPORT}}
1.293 + \pdfButton{2cm}%
1.294 + {\href{http://www.elsevier.com/locate/latex}%
1.295 + {RESOURCES}}
1.296 +% \pdfButton{2cm}{\Acrobatmenu{GoToPage}{GoTo}}
1.297 + \end{minipage}\\
1.298 + \rule{\paperwidth}{0.1pt}
1.299 + \end{minipage}%
1.300 +}
1.301 +
1.302 +\@ifundefined{backgroundcolor}%
1.303 + {\def\backgroundcolor#1{\gdef\@backgroundcolor{#1}}}{}
1.304 +\colorlet{panelbackground}{orange!10}
1.305 +\backgroundcolor{orange!10}
1.306 +\def\@urlcolor{brown}
1.307 +\def\@linkcolor{brown}
1.308 +\def\@menucolor{brown}
1.309 +
1.310 +\RequirePackage{moreverb}
1.311 +
1.312 +\newenvironment{vquote}%
1.313 + {\medskip
1.314 + \verbatimwrite{tmp.tex}}
1.315 + {\endverbatimwrite
1.316 + \aftergroup\printBox}
1.317 +
1.318 +\def\printBox{\bgroup\def\rulecolor{orange}%
1.319 + \def\rulewidth{.2pt}%
1.320 + \noindent\begin{tikzpicture}
1.321 + \node[fill=blue!10,draw,shade,top color=white!10,
1.322 + bottom color=cyan!5,shape=quotedbox,
1.323 + inner sep=8pt,text width=.95\linewidth] (x)
1.324 + {\color{orange}\verbatiminput{tmp.tex}%
1.325 + \vspace*{-\baselineskip}%
1.326 + } ;
1.327 + \end{tikzpicture}%
1.328 + \egroup
1.329 + \medskip
1.330 +}
1.331 +\def\red{\color{Sepia}}
1.332 +\def\verbatim@font{\red\normalfont\ttfamily}
1.333 +
1.334 +\def\verbatimcontinuewrite{%
1.335 + \@bsphack
1.336 +% \verbatim@out=#1
1.337 + \let\do\@makeother\dospecials
1.338 + \obeyspaces\catcode`\^^M\active \catcode`\^^I=12
1.339 + \def\verbatim@processline{%
1.340 + \immediate\write\verbatim@out
1.341 + {\the\verbatim@line}}%
1.342 + \verbatim@start}
1.343 +
1.344 +\def\@@@lbr{\expandafter\@gobble\string\{}
1.345 +\def\@@@rbr{\expandafter\@gobble\string\}}
1.346 +\def\@@@pcr{\expandafter\@gobble\string\%}
1.347 +
1.348 +
1.349 +%\immediate\write18{touch mytool.tex
1.350 +% ^^J rm mytool.tex ^^J touch mytool.tex}
1.351 +
1.352 +\newenvironment{toolwrite}[1]%
1.353 + {\@tempdima=#1
1.354 + \verbatimwrite{xx}}
1.355 + {\endverbatimwrite
1.356 + \immediate\write18{echo
1.357 + "\string\Clear\@@@lbr\the\@tempdima\@@@rbr\@@@lbr\@@@pcr">>mytool.tex^^J
1.358 + cat xx.tex >> mytool.tex ^^J
1.359 + echo "\@@@rbr" >> mytool.tex}}
1.360 +
1.361 +\tikzstyle{place}=[scale=.39,rectangle,draw=blue!90,fill=blue!30,thin,%
1.362 + minimum height=1mm,minimum width=13mm]
1.363 +\tikzstyle{trans}=[scale=.39,rectangle,draw=Olive,fill=Olive!20,thin,%
1.364 + minimum height=1mm,minimum width=13mm]
1.365 +\tikzstyle{past}=[scale=.39,rectangle,draw=Olive,fill=Olive!60,thin,%
1.366 + minimum height=1mm,minimum width=13mm]
1.367 +
1.368 +\def\printSq#1{\parbox{107mm}{\@tempcnta=1
1.369 + \let\printfill\@empty
1.370 + \loop\ifnum\@tempcnta<#1
1.371 + {\printfill\ifnum\c@page=\@tempcnta
1.372 + \tikz\node at(0,0) [place]{};\else
1.373 + \ifnum\c@page<\@tempcnta
1.374 + \hyperlink{page.\the\@tempcnta}{\tikz\node at(0,0)
1.375 + [trans]{};}%
1.376 + \else
1.377 + \hyperlink{page.\the\@tempcnta}{\tikz\node at(0,0)
1.378 + [past]{};}%
1.379 + \fi\fi}%
1.380 + \advance\@tempcnta 1 \let\printfill\,\repeat}}
1.381 +
1.382 +
1.383 +\endinput
1.384 +
1.385 +