alpar@0
|
1 |
%%
|
alpar@0
|
2 |
%% pdfwidgets.sty
|
alpar@0
|
3 |
%%
|
alpar@0
|
4 |
%% $Id: pdfwidgets.sty,v 1.2 2007-10-22 09:45:17 cvr Exp $
|
alpar@0
|
5 |
%%
|
alpar@0
|
6 |
%% (c) C. V. Radhakrishnan <cvr@river-valley.org>
|
alpar@0
|
7 |
%%
|
alpar@0
|
8 |
%% This package may be distributed under the terms of the LaTeX Project
|
alpar@0
|
9 |
%% Public License, as described in lppl.txt in the base LaTeX distribution.
|
alpar@0
|
10 |
%% Either version 1.0 or, at your option, any later version.
|
alpar@0
|
11 |
%%
|
alpar@0
|
12 |
%\RequirePackage[oldstyle]{minion}
|
alpar@0
|
13 |
%\RequirePackage[scaled=.8]{prima}
|
alpar@0
|
14 |
%\RequirePackage[scaled=.9]{lfr}
|
alpar@0
|
15 |
\usepackage[dvipsnames,svgnames]{xcolor}
|
alpar@0
|
16 |
\RequirePackage{graphicx}
|
alpar@0
|
17 |
\RequirePackage{tikz}
|
alpar@0
|
18 |
\usetikzlibrary{backgrounds}
|
alpar@0
|
19 |
|
alpar@0
|
20 |
%\def\thesection{\ifnum\c@section<10
|
alpar@0
|
21 |
% \protect\phantom{0}\fi\arabic{section}}
|
alpar@0
|
22 |
|
alpar@0
|
23 |
\newdimen\lmrgn
|
alpar@0
|
24 |
\def\rulecolor{orange}
|
alpar@0
|
25 |
\def\rulewidth{1pt}
|
alpar@0
|
26 |
\pgfdeclareshape{filledbox}{%
|
alpar@0
|
27 |
\inheritsavedanchors[from=rectangle] % this is nearly a rectangle
|
alpar@0
|
28 |
\inheritanchorborder[from=rectangle]
|
alpar@0
|
29 |
\inheritanchor[from=rectangle]{center}
|
alpar@0
|
30 |
\inheritanchor[from=rectangle]{north}
|
alpar@0
|
31 |
\inheritanchor[from=rectangle]{south}
|
alpar@0
|
32 |
\inheritanchor[from=rectangle]{west}
|
alpar@0
|
33 |
\inheritanchor[from=rectangle]{east}
|
alpar@0
|
34 |
% ... and possibly more
|
alpar@0
|
35 |
\backgroundpath{% this is new
|
alpar@0
|
36 |
% store lower right in xa/ya and upper right in xb/yb
|
alpar@0
|
37 |
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
|
alpar@0
|
38 |
\northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
|
alpar@0
|
39 |
% compute corner of ``flipped page''
|
alpar@0
|
40 |
\pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
|
alpar@0
|
41 |
\pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
|
alpar@0
|
42 |
% construct main path
|
alpar@0
|
43 |
\pgfsetlinewidth{\rulewidth}
|
alpar@0
|
44 |
\pgfsetstrokecolor{\rulecolor}
|
alpar@0
|
45 |
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
|
alpar@0
|
46 |
\pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
|
alpar@0
|
47 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
|
alpar@0
|
48 |
% \pgfsetcornersarced{\pgforigin}
|
alpar@0
|
49 |
\pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
|
alpar@0
|
50 |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
|
alpar@0
|
51 |
\pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
|
alpar@0
|
52 |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
|
alpar@0
|
53 |
\pgfsetcornersarced{\pgforigin}
|
alpar@0
|
54 |
\pgfpathclose ;
|
alpar@0
|
55 |
% \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
|
alpar@0
|
56 |
}%
|
alpar@0
|
57 |
}
|
alpar@0
|
58 |
\pgfdeclareshape{roundedbox}{%
|
alpar@0
|
59 |
\inheritsavedanchors[from=rectangle] % this is nearly a rectangle
|
alpar@0
|
60 |
\inheritanchorborder[from=rectangle]
|
alpar@0
|
61 |
\inheritanchor[from=rectangle]{center}
|
alpar@0
|
62 |
\inheritanchor[from=rectangle]{north}
|
alpar@0
|
63 |
\inheritanchor[from=rectangle]{south}
|
alpar@0
|
64 |
\inheritanchor[from=rectangle]{west}
|
alpar@0
|
65 |
\inheritanchor[from=rectangle]{east}
|
alpar@0
|
66 |
% ... and possibly more
|
alpar@0
|
67 |
\backgroundpath{% this is new
|
alpar@0
|
68 |
% store lower right in xa/ya and upper right in xb/yb
|
alpar@0
|
69 |
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
|
alpar@0
|
70 |
\northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
|
alpar@0
|
71 |
% compute corner of ``flipped page''
|
alpar@0
|
72 |
\pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
|
alpar@0
|
73 |
\pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
|
alpar@0
|
74 |
% construct main path
|
alpar@0
|
75 |
\pgfsetlinewidth{\rulewidth}
|
alpar@0
|
76 |
\pgfsetstrokecolor{\rulecolor}
|
alpar@0
|
77 |
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
|
alpar@0
|
78 |
\pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
|
alpar@0
|
79 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
|
alpar@0
|
80 |
% \pgfsetcornersarced{\pgforigin}
|
alpar@0
|
81 |
\pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
|
alpar@0
|
82 |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
|
alpar@0
|
83 |
\pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
|
alpar@0
|
84 |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
|
alpar@0
|
85 |
% \pgfsetcornersarced{\pgforigin}
|
alpar@0
|
86 |
\pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
|
alpar@0
|
87 |
\pgfpathclose ;
|
alpar@0
|
88 |
% \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
|
alpar@0
|
89 |
}%
|
alpar@0
|
90 |
}
|
alpar@0
|
91 |
|
alpar@0
|
92 |
|
alpar@0
|
93 |
|
alpar@0
|
94 |
|
alpar@0
|
95 |
\pgfdeclareshape{buttonbox}{%
|
alpar@0
|
96 |
\inheritsavedanchors[from=rectangle] % this is nearly a rectangle
|
alpar@0
|
97 |
\inheritanchorborder[from=rectangle]
|
alpar@0
|
98 |
\inheritanchor[from=rectangle]{center}
|
alpar@0
|
99 |
\inheritanchor[from=rectangle]{north}
|
alpar@0
|
100 |
\inheritanchor[from=rectangle]{south}
|
alpar@0
|
101 |
\inheritanchor[from=rectangle]{west}
|
alpar@0
|
102 |
\inheritanchor[from=rectangle]{east}
|
alpar@0
|
103 |
% ... and possibly more
|
alpar@0
|
104 |
\backgroundpath{% this is new
|
alpar@0
|
105 |
% store lower right in xa/ya and upper right in xb/yb
|
alpar@0
|
106 |
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
|
alpar@0
|
107 |
\northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
|
alpar@0
|
108 |
% compute corner of ``flipped page''
|
alpar@0
|
109 |
\pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
|
alpar@0
|
110 |
\pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
|
alpar@0
|
111 |
% construct main path
|
alpar@0
|
112 |
\pgfsetlinewidth{1pt}
|
alpar@0
|
113 |
\pgfsetstrokecolor{blue!10}
|
alpar@0
|
114 |
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
|
alpar@0
|
115 |
\pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
|
alpar@0
|
116 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
|
alpar@0
|
117 |
% \pgfsetcornersarced{\pgforigin}
|
alpar@0
|
118 |
\pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
|
alpar@0
|
119 |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
|
alpar@0
|
120 |
\pgfsetcornersarced{\pgforigin}
|
alpar@0
|
121 |
% \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
|
alpar@0
|
122 |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
|
alpar@0
|
123 |
\pgfsetcornersarced{\pgforigin}
|
alpar@0
|
124 |
\pgfpathclose ;
|
alpar@0
|
125 |
% \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
|
alpar@0
|
126 |
}%
|
alpar@0
|
127 |
}
|
alpar@0
|
128 |
\pgfdeclareshape{quotedbox}{%
|
alpar@0
|
129 |
\inheritsavedanchors[from=rectangle] % this is nearly a rectangle
|
alpar@0
|
130 |
\inheritanchorborder[from=rectangle]
|
alpar@0
|
131 |
\inheritanchor[from=rectangle]{center}
|
alpar@0
|
132 |
\inheritanchor[from=rectangle]{north}
|
alpar@0
|
133 |
\inheritanchor[from=rectangle]{south}
|
alpar@0
|
134 |
\inheritanchor[from=rectangle]{west}
|
alpar@0
|
135 |
\inheritanchor[from=rectangle]{east}
|
alpar@0
|
136 |
% ... and possibly more
|
alpar@0
|
137 |
\backgroundpath{% this is new
|
alpar@0
|
138 |
% store lower right in xa/ya and upper right in xb/yb
|
alpar@0
|
139 |
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
|
alpar@0
|
140 |
\northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
|
alpar@0
|
141 |
% compute corner of ``flipped page''
|
alpar@0
|
142 |
\pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter
|
alpar@0
|
143 |
\pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
|
alpar@0
|
144 |
% construct main path
|
alpar@0
|
145 |
\pgfsetlinewidth{\rulewidth}
|
alpar@0
|
146 |
\pgfsetstrokecolor{\rulecolor}
|
alpar@0
|
147 |
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
|
alpar@0
|
148 |
\pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
|
alpar@0
|
149 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
|
alpar@0
|
150 |
\pgfsetcornersarced{\pgforigin}
|
alpar@0
|
151 |
% \pgfsetcornersarced{\pgfpoint{4pt}{4pt}}
|
alpar@0
|
152 |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
|
alpar@0
|
153 |
\pgfsetcornersarced{\pgforigin}
|
alpar@0
|
154 |
% \pgfsetcornersarced{\pgfpoint{9pt}{9pt}}
|
alpar@0
|
155 |
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
|
alpar@0
|
156 |
\pgfsetcornersarced{\pgforigin}
|
alpar@0
|
157 |
\pgfpathclose ;
|
alpar@0
|
158 |
% \draw(\pgf@xa,\pgf@ya) -- (\pgf@xa,\pgf@yb) ;
|
alpar@0
|
159 |
}%
|
alpar@0
|
160 |
}
|
alpar@0
|
161 |
|
alpar@0
|
162 |
\newcounter{clip}
|
alpar@0
|
163 |
\newdimen\mywidth
|
alpar@0
|
164 |
\mywidth=\linewidth
|
alpar@0
|
165 |
|
alpar@0
|
166 |
\def\src#1{\gdef\@src{#1}}\let\@src\@empty
|
alpar@0
|
167 |
\def\includeclip{\@ifnextchar[{\@includeclip}{\@includeclip[]}}
|
alpar@0
|
168 |
\def\@includeclip[#1]#2#3#4{\par
|
alpar@0
|
169 |
% \vskip.75\baselineskip plus 3pt minus 1pt
|
alpar@0
|
170 |
\computeLinewidth{\mywidth}%
|
alpar@0
|
171 |
\begingroup\color{white}%
|
alpar@0
|
172 |
\noindent%
|
alpar@0
|
173 |
\begin{tikzpicture}
|
alpar@0
|
174 |
%\node[fill=black!10,draw,shape=filledbox,
|
alpar@0
|
175 |
\node[fill=black!10,%
|
alpar@0
|
176 |
draw,
|
alpar@0
|
177 |
shade,%
|
alpar@0
|
178 |
top color=blue!10,
|
alpar@0
|
179 |
bottom color=cyan!5,
|
alpar@0
|
180 |
shape=filledbox,
|
alpar@0
|
181 |
inner sep=\Sep,
|
alpar@0
|
182 |
text width=\Linewidth] (x)
|
alpar@0
|
183 |
{\parbox{\Linewidth}
|
alpar@0
|
184 |
{\ifx\@src\@empty\else\refstepcounter{clip}\label{clip\theclip}%
|
alpar@0
|
185 |
{\par\vskip6pt\color{orange}\sffamily\small
|
alpar@0
|
186 |
~Clip \theclip:\space\@src.}%
|
alpar@0
|
187 |
\par\vskip3pt\fi\normalcolor
|
alpar@0
|
188 |
\includegraphics[width=\Linewidth,page={#2},%
|
alpar@0
|
189 |
viewport={#3},clip=true,#1]{#4}}
|
alpar@0
|
190 |
\hspace*{-10pt}};
|
alpar@0
|
191 |
\end{tikzpicture}
|
alpar@0
|
192 |
\endgroup
|
alpar@0
|
193 |
% \par\vskip.5\baselineskip
|
alpar@0
|
194 |
% plus 3pt minus 1pt
|
alpar@0
|
195 |
}
|
alpar@0
|
196 |
%%
|
alpar@0
|
197 |
%% include clippings from a pdf document:
|
alpar@0
|
198 |
%% #1 => Optional argument for \includegraphics
|
alpar@0
|
199 |
%% #2 => page number
|
alpar@0
|
200 |
%% #3 => co-ordinates
|
alpar@0
|
201 |
%% #4 => file name
|
alpar@0
|
202 |
|
alpar@0
|
203 |
\newenvironment{quoted}{%\bigskip
|
alpar@0
|
204 |
\computeLinewidth{.95\linewidth}%
|
alpar@0
|
205 |
\global\setbox0=\hbox\bgroup
|
alpar@0
|
206 |
\begin{minipage}{.95\linewidth}\color{brown}%
|
alpar@0
|
207 |
\footnotesize\ttfamily\obeyspaces\obeylines}
|
alpar@0
|
208 |
{\end{minipage}\egroup
|
alpar@0
|
209 |
\vskip12pt plus 3pt minus 3pt\noindent\begin{tikzpicture}
|
alpar@0
|
210 |
\node[fill=blue!10,draw,shade,top color=orange!10,
|
alpar@0
|
211 |
bottom color=white,shape=filledbox,
|
alpar@0
|
212 |
inner sep=8pt,text width=\Linewidth] (x) {\box0} ;
|
alpar@0
|
213 |
\end{tikzpicture}%
|
alpar@0
|
214 |
\vskip12pt plus 3pt minus 3pt}
|
alpar@0
|
215 |
|
alpar@0
|
216 |
\newdimen\Linewidth
|
alpar@0
|
217 |
\newdimen\Sep
|
alpar@0
|
218 |
\def\computeLinewidth#1{\global\setlength\Linewidth{#1}%
|
alpar@0
|
219 |
\global\addtolength{\Linewidth}{-2\Sep}}
|
alpar@0
|
220 |
|
alpar@0
|
221 |
\newdimen\npskip
|
alpar@0
|
222 |
\npskip=0mm
|
alpar@0
|
223 |
|
alpar@0
|
224 |
\long\def\NavigationPanel{%
|
alpar@0
|
225 |
\global\setbox0=\hbox\bgroup
|
alpar@0
|
226 |
\begin{minipage}[t][.8125\panelheight][t]{.9\panelwidth}\color{brown}%
|
alpar@0
|
227 |
%\centering
|
alpar@0
|
228 |
\ifx\@pinclude\empty\relax\par\vfill\else
|
alpar@0
|
229 |
\@pinclude\fi
|
alpar@0
|
230 |
%River Valley Technologies
|
alpar@0
|
231 |
\end{minipage}\egroup
|
alpar@0
|
232 |
\Sep=.5cm
|
alpar@0
|
233 |
\@tempdima=\panelwidth
|
alpar@0
|
234 |
\advance\@tempdima-1cm
|
alpar@0
|
235 |
\computeLinewidth{\@tempdima}%
|
alpar@0
|
236 |
\def\rulewidth{.2pt}%
|
alpar@0
|
237 |
\noindent\begin{tikzpicture}
|
alpar@0
|
238 |
\node[fill=blue!10,draw,shade,bottom color=brown!30,
|
alpar@0
|
239 |
top color=white,shape=filledbox,
|
alpar@0
|
240 |
inner sep=\the\Sep,text width=\Linewidth] (x)
|
alpar@0
|
241 |
{\hspace*{\npskip}\box0} ;
|
alpar@0
|
242 |
\end{tikzpicture}%
|
alpar@0
|
243 |
\vspace*{.0125\panelheight}
|
alpar@0
|
244 |
}
|
alpar@0
|
245 |
|
alpar@0
|
246 |
\long\def\pinclude#1{\gdef\@pinclude{#1}}
|
alpar@0
|
247 |
\let\@pinclude\empty
|
alpar@0
|
248 |
|
alpar@0
|
249 |
\def\Strut{\vrule depth 2pt height 10pt width 0pt}
|
alpar@0
|
250 |
\def\pdfButton#1#2{\begin{tikzpicture}
|
alpar@0
|
251 |
\node[fill=blue!10,draw,shade,top color=blue!50,
|
alpar@0
|
252 |
bottom color=white,shape=buttonbox,
|
alpar@0
|
253 |
inner sep=2pt,text width=#1](x)
|
alpar@0
|
254 |
{\parbox{#1}{\centering\Strut#2}}; \end{tikzpicture}}
|
alpar@0
|
255 |
|
alpar@0
|
256 |
\def\vpanel{\def\@linkcolor{blue}%
|
alpar@0
|
257 |
\def\@urlcolor{blue}%
|
alpar@0
|
258 |
\def\@menucolor{blue}%
|
alpar@0
|
259 |
\begin{minipage}[t][\vpanelheight][c]{\paperwidth}%
|
alpar@0
|
260 |
\normalsfcodes%
|
alpar@0
|
261 |
\hspace*{.25cm}
|
alpar@0
|
262 |
\begin{minipage}[c][\vpanelheight][c]{17cm}
|
alpar@0
|
263 |
\parbox[c][27mm][b]{15mm}%
|
alpar@0
|
264 |
% {\includegraphics[width=15mm]{logo4.pdf}}\hfill%\hspace{1cm}
|
alpar@0
|
265 |
{\def\rulecolor{Goldenrod}%
|
alpar@0
|
266 |
\def\rulewidth{1pt}%
|
alpar@0
|
267 |
\begin{tikzpicture}%
|
alpar@0
|
268 |
%\node[fill=black!10,draw,shape=filledbox,
|
alpar@0
|
269 |
\node[fill=white!10,%
|
alpar@0
|
270 |
draw,
|
alpar@0
|
271 |
% shade,%
|
alpar@0
|
272 |
% top color=blue!10,
|
alpar@0
|
273 |
% bottom color=white,
|
alpar@0
|
274 |
shape=roundedbox,
|
alpar@0
|
275 |
inner sep=2mm,
|
alpar@0
|
276 |
text width=13mm] (x)
|
alpar@0
|
277 |
{\includegraphics[width=13mm]{els-logo.pdf}};
|
alpar@0
|
278 |
\end{tikzpicture}}\hfill
|
alpar@0
|
279 |
%
|
alpar@0
|
280 |
\parbox[c][24mm][b]{145mm}%
|
alpar@0
|
281 |
{{\fontsize{30}{30}\selectfont\textsf{\color{white}elsarticle.cls}}
|
alpar@0
|
282 |
\quad{\fontsize{14}{14}\selectfont\sffamily\color{blue!50}
|
alpar@0
|
283 |
A better way to format your submission}}
|
alpar@0
|
284 |
\end{minipage}
|
alpar@0
|
285 |
\hfill
|
alpar@0
|
286 |
\begin{minipage}[c][\vpanelheight][b]{7.9cm}
|
alpar@0
|
287 |
\sffamily\footnotesize
|
alpar@0
|
288 |
\pdfButton{2cm}{\href{mailto:elsarticle@river-valley.com}{BUGS}}
|
alpar@0
|
289 |
\pdfButton{2cm}{\href{http://support.river-valley.com}{SUPPORT}}
|
alpar@0
|
290 |
\pdfButton{2cm}%
|
alpar@0
|
291 |
{\href{http://www.elsevier.com/locate/latex}%
|
alpar@0
|
292 |
{RESOURCES}}
|
alpar@0
|
293 |
% \pdfButton{2cm}{\Acrobatmenu{GoToPage}{GoTo}}
|
alpar@0
|
294 |
\end{minipage}\\
|
alpar@0
|
295 |
\rule{\paperwidth}{0.1pt}
|
alpar@0
|
296 |
\end{minipage}%
|
alpar@0
|
297 |
}
|
alpar@0
|
298 |
|
alpar@0
|
299 |
\@ifundefined{backgroundcolor}%
|
alpar@0
|
300 |
{\def\backgroundcolor#1{\gdef\@backgroundcolor{#1}}}{}
|
alpar@0
|
301 |
\colorlet{panelbackground}{orange!10}
|
alpar@0
|
302 |
\backgroundcolor{orange!10}
|
alpar@0
|
303 |
\def\@urlcolor{brown}
|
alpar@0
|
304 |
\def\@linkcolor{brown}
|
alpar@0
|
305 |
\def\@menucolor{brown}
|
alpar@0
|
306 |
|
alpar@0
|
307 |
\RequirePackage{moreverb}
|
alpar@0
|
308 |
|
alpar@0
|
309 |
\newenvironment{vquote}%
|
alpar@0
|
310 |
{\medskip
|
alpar@0
|
311 |
\verbatimwrite{tmp.tex}}
|
alpar@0
|
312 |
{\endverbatimwrite
|
alpar@0
|
313 |
\aftergroup\printBox}
|
alpar@0
|
314 |
|
alpar@0
|
315 |
\def\printBox{\bgroup\def\rulecolor{orange}%
|
alpar@0
|
316 |
\def\rulewidth{.2pt}%
|
alpar@0
|
317 |
\noindent\begin{tikzpicture}
|
alpar@0
|
318 |
\node[fill=blue!10,draw,shade,top color=white!10,
|
alpar@0
|
319 |
bottom color=cyan!5,shape=quotedbox,
|
alpar@0
|
320 |
inner sep=8pt,text width=.95\linewidth] (x)
|
alpar@0
|
321 |
{\color{orange}\verbatiminput{tmp.tex}%
|
alpar@0
|
322 |
\vspace*{-\baselineskip}%
|
alpar@0
|
323 |
} ;
|
alpar@0
|
324 |
\end{tikzpicture}%
|
alpar@0
|
325 |
\egroup
|
alpar@0
|
326 |
\medskip
|
alpar@0
|
327 |
}
|
alpar@0
|
328 |
\def\red{\color{Sepia}}
|
alpar@0
|
329 |
\def\verbatim@font{\red\normalfont\ttfamily}
|
alpar@0
|
330 |
|
alpar@0
|
331 |
\def\verbatimcontinuewrite{%
|
alpar@0
|
332 |
\@bsphack
|
alpar@0
|
333 |
% \verbatim@out=#1
|
alpar@0
|
334 |
\let\do\@makeother\dospecials
|
alpar@0
|
335 |
\obeyspaces\catcode`\^^M\active \catcode`\^^I=12
|
alpar@0
|
336 |
\def\verbatim@processline{%
|
alpar@0
|
337 |
\immediate\write\verbatim@out
|
alpar@0
|
338 |
{\the\verbatim@line}}%
|
alpar@0
|
339 |
\verbatim@start}
|
alpar@0
|
340 |
|
alpar@0
|
341 |
\def\@@@lbr{\expandafter\@gobble\string\{}
|
alpar@0
|
342 |
\def\@@@rbr{\expandafter\@gobble\string\}}
|
alpar@0
|
343 |
\def\@@@pcr{\expandafter\@gobble\string\%}
|
alpar@0
|
344 |
|
alpar@0
|
345 |
|
alpar@0
|
346 |
%\immediate\write18{touch mytool.tex
|
alpar@0
|
347 |
% ^^J rm mytool.tex ^^J touch mytool.tex}
|
alpar@0
|
348 |
|
alpar@0
|
349 |
\newenvironment{toolwrite}[1]%
|
alpar@0
|
350 |
{\@tempdima=#1
|
alpar@0
|
351 |
\verbatimwrite{xx}}
|
alpar@0
|
352 |
{\endverbatimwrite
|
alpar@0
|
353 |
\immediate\write18{echo
|
alpar@0
|
354 |
"\string\Clear\@@@lbr\the\@tempdima\@@@rbr\@@@lbr\@@@pcr">>mytool.tex^^J
|
alpar@0
|
355 |
cat xx.tex >> mytool.tex ^^J
|
alpar@0
|
356 |
echo "\@@@rbr" >> mytool.tex}}
|
alpar@0
|
357 |
|
alpar@0
|
358 |
\tikzstyle{place}=[scale=.39,rectangle,draw=blue!90,fill=blue!30,thin,%
|
alpar@0
|
359 |
minimum height=1mm,minimum width=13mm]
|
alpar@0
|
360 |
\tikzstyle{trans}=[scale=.39,rectangle,draw=Olive,fill=Olive!20,thin,%
|
alpar@0
|
361 |
minimum height=1mm,minimum width=13mm]
|
alpar@0
|
362 |
\tikzstyle{past}=[scale=.39,rectangle,draw=Olive,fill=Olive!60,thin,%
|
alpar@0
|
363 |
minimum height=1mm,minimum width=13mm]
|
alpar@0
|
364 |
|
alpar@0
|
365 |
\def\printSq#1{\parbox{107mm}{\@tempcnta=1
|
alpar@0
|
366 |
\let\printfill\@empty
|
alpar@0
|
367 |
\loop\ifnum\@tempcnta<#1
|
alpar@0
|
368 |
{\printfill\ifnum\c@page=\@tempcnta
|
alpar@0
|
369 |
\tikz\node at(0,0) [place]{};\else
|
alpar@0
|
370 |
\ifnum\c@page<\@tempcnta
|
alpar@0
|
371 |
\hyperlink{page.\the\@tempcnta}{\tikz\node at(0,0)
|
alpar@0
|
372 |
[trans]{};}%
|
alpar@0
|
373 |
\else
|
alpar@0
|
374 |
\hyperlink{page.\the\@tempcnta}{\tikz\node at(0,0)
|
alpar@0
|
375 |
[past]{};}%
|
alpar@0
|
376 |
\fi\fi}%
|
alpar@0
|
377 |
\advance\@tempcnta 1 \let\printfill\,\repeat}}
|
alpar@0
|
378 |
|
alpar@0
|
379 |
|
alpar@0
|
380 |
\endinput
|
alpar@0
|
381 |
|
alpar@0
|
382 |
|