pdfwin_slides

效果:

技术文章技术文章技术文章技术文章技术文章技术文章技术文章技术文章技术文章技术文章技术文章技术文章技术文章

slides.tex

  1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2 %
  3 %   Presentation for:
  4 %
  5 %   Workshop on Adaptive Filters in Bucure\c{s}ti / Romania
  6 %   (March 2003)
  7 %
  8 %   (c) Matthias M\"{u}hlich, 03/2003
  9 %
 10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 11 
 12 % this file must be processed with pdflatex!
 13 
 14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 15 % Shujun Li‘s template based on the example source file of pdfwin
 16 % enhanced with multimedia.sty of beamer package
 17 % and pdftricks.sty modified by Shujun Li.
 18 % If your TeX system does not install beamer package,
 19 % please download it at any mirror of CTAN ftp site or
 20 % beamer‘s official web site: http://latex-beamer.sourceforge.net
 21 % Reach Shujun Li via http://www.hooklee.com.
 22 % pdfwin.sty is downloadable at
 23 % http://www.uni-frankfurt.de/~muehlich/tex/texindex.html
 24 % and this template is downloadable at http://www.hooklee.com/tex.html.
 25 %                                       26 May, 2004
 26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 27 
 28 \documentclass[english,pdftex]{article}
 29 
 30 \input formats
 31 
 32 \begin{document}
 33 
 34 % produce panel TOC entry for title page
 35 \AddPanelTocEntry{Title Page}%
 36 
 37 % title page
 38 \begin{center}
 39 % leading title
 40 {\scriptsize-- hooklee‘s \TeX{} contribution series
 41 --}\vspace*{0.5em}
 42 
 43 % title
 44 {\LARGE\bfseries\color{titlecolor}
 45   hooklee‘s \TeX{} Template for Presentation based on
 46   \href{http://www.uni-frankfurt.de/~muehlich/tex/texindex.html}{\color{titlecolor}\textsl{pdfwin}} Package\ 47 } \vspace*{8mm}
 48 % author
 49 {\Large Shujun Li}\\[2.5ex]
 50 % affiliation and contact information
 51 Center for Chaos Control and Synchronization,\ 52 Department of Electronic Engineering,\ 53 City University of Hong Kong, HK SAR, China\ 54 \href{mailto:hooklee@hooklee.com}{\color{black}hooklee@hooklee.com}\ 55 \href{http://www.hooklee.com}{\color{black}http://www.hooklee.com}
 56 \end{center}
 57 
 58 \tableofcontents
 59 
 60 \section{Introduction}
 61 
 62 % change text window style from normal (-> title page) to transparent
 63 % (-> rest of talk); must appear after page break, i.e. section command
 64 % ("sectionbreak" option for pdfwin produces page break at each \section
 65 % command)
 66 \SetWindow{text}{type=transparent, borderthickness=0.5mm}
 67 
 68 There are many available solutions for slides in \TeX. The most
 69 comprehensive introduction on how to make slides (not only with
 70 \TeX) can be found at
 71 \href{http://www.miwie.org/presentations}{http://www.miwie.org/presentations},
 72 which is updated very frequently.
 73 
 74 \vfill
 75 
 76 You are suggest trying some solutions by yourself to find the most
 77 suitable for your slides.
 78 
 79 \vfill
 80 
 81 This template is used to show the integration of different \TeX{}
 82 slide solutions. Also, I hope it is useful for you to make a
 83 beautiful presentation with \TeX{} quickly.
 84 
 85 \vfill
 86 
 87 A formal example of this template can be found at
 88 \href{http://www.hooklee.com/Talks/DigitalChaos.pdf}{http://www.hooklee.com/Talks/DigitalChaos.pdf}.
 89 
 90 \newpage
 91 \AddPanelTocEntry{Dynamic Pages}
 92 
 93 % \inithighlight and \highlightnext are used to realize dynamic texts
 94 % When the number of the items is greater than 6,
 95 % you have to change the command \setcounter{maxdynamicpages}{6} in
 96 % pdfwin.cfg to change the number "6" to be your number
 97 \inithighlight{\section*{Dynamic Pages}
 98 \begin{itemize}
 99 %\itemsep=-1mm
100 \item {\color{color1} Item 1}
101 
102 \item {\color{color2} Item 2}
103 
104 \item {\color{color3} Item 3}
105 
106 \item {\color{color4} Item 4}
107 \end{itemize}}
108 
109 \highlightnext
110 
111 % \pagenumbering is used to change the current page number to the second level
112 % it can be used anywhere to generate the effects of dynamic pages
113 \pagenumbering{incremental}
114 
115 Item 1 ...
116 
117 \highlightnext
118 
119 Item 2 ...
120 
121 \highlightnext
122 
123 Item 3 ...
124 
125 \highlightnext
126 
127 Item 4 ...
128 
129 \newpage
130 % this command is used to restore the page number to the normal level
131 \pagenumbering{restore}
132 
133 \section[Enjoy \textsl{pstricks}]{Enjoy \textsl{pstricks} via \textsl{pdftricks}}
134 
135 As we know, \textsl{pstricks} package is a powerful tool to draw
136 graphics via postscript language in \TeX, but it cannot work with
137 PDF\LaTeX. \textsl{pdftricks} package is to partially solve this
138 problem. Of course, such a solution is not complete and far from
139 prefect. You are suggested to transfer to other \TeX{} slide
140 packages, such as \textsl{prosper}, if you want to use
141 \textsl{pstricks} more fluently.
142 
143 hooklee made some modifications on the original \textsl{pdftricks}
144 package to solve some compatibility problems and make the
145 background transparent by default.
146 
147 \newpage
148 \subsection{An Example}
149 
150 \begin{pdfpic}
151 % this command is to make the default font same as the main texts
152 \renewcommand{\rmdefault}{cmss}\normalfont
153 \Large % make the font size identical to the main text
154 % note that ".79\textwidth" is the current width of the Text Window
155 \noindent Note: following IEEE 754 standard, a 64-bit
156 floating-point number
157 $\rnode{Ss1}{b_{63}}\rnode{Se1}{\underline{b_{62}\cdots
158 b_{52}}}\rnode{Sm1}{b_{51}\cdots b_0}$ represents the following
159 binary real number (except for some special values)
160 \[
161 \overbrace{\rnode{Ss2}{\pm}\underbrace{1.\rnode{Sm2}{b_{51}\cdots
162 b_0}}_{\mbox{53 bits}}}^{\mbox{called mantissa}}\times
163 2^{\rnode{Se2}{b_{62}\cdots b_{52}}-1023}.
164 \]
165 \nccurve[linecolor=red,angleA=225,angleB=135]{<->}{Ss1}{Ss2}
166 \ncline[linecolor=red]{<->}{Se1}{Se2}\ncline[linecolor=red]{<->}{Sm1}{Sm2}
167 \end{pdfpic}
168 
169 \vfill
170 
171 Note: you \TeX{} system must be correctly configured to support
172 the mechanism of \textsl{pdftricks} package. For MiKTeX, you
173 should ensure ``\texttt{write18 = enable}" occurs in the file
174 \texttt{miktex.ini}. Also, you should ensure \texttt{ps2eps.pl}
175 and \texttt{bbox.exe} have been installed in your system. ChinaTeX
176 CD will be configured to contain such requirements.
177 
178 \vfill
179 
180 \section{Enjoy Multimedia}
181 
182 \subsection{Basic Methods}
183 
184 You can use a command of \textsl{hyperref} package to realize the
185 replay of a multimedia file. It is like the following:
186 
187 \vfill
188 
189 \footnotesize
190 
191 \verb|\href{run:clock.avi}{Click here to run clock.avi}|
192 
193 \normalsize
194 
195 \vfill
196 
197 \begin{center}
198     \href{run:clock.avi}{Click here to run clock.avi}
199 \end{center}
200 
201 \vfill
202 
203 In fact, you can also use \verb|\href{run:...}{}| to invoke a
204 program, such as Matlab for some demos.
205 
206 \subsection{A Powerful Method: \textsl{multimedia} Package}
207 
208 However, the above method does not support the function of
209 displaying the video within the pdf file itself, which is much
210 more attractive for our audience. A powerful tool can help us to
211 realize such a function: \textsl{multimedia} package, which is
212 provided with \textsl{beamer} (another cool \TeX{} slide package
213 available at
214 \href{http://latex-beamer.sourceforge.net}{http://latex-beamer.sourceforge.net}).
215 For details on how to use this package, please see
216 \textsl{beamer}‘s manual.
217 
218 \begin{center}
219 \movie[label=clock,width=3cm,height=2cm,poster]{}{clock.avi}
220 
221 \hyperlinkmovie[showcontrols=true]{clock}{Click here to start the
222 movie}
223 \end{center}
224 
225 \section{更多功能?}
226 
227 与~\textsl{pdfscreen}~类似,\textsl{pdfwin}~的一个显著优点是与其他~\TeX~宏包的兼容性较好。
228 您可以使用其他宏包,如~\textsl{ppower4}~宏包族增加~\textsl{pdfscreen}~中未提供的一些功能。
229 例如,您可以使用~\verb|pause.sty|~宏包创建更为简单的动态页面。
230 
231 \newpage
232 \vspace*{2cm}
233 
234 {\Huge Thank you!}
235 
236 \vspace{1.3cm}
237 
238 \vfill
239 
240 \end{document}

cnames.tex

 1 % the following definitions are for Chinese panel
 2 \paneltitlepagename{封\ \ \ \ 面}
 3 \panelabstractname{摘\ \ \ \ 要}
 4 \panelcontentsname{目\ \ \ \ 录}
 5 \panelindexname{索\ \ \ \ 引}
 6 \panelfullscreenname{全\ \ \ \ 屏}
 7 \panelhomepagename{主\ \ \ \ 页}
 8 \panelgobackname{后\ \ \ \ 退}
 9 \panelgoforwardname{前\ \ \ \ 进}
10 \panelclosename{关\ \ \ \ 闭}
11 \panelsearchname{搜\ \ \ \ 索}
12 \panelquitname{退\ \ \ \ 出}
13 \panelprepagenamei{第}
14 \panelprepagenameii{共}
15 \panelpagename{页}
16 \panelofname{/}
17 
18 %end of cnames.tex

 

formats.tex

  1 %====================================================================
  2 
  3 %% loading miscellenous packages
  4 
  5 \usepackage{babel}          %% hyphenation patterns - takes global option english
  6 \usepackage{palatino}       %% Palatino fonts
  7 \usepackage{mathptm}        %% PostScript Type 1 math fonts
  8 \usepackage{textcomp}       %% symbols
  9 
 10 %% loading pdfwin
 11 
 12 \usepackage[paneltoc,chinese,sectionbreak]{pdfwin}  %% my presentation style file
 13                                             %% takes global options english + pdftex
 14 
 15 \usepackage{ulem}           %% more styles of \em commands
 16 \usepackage{overpic}        %% write texts on the pictures
 17 \usepackage{amsmath,amssymb,bm}        %% more AMS definitions and fonts
 18 \usepackage{url}            %% URL
 19 %\usepackage[nomarkers]{pause}          %% Use ppower4 to realize more functions
 20 
 21 \usepackage{multimedia}     %% this package is part of beamer boundle but can be used alone
 22 
 23 % pdftricks can be used here to display beautiful graphics by invoking pstricks packages
 24 \usepackage{pdftricks}
 25 \configure[pdfgraphic][width=\textwidth]
 26 \begin{psinputs}
 27 \usepackage{pstricks}
 28 \usepackage{pst-node}
 29 \usepackage{palatino}
 30 \usepackage{mathptm}
 31 \usepackage{textcomp}
 32 \end{psinputs}
 33 
 34 % character protruding; disabled for higher compatibility
 35 %\input{normprot.tex}
 36 
 37 % abbreviation for vectors
 38 %\input{shortvec.tex}
 39 
 40 
 41 % SETUP OF PDFWIN PACKAGE
 42 %
 43 % define windows and margins
 44 \SetScreen{width=12cm, height=9cm}% 4:3 ratio
 45 \SetWindow{text}{basex=0.2cm, basey=0.2cm,
 46 width=9.4cm,height=8.6cm, borderthickness=0.4mm}
 47 \SetWindow{panel}{basex=9.8cm, basey=0.2cm, width=2cm,
 48 height=8.6cm, borderthickness=0.4mm} \SetButtons{width=1.7cm,
 49 shadowdepth=0.3mm} \SetMargins{.5cm}{.5cm}{.5cm}{.5cm}
 50 %
 51 % define panel
 52 \SetLogo{filename=Logo.pdf,width=1.4cm, shadowdepth=.7mm,
 53 url=http://www.hooklee.com}%
 54 \SetScreen{type=wallpaper, filename=chaos.pdf}%
 55 \SetPaneltext{\scriptsize\sffamily
 56 \href{http://www.hooklee.com/tex.html}{Hook\TeX}\\by hooklee\\26
 57 May 2004}
 58 \renewcommand{\DrawNavigationPanel}{
 59 %  \ShowPageInfo\par\vfill
 60   \GoToPageButton\par\vfill
 61   \FirstLastButton\par\vfill
 62   \PrevNextButton\par\vfill
 63   \BackForwardButton\par\vfill
 64   \FullScreenButton\par\vfill
 65   \SearchButton\par\vfill
 66   \CloseButton\par\vfill
 67 }
 68 
 69 
 70 % COLORS
 71 %
 72 % windows
 73 \definecolor{titlecolor}{rgb}{.7,.15,.1}
 74 \definecolor{TextBackgroundColor}{rgb}{.7,.8,1.0}
 75 \definecolor{TextBorderColor}{rgb}{0,0,.5}
 76 %
 77 % colors for presentation
 78 \definecolor{StateColor}{rgb}{0,0,.6}
 79 \definecolor{StateFuncColor}{rgb}{.4,0,.3}
 80 \definecolor{StateNoiseColor}{rgb}{.3,.3,.7}
 81 \definecolor{MeasColor}{rgb}{0,.5,0}
 82 \definecolor{MeasFuncColor}{rgb}{.4,.3,0}
 83 \definecolor{MeasNoiseColor}{rgb}{.3,.7,.3}
 84 \definecolor{InputColor}{rgb}{.7,0,0}
 85 %
 86 % colors for environments
 87 \definecolor{CodeTextColor}{rgb}{0,0.3,0}
 88 \definecolor{CodeMathColor}{rgb}{0.1,0.3,0.6}
 89 \definecolor{MyBoxColor1}{rgb}{.8,.5,.1}
 90 \definecolor{MyBoxColor2}{rgb}{.9,.8,.3}
 91 \definecolor{MyBoxiiColor1}{rgb}{.8,.6,.4}
 92 \definecolor{MyBoxiiColor2}{rgb}{.9,.8,.7}
 93 \definecolor{MyCodeBoxColor1}{rgb}{.3,.6,.2}
 94 \definecolor{MyCodeBoxColor2}{rgb}{.8,.9,.7}
 95 %
 96 % misc
 97 \definecolor{dgreen}{rgb}{0,.6,0}
 98 
 99 
100 % LAYOUT
101 %
102 % general layout
103 \tolerance=2000 \emergencystretch=5em \fboxsep=3mm
104 \setlength{\parskip}{4pt plus 2pt minus 1pt}
105 \setlength{\parindent}{0pt} \frenchspacing
106 %
107 % define page transition style
108 % see Page_Transition_Styles.pdf for the syntax
109 %\pdfpageattr{/Trans << /S /Dissolve /D 0.2 >>}
110 %\pdfpageattr{/Trans << /S /Glitter /D 0.3 >>}
111 %
112 % replace default font (roman default) by computer modern sans serif;
113 % Palatino only for panel
114 % NOTE: brute force, no good style here...
115 \renewcommand{\rmdefault}{cmss}
116 %
117 % redefine vector style (boldface instead of arrow on top)
118 \renewcommand{\vec}[1]{\mathbf{#1}}
119 %
120 % redefine section numbering: only section (and no subsection or lower)
121 % gets a number
122 \setcounter{secnumdepth}{1}
123 
124 
125 % NEW COMMANDS
126 %
127 \newcommand{\Realnumbers}{\mathrm{I\!R}}
128 \newcommand{\Expect}[1]{\mbox{{\sf E}}\left[ #1 \right]}
129 \newcommand{\Cov}[1]{\mbox{\sf Cov}\left[ #1 \right]}
130 %
131 \newcommand{\mybox}[1]{\begin{center}%
132   \fboxrule=.5mm%
133   \fcolorbox{MyBoxColor1}{MyBoxColor2}{%
134   \parbox[c]{.9\textwidth}{#1}}%
135 \end{center}}
136 %
137 \newcommand{\myboxii}[1]{\begin{center}%
138   \fboxrule=.3mm%
139   \fcolorbox{MyBoxiiColor1}{MyBoxiiColor2}{%
140   \parbox[c]{.9\textwidth}{#1}}%
141 \end{center}}
142 %
143 \newcommand{\mycodebox}[1]{\begin{center}%
144   \fboxrule=.5mm%
145   \ttfamily\bfseries%
146   \color{CodeTextColor}%
147   \fcolorbox{MyCodeBoxColor1}{MyCodeBoxColor2}{%
148   \parbox[c]{.9\textwidth}{#1}}%
149 \end{center}}
150 %
151 \newcommand{\codemath}[1]{\textcolor{CodeMathColor}{$#1$}}
152 \newcommand{\codetext}[1]{\textsf{\mdseries\small #1}}
153 
154 % hooklee‘s commands
155 \newtheorem{example}{Example}
156 \newtheorem{theorem}{Theorem}
157 \newtheorem{definition}{Definition}
158 \newtheorem{corollary}{Corollary}
159 \newcommand{\myfbox}[1]{\begin{center}%
160   \fboxrule=.3mm%
161   \fbox{\parbox[c]{.9\textwidth}{#1}}%
162 \end{center}}
163 % hooklee‘s note
164 \newcommand\hooklee[1]{}
165 
166 \newcommand{\mysbox}[1]{\fcolorbox{MyBoxColor1}{MyBoxColor2}{#1}}
167 \newcommand{\mycsbox}[1]{\begin{center}\fcolorbox{MyBoxColor1}{MyBoxColor2}{#1}\end{center}}
168 
169 %====================================================================

pdftricks.sty

%
% pdftricks.sty 
%
% Copyright (c) 2001-3, Radhakrishnan CV <cvr@river-valley.com>
%                       Rajagopal CV <cvr3@river-valley.com>
%                       http://www.river-valley.com
%
% River Valley Technologies, Floor III, SJP Buildings, Cotton Hills
% Trivandrum, India 695014
%
% Tel: +91 471 233 7501
%
%                     Antoine Chambert-Loir 
%                     <chambert@math.polytechnique.fr>
%                     http://www.math.polytechnique.fr/~chambert
%
% Ecole polytechnique, Palaiseau Cedex, France
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This file is modified by Shujun Li (http://www.hooklee.com)
% to support web2c TeX systems under Windows OS, such as MiKTeX,
% and to add the support of transparency background on 4 May 2004
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
% 
% You should have received a copy of the GNU General Public License
% along with this program (gpl.txt); if not, write to the Free
% Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
% MA  02111-1307, USA.
%
% $Id: pdftricks.sty,v 1.16 2003/08/10 04:29:20 cvr Exp cvr $
%

\NeedsTeXFormat{LaTeX2e}
\def\Fileversion$#1: #2 ${\gdef\fileversion{#2}}
\def\Filedate$#1: #2 #3 ${\gdef\filedate{#2}}
\Fileversion$Revision: 1.16 $
\Filedate$Date: 2003/08/10 04:29:20 $
\ProvidesPackage{pdftricks}
   [\filedate\space\fileversion\space psTricks support in PDF (CVR/ACL)]
\PackageWarningNoLine{pdftricks}
   {****************************************\MessageBreak
    Package pdftricks v,\fileversion\space loaded\MessageBreak
    [psTricks support in PDF (CVR, ACL)]\MessageBreak
    ****************************************}
\RequirePackage{graphicx,color}
\newif\if@debug\@debugfalse
\newif\ifPDFTshell
\newif\ifPDFTnopdf
\newif\ifnoprocess \noprocessfalse
\newif\ifmiktex \miktextrue % changed by Shujun Li from \miktexfalse
\DeclareOption{debug}{\@debugtrue}
\DeclareOption{noshell}{\PDFTshellfalse}
\DeclareOption{shell}{\PDFTshelltrue}
\DeclareOption{miktex}{\global\miktextrue}  
\ExecuteOptions{shell}
\ProcessOptions\relax
\ifPDFTshell
% we must set it to false if \write18 doesn‘t work.
% Hack given by Thierry Bouche (Thanks !)
\def\tmpfile{pdftricks-w18-test-\the\year\the\month\the\day\the\time}
\ifmiktex%
 \immediate\write18{ver >"\tmpfile"}%%%%%% LDL-2
\else
 \immediate\write18{touch \tmpfile} %%%%%% LDL-1
\fi
\ifmiktex
 \IfFileExists{\tmpfile.}{\PDFTshelltrue}{\PDFTshellfalse} %%%%%% LDL-4
 \immediate\write18{del \tmpfile} %%%%%% LDL-4‘
\else
 \IfFileExists{\tmpfile}{\PDFTshelltrue}{\PDFTshellfalse}  %%%%%% LDL-3
 \immediate\write18{rm \tmpfile} %%%%%% LDL-3‘
\fi
\fi
\ifPDFTshell
  \PackageWarningNoLine{pdftricks}
   {****************************************\MessageBreak
    Using \csname write\endcsname18 capability \MessageBreak
    for producing PDF-figures.  \MessageBreak
    ****************************************}
\else
  \PackageWarningNoLine{pdftricks}
   {****************************************\MessageBreak
    No \csname write\endcsname18 capability.\MessageBreak
    You‘ll have to run a script by yourself!\MessageBreak
    ****************************************}
\fi

% warning! the definition of FIGURES if pst2pdf must be set accordingly !!
\def\PDFTfigname{\jobname-fig\thepsfig}
\def\PDFTWarning#1#2{\if@debug\PackageWarning{#1}{#2}\fi}
\def\PDFTWarningNoLine#1#2{\if@debug\PackageWarningNoLine{#1}{#2}\fi}

%%
%% The real meat of psfile manipulation starts here.
%%
%%
\RequirePackage{moreverb}
\def\pdfverbatimwrite#1{%
  \@bsphack
  \immediate\openout \verbatim@out #1
  \BeforeStream%
  \let\do\@makeother\dospecials
  \catcode`\^^M\active \catcode`\^^I=12
  \def\verbatim@processline{%
    \immediate\write\verbatim@out
      {\the\verbatim@line}}%
  \verbatim@start}
\def\endpdfverbatimwrite{%
  \immediate\write\verbatim@out{\string\end{document}}
  \immediate\closeout\verbatim@out
  \@esphack}

\def\BeforeStream
   {\message{Opening PDFStream=\PDFTfigname.tex}%
    \immediate\write\verbatim@out{\string\documentclass{article}}
    \immediate\write\verbatim@out{\string\input\space tmp.inputs}
    \immediate\write\verbatim@out{\string\pagestyle{empty}}
    \immediate\write\verbatim@out{\string\begin{document}}
    }
\newenvironment{pdfdisplay}{\stepcounter{psfig}%
  \xdef\PDFCutFile{\PDFTfigname.tex}
  \pdfverbatimwrite{\PDFCutFile}}
 {\endpdfverbatimwrite%
  \psgraphicsinclude%
   \global\noprocessfalse\noindent}
\newenvironment{pdfpic}{\stepcounter{psfig}%
  \xdef\PDFCutFile{\PDFTfigname.tex}
  \pdfverbatimwrite{\PDFCutFile}}
 {\endpdfverbatimwrite%
  \psgraphicsinclude%
   \global\noprocessfalse\noindent}
\newenvironment{pdfinline}{\stepcounter{psfig}%
  \xdef\PDFCutFile{\PDFTfigname.tex}
  \pdfverbatimwrite{\PDFCutFile}}
 {\endpdfverbatimwrite%
  \psinlinegraphicsinclude%
   \global\noprocessfalse\noindent}
\AtEndDocument{\endPShook%
      \ifPDFTnopdf
        \PackageWarningNoLine{pdftricks}
        {******************************************\MessageBreak
         Some PDF files of images were not found.\MessageBreak
         Run the script `pst2pdf‘ before the next\MessageBreak
         run of pdfLaTeX\MessageBreak
         ******************************************}
       \fi
}
\gdef\endPShook{}
\def\noprocess{\global\noprocesstrue
  \PackageWarning{pdftricks}
        {******************************************\MessageBreak
           Figure Number: \PDFTfigname\space is not processed \MessageBreak
         ******************************************\MessageBreak}
}

\newcounter{psfig}
\newif\if@pdfGINwidth
\newif\if@pdfGINheight
\newif\if@pdfGINscale
\long\gdef\psgraphicsProcess{%
  \@ifundefined{Fig\thepsfig}
  {\PDFTWarningNoLine{pdftricks}
    {******************************************\MessageBreak
     ************ Processing Fig: \thepsfig\space**********\MessageBreak
    ******************************************}
  }
  {\noprocess}
   \ifPDFTshell\ifnoprocess\relax\else
    \IfFileExists{\PDFTfigname.tex}{%
     \immediate\write18{latex -interaction=batchmode \PDFTfigname}
  \PDFTWarningNoLine{pdftricks}
    {******************************************\MessageBreak
     \PDFTfigname.tex converted to \PDFTfigname.dvi\MessageBreak
     ******************************************}
    }{}
    \IfFileExists{\PDFTfigname.dvi}{%
     \immediate\write18{dvips -P PDF -o \PDFTfigname.ps \PDFTfigname} % "-P pdf" is added by Shujun Li
  \PDFTWarningNoLine{pdftricks}
    {******************************************\MessageBreak
     \PDFTfigname.ps generated\MessageBreak
     ******************************************}
    }{}
    \IfFileExists{\PDFTfigname.ps}{%
     \immediate\write18{ps2eps.pl -f \PDFTfigname.ps} % modified by Shujun Li ".pl"
  \PDFTWarningNoLine{pdftricks}
    {******************************************\MessageBreak
     \PDFTfigname.eps generated\MessageBreak
     ******************************************}
    }{}
    \IfFileExists{\PDFTfigname.eps}{%
      \immediate\write18{epstopdf \PDFTfigname.eps}
  \PDFTWarningNoLine{pdftricks}
    {******************************************\MessageBreak
     \PDFTfigname.eps converted to \PDFTfigname.pdf\MessageBreak
     ******************************************}
    }{}
    \ifmiktex%
    \immediate\write18{del \PDFTfigname.aux \PDFTfigname.dvi 
       \PDFTfigname.log \PDFTfigname.ps \PDFTfigname.eps}     %%%%%% LDL-6
    \else
    \immediate\write18{rm \PDFTfigname.aux \PDFTfigname.dvi 
     \PDFTfigname.log \PDFTfigname.eps} %%%%%% LDL-5
   \fi\fi
   \fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% the following codes are modified by Shujun Li %%%%%%%%%%%%%%%
\newif\if@PDFTTransparentBG\@PDFTTransparentBGfalse
\long\gdef\@PDFTincludegraphics{%
\if@pdfGINwidth%
    \includegraphics[width=\@PDFgraphicwidth]{\PDFTfigname}\else%
\if@pdfGINheight%
    \includegraphics[height=\@PDFgraphicheight]{\PDFTfigname}\else%
\if@pdfGINscale%
    \includegraphics[scale=\@PDFgraphicscale]{\PDFTfigname}\else%
\includegraphics{\PDFTfigname}\fi\fi\fi}
\long\gdef\psgraphicsinclude{\psgraphicsProcess%
\if@PDFTTransparentBG
  \IfFileExists{\PDFTfigname.pdf}%
     {\begin{center}%
     \@PDFTincludegraphics%
     \end{center}%
      \global\@pdfGINwidthfalse\let\@PDFgraphicwidth\relax
      \global\@pdfGINheightfalse\let\@PDFgraphicheight\relax
      \global\@pdfGINscalefalse\let\@PDFgraphicscale\relax
      }{\PDFTnopdftrue}
\else
  \IfFileExists{\PDFTfigname.pdf}%
     {\begin{center}
     \bgroup\fboxsep\@PDFboxsep\fboxrule\@PDFboxrule%
      \color{\@PDFgraphiccolor}%
      \fcolorbox{\@PDFgraphiclinecolor}{\@PDFgraphicbackground}%
     {\@PDFTincludegraphics}\egroup\end{center}%
      \global\@pdfGINwidthfalse\let\@PDFgraphicwidth\relax
      \global\@pdfGINheightfalse\let\@PDFgraphicheight\relax
      \global\@pdfGINscalefalse\let\@PDFgraphicscale\relax
      }{\PDFTnopdftrue}
\fi
   \gdef\@PDFgraphiclinecolor{white}
   \gdef\@PDFgraphicbackground{white}
   \gdef\@PDFboxsep{0pt}
   \gdef\@PDFboxrule{0pt}
}

\long\gdef\psinlinegraphicsinclude{%
  \psgraphicsProcess%
  \IfFileExists{\PDFTfigname.pdf}%
     {\includegraphics{\PDFTfigname}}% simplified by Shujun Li
      {\PDFTnopdftrue}%
}
%%%%%%%%%%%% the above codes are modified by Shujun Li %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definecolor{gray30}{gray}{.70}
\definecolor{gray10}{gray}{.90}
\RequirePackage{keyval}
\def\configure[#1][#2]{\setkeys{#1}{#2}
  \PDFTWarning{pdftricks}{Reconfigured #1 parameter(s)\MessageBreak  
   #2\MessageBreak}}
\define@key{pdfgraphic}{transparent}[true]{\@PDFTTransparentBGtrue}
\@PDFTTransparentBGtrue % make the transparent background as the default option
\define@key{pdfgraphic}{width}     {\gdef\@PDFgraphicwidth{#1}%
                                    \global\@pdfGINwidthtrue}
\define@key{pdfgraphic}{height}    {\gdef\@PDFgraphicheight{#1}%
                                    \global\@pdfGINheighttrue}
\define@key{pdfgraphic}{scale}     {\gdef\@PDFgraphicscale{#1}%
                                    \global\@pdfGINscaletrue}
\define@key{pdfgraphic}{color}     {\gdef\@PDFgraphiccolor{#1}}
\define@key{pdfgraphic}{linecolor} {\gdef\@PDFgraphiclinecolor{#1}}
\define@key{pdfgraphic}{background}{\gdef\@PDFgraphicbackground{#1}}
\define@key{pdfgraphic}{linewidth} {\gdef\@PDFboxrule{#1}}
\define@key{pdfgraphic}{rulesep}   {\gdef\@PDFboxsep{#1}}
\gdef\@PDFgraphiccolor{black}
\gdef\@PDFgraphiclinecolor{white}
\gdef\@PDFgraphicbackground{white}
\gdef\@PDFboxrule{0pt}
\gdef\@PDFboxsep{0pt}

%%
%% Environment to grab all the packages used in the master doc.
%% This forces you to load pdftricks as the first package.
%%
\newenvironment{psinputs}{\verbatimwrite{tmp.inputs}}
   {\endverbatimwrite}

%%
%% Arrays to keep the fig numbers
%%
\@ifundefined{c@arraylength}{\newcounter{arraylength}}{}%
\@ifundefined{c@ArrayIndex}{\newcounter{ArrayIndex}}{}%
\@ifundefined{c@zeroCtr}{\newcounter{zeroCtr}}{}%
\@ifundefined{c@recordCtr}{\newcounter{recordCtr}}{}
\setcounter{recordCtr}{1}
\@ifundefined{c@Ctr}{\newcounter{Ctr}}{}
\def\DeclareArray#1{\Array{#1}[0]{}}%
%
\def\Array#1[#2]#3{%
      \expandafter\gdef\csname #1#2\endcsname{#3}%
      \expandafter\gdef\csname #1\endcsname[##1]{\csname #1##1\endcsname}}%
%
\def\getArraylength#1{\setcounter{arraylength}{0}%
   \loop\expandafter\ifx\csname #1\thearraylength\endcsname\relax%
   \else\stepcounter{arraylength}\repeat}%
%
\def\addToArray#1#2{\setcounter{arraylength}{0}%
   \loop\expandafter\ifx\csname #1\thearraylength\endcsname\relax%
   \else\stepcounter{arraylength}\repeat%
   \Array{#1}[\thearraylength]{#2}}%
%
\def\clearArray#1{\getArraylength{#1}%
   \loop\ifnum\c@arraylength >0%
   \global\expandafter\let\csname #1\thearraylength\endcsname\relax%
   \addtocounter{arraylength}{-1}\repeat}%
%
\long\def\ArrayIterator#1#2{%
   \setcounter{ArrayIndex}{1}\getArraylength{#1}%
   \setcounter{zeroCtr}{\c@arraylength}%
   \loop\ifnum\c@ArrayIndex<\c@zeroCtr{#2}%
   \stepcounter{ArrayIndex}\repeat%
}%
\def\@nnil{\@nil}
\def\@empty{}
\def\@cvrstop#1\@@#2{}
%%
%% Equivalent of \@tfor and \@for where any delimiter can be 
%% provided instead of LaTeX‘s default comma character
%%
\long\def\cvr@delimfor#1#2#3{\DeclareArray{#1}\clearArray{#1}%
   \long\def\@icvrloop##1#2##2\@@##3{\def##3{##1}\ifx ##3\@nnil%
   \expandafter\@cvrstop \else\addToArray{#1}{##1}%
    \relax\expandafter\@icvrloop\fi##2\@@##3}%
   \long\def\@cvrloop##1#2##2#2##3\@@##4{\addToArray{#1}{##1}%
   \def##4{##1}\ifx ##4\@nnil \else%
    \def##4{##2}\def\y@y{##2}\ifx\y@y\@nnil\else%
         \addToArray{#1}{##2}\fi\ifx ##4\@nnil \else%
      \@icvrloop ##3\@@##4\fi\fi}%
  \expandafter\def\expandafter\@fortmp\expandafter{#3}%
  \ifx\@fortmp\@empty \else%
    \expandafter\@cvrloop#3#2\@nil#2\@nil\@@\@ee@\fi}%
%
% Dont look into the following code. It is harmful
% for your eyes and brain as well.
%
\newcounter{f@irstCtr}
\newcounter{s@econdCtr}
\long\gdef\NoProcess[#1]{%
   \long\def\@i@@noprocess##1,##2\@@##3{\def##3{##1}\ifx ##3\@nnil%
   \expandafter\@cvrstop \else
      \expandafter\hyphencheck##1-@-*[*]
    \relax\expandafter\@i@@noprocess\fi##2\@@##3}%
   \long\def\@@@noprocess##1,##2,##3\@@##4{
      \expandafter\hyphencheck##1-@-*[*]
   \def##4{##1}\ifx ##4\@nnil \else%
    \def##4{##2}\def\y@y{##2}\ifx\y@y\@nnil\else%
      \expandafter\hyphencheck##2-@-*[*]
         \fi\ifx ##4\@nnil \else%
      \@i@@noprocess ##3\@@##4\fi\fi}%
  \expandafter\def\expandafter\@fortmp\expandafter{#1}%
  \ifx\@fortmp\@empty \else%
    \expandafter\@@@noprocess#1,\@nil,\@nil\@@\@ee@\fi}%
\def\d@d#1[*]{}
\def\hyphencheck#1-#2-#3{\def\r@r{@}\def\s@s{*}\edef\c@c{#3}
   \ifx\c@c\r@r
   \setcounter{f@irstCtr}{#1}
   \setcounter{s@econdCtr}{#2}
   \stepcounter{s@econdCtr}
   \loop\ifnum\thes@econdCtr > \thef@irstCtr% 
      \expandafter\edef\csname Fig\thef@irstCtr\endcsname{TRUE}
      \stepcounter{f@irstCtr}
   \repeat%
   \else\ifx\c@c\s@s% 
      \expandafter\edef\csname Fig#1\endcsname{TRUE}
   \fi\fi\d@d}

%%
%%
%% End of file `pdftricks.sty‘
%%

 

pdfwin.sty

   1 %% -*- TeX -*-
   2 %% (top line is for WinEdt: TeX file)
   3 %%
   4 %% This is file `pdfwin.sty‘. It provides three widely
   5 %% customizable windows for screen output of TeX documents.
   6 %%
   7 %% Copyright (C) 2001,02,03   Matthias M\"{u}hlich
   8 %%                            muehlich@iap.uni-frankfurt.de
   9 %%
  10 %% modified by Shujun Li (http://www.hooklee.com) in July, 2004
  11 %%
  12 %%
  13 %% NOTES:
  14 %%  * I prefer readability to achieving maximum effectivity, i.e. I
  15 %%    tried to avoid macros like \hb@xt@, \z@, \p@ or \xixt@@n and
  16 %%    wrote \hbox to, 0, 1pt and 16 instead.
  17 %%  * The package "pdfscreen.sty" by C.V. Radhakrishnan provided a
  18 %%    nice inspiration of what is possible with pdf output - at least
  19 %%    if you use default configuration and are content with the
  20 %%    package and its many bugs.
  21 %%    The pdfwin package was completely coded from scratch and its
  22 %%    features and flexibility extend pdfscreen considerably. Only a
  23 %%    bug fix in "pdfscreen.sty" (provided by D. P. Story) and
  24 %%    some foreign language names were copied.
  25 %%
  26 %% This program may be distributed and/or modified under the
  27 %% conditions of the LaTeX Project Public License, either version 1.2
  28 %% of this license or (at your option) any later version.
  29 %% The latest version of this license is in
  30 %%   http://www.latex-project.org/lppl.txt
  31 %% and version 1.2 or later is part of all distributions of LaTeX
  32 %% version 1999/12/01 or later.
  33 %%
  34 %% History:
  35 %%   JAN-FEB 2001  1.0  MM  first version
  36 %%     JUL   2001  1.1  MM  I added some macros for a upcoming
  37 %%                          presentation at a conference
  38 %%   SEP-OCT 2001  1.2  MM  some cosmetics; adapted to a lecture script;
  39 %%                          chapterpanel functionality
  40 %%   MAR-APR 2003  1.3  MM  some functionality removed (temporarily);
  41 %%                          first official release
  42 %%
  43 %% =====================================================================
  44 %% This program package contains the following files:
  45 %%  * pdfwin.sty             style file
  46 %%                           (to be included with \UsePackage{pdfwin})
  47 %%  * pdfwin.cfg             configuration file (empty)
  48 %%  ------------------------------------------------------------------
  49 %%  * truncate.sty           style file not included in all LaTeX
  50 %%                           distributions; needed for panel TOC
  51 %%  ------------------------------------------------------------------
  52 %%  * Bucuresti2003.tex      sample document, main file
  53 %%  * Buc*.pdf               graphics for sample document
  54 %%  * marble.png             background graphics for sample document
  55 %%  * JWGU-Logo.png          logo of my university
  56 %%  * shortvec.tex           abbreviations for vectors and matrices
  57 %% =====================================================================
  58 %%
  59 %% feel free to experiment with the code! But remember:
  60 %% modification means change of filename (and be fair and give reference
  61 %% to the original author :-). See LaTeX Project Public
  62 %% License for details.
  63 %%
  64 %% please report bugs to: muehlich@iap.uni-frankfurt.de  Thanks!
  65 
  66 \NeedsTeXFormat{LaTeX2e}
  67 
  68 % ==============
  69 % identification
  70 % ==============
  71 %
  72 \ProvidesPackage{pdfwin}%
  73   [2003/04/04 v1.3   This is package pdfwin. It provides widely %
  74   customizable windows for screen output of TeX documents.]
  75 
  76 % =================
  77 % required packages
  78 % =================
  79 %
  80 % NOTE: all packages listed here are standard packages.
  81 % However, if paneltoc is activated you have to get
  82 % truncate.sty from CTAN (e.g. ftp://ftp.dante.de/tex-archive)
  83 \RequirePackage{amssymb}     % black triangles
  84 \RequirePackage{keyval}      % user interface
  85 \RequirePackage{graphicx}
  86 \RequirePackage{color}
  87 
  88 % ========================
  89 % preliminary declarations
  90 % ========================
  91 %
  92 \newif\if@nocfg            \@nocfgfalse
  93 \newif\if@paneltoc         \@paneltocfalse
  94 \newif\if@chapterpanel     \@chapterpanelfalse
  95 \newif\if@coloremph        \@coloremphfalse
  96 \newif\if@pdftexdriver     \@pdftexdriverfalse
  97 \newif\if@chinese          \@chinesefalse   % added by Shujun Li
  98 %
  99 \def\PDFWIN@Warning#1{\PackageWarning{pdfwin}{#1}}
 100 \def\PDFWIN@Info#1{\PackageInfo{pdfwin}{#1}}
 101 \def\PDFWIN@Error#1#2{\PackageError{pdfwin}{#1}{#2}}
 102 \def\PDFWIN@langwarn#1{\PackageWarningNoLine{pdfwin}{%
 103     Sorry, language `#1‘ not supported\MessageBreak%
 104     in this version. English strings are used instead.\MessageBreak%
 105     However you can give all the strings in the pdfwin.cfg\MessageBreak%
 106     file which will be read by the package. \MessageBreak\MessageBreak%
 107     If you can suggest translations for this language,\MessageBreak%
 108     please mail them to the author of this package}}
 109 %
 110 \def\paneltitlepagename#1{\gdef\@Paneltitlepagename{#1}}
 111 \def\panelabstractname#1{\gdef\@Panelabstractname{#1}}
 112 \def\panelcontentsname#1{\gdef\@Panelcontentsname{#1}}
 113 \def\panelindexname#1{\gdef\@Panelindexname{#1}}
 114 \def\panelhomepagename#1{\gdef\@Panelhomepagename{#1}}
 115 \def\panelfullscreenname#1{\gdef\@Panelfullscreenname{#1}}
 116 \def\panelgobackname#1{\gdef\@Panelgobackname{#1}}
 117 \def\panelgoforwardname#1{\gdef\@Panelgoforwardname{#1}}
 118 \def\panelsearchname#1{\gdef\@Panelsearchname{#1}}
 119 \def\panelquitname#1{\gdef\@Panelquitname{#1}}
 120 \def\panelclosename#1{\gdef\@Panelclosename{#1}}
 121 \def\panelprepagenamei#1{\gdef\@Panelprepagenamei{#1}} % added by Shujun Li
 122 \def\panelprepagenameii#1{\gdef\@Panelprepagenameii{#1}} % added by Shujun Li
 123 \def\panelpagename#1{\gdef\@Panelpagename{#1}}
 124 \def\panelofname#1{\gdef\@Panelofname{#1}}
 125 \let\@Paneltitlepagename\@empty
 126 \let\@Panelabstractname\@empty
 127 \let\@Panelcontentsname\@empty
 128 \let\@Panelindexname\@empty
 129 \let\@Panelhomepagename\@empty
 130 \let\@Panelfullscreenname\@empty
 131 \let\@Panelgobackname\@empty
 132 \let\@Panelgoforwardname\@empty
 133 \let\@Panelsearchname\@empty
 134 \let\@Panelquitname\@empty
 135 \let\@Panelclosename\@empty
 136 \let\@Panelprepagenamei\@empty % added by Shujun Li
 137 \let\@Panelprepagenameii\@empty % added by Shujun Li
 138 \let\@Panelpagename\@empty
 139 \let\@Panelofname\@empty
 140 
 141 % =================================
 142 % option declaration and processing
 143 % =================================
 144 %
 145 \DeclareOption{nocfg}{\@nocfgtrue}
 146 \DeclareOption{paneltoc}{\@paneltoctrue}
 147 \DeclareOption{chapterpanel}{\@chapterpaneltrue}
 148 \DeclareOption{coloremph}{\@coloremphtrue}
 149 \DeclareOption{pdftex}{\@pdftexdrivertrue}
 150 \DeclareOption{sectionbreak}{%
 151   \let\org@section\section\def\section{\clearpage\org@section}%
 152 }
 153 %
 154 \DeclareOption{chinese}{\@chinesetrue}
 155 \DeclareOption{catalan}{%
 156   \paneltitlepagename{Inici}
 157   \panelabstractname{Resum}
 158   \panelcontentsname{Contingut}
 159   \panelindexname{Index} % ???
 160   \panelfullscreenname{Full Screen}
 161   \panelhomepagename{Plana personal}
 162   \panelgobackname{Tornar}
 163   \panelgoforwardname{->}
 164   \panelclosename{Tancar}
 165   \panelsearchname{???}
 166   \panelquitname{Sortir}
 167   \panelpagename{P\`agina}
 168   \panelofname{de}
 169 }
 170 \DeclareOption{czech}{%
 171   \paneltitlepagename{Tituln\‘{\i} strana}
 172   \panelabstractname{Abstrakt}
 173   \panelcontentsname{Obsah}
 174   \panelindexname{Index} % ???
 175   \panelfullscreenname{Full Screen}
 176   \panelhomepagename{\‘Uvodn\‘{\i} strana}
 177   \panelgobackname{Zp\v{e}t}
 178   \panelgoforwardname{->}
 179   \panelclosename{Zav\v{r}\‘{\i}t}
 180   \panelsearchname{???}
 181   \panelquitname{Konec}
 182   \panelpagename{Strana}
 183   \panelofname{z}
 184 }
 185 \DeclareOption{danish}{%
 186   \paneltitlepagename{Forside}
 187   \panelabstractname{Resum\‘e}
 188   \panelcontentsname{Indhold}
 189   \panelindexname{Index} % ???
 190   \panelfullscreenname{Full Screen}
 191   \panelhomepagename{Hjemmeside}
 192   \panelgobackname{G\aa\ tilbage}
 193   \panelgoforwardname{->}
 194   \panelclosename{Luk}
 195   \panelsearchname{???}
 196   \panelquitname{Afslut}
 197   \panelpagename{Side}
 198   \panelofname{af}
 199 }
 200 \DeclareOption{dutch}{
 201   \paneltitlepagename{Titel Pagina}
 202   \panelabstractname{Samenvatting}
 203   \panelcontentsname{Inhoudsopgave}
 204   \panelindexname{Index} % ???
 205   \panelfullscreenname{Full Screen}
 206   \panelhomepagename{Startpagina}
 207   \panelgobackname{Ga terug}
 208   \panelgoforwardname{->}
 209   \panelclosename{Sluiten}
 210   \panelsearchname{???}
 211   \panelquitname{Be\"eindigen}
 212   \panelpagename{Pagina}
 213   \panelofname{van}
 214 }
 215 \DeclareOption{english}{%
 216   \paneltitlepagename{Title Page}
 217   \panelabstractname{Abstract}
 218   \panelcontentsname{Contents}
 219   \panelindexname{Index} % ???
 220   \panelfullscreenname{Full Screen}
 221   \panelhomepagename{Home Page}
 222   \panelgobackname{Go Back}
 223   \panelgoforwardname{Go Forward}
 224   \panelclosename{Close}
 225   \panelsearchname{Search}
 226   \panelquitname{Quit}
 227   \panelpagename{Page}
 228   \panelofname{of}
 229 }
 230 \DeclareOption{french}{%
 231   \paneltitlepagename{Page de Titre}
 232   \panelabstractname{R\‘esum\‘e}
 233   \panelcontentsname{Sommaire}
 234   \panelindexname{Index} % ???
 235   \panelfullscreenname{Full Screen}
 236   \panelhomepagename{Page d\‘accueil}
 237   \panelgobackname{Retour}
 238   \panelgoforwardname{->}
 239   \panelclosename{Fermer}
 240   \panelsearchname{???}
 241   \panelquitname{Quitter}
 242   \panelpagename{Page}
 243   \panelofname{de}
 244 }
 245 \DeclareOption{german}{%
 246   \paneltitlepagename{Titelseite}
 247   \panelabstractname{Zusammenfassung}
 248   \panelcontentsname{Inhalt}
 249   \panelindexname{Index}
 250   \panelfullscreenname{Vollbild}
 251   \panelhomepagename{WWW-Startseite}
 252   \panelgobackname{Zur\"uck}
 253   \panelgoforwardname{Vor}
 254   \panelclosename{Schlie\ss en}
 255   \panelsearchname{Suchen}
 256   \panelquitname{Beenden}
 257   \panelpagename{Seite}
 258   \panelofname{von}
 259 }
 260 \DeclareOption{norsk}{%
 261   \paneltitlepagename{Forside}
 262   \panelabstractname{Sammendrag}
 263   \panelcontentsname{Innhold}
 264   \panelindexname{Index} % ???
 265   \panelfullscreenname{Full Screen}
 266   \panelhomepagename{Hjemmeside}
 267   \panelgobackname{G\aa\ tilbake}
 268   \panelgoforwardname{->}
 269   \panelclosename{Lukk}
 270   \panelsearchname{???}
 271   \panelquitname{Avslutt}
 272   \panelpagename{Side}
 273   \panelofname{av}
 274 }
 275 \DeclareOption{nynorsk}{%
 276   \paneltitlepagename{Forside}
 277   \panelabstractname{Samandrag}
 278   \panelcontentsname{Innhald}
 279   \panelindexname{Index} % ???
 280   \panelfullscreenname{Full Screen}
 281   \panelhomepagename{Heimeside}
 282   \panelgobackname{G\aa\ tilbake}
 283   \panelgoforwardname{->}
 284   \panelclosename{Lat att}
 285   \panelsearchname{???}
 286   \panelquitname{Avslutt}
 287   \panelpagename{Side}
 288   \panelofname{av}
 289 }
 290 \DeclareOption{polish}{%
 291   \paneltitlepagename{Strona tytu\l owa}
 292   \panelabstractname{Streszczenie}
 293   \panelcontentsname{Spis tre\‘sci}
 294   \panelindexname{Index} % ???
 295   \panelfullscreenname{Full Screen}
 296   \panelhomepagename{Strona g\l \‘owna}
 297   \panelgobackname{Powr\‘ot}
 298   \panelgoforwardname{->}
 299   \panelclosename{Zamknij}
 300   \panelsearchname{???}
 301   \panelquitname{Koniec}
 302   \panelpagename{Strona}
 303   \panelofname{z}
 304 }
 305 \DeclareOption{portuges}{%
 306   \paneltitlepagename{P\‘agina de Rosto}
 307   \panelabstractname{Sum\‘ario}
 308   \panelcontentsname{\‘Indice Geral}
 309   \panelindexname{Index} % ???
 310   \panelfullscreenname{Full Screen}
 311   \panelhomepagename{Homepage}
 312   \panelgobackname{Voltar}
 313   \panelgoforwardname{->}
 314   \panelclosename{Fechar}
 315   \panelsearchname{???}
 316   \panelquitname{Desistir}
 317   \panelpagename{P\‘agina}
 318   \panelofname{de}
 319 }
 320 \DeclareOption{russian}{%
 321   \paneltitlepagename{\cyr\CYRT\cyri\cyrt\cyru\cyrl\cyrsftsn\cyrn\cyra\cyrya{}
 322     \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}
 323   \panelabstractname{\cyr\CYRA\cyrn\cyrn\cyro\cyrt\cyra\cyrc\cyri\cyrya}
 324   \panelcontentsname{\cyr\CYRS\cyro\cyrd\cyre\cyrr\cyrzh\cyra\cyrn\cyri\cyre}
 325   \panelindexname{Index} % ???
 326   \panelfullscreenname{Full Screen}
 327   \panelhomepagename{Home Page}
 328   \panelgobackname{\cyr\CYRN\cyra\cyrz\cyra\cyrd}
 329   \panelgoforwardname{->}
 330   \panelclosename{\cyr\CYRZ\cyra\cyrk\cyrr\cyrery\cyrt\cyrsftsn}
 331   \panelsearchname{???}
 332   \panelquitname{\cyr\CYRV\cyrery\cyrh\cyro\cyrd}
 333   \panelpagename{\cyr\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}
 334   \panelofname{\cyr\cyri\cyrz}
 335 }
 336 \DeclareOption{slovak}{%
 337   \paneltitlepagename{Tituln\‘a strana}
 338   \panelabstractname{Abstrakt}
 339   \panelcontentsname{Obsah}
 340   \panelindexname{Index} % ???
 341   \panelfullscreenname{Full Screen}
 342   \panelhomepagename{Domovsk\‘a str\‘anka}
 343   \panelgobackname{Sp\"a\v t}
 344   \panelgoforwardname{->}
 345   \panelclosename{Zatvori\v t}
 346   \panelsearchname{???}
 347   \panelquitname{Koniec}
 348   \panelpagename{Strana}
 349   \panelofname{z}
 350 }
 351 \DeclareOption{slovene}{%
 352   \paneltitlepagename{Naslovnica}
 353   \panelabstractname{Povzetek}
 354   \panelcontentsname{Kazalo}
 355   \panelindexname{Index} % ???
 356   \panelfullscreenname{Full Screen}
 357   \panelhomepagename{Spletna stran}
 358   \panelgobackname{Nazaj}
 359   \panelgoforwardname{->}
 360   \panelclosename{Zapri}
 361   \panelsearchname{???}
 362   \panelquitname{Kon\v{c}aj}
 363   \panelpagename{Stran}
 364   \panelofname{od}
 365 }
 366 \DeclareOption{spanish}{%
 367   \paneltitlepagename{P\‘agina de Abertura}
 368   \panelabstractname{Resumen}
 369   \panelcontentsname{Contenido}
 370   \panelindexname{Index} % ???
 371   \panelfullscreenname{Full Screen}
 372   \panelhomepagename{P\‘agina www}
 373   \panelgobackname{Regresar}
 374   \panelgoforwardname{->}
 375   \panelclosename{Cerrar}
 376   \panelsearchname{???}
 377   \panelquitname{Abandonar}
 378   \panelpagename{P\‘agina}
 379   \panelofname{de}
 380 }
 381 \DeclareOption{swedish}{%
 382   \paneltitlepagename{F\"ors\"attsblad}
 383   \panelabstractname{Sammanfattning}
 384   \panelcontentsname{Inneh\aa{}ll}
 385   \panelindexname{Index} % ???
 386   \panelfullscreenname{Full Screen}
 387   \panelhomepagename{Hemsida}
 388   \panelgobackname{Tillbaka}
 389   \panelgoforwardname{->}
 390   \panelclosename{St\"ang}
 391   \panelsearchname{???}
 392   \panelquitname{Avsluta}
 393   \panelpagename{Sida}
 394   \panelofname{av}
 395 }
 396 % define all other languages of babel package as non existent
 397 \DeclareOption{bahasa}{\PDFSCR@langwarn{bahasa}\ExecuteOptions{english}}
 398 \DeclareOption{breton}{\PDFSCR@langwarn{breton}\ExecuteOptions{english}}
 399 \DeclareOption{croatian}{\PDFSCR@langwarn{croatian}\ExecuteOptions{english}}
 400 \DeclareOption{esperanto}{\PDFSCR@langwarn{esperanto}\ExecuteOptions{english}}
 401 \DeclareOption{finnish}{\PDFSCR@langwarn{finnish}\ExecuteOptions{english}}
 402 \DeclareOption{galician}{\PDFSCR@langwarn{galician}\ExecuteOptions{english}}
 403 \DeclareOption{greek}{\PDFSCR@langwarn{greek}\ExecuteOptions{english}}
 404 \DeclareOption{hebrew}{\PDFSCR@langwarn{hebrew}\ExecuteOptions{english}}
 405 \DeclareOption{hungarian}{\PDFSCR@langwarn{hungarian}\ExecuteOptions{english}}
 406 \DeclareOption{magyar}{\PDFSCR@langwarn{magyar}\ExecuteOptions{english}}
 407 \DeclareOption{irish}{\PDFSCR@langwarn{irish}\ExecuteOptions{english}}
 408 \DeclareOption{italian}{\PDFSCR@langwarn{italian}\ExecuteOptions{english}}
 409 \DeclareOption{lowersorbian}{\PDFSCR@langwarn{lowersorbian}\ExecuteOptions{english}}
 410 \DeclareOption{uppersorbian}{\PDFSCR@langwarn{uppersorbian}\ExecuteOptions{english}}
 411 \DeclareOption{romanian}{\PDFSCR@langwarn{romanian}\ExecuteOptions{english}}
 412 \DeclareOption{scottish}{\PDFSCR@langwarn{scottish}\ExecuteOptions{english}}
 413 \DeclareOption{turkish}{\PDFSCR@langwarn{turkish}\ExecuteOptions{english}}
 414 \DeclareOption{ukrainian}{\PDFSCR@langwarn{ukrainian}\ExecuteOptions{english}}
 415 \DeclareOption{welsh}{\PDFSCR@langwarn{welsh}\ExecuteOptions{english}}
 416 
 417 % some replacements
 418 \DeclareOption{american}{\ExecuteOptions{english}}
 419 \DeclareOption{USenglish}{\ExecuteOptions{english}}
 420 \DeclareOption{UKenglish}{\ExecuteOptions{english}}
 421 \DeclareOption{british}{\ExecuteOptions{english}}
 422 \DeclareOption{austrian}{\ExecuteOptions{german}}
 423 \DeclareOption{germanb}{\ExecuteOptions{german}}
 424 \DeclareOption{brazil}{\ExecuteOptions{portuges}}
 425 \DeclareOption{portuguese}{\ExecuteOptions{portuges}}
 426 \DeclareOption{brazilian}{\ExecuteOptions{portuges}}
 427 \DeclareOption{francais}{\ExecuteOptions{french}}
 428 \DeclareOption{ngerman}{\typeout{****** Igitt! Neue Beliebigkeits-Rechtschreibung!%
 429   Na, meinetwegen... ;-) ******}\ExecuteOptions{german}}
 430 \DeclareOption{naustrian}{\typeout{****** Igitt! Neue Beliebigkeits-Rechtschreibung!%
 431   Na, meinetwegen... ;-) ******}\ExecuteOptions{german}}
 432 \ExecuteOptions{english}
 433 \ProcessOptions\relax
 434 
 435 \if@chinese\RequirePackage{CJK}\fi% added by Shujun Li
 436 
 437 % =======================
 438 % BEGIN OF IMPLEMENTATION
 439 % =======================
 440 %
 441 % NOTE: all identifiers containing an ‘@‘ symbol are internal
 442 % identifiers. Please do not write code that relies on these
 443 % functions because they might change in future versions.
 444 
 445 % --------------------------------------------------------------
 446 % HYPERREF SETUP
 447 %
 448 \if@paneltoc\RequirePackage[breakall]{truncate}\fi
 449 %
 450 \@ifundefined{hyperref}{%
 451   \if@pdftexdriver%
 452     \RequirePackage[pdftex,backref,pagebackref,colorlinks,plainpages=false,%
 453       menucolor=menucolor,%
 454 %      pdfpagemode=FullScreen,%
 455       pdfmenubar=false,pdftoolbar=false,%
 456       pdffitwindow=true,pdfcenterwindow=true,pdfwindowui=false,pdfview=Fit,%
 457       pdfstartview=Fit]{hyperref}%
 458   \else% (no pdftex => try to setup hyperref now)
 459     \hypersetup{%
 460       backref,pagebackref,colorlinks,plainpages=false,menucolor=menucolor,%
 461       pdfpagemode=none,pdfmenubar=false,pdftoolbar=false,pdffitwindow=true,%
 462       pdfcenterwindow=true,pdfwindowui=false,pdfview=Fit,pdfstartview=Fit%
 463     }
 464   \fi%
 465 }{ % (else hyperref undefined)
 466   \PDFWIN@Error{Please load hyperref package first}{hyperref must be loaded before pdfwin}%
 467 }
 468 \if@chinese\hypersetup{CJKbookmarks=true}\fi% added by Shujun Li
 469 
 470 
 471 % --------------------------------------------------------------
 472 % COUNTERS
 473 %
 474 % window types
 475 %  0: disabled
 476 %  1: transparent
 477 %  2: colored background
 478 %  3: graphics
 479 %  4: colored background + graphics
 480 \newcount\@Screen@Type      \@Screen@Type=2
 481 \newcount\@Text@WinType     \@Text@WinType=2
 482 \newcount\@Panel@WinType    \@Panel@WinType=2
 483 \newcount\@User@WinType     \@User@WinType=0
 484 %
 485 % define chapter counter for small classes (!!!)
 486 \ifx\c@chapter\@undefined\newcount\c@chapter\fi
 487 %
 488 % RealPage is necessary to allow different page numberings,
 489 % e.g. roman for titlepage, abstract, contents and foreword
 490 % and arabic numbering (starting with 1!) for the rest
 491 \newcounter{RealPage}
 492 \setcounter{RealPage}{1}
 493 %
 494 % Three windows are predefined - text, panel, user. Additional windows
 495 % can be defined by the user if he/she needs them.
 496 \newcounter{WindowCount}
 497 \setcounter{WindowCount}{3}
 498 %
 499 % PanelTocLine is a counter for the lines in the panel TOC
 500 \newcounter{PanelTocLine}[page]
 501 \newcounter{TocChapterCount}[page]
 502 \newcounter{ptocsection}\setcounter{ptocsection}{0}
 503 
 504 
 505 % --------------------------------------------------------------
 506 % BOOLEANS
 507 %
 508 \newif\if@PanelTocHighlight   \@PanelTocHighlightfalse
 509 \newif\if@PTocNTransparent    \@PTocNTransparentfalse
 510 \newif\if@PTocHTransparent    \@PTocHTransparentfalse
 511 \newif\if@InPreamble          \@InPreambletrue
 512 \AtBeginDocument{\@InPreamblefalse}
 513 
 514 
 515 % --------------------------------------------------------------
 516 % COLORS  ---  these colors can be modified (i.e. redefined) by the user
 517 %
 518 % screen and window colors
 519 \definecolor{ScreenBackgroundColor}{rgb}{.0,.2,.8}
 520 \definecolor{TextBackgroundColor}{rgb}{.8,.9,1.0}
 521 \definecolor{PanelBackgroundColor}{rgb}{.7,.75,.8}
 522 \definecolor{UserBackgroundColor}{rgb}{1.0,1.0,1.0}
 523 \definecolor{TextBorderColor}{rgb}{.0,.0,.0}
 524 \definecolor{PanelBorderColor}{rgb}{.0,.0,.0}
 525 \definecolor{UserBorderColor}{rgb}{.0,.0,.0}
 526 % button colors
 527 \definecolor{ButtonTextColor}{rgb}{.0,.0,.3}
 528 \definecolor{ButtonHighlightedTextColor}{rgb}{.8,.0,.2}
 529 \definecolor{ButtonDisabledTextColor}{rgb}{.5,.55,.6}
 530 \definecolor{ButtonBackgroundColor}{rgb}{.7,.75,.8}
 531 \definecolor{ButtonUpperShadowColor}{rgb}{.85,.9,.95}
 532 \definecolor{ButtonShadowColor}{rgb}{.5,.55,.6}
 533 % logo colors
 534 \definecolor{LogoShadowColor}{rgb}{.85,.9,.95}
 535 \definecolor{LogoUpperShadowColor}{rgb}{.5,.55,.6}
 536 % panel toc colors
 537 \definecolor{PanelTocNormalTextColor}{rgb}{.0,.0,.3}
 538 \definecolor{PanelTocNormalBackgroundColor}{rgb}{.7,.75,.8}
 539 \definecolor{PanelTocHighlightedTextColor}{rgb}{.8,.8,.0}
 540 \definecolor{PanelTocHighlightedBackgroundColor}{rgb}{.0,.0,.3}
 541 % text colors
 542 \definecolor{TextEmphColor}{rgb}{.0,.0,.8}%
 543 \definecolor{TextGrayedOutColor}{rgb}{.5,.5,.5}%
 544 \definecolor{TextHighlightedColor}{rgb}{.9,.0,.2}%
 545 \definecolor{TextRevealedColor}{rgb}{.0,.0,.5}%
 546 % section headings
 547 \definecolor{Section0Color}{rgb}{.7,.7,.0}
 548 \definecolor{Section1Color}{rgb}{.75,.6,.1}
 549 \definecolor{Section2Color}{rgb}{.7,.4,.2}
 550 \definecolor{Section3Color}{rgb}{.65,.2,.3}
 551 \definecolor{Section4Color}{rgb}{.6,.1,.5}
 552 \definecolor{Section5Color}{rgb}{.55,.0,.7}
 553 % chapter panel colors: 0 - title, contents, index, ...
 554 %                       1 - normal chapters
 555 % a/b/c/d: background/text/upper shadow/lower shadow
 556 \definecolor{ChapterPanelColor0a}{rgb}{.9,.9,.9}
 557 \definecolor{ChapterPanelColor0b}{rgb}{0,0,0}
 558 \definecolor{ChapterPanelColor0c}{rgb}{1,1,1}
 559 \definecolor{ChapterPanelColor0d}{rgb}{.4,.4,.4}
 560 \definecolor{ChapterPanelColor1a}{rgb}{.15,.2,.5}
 561 \definecolor{ChapterPanelColor1b}{rgb}{.95,.95,.95}
 562 \definecolor{ChapterPanelColor1c}{rgb}{.6,.7,.95}
 563 \definecolor{ChapterPanelColor1d}{rgb}{.0,.05,.3}
 564 
 565 % --------------------------------------------------------------
 566 % LENGTHS
 567 %
 568 \setlength{\headheight}{0pt}
 569 \setlength{\headsep}{0pt}
 570 \setlength{\footskip}{0pt}
 571 \hoffset=0pt
 572 \voffset=0pt
 573 \paperwidth=20cm
 574 \paperheight=15cm
 575 \pagestyle{empty}
 576 %
 577 % NOTE:
 578 % We will use the \put command for displaying graphics. Therefore,%
 579 % the origin is in the LOWER left corner at (0pt/0pt).
 580 %
 581 % - text window position (lower left corner) and size
 582 \newlength{\@Text@LLX}          \setlength{\@Text@LLX}{.02\paperwidth}
 583 \newlength{\@Text@LLY}          \setlength{\@Text@LLY}{.02\paperheight}
 584 \newlength{\@Text@DimX}         \setlength{\@Text@DimX}{.79\paperwidth}
 585 \newlength{\@Text@DimY}         \setlength{\@Text@DimY}{.96\paperheight}
 586 % - panel position (lower left corner) and size
 587 \newlength{\@Panel@LLX}         \setlength{\@Panel@LLX}{.83\paperwidth}
 588 \newlength{\@Panel@LLY}         \setlength{\@Panel@LLY}{.02\paperheight}
 589 \newlength{\@Panel@DimX}        \setlength{\@Panel@DimX}{.15\paperwidth}
 590 \newlength{\@Panel@DimY}        \setlength{\@Panel@DimY}{.96\paperheight}
 591 % - user window position (lower left corner) and size
 592 \newlength{\@User@LLX}          \setlength{\@User@LLX}{.02\paperwidth}
 593 \newlength{\@User@LLY}          \setlength{\@User@LLY}{.92\paperheight}
 594 \newlength{\@User@DimX}         \setlength{\@User@DimX}{.79\paperwidth}
 595 \newlength{\@User@DimY}         \setlength{\@User@DimY}{.06\paperheight}
 596 % - window borders
 597 \newlength{\@Text@BorderThickness}  \setlength{\@Text@BorderThickness}{2.0pt}
 598 \newlength{\@Text@BorderArcRadius}  \setlength{\@Text@BorderArcRadius}{12pt}
 599 \newlength{\@Panel@BorderThickness} \setlength{\@Panel@BorderThickness}{2.0pt}
 600 \newlength{\@Panel@BorderArcRadius} \setlength{\@Panel@BorderArcRadius}{12pt}
 601 \newlength{\@User@BorderThickness}  \setlength{\@User@BorderThickness}{2.0pt}
 602 \newlength{\@User@BorderArcRadius}  \setlength{\@User@BorderArcRadius}{12pt}
 603 % - margins (apply for text window)
 604 \newlength{\@LeftMargin}       \setlength{\@LeftMargin}{1cm}
 605 \newlength{\@RightMargin}      \setlength{\@RightMargin}{1cm}
 606 \newlength{\@TopMargin}        \setlength{\@TopMargin}{1cm}
 607 \newlength{\@BottomMargin}     \setlength{\@BottomMargin}{1cm}
 608 % - button shape
 609 \newlength{\@ButtonShadowDepth}\setlength{\@ButtonShadowDepth}{2pt}
 610 \newlength{\@ButtonWidth}      \setlength{\@ButtonWidth}{.8\@Panel@DimX}
 611 \newlength{\@SmallButtonWidth} \setlength{\@SmallButtonWidth}{.4\@Panel@DimX}
 612 \addtolength{\@SmallButtonWidth}{-\@ButtonShadowDepth}
 613 % - logo shape
 614 \newlength{\@LogoWidth}        \setlength{\@LogoWidth}{.7\@Panel@DimX}
 615 \newlength{\@LogoShadowDepth}  \setlength{\@LogoShadowDepth}{3.0pt}
 616 % - panel toc height (usually automatic; fixed only if >0)
 617 \newlength{\@PanelTOCHeight}   \setlength{\@PanelTOCHeight}{0cm}
 618 %
 619 % temporary help registers
 620 \newdimen\Win@DimX
 621 \newdimen\Win@DimY
 622 \newdimen\Win@LLX
 623 \newdimen\Win@LLY
 624 \newdimen\Win@BT
 625 \newdimen\Win@BR
 626 
 627 % --------------------------------------------------------------
 628 % LAYOUT
 629 %
 630 \newcommand{\InitLayout}{%
 631   % NOTE: both \oddsidemargin and \evensidemargin define
 632   %       LEFT margins (on odd/even pages). In one-sided
 633   %       documents only \oddsidemargin is used.
 634   \if@InPreamble%
 635   \else%
 636     \PDFWIN@Warning{***** Page Layout changed outside of %
 637      Preamble - this might not work as expected! *****}
 638   \fi%
 639   \global\setlength{\textwidth}{\@Text@DimX}%
 640   \global\addtolength{\textwidth}{-\@LeftMargin}%
 641   \global\addtolength{\textwidth}{-\@RightMargin}%
 642   \global\setlength{\textheight}{\@Text@DimY}%
 643   \global\addtolength{\textheight}{-\@TopMargin}%
 644   \global\addtolength{\textheight}{-\@BottomMargin}%
 645   \global\addtolength{\textheight}{-\headheight}%
 646   \global\addtolength{\textheight}{-\headsep}%
 647   \global\addtolength{\textheight}{-\footskip}%
 648   \global\setlength{\oddsidemargin}{\@LeftMargin}%
 649   \global\addtolength{\oddsidemargin}{\@Text@LLX}%
 650   \global\addtolength{\oddsidemargin}{-1in}%
 651   \global\setlength{\evensidemargin}{\@LeftMargin}%
 652   \global\addtolength{\evensidemargin}{\@Text@LLX}%
 653   \global\addtolength{\evensidemargin}{-1in}%
 654   \global\setlength{\topmargin}{\@TopMargin}%
 655   \global\addtolength{\topmargin}{\paperheight}%
 656   \global\addtolength{\topmargin}{-\@Text@DimY}%
 657   \global\addtolength{\topmargin}{-\@Text@LLY}%
 658   \global\addtolength{\topmargin}{-1in}%
 659 }
 660 \InitLayout  % initialize with default values
 661 
 662 % --------------------------------------------------------------
 663 % GENERAL DEFINITIONS
 664 %
 665 \renewcommand\floatpagefraction{1}
 666 \renewcommand\textfraction{0}
 667 %
 668 % Overwrite page styles. Can be modified by user to make use of
 669 % explicit or implicit (e.g. "empty" for title page or "plain" for
 670 % first page of chapters) page style modifications
 671 \def\ps@plain{}
 672 \def\ps@empty{}
 673 \def\ps@firstpage{}
 674 \def\ps@headings{}
 675 \def\ps@myheadings{}
 676 \def\ps@title{}
 677 %
 678 \def\@linkcolor{red}
 679 \def\@anchorcolor{blue}
 680 \def\@citecolor{red}
 681 \def\@filecolor{red}
 682 \def\@urlcolor{magenta}
 683 \def\@menucolor{red}
 684 \def\@pagecolor{red}
 685 %
 686 \def\Top@Text@{\relax}
 687 \def\@Text@{\relax}
 688 \def\@Panel@{\relax}
 689 \def\@User@{\relax}
 690 %
 691 \let\@Screen@Overlay\@empty
 692 \let\@Text@Overlay\@empty
 693 \let\@Panel@Overlay\@empty
 694 \let\@User@Overlay\@empty
 695 %
 696 \def\emptystring{empty}
 697 \edef\@paneltext{\emptystring}
 698 \edef\@LogoFile{\emptystring}
 699 \def\@LogoWidth{2cm}
 700 \edef\@HomepageURL{\emptystring}
 701 \edef\@LogoURL{\emptystring}
 702 
 703 
 704 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 705 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 706 %
 707 % USER INTERFACE
 708 %
 709 \long\def\SetUnderTextWin#1{\gdef\@Text@{#1}}
 710 \long\def\SetOverTextWin#1{\gdef\Top@Text@{#1}}
 711 \long\def\SetPanelContents#1{\gdef\@Panel@{#1}}
 712 \long\def\SetUserContents#1{\gdef\@User@{#1}}
 713 %
 714 \newcommand{\SetMargins}[4]{%
 715   \global\setlength{\@LeftMargin}{#1}%
 716   \global\setlength{\@RightMargin}{#2}%
 717   \global\setlength{\@TopMargin}{#3}%
 718   \global\setlength{\@BottomMargin}{#4}%
 719   \InitLayout%
 720 }
 721 \newcommand{\SetPaneltext}[1]{\gdef\@paneltext{#1}}
 722 %
 723 \expandafter\def\csname WindowName1\endcsname{Text}
 724 \expandafter\def\csname WindowName2\endcsname{Panel}
 725 \expandafter\def\csname WindowName3\endcsname{User}
 726 \expandafter\def\csname WindowRef1\endcsname{text}
 727 \expandafter\def\csname WindowRef2\endcsname{panel}
 728 \expandafter\def\csname WindowRef3\endcsname{user}
 729 %
 730 % MACROS USING KEYVAL PACKAGE
 731 \def\SetScreen#1{\setkeys{pdfwinScreen}{#1}}
 732 \def\SetLogo#1{\setkeys{pdfwinLogo}{#1}}
 733 \def\SetButtons#1{\setkeys{pdfwinButtons}{#1}}
 734 \def\SetPanelTOC#1{\setkeys{pdfwinPanelTOC}{#1}}
 735 \def\SetWindow#1#2{%
 736   \def\@WinName{error}%
 737   \@tempcnta=\c@WindowCount%
 738   \loop%
 739   \ifnum\@tempcnta>0%
 740     \def\tempa{#1}%
 741     \edef\tempb{\csname WindowRef\number\@tempcnta\endcsname}%
 742     \ifx\tempa\tempb%
 743       \xdef\@WinName{\csname WindowName\number\@tempcnta\endcsname}%
 744     \fi%
 745     \advance\@tempcnta by -1%
 746   \repeat%
 747   \def\tempb{error}%
 748   \ifx\@WinName\tempb%
 749     \PDFWIN@Error{SetWindow called with wrong window name specifier ‘#1‘}%
 750     {you can only use ‘text‘, ‘panel‘ or ‘user‘ (or your user-created%
 751     additional specifiers) as window identifiers %
 752     (first argument of SetWindow command)}%
 753   \fi%
 754   \setkeys{pdfwin}{#2}%
 755 }
 756 %
 757 % SCREEN KEYS
 758 \define@key{pdfwinScreen}{width}{\global\paperwidth=#1}
 759 \define@key{pdfwinScreen}{height}{\global\paperheight=#1\InitLayout}
 760 \define@key{pdfwinScreen}{filename}{\xdef\@Screen@Overlay{#1}}
 761 \define@key{pdfwinScreen}{backgroundcolor}%
 762   {\definecolor{ScreenBackgroundColor}{rgb}{#1}}
 763 \define@key{pdfwinScreen}{type}{%
 764   \def\tempa{#1}%
 765   \def\tempb{disabled}%
 766   \ifx\tempa\tempb\PDFWIN@Error{Disabling screen?! NO!}{\PDFWIN@ScreenErr}%
 767   \else\def\tempb{transparent}%
 768   \ifx\tempa\tempb\PDFWIN@Error{transparent screen?! NO!}{\PDFWIN@ScreenErr}%
 769   \else\def\tempb{colored}%
 770   \ifx\tempa\tempb\global\@Screen@Type=2%
 771   \else\def\tempb{graphics}%
 772   \ifx\tempa\tempb\global\@Screen@Type=3%
 773   \else\def\tempb{extended}%
 774   \ifx\tempa\tempb\global\@Screen@Type=4%
 775   \else\def\tempb{wallpaper}%
 776   \ifx\tempa\tempb\global\@Screen@Type=5%
 777   \else\PDFWIN@Error{SetScreen called with wrong type specifier ‘#1‘}{\PDFWIN@ScreenErr}%
 778   \fi\fi\fi\fi\fi\fi%
 779 }
 780 \def\PDFWin@ScreenErr{Only ‘colored‘, ‘graphics‘, ‘extended‘ and ‘wallpaper‘ are %
 781   allowed for the screen type. In contrast to windows, ‘disabled‘ and %
 782   ‘transparent‘ are forbidden.}
 783 %
 784 % LOGO KEYS
 785 \define@key{pdfwinLogo}{shadowcolor}%
 786   {\definecolor{LogoShadowColor}{rgb}{#1}}
 787 \define@key{pdfwinLogo}{uppershadowcolor}%
 788   {\definecolor{LogoUpperShadowColor}{rgb}{#1}}
 789 \define@key{pdfwinLogo}{filename}{\xdef\@LogoFile{#1}}
 790 \define@key{pdfwinLogo}{width}{\xdef\@LogoWidth{#1}}
 791 \define@key{pdfwinLogo}{shadowdepth}{\global\@LogoShadowDepth=#1}
 792 \define@key{pdfwinLogo}{url}{\xdef\@LogoURL{#1}}
 793 %
 794 % BUTTONS KEYS
 795 \def\Init@Buttons{%
 796   \global\setlength{\@SmallButtonWidth}{.5\@ButtonWidth}%
 797   \global\addtolength{\@SmallButtonWidth}{-\@ButtonShadowDepth}}
 798 \define@key{pdfwinButtons}{width}{\global\@ButtonWidth=#1\Init@Buttons}
 799 \define@key{pdfwinButtons}{shadowdepth}%
 800   {\global\@ButtonShadowDepth=#1\Init@Buttons}
 801 \define@key{pdfwinButtons}{backgroundcolor}%
 802   {\definecolor{ButtonBackgroundColor}{rgb}{#1}}
 803 \define@key{pdfwinButtons}{textcolor}%
 804   {\definecolor{ButtonTextColor}{rgb}{#1}}
 805 \define@key{pdfwinButtons}{htextcolor}%
 806   {\definecolor{ButtonHighlightedTextColor}{rgb}{#1}}
 807 \define@key{pdfwinButtons}{dtextcolor}%
 808  {\definecolor{ButtonDisabledTextColor}{rgb}{#1}}
 809 \define@key{pdfwinButtons}{shadowcolor}%
 810   {\definecolor{ButtonShadowColor}{rgb}{#1}}
 811 \define@key{pdfwinButtons}{uppershadowcolor}%
 812   {\definecolor{ButtonUpperShadowColor}{rgb}{#1}}
 813 \define@key{pdfwinButtons}{url}{\xdef\@HomepageURL{#1}}
 814 %
 815 % PANELTOC KEYS
 816 \define@key{pdfwinPanelTOC}{textcolor}%
 817   {\definecolor{PanelTocNormalTextColor}{rgb}{#1}}
 818 \define@key{pdfwinPanelTOC}{backgroundcolor}%
 819   {\definecolor{PanelTocNormalBackgroundColor}{rgb}{#1}}
 820 \define@key{pdfwinPanelTOC}{htextcolor}%
 821   {\definecolor{PanelTocHighlightedTextColor}{rgb}{#1}}
 822 \define@key{pdfwinPanelTOC}{hbackgroundcolor}%
 823   {\definecolor{PanelTocHighlightedBackgroundColor}{rgb}{#1}}
 824 \define@key{pdfwinPanelTOC}{height}%
 825   {\global\@PanelTOCHeight=#1}
 826 \define@key{pdfwinPanelTOC}{transparency}{%
 827   \def\tempa{#1}%
 828   \def\tempb{none}%
 829   \ifx\tempa\tempb\@PTocNTransparentfalse\@PTocHTransparentfalse%
 830   \else\def\tempb{normal}%
 831   \ifx\tempa\tempb\@PTocNTransparenttrue\@PTocHTransparentfalse%
 832   \else\def\tempb{highlighted}%
 833   \ifx\tempa\tempb\@PTocNTransparentfalse\@PTocHTransparenttrue%
 834   \else\def\tempb{both}%
 835   \ifx\tempa\tempb\@PTocNTransparenttrue\@PTocHTransparenttrue%
 836   \else\PDFWIN@Error{wrong specifier ‘#1‘ for panel TOC transparency mode}%
 837     {Only the transparency modes ‘none‘, ‘normal‘, ‘highlighted‘ and%
 838     ‘both‘ are possible}%
 839   \fi\fi\fi\fi%
 840 }
 841 %
 842 % WINDOW KEYS
 843 \def\Adjust@Text@Win{\InitLayout}
 844 \def\Adjust@Panel@Win{}
 845 \def\Adjust@User@Win{}
 846 \define@key{pdfwin}{basex}{\global\csname @\@WinName @LLX\endcsname=#1%
 847   \csname Adjust@\@WinName @Win\endcsname}
 848 \define@key{pdfwin}{basey}{\global\csname @\@WinName @LLY\endcsname=#1%
 849   \csname Adjust@\@WinName @Win\endcsname}
 850 \define@key{pdfwin}{width}{\global\csname @\@WinName @DimX\endcsname=#1%
 851   \csname Adjust@\@WinName @Win\endcsname}
 852 \define@key{pdfwin}{height}{\global\csname @\@WinName @DimY\endcsname=#1%
 853   \csname Adjust@\@WinName @Win\endcsname}
 854 \define@key{pdfwin}{borderthickness}%
 855   {\global\csname @\@WinName @BorderThickness\endcsname=#1}
 856 \define@key{pdfwin}{borderradius}%
 857   {\global\csname @\@WinName @BorderArcRadius\endcsname=#1}
 858 \define@key{pdfwin}{filename}%
 859   {\expandafter\xdef\csname @\@WinName @Overlay\endcsname{#1}}
 860 \define@key{pdfwin}{backgroundcolor}%
 861   {\definecolor{\@WinName BackgroundColor}{rgb}{#1}}
 862 \define@key{pdfwin}{bordercolor}%
 863   {\definecolor{\@WinName BorderColor}{rgb}{#1}}
 864 \define@key{pdfwin}{type}{%
 865   \def\tempa{#1}%
 866   \def\tempb{disabled}%
 867   \ifx\tempa\tempb\global\csname @\@WinName @WinType\endcsname=0%
 868   \else\def\tempb{transparent}%
 869   \ifx\tempa\tempb\global\csname @\@WinName @WinType\endcsname=1%
 870   \else\def\tempb{colored}%
 871   \ifx\tempa\tempb\global\csname @\@WinName @WinType\endcsname=2%
 872   \else\def\tempb{graphics}%
 873   \ifx\tempa\tempb\global\csname @\@WinName @WinType\endcsname=3%
 874   \else\def\tempb{extended}%
 875   \ifx\tempa\tempb\global\csname @\@WinName @WinType\endcsname=4%
 876   \else\PDFWIN@Error{SetWindow called with wrong window type specifier ‘#1‘}%
 877    {Only the window types ‘disabled‘, ‘transparent‘, ‘colored‘,%
 878    ‘graphics‘ and ‘extended‘ are allowed.}%
 879   \fi\fi\fi\fi\fi%
 880 }
 881 %           --- user interface finished ---
 882 %
 883 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 884 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 885 
 886 
 887 
 888 %==========================================================
 889 %
 890 %    --- internal realization part starts here ---
 891 %
 892 % NOTE: the following commands will be written to aux-file;
 893 % the initial value defined here is overwritten when aux-file is read.
 894 % NOTE: \LastPageString is not necessarily an arabic number
 895 \newcommand*{\LastPageString}{?}      % for page <x> of <y>
 896 \newcommand*{\ChapterNumber}{10}      % for chapter panel
 897 \newcommand*{\LastPage}{999}          % for disabling this button
 898 \newcommand*{\AbstractPage}{0}        % for disabling this button
 899 \newcommand*{\ContentsPage}{0}        % for disabling this button
 900 \newcommand*{\IndexPage}{0}           % for disabling this button
 901 %
 902 % chapter-specific version of \LastPageString:
 903 \expandafter\def\csname LastPageC0String\endcsname{???}
 904 \expandafter\def\csname LastPageC1String\endcsname{???}
 905 \expandafter\def\csname LastPageC2String\endcsname{???}
 906 \expandafter\def\csname LastPageC3String\endcsname{???}
 907 \expandafter\def\csname LastPageC4String\endcsname{???}
 908 \expandafter\def\csname LastPageC5String\endcsname{???}
 909 \expandafter\def\csname LastPageC6String\endcsname{???}
 910 \expandafter\def\csname LastPageC7String\endcsname{???}
 911 \expandafter\def\csname LastPageC8String\endcsname{???}
 912 \expandafter\def\csname LastPageC9String\endcsname{???}
 913 \expandafter\def\csname LastPageC10String\endcsname{???}
 914 \expandafter\def\csname LastPageC11String\endcsname{???}
 915 \expandafter\def\csname LastPageC12String\endcsname{???}
 916 \expandafter\def\csname LastPageC13String\endcsname{???}
 917 \expandafter\def\csname LastPageC14String\endcsname{???}
 918 \expandafter\def\csname LastPageC15String\endcsname{???}
 919 %
 920 % WARNING: AN EVIL HACK WILL FOLLOW NOW ... CONTINUE READING AT OWN RISK ;-)
 921 % we have to fight a fierce battle against the babel package here:
 922 % babel writes a \select@language command at the begin of the aux-file
 923 % (and toc, lof, lot files, if they exist). This command overwrites
 924 % \contentsname and \abstractname. Thus, a simple definition would
 925 % not work.
 926 % We have to change it \emph{at the beginning of the document}.
 927 % And additionally, we have to modify \select@language (this is
 928 % executed at the beginning of every toc, lof, lot or aux file!).
 929 \newcommand*{\PDFWinFightsBabelSuccessfully}{%
 930   \renewcommand*{\contentsname}{%
 931     \protect\hypertarget{contents}{\@Panelcontentsname}%
 932     \immediate\write\@auxout{\string\gdef\string\ContentsPage{\number\c@RealPage}}%
 933   }%
 934   \renewcommand*{\abstractname}{%
 935     \protect\hypertarget{abstract}{\@Panelabstractname}%
 936     \immediate\write\@auxout{\string\gdef\string\AbstractPage{\number\c@RealPage}}%
 937   }%
 938   \renewcommand*{\indexname}{%
 939     \protect\hypertarget{index}{\@Panelindexname}%
 940     \immediate\write\@auxout{\string\gdef\string\IndexPage{\number\c@RealPage}}%
 941   }%
 942 }
 943 \AtBeginDocument{%
 944   \PDFWinFightsBabelSuccessfully%
 945   \let\org@select@language\select@language%
 946   \def\select@language#1{%
 947     \org@select@language{#1}\PDFWinFightsBabelSuccessfully}%
 948 }
 949 
 950 
 951 % --------------------------------------------------------------
 952 % NEW WINDOWS
 953 %
 954 \def\NewWindow#1#2{%
 955   % increase window counter
 956   \global\advance\c@WindowCount by 1\relax%
 957   %
 958   % window name and reference
 959   \expandafter\gdef\csname WindowName\number\c@WindowCount\endcsname{#1}%
 960   \expandafter\gdef\csname WindowRef\number\c@WindowCount\endcsname{#2}%
 961   %
 962   % append to \Draw@PDFWinWindows
 963   \g@addto@macro\Draw@PDFWinWindows{\@ShowWindow{#1}}%
 964   %
 965   % new colors and variables
 966   \definecolor{#1BackgroundColor}{rgb}{1.0,1.0,1.0}%
 967   \definecolor{#1BorderColor}{rgb}{.0,.0,.0}%
 968   \expandafter\newcount\csname @#1@WinType\endcsname%
 969   \csname @#1@WinType\endcsname=0%
 970   \expandafter\newlength\csname @#1@LLX\endcsname%
 971   \csname @#1@LLX\endcsname=.02\paperwidth%
 972   \expandafter\newlength\csname @#1@LLY\endcsname%
 973   \csname @#1@LLY\endcsname=.92\paperheight%
 974   \expandafter\newlength\csname @#1@DimX\endcsname%
 975   \csname @#1@DimX\endcsname=.79\paperwidth%
 976   \expandafter\newlength\csname @#1@DimY\endcsname%
 977   \csname @#1@DimY\endcsname=.06\paperheight%
 978   \expandafter\newlength\csname @#1@BorderThickness\endcsname%
 979   \csname @#1@BorderThickness\endcsname=2.0pt%
 980   \expandafter\newlength\csname @#1@BorderArcRadius\endcsname%
 981   \csname @#1@BorderArcRadius\endcsname=12pt%
 982   %
 983   % misc
 984   \expandafter\def\csname Adjust@#1@Win\endcsname{}%
 985   \expandafter\def\csname @#1@\endcsname{\relax}%
 986   \long\expandafter\def\csname Set#1Contents\endcsname##1{%
 987     \expandafter\gdef\csname @#1@\endcsname{##1}%
 988   }%
 989 }
 990 
 991 
 992 % --------------------------------------------------------------
 993 % INCREMENTAL PAGE NUMBERING (e.g. 10 - 11a - 11b - 11c - 12)
 994 %
 995 % mechanism: in order to avoid changes on internal functions as far
 996 % as possible, two new counters are introduced. The first one
 997 % memorizes the basic page number (i.e. 11 in the example given
 998 % above) and the second one is computed as the difference between
 999 % the normal page counter (not touched!) and the first counter,
1000 % plus offset of one.
1001 % NOTE: no \stepcounter or \addtocounter before/after page break
1002 % necessary for new counters; normal page counter does the job!
1003 %
1004 % define new counters for incremental page counting
1005 \newcount\c@incpagea
1006 \newcount\c@incpageb
1007 %
1008 % redefine (i.e. patch) \pagenumbering:
1009 % \pagenumbering{incremental} starts incremental numbering
1010 % \pagenumbering{restore} restores old setting
1011 % else: old \pagenumbering definition from latex.ltx
1012 \def\pagenumbering#1{%
1013   \def\tempa{#1}%
1014   \def\tempb{incremental}%
1015   \ifx\tempa\tempb
1016     \global\c@incpagea=\c@page%
1017     \let\org@thepage\thepage%
1018     % NOTE: \thepage can be modified by user after \pagenumbering{incremental}
1019     \gdef\thepage{\arabic{incpagea}\alph{incpageb}}%
1020     \let\org@newpage\newpage%
1021     \def\newpage{\org@newpage\computeincpage}%
1022     \computeincpage
1023   \else
1024     \def\tempb{restore}%
1025     \ifx\tempa\tempb
1026       \let\newpage\org@newpage%
1027       \let\thepage\org@thepage%
1028       \global\c@page=\c@incpagea%
1029       \stepcounter{page}
1030     \else
1031       \global\c@page \@ne \gdef\thepage{\csname @#1\endcsname\c@page}
1032     \fi
1033   \fi
1034 }
1035 \def\computeincpage{%
1036   \c@incpageb=\c@page%
1037   \advance\c@incpageb\@ne%
1038   \advance\c@incpageb -\c@incpagea%
1039 }
1040 
1041 
1042 % --------------------------------------------------------------
1043 % FONTS (can be redefined by user)
1044 %
1045 % setting button text font and style (button height)
1046 %\newcommand{\SetButtonTextStyle}{\rule[-4pt]{0pt}{13pt}%
1047 % \footnotesize\sffamily\itshape\mdseries}
1048 \newcommand{\SetButtonTextStyle}{\rule[-3pt]{0pt}{11pt}%
1049  \scriptsize\sffamily\itshape\mdseries}
1050 %
1051 % setting page info ("page x of y") font and style
1052 % (usually the same as button text)
1053 %\newcommand{\SetPageInfoStyle}{\rule[-4pt]{0pt}{13pt}%
1054 % \footnotesize\sffamily\itshape\mdseries}
1055 \newcommand{\SetPageInfoStyle}{\rule[-3pt]{0pt}{11pt}%
1056  \scriptsize\sffamily\itshape\mdseries}
1057 %
1058 % setting panel toc text font and style (button height)
1059 %\newcommand{\SetTocNTextStyle}{\rule[-3pt]{0pt}{11pt}%
1060 % \scriptsize\sffamily\itshape\mdseries}
1061 %\newcommand{\SetTocHTextStyle}{\rule[-3pt]{0pt}{11pt}%
1062 % \scriptsize\sffamily\itshape\bfseries}
1063 \newcommand{\SetTocNTextStyle}{\rule[-2pt]{0pt}{7pt}%
1064  \tiny\sffamily\itshape\mdseries}
1065 \newcommand{\SetTocHTextStyle}{\rule[-2pt]{0pt}{7pt}%
1066  \tiny\sffamily\itshape\bfseries}
1067 %
1068 % setting font and style of the chapter panel
1069 \newcommand{\SetChapterTextStyle}{\rule[-2pt]{0pt}{9pt}%
1070  \sffamily\bfseries\scriptsize}
1071 \newcommand{\SetChapterTitelStyle}{\rule[-2pt]{0pt}{7pt}%
1072  \sffamily\bfseries\tiny}
1073 
1074 
1075 % --------------------------------------------------------------
1076 % SECTION AND \EMPH COLORING
1077 %
1078 \if@coloremph\renewcommand{\emph}[1]{\textcolor{TextEmphColor}{#1}}\fi
1079 %
1080 \let\org@startsection\@startsection
1081 \renewcommand{\@startsection}[6]{%
1082  \org@startsection{#1}{#2}{#3}{#4}{#5}{#6\color{Section#2Color}}}
1083 %
1084 % normally redefining \@startsection should be sufficient.
1085 % But unfortunately, it‘s not. Sometimes, the internal color stack
1086 % gets mixed up and the beginning of a new page is written in a
1087 % wrong color. The color is fixed once a differently colored text
1088 % is printed. A work-around for section headings (which are likely to
1089 % be affected by this bug) is printing the section number in the
1090 % correct color.
1091 \let\org@seccntformat\@seccntformat
1092 \def\@seccntformat#1{\protect\textcolor{Section\thesection@level Color}%
1093    {\org@seccntformat{#1}}\quad}%
1094 
1095 
1096 % --------------------------------------------------------------
1097 % DYNAMIC PAGES
1098 %
1099 % NOTE: if you are looking at this section in order to define new
1100 % dynamic environments and you don‘t really understand what‘s
1101 % going on here, then I have to apologize, but some things I need
1102 % are only possible in plain TeX and not in LaTeX, e.g. global
1103 % (and not local) counter settings. Notice that the LaTeX counter
1104 % abc is equivalent to the TeX counter \c@abc.
1105 %
1106 \newcounter{dynamicpage}      \setcounter{dynamicpage}{0}
1107 \newcounter{maxdynamicpages}  \setcounter{maxdynamicpages}{5}
1108 %
1109 \newcommand*{\copycolor}[2]{\expandafter\let\csname\string\color @#2%
1110   \expandafter\endcsname\csname\string\color @#1\endcsname}
1111 %
1112 \newcommand{\store}[1]{\long\gdef\recall{#1}\global\c@dynamicpage=0}
1113 %
1114 \newcommand*{\revealnext}{%
1115   \newpage%
1116   \global\advance\c@dynamicpage by 1%
1117   \relax%   %% otherwise the FIRST color would not be changed. Mysterious...
1118   \copycolor{TextRevealedColor}{color\number\c@dynamicpage}%
1119   \recall%
1120 }
1121 \newcommand{\initreveal}[1]{%
1122   \@tempcnta=\c@maxdynamicpages%
1123   \loop \ifnum\@tempcnta>0%
1124     \copycolor{TextBackgroundColor}{color\number\@tempcnta}%
1125     \advance\@tempcnta by -1%
1126   \repeat%
1127   \store{#1}%
1128 }
1129 \newcommand*{\highlightnext}{%
1130   \newpage%
1131   \@tempcnta=\c@maxdynamicpages%
1132   \loop \ifnum\@tempcnta>0%
1133     \copycolor{TextGrayedOutColor}{color\number\@tempcnta}%
1134     \advance\@tempcnta by -1%
1135   \repeat%
1136   \global\advance\c@dynamicpage by 1%
1137   \relax%
1138   \copycolor{TextHighlightedColor}{color\number\c@dynamicpage}%
1139   \recall%
1140 }
1141 \newcommand{\inithighlight}[1]{\store{#1}}
1142 
1143 
1144 % --------------------------------------------------------------
1145 % BUTTON MACROS
1146 %
1147 % setting button color
1148 \newcommand{\NormalButtonCol}{\color{ButtonTextColor}}
1149 \newcommand{\FirstButtonCol}{\ifnum\number\c@RealPage=1%
1150   \color{ButtonDisabledTextColor}\else\NormalButtonCol\fi}
1151 \newcommand{\LastButtonCol}{\ifnum\number\c@RealPage=\number\LastPage%
1152   \color{ButtonDisabledTextColor}\else\NormalButtonCol\fi}
1153 \newcommand{\AbstractButtonCol}{\ifnum\number\c@RealPage=\number\AbstractPage%
1154   \color{ButtonDisabledTextColor}\else\NormalButtonCol\fi}
1155 \newcommand{\ContentsButtonCol}{\ifnum\number\c@RealPage=\number\ContentsPage%
1156   \color{ButtonDisabledTextColor}\else\NormalButtonCol\fi}
1157 \newcommand{\IndexButtonCol}{\ifnum\number\c@RealPage=\number\IndexPage%
1158   \color{ButtonDisabledTextColor}\else\NormalButtonCol\fi}
1159 %
1160 % #1: box contents  #2,#3 : upper/lower border colors
1161 % \fboxrule determines the thickness of the shadow
1162 \newcommand*{\ThreeDimBox}[3]{\bgroup%
1163   \fboxsep0pt%
1164   \color{#2}%
1165   \setbox\@tempboxa\hbox{\fbox{#1}}%
1166   \copy\@tempboxa%
1167   \@tempcnta=10%
1168   \@tempdimc=\fboxrule%         %% increment
1169   \divide\@tempdimc by \@tempcnta%
1170   \color{#3}%
1171   \@tempdima=0pt%               %% width
1172   \@tempdimb=\ht\@tempboxa%     %% height
1173   \loop%
1174     \ifnum\@tempcnta>0%
1175     \advance\@tempcnta by -1%
1176     \advance\@tempdimb by -\@tempdimc%
1177     \advance\@tempdima by \@tempdimc%
1178     \hbox to 0pt{\hss\vrule \@width\@tempdima \@height\@tempdimb \@depth\dp\@tempboxa}%
1179   \repeat%
1180   \@tempcnta=10%
1181   \@tempdima=\wd\@tempboxa%     %% width
1182   \@tempdimb=-\dp\@tempboxa%    %% -depth -> height
1183   \loop%
1184     \ifnum\@tempcnta>0%
1185     \advance\@tempcnta by -1%
1186     \advance\@tempdimb by \@tempdimc%
1187     \advance\@tempdima by -\@tempdimc%
1188     \hbox to 0pt{\hss\vrule \@width\@tempdima \@height\@tempdimb \@depth\dp\@tempboxa}%
1189   \repeat%
1190 \egroup}
1191 %
1192 % [#1]: width (optional; default: \@ButtonWidth)    #2:  button text
1193 \newcommand{\AddButton}[2][\@ButtonWidth]{\bgroup%
1194   \fboxrule=\@ButtonShadowDepth%
1195   \ThreeDimBox{\colorbox{ButtonBackgroundColor}%
1196    {\hbox to #1{\hfil\NormalButtonCol\SetButtonTextStyle#2\hfil}}}%
1197    {ButtonUpperShadowColor}{ButtonShadowColor}%
1198 \egroup}
1199 
1200 
1201 % --------------------------------------------------------------
1202 % PANEL MACROS
1203 %
1204 \newcommand*{\btl}{\ensuremath{\blacktriangleleft}}
1205 \newcommand*{\btr}{\ensuremath{\blacktriangleright}}
1206 %
1207 % The default panel consists of four parts:
1208 %   [graphical logo]
1209 %   [panel TOC]
1210 %   navigation buttons
1211 %   [some text]
1212 % parts in square brackets are optional.
1213 %
1214 % The panel contents are composed vertically to build a minipage
1215 % NOTE: background color is set later
1216 \SetPanelContents{%
1217   \begin{minipage}[t][\@Panel@DimY][c]{\@Panel@DimX}%
1218     \normalcolor%
1219     \normalfont%
1220     \PanelContents%
1221   \end{minipage}%
1222 }
1223 % \PanelContents can be modified by user. The user does not need
1224 % to know anything about the internal realization of \@Panel@
1225 % or \Draw<Something>. The \PanelContents level is encapsulated.
1226 % NOTE: all \Draw<Something> commands should end with \vfill
1227 \newcommand{\PanelContents}{%
1228   \centering%
1229   \vspace*{5pt}\vfill%
1230   \DrawLogo%
1231   \DrawPanelTOC%
1232   \DrawNavigationPanel%
1233   \DrawPanelText%
1234   \vspace*{5pt}%
1235 }
1236 %
1237 \def\DrawLogo{\ifx\emptystring\@LogoFile\else%
1238   \setbox0=\hbox{\bgroup%
1239     \fboxrule=\@LogoShadowDepth%
1240     \ThreeDimBox{\includegraphics[width=\@LogoWidth]%
1241      {\@LogoFile}}{LogoUpperShadowColor}{LogoShadowColor}%
1242   \egroup}%
1243   \ifx\emptystring\@LogoURL\mbox{\box0}\else\href{\@LogoURL}{\box0}\fi%
1244   \par\vfill\fi%
1245 }
1246 %
1247 \def\DrawPanelTOC{%
1248   \if@paneltoc%
1249     \ifdim\@PanelTOCHeight>0cm%  fixed size?
1250       \begin{minipage}[t][1.5cm][t]{\@Panel@DimX}%
1251         \@panel@toc%
1252       \end{minipage}%
1253     \else%
1254       \@panel@toc%
1255     \fi%
1256     \vfill%
1257   \else%
1258     \relax%
1259   \fi%
1260 }
1261 %
1262 \def\DrawPanelText{\ifx\emptystring\@paneltext\else%
1263  \parbox{.98\@Panel@DimX}{\centering \@paneltext}\par\vfill\fi}
1264 %
1265 % You can change \DrawNavigationPanel with \renewcommand.
1266 % Just copy this definition here and (un)comment and reorder
1267 % the items in the way you like.
1268 \newcommand{\DrawNavigationPanel}{
1269 %  \ShowPageInfo\par\vfill
1270   \GoToPageButton\par\vfill
1271 %  \HomePageButton\par\vfill
1272 %  \TitlePageButton\par\vfill
1273 %  \AbstractPageButton\par\vfill
1274 %  \IndexPageButton\par\vfill
1275 %  \ContentsPageButton\par\vfill
1276   \FirstLastButton\par\vfill
1277   \PrevNextButton\par\vfill
1278   \BackForwardButton\par\vfill
1279 %  \BackButton\par\vfill
1280 %  \ForwardButton\par\vfill
1281   \FullScreenButton\par\vfill
1282   \SearchButton\par\vfill
1283   \CloseButton\par\vfill
1284 %  \QuitButton\par\vfill
1285 }
1286 %
1287 % \ShowEmptyPageInfo needs exactly the same space as \ShowPageInfo. Use this
1288 % if you want to turn off page info for certain pages without changing the
1289 % positions of the other panel elements
1290 \def\ShowEmptyPageInfo{%
1291   \bgroup%
1292     \SetPageInfoStyle%
1293   \egroup%
1294 }
1295 \if@chinese
1296     \def\ShowPageInfo{%
1297     \bgroup%
1298         \SetPageInfoStyle%
1299         \textcolor{ButtonTextColor}{\@Panelprepagenamei}%
1300         \textcolor{ButtonHighlightedTextColor}{\thepage}%
1301         \textcolor{ButtonTextColor}{\@Panelpagename}%
1302         \space\textcolor{ButtonTextColor}{\@Panelofname}\space%
1303         \textcolor{ButtonTextColor}{\@Panelprepagenameii}%
1304         \if@chapterpanel%
1305         \textcolor{ButtonHighlightedTextColor}%
1306         {\csname LastPageC\arabic{chapter}String\endcsname}%
1307         \else%
1308         \textcolor{ButtonHighlightedTextColor}{\LastPageString}%
1309         \fi%
1310         \textcolor{ButtonTextColor}{\@Panelpagename}%
1311     \egroup%
1312     }
1313     \def\GoToPageButton{%
1314     \Acrobatmenu{GoToPage}{\AddButton%
1315         {\textcolor{ButtonTextColor}{\@Panelprepagenamei}%
1316         \textcolor{ButtonHighlightedTextColor}{\thepage}%
1317         \textcolor{ButtonTextColor}{\@Panelpagename}%
1318         \space\textcolor{ButtonTextColor}{\@Panelofname}\space%
1319         \textcolor{ButtonTextColor}{\@Panelprepagenameii}%
1320         \if@chapterpanel%
1321         \textcolor{ButtonHighlightedTextColor}%
1322         {\csname LastPageC\arabic{chapter}String\endcsname}%
1323         \else%
1324         \textcolor{ButtonHighlightedTextColor}{\LastPageString}%
1325         \fi%
1326         \textcolor{ButtonTextColor}{\@Panelpagename}}}
1327     }
1328 \else
1329     \def\ShowPageInfo{%
1330     \bgroup%
1331         \SetPageInfoStyle%
1332         \textcolor{ButtonTextColor}{\@Panelpagename}\space%
1333         \textcolor{ButtonHighlightedTextColor}{\thepage}%
1334         \space\textcolor{ButtonTextColor}{\@Panelofname}\space%
1335         \if@chapterpanel%
1336         \textcolor{ButtonHighlightedTextColor}%
1337         {\csname LastPageC\arabic{chapter}String\endcsname}%
1338         \else%
1339         \textcolor{ButtonHighlightedTextColor}{\LastPageString}%
1340         \fi%
1341     \egroup%
1342     }
1343     \def\GoToPageButton{%
1344     \Acrobatmenu{GoToPage}{\AddButton%
1345         {\textcolor{ButtonTextColor}{\@Panelpagename}\space%
1346         \textcolor{ButtonHighlightedTextColor}{\thepage}\space%
1347         \textcolor{ButtonTextColor}{\@Panelofname}\space%
1348         \if@chapterpanel%
1349         \textcolor{ButtonHighlightedTextColor}%
1350         {\csname LastPageC\arabic{chapter}String\endcsname}%
1351         \else%
1352         \textcolor{ButtonHighlightedTextColor}{\LastPageString}%
1353         \fi}}
1354     }
1355 \fi
1356 \def\HomePageButton{%
1357   \href{\@HomepageURL}{\AddButton{\@Panelhomepagename}}
1358 }
1359 \def\TitlePageButton{%
1360   \Acrobatmenu{FirstPage}{\AddButton{\FirstButtonCol\@Paneltitlepagename}}%
1361 }
1362 \def\AbstractPageButton{%
1363   \ifnum\number\AbstractPage=0%
1364     \PDFWIN@Warning{no abstract! abstract page button not possible}%
1365   \else%
1366     \hyperlink{abstract}{\AddButton{\AbstractButtonCol\@Panelabstractname}}%
1367   \fi%
1368 }
1369 \def\ContentsPageButton{%
1370   \ifnum\number\ContentsPage=0%
1371     \PDFWIN@Warning{no TOC found! contents page button not possible}%
1372   \else%
1373     \hyperlink{contents}{\AddButton{\ContentsButtonCol\@Panelcontentsname}}%
1374   \fi%
1375 }
1376 \def\IndexPageButton{%
1377   \ifnum\number\IndexPage=0%
1378     \PDFWIN@Warning{no index found! index button not possible}%
1379   \else%
1380     \hyperlink{index}{\AddButton{\ContentsButtonCol\@Panelindexname}}%
1381   \fi%
1382 }
1383 \def\FirstLastButton{%
1384   \Acrobatmenu{FirstPage}{\AddButton[\@SmallButtonWidth]%
1385    {\FirstButtonCol\scalebox{.8}[1.4]{\btl\btl}}}%
1386   \Acrobatmenu{LastPage}{\AddButton[\@SmallButtonWidth]%
1387    {\LastButtonCol\scalebox{.8}[1.4]{\btr\btr}}}%
1388 }
1389 \def\PrevNextButton{%
1390   \Acrobatmenu{PrevPage}{\AddButton[\@SmallButtonWidth]%
1391    {\FirstButtonCol\scalebox{.8}[1.4]{\btl}}}%
1392   \Acrobatmenu{NextPage}{\AddButton[\@SmallButtonWidth]%
1393    {\LastButtonCol\scalebox{.8}[1.4]{\btr}}}%
1394 }
1395 \def\BackForwardButton{%
1396   \Acrobatmenu{GoBack}{\AddButton[\@SmallButtonWidth]%
1397    {\raisebox{-2pt}{\scalebox{2}{$\hookleftarrow$}}}}%
1398   \Acrobatmenu{GoForward}{\AddButton[\@SmallButtonWidth]%
1399    {\raisebox{-2pt}{\scalebox{2}{$\hookrightarrow$}}}}%
1400 }
1401 \def\BackButton{%
1402   \Acrobatmenu{GoBack}{\AddButton{\@Panelgobackname}}%
1403 }
1404 \def\ForwardButton{%
1405   \Acrobatmenu{GoForward}{\AddButton{\@Panelgoforwardname}}%
1406 }
1407 \def\FullScreenButton{%
1408   \Acrobatmenu{FullScreen}{\AddButton{\@Panelfullscreenname}}%
1409 }
1410 \def\SearchButton{%
1411   \Acrobatmenu{Find}{\AddButton{\@Panelsearchname}}%
1412 }
1413 \def\CloseButton{%
1414   \Acrobatmenu{Close}{\AddButton{\@Panelclosename}}%
1415 }
1416 \def\QuitButton{%
1417   \Acrobatmenu{Quit}{\AddButton{\@Panelquitname}}%
1418 }
1419 
1420 
1421 % --------------------------------------------------------------
1422 % PANEL TOC SECTION COUNTING
1423 %
1424 \def\sectionstring{section}
1425 \def\chapterstring{chapter}
1426 %
1427 \def\AddPanelTocEntry#1{%
1428   \stepcounter{ptocsection}%
1429   \hypertarget{ptoctarget\number\c@ptocsection}{}%
1430   \addtocontents{toc}{\protect\PTocEntry{#1}{ptoctarget\number\c@ptocsection}}%
1431 }%
1432 %
1433 \let\PTocEntry\@gobbletwo
1434 
1435 
1436 % --------------------------------------------------------------
1437 % PANEL TOC MACROS
1438 %
1439 % for a panel TOC we have to modify:
1440 %  * the input of the *.toc file
1441 %  * the generation of the *.toc file
1442 % the last thing is necessary because usually the \tableofcontents
1443 % command does BOTH jobs: the display and the generation. And
1444 % therefore, it must only be called once in a normal LaTeX
1445 % document.
1446 % But for a panel TOC (i.e. a TOC an EVERY page) we have to separate
1447 % both tasks.
1448 %
1449 % The original \tableofcontents is (in article class):
1450 %  \newcommand\tableofcontents{%
1451 %    \section*{\contentsname\@mkboth{\MakeUppercase\contentsname}%
1452 %    {\MakeUppercase\contentsname}}\@starttoc{toc}%
1453 %  }
1454 % and \@starttoc does (latex base):
1455 %  \def\@starttoc#1{%
1456 %    \begingroup
1457 %      \makeatletter
1458 %      \@input{\jobname.#1}%
1459 %      \if@filesw
1460 %        \expandafter\newwrite\csname tf@#1\endcsname
1461 %        \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
1462 %      \fi
1463 %      \@nobreakfalse
1464 %    \endgroup}
1465 %
1466 % We separate this in two parts: \tableofcontents is redefined to
1467 % only SHOW the toc and the WRITE command is given at the end of
1468 % the document.
1469 % NOTE: \makeatletter is necessary if e.g. the babel package is used:
1470 % this package writes a \select@language command via the *.aux file
1471 % of the last LaTeX run. Without \makeatletter, a "undefined command"
1472 % would result because ‘@‘ is no letter anymore.
1473 \renewcommand{\tableofcontents}{%
1474   \section*{\contentsname\@mkboth{\MakeUppercase\contentsname}%
1475     {\MakeUppercase\contentsname}}%
1476   \begingroup%
1477     \makeatletter%
1478     \@input{\jobname.toc}%
1479   \endgroup%
1480 }
1481 %
1482 \AtEndDocument{%
1483   \if@filesw%
1484     \clearpage% <-- otherwise the panel toc on the last page would be lost
1485     \newwrite\tf@toc%
1486     \immediate\openout\tf@toc\jobname.toc\relax%
1487   \fi
1488 }
1489 % On reading the *.toc file for the panel TOC, we must modify the
1490 % display (locally, of course!):
1491 %  - disable \numberline which would produce a dotted line with
1492 %    the page number at the end.
1493 %  - count the sections in order to switch between normal and
1494 %    highlighted display
1495 \def\@panel@toc{%
1496   \IfFileExists{\jobname.toc}{\vbox%
1497   \bgroup%
1498     \rightskip0pt plus 1fill%
1499     \hbadness=10000%
1500     \let\numberline\@gobble%
1501     \let\contentsline\PanelTOC@ContentsLine%
1502     \let\PTocEntry\PanelTOC@PTocEntry%
1503     \makeatletter%
1504     \@input{\jobname.toc}%
1505     \PDFWIN@Info{TOC file read}%
1506   \egroup}%
1507   % ELSE (file does not exist)
1508   {\PDFWIN@Warning{TOC file not available}}%
1509 }
1510 %
1511 \long\def\PanelTOC@ContentsLine#1#2#3#4{%
1512   \edef\temp{#1}%
1513   \ifx\temp\chapterstring%
1514     \stepcounter{TocChapterCount}%
1515   \fi%
1516   \ifnum\c@TocChapterCount=\c@chapter%
1517     \ifx\temp\sectionstring%
1518       \stepcounter{PanelTocLine}%
1519       \@tempcnta=\c@section%
1520       \advance\@tempcnta by \c@ptocsection%
1521       \ifnum\@tempcnta=\c@PanelTocLine%
1522         \global\@PanelTocHighlighttrue%
1523       \else%
1524         \global\@PanelTocHighlightfalse%
1525       \fi%
1526       \hyperlink{#4}{\makebox[\@Panel@DimX]%
1527         {\TOC@Button{.97\@Panel@DimX}{\truncate{.96\@Panel@DimX}{#2}}}}%
1528       \par%
1529     \fi% section entry detected
1530   \fi% in actual chapter
1531 }
1532 %
1533 \long\def\PanelTOC@PTocEntry#1#2{%
1534   \stepcounter{PanelTocLine}%
1535   \@tempcnta=\c@section%
1536   \advance\@tempcnta by \c@ptocsection%
1537   \ifnum\@tempcnta=\c@PanelTocLine%
1538     \global\@PanelTocHighlighttrue%
1539   \else%
1540     \global\@PanelTocHighlightfalse%
1541   \fi%
1542   \hyperlink{#2}{\makebox[\@Panel@DimX]%
1543     {\TOC@Button{.97\@Panel@DimX}{\truncate{.96\@Panel@DimX}{#1}}}}%
1544   \par%
1545 }
1546 %
1547 % displaying the panel TOC buttons
1548 \def\TOC@Button#1#2{\begingroup%
1549   \fboxsep0pt
1550   \fboxrule0pt%
1551   \if@PanelTocHighlight%
1552     \if@PTocHTransparent%
1553       {\hbox to #1{\color{PanelTocHighlightedTextColor}%
1554       \SetTocHTextStyle\hfill#2\hfill}}%
1555     \else%
1556       {\colorbox{PanelTocHighlightedBackgroundColor}{\hbox to #1%
1557       {\color{PanelTocHighlightedTextColor}\SetTocHTextStyle\hfill#2\hfill}}}%
1558     \fi%
1559   \else%
1560     \if@PTocNTransparent%
1561       {\hbox to #1{\color{PanelTocNormalTextColor}%
1562       \SetTocNTextStyle\hfill#2\hfill}}%
1563     \else%
1564       {\colorbox{PanelTocNormalBackgroundColor}{\hbox to #1%
1565       {\color{PanelTocNormalTextColor}\SetTocNTextStyle\hfill#2\hfill}}}%
1566     \fi%
1567   \fi%
1568 \endgroup}
1569 
1570 
1571 % --------------------------------------------------------------
1572 % CHAPTER PANEL MACROS
1573 %
1574 % (!!!) einige Sachen noch fest verdrahtet!
1575 %
1576 \newcommand{\ChapterBox}{%
1577   \normalfont\normalsize%
1578   \bgroup%
1579   \fboxrule1pt%
1580   \@tempcnta=0%
1581   \@tempcntb=\number\ChapterNumber%
1582   \advance\@tempcntb by 1%
1583   \loop%
1584   \ifnum\@tempcnta<\@tempcntb%
1585     \ifnum\c@chapter=\@tempcnta%
1586       \ifnum\@tempcnta=0%
1587         \Acrobatmenu{FirstPage}{\Big@NoChapterButton{\@Paneltitlepagename}}
1588       \else \ifnum\@tempcnta=16%
1589         \hyperlink{index}{\Big@NoChapterButton{\@Panelindexname}}
1590       \else%
1591         \hyperlink{chapter.\number\@tempcnta}{\Big@ChapterButton{\chaptertitle}}
1592       \fi\fi%
1593     \else % chapter not selected
1594       \ifnum\@tempcnta=0%
1595         \Acrobatmenu{FirstPage}{\Small@NoChapterButton{T}}
1596       \else\ifnum\@tempcnta=16%
1597         \hyperlink{index}{\Small@NoChapterButton{I}}
1598       \else%
1599         \hyperlink{chapter.\number\@tempcnta}{\Small@ChapterButton}
1600       \fi\fi
1601     \fi % chapter selected?
1602     \advance\@tempcnta by 1%
1603   \repeat
1604   \egroup
1605 }
1606 %
1607 \newcommand{\Big@NoChapterButton}[1]{%
1608   \ThreeDimBox{\colorbox{ChapterPanelColor0a}{%
1609     \begin{minipage}[c][5mm]{22mm}%
1610       \centering\SetChapterTextStyle\color{ChapterPanelColor0b}#1%
1611     \end{minipage}%
1612   }}{ChapterPanelColor0c}{ChapterPanelColor0d}%
1613 }
1614 \newcommand{\Big@ChapterButton}[1]{%
1615   \ThreeDimBox{\colorbox{ChapterPanelColor1a}{%
1616     \begin{minipage}[c][5mm]{22mm}%
1617       \offinterlineskip\centering\SetChapterTextStyle\color{ChapterPanelColor1b}%
1618       \@chapapp\space\@Roman\@tempcnta\\ \SetChapterTitelStyle #1\\ %
1619     \end{minipage}%
1620   }}{ChapterPanelColor1c}{ChapterPanelColor1d}%
1621 }
1622 \newcommand{\Small@NoChapterButton}[1]{%
1623   \ThreeDimBox{\colorbox{ChapterPanelColor0a}{%
1624     \begin{minipage}[c][3mm]{3mm}%
1625       \centering\SetChapterTextStyle\color{ChapterPanelColor0b}#1%
1626     \end{minipage}%
1627   }}{ChapterPanelColor0c}{ChapterPanelColor0d}%
1628 }
1629 \newcommand{\Small@ChapterButton}{%
1630   \ThreeDimBox{\colorbox{ChapterPanelColor1a}{%
1631     \begin{minipage}[c][3mm]{3mm}%
1632       \centering\SetChapterTextStyle\color{ChapterPanelColor1b}%
1633       \@Roman\@tempcnta%
1634     \end{minipage}%
1635   }}{ChapterPanelColor1c}{ChapterPanelColor1d}%
1636 }
1637 %
1638 \if@chapterpanel\SetUserContents{\ChapterBox}\fi
1639 
1640 % --------------------------------------------------------------
1641 % OVERLAY MACROS
1642 %
1643 % TeX assembles a page and calls \shipout{...} then.
1644 % Therefore, we have to interrupt \shipout
1645 \AtBeginDocument{%
1646   \let\org@shipout\shipout
1647   \let\shipout\my@shipout
1648 }
1649 %
1650 % now we have to steal shipout‘s argument in order
1651 % to modify it as we like
1652 \def\my@shipout{%
1653   \afterassignment\Test@OutBox%
1654   \global\setbox\@cclv= %
1655 }
1656 \newcommand{\Test@OutBox}{%
1657   \ifvoid\@cclv%
1658      \relax\aftergroup\My@Output%
1659   \else%
1660      \My@Output%
1661   \fi%
1662 }
1663 
1664 % --------------------------------------------------------------
1665 % PAGE COMPOSITION
1666 % (original page is in box 255 [or \box\@cclv])
1667 %
1668 \newcommand{\My@Output}{%
1669   \bgroup%
1670     \@tempdima=1in%
1671     \@tempcnta=\@tempdima%   % => unit: scaled points
1672     \@tempcntb=\paperheight%
1673     \advance\@tempcntb by -\@tempdima%
1674     \global\setbox\@cclv\vbox{%
1675       \offinterlineskip%
1676       \vbox{%
1677         \let\protect\relax%
1678         \unitlength=1sp%
1679         \pictur@(0,0)(\@tempcnta,\@tempcntb)%
1680           {\bgroup%
1681             \setlength{\unitlength}{1pt}%
1682             % draw background
1683             \Draw@ScreenBackground%
1684             % draw other windows
1685             \Draw@PDFWinWindows%
1686           \egroup}%
1687         \endpicture%
1688       }%
1689       \vbox to 0mm{\hbox to 0mm{\box\@cclv\hss}\vss}%
1690       \vbox{%
1691         \let\protect\relax%
1692         \unitlength=1sp%
1693         \pictur@(0,0)(\@tempcnta,\@tempcntb)%
1694           {\bgroup%
1695             \setlength{\unitlength}{1pt}
1696             \Draw@TopTextWindow%
1697           \egroup}%
1698         \endpicture%
1699       }%
1700     }%
1701   \egroup%
1702   \addtocounter{RealPage}{1}%
1703   \org@shipout\box\@cclv%
1704 }
1705 
1706 
1707 % --------------------------------------------------------------
1708 % WINDOW DRAWING
1709 %
1710 \def\Draw@PDFWinWindows{%
1711   \normalcolor%
1712   \normalfont%
1713   \@ShowWindow{Text}%
1714   \@ShowWindow{Panel}%
1715   \@ShowWindow{User}%
1716 }
1717 
1718 \def\Draw@ScreenBackground{%
1719   \ifcase\@Screen@Type%
1720   \or%
1721   \or%
1722     % 2 = colored
1723     \put(0,0){\bgroup\color{ScreenBackgroundColor}\vrule%
1724       height\paperheight depth0pt width\paperwidth\egroup}%
1725   \or%
1726     % 3 = graphics
1727     \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]%
1728       {\@Screen@Overlay}}%
1729   \or%
1730     % 4 = extended
1731     \put(0,0){\bgroup\color{ScreenBackgroundColor}\vrule%
1732       height\paperheight depth0pt width\paperwidth\egroup}%
1733     \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]%
1734       {\@Screen@Overlay}}%
1735   \or%
1736     % 5 = wallpaper
1737     \bgroup%
1738       \setbox0=\hbox{\includegraphics{\@Screen@Overlay}}%
1739       \setlength{\unitlength}{1sp}%
1740       \@tempcnta=\paperwidth%
1741       \count255=\wd0%
1742       \divide\@tempcnta by \count255%
1743       \setbox2=\hbox{\count255=-1%
1744         \loop\ifnum\count255<\@tempcnta\advance\count255 by 1\copy0\repeat\hss}
1745       \@tempcntb=\paperheight%
1746       \count255=\ht0%
1747       \divide\@tempcntb by \count255%
1748       \advance\@tempcntb by 1%
1749       \multiput(0,0)(0,\count255){\@tempcntb}{\copy2}%
1750     \egroup%
1751   \fi%
1752 }
1753 %
1754 % show window procedure
1755 \def\@ShowWindow#1{%
1756   \expandafter\Win@DimX\csname @#1@DimX\endcsname%
1757   \expandafter\Win@DimY\csname @#1@DimY\endcsname%
1758   \expandafter\Win@LLX\csname @#1@LLX\endcsname%
1759   \expandafter\Win@LLY\csname @#1@LLY\endcsname%
1760   \expandafter\Win@BT\csname @#1@BorderThickness\endcsname%
1761   \expandafter\Win@BR\csname @#1@BorderArcRadius\endcsname%
1762   \ifcase\csname @#1@WinType\endcsname%
1763     % 0 = disabled
1764     \relax%
1765   \or%
1766     % 1 = transparent => frame+contents
1767     \ShowWindow@Frame{#1}%
1768     \ShowWindow@Contents{#1}%
1769   \or%
1770     % 2 = colored => frame+box+contents
1771     \ShowWindow@FrameBox{#1}%
1772     \ShowWindow@Contents{#1}%
1773   \or%
1774     % 3 = graphics => graphics+contents
1775     \ShowWindow@Frame{#1}%
1776     \ShowWindow@Graphics{#1}%
1777     \ShowWindow@Contents{#1}%
1778   \or%
1779     % 4 = extended => frame+box+graphics+contents
1780     \ShowWindow@FrameBox{#1}%
1781     \ShowWindow@Graphics{#1}%
1782     \ShowWindow@Contents{#1}%
1783   \fi%
1784 }
1785 %
1786 \def\ShowWindow@Frame#1{%
1787   \bgroup
1788     \color{#1BorderColor}%
1789     \@tempdimb=\Win@DimY  \advance\@tempdimb by \Win@BT%
1790     \put(\strip@pt\Win@LLX,\strip@pt\Win@LLY)%
1791      {\vrule width\Win@DimX height\@tempdimb depth-\Win@DimY}%
1792     \put(\strip@pt\Win@LLX,\strip@pt\Win@LLY)%
1793      {\vrule width\Win@DimX height0pt depth\Win@BT}%
1794     \@tempdima=\Win@LLX  \advance\@tempdima by -\Win@BT%
1795     \@tempdimc=\Win@LLX  \advance\@tempdimc by \Win@DimX%
1796     \put(\strip@pt\@tempdima,\strip@pt\Win@LLY)%
1797      {\vrule width\Win@BT height\@tempdimb depth\Win@BT}%
1798     \put(\strip@pt\@tempdimc,\strip@pt\Win@LLY)%
1799      {\vrule width\Win@BT height\@tempdimb depth\Win@BT}%
1800   \egroup
1801 }
1802 \def\ShowWindow@FrameBox#1{%
1803   \ifdim\Win@BR=0pt%
1804     \ShowWindow@Frame{#1}%
1805     \put(\strip@pt\Win@LLX,\strip@pt\Win@LLY)%
1806      {\color{#1BackgroundColor}\vrule height\Win@DimY%
1807      depth0pt width\Win@DimX}%
1808   \else
1809     \@tempdima=\Win@LLX  \advance\@tempdima by -\Win@BT%
1810     \@tempdimb=\Win@LLY  \advance\@tempdimb by \Win@BR%
1811     \@tempdimc=\Win@DimX  \advance\@tempdimc by -2.0\Win@BR%
1812     % bottom line: corners and bottom border
1813     \dimen0\Win@BR  \advance\dimen0\Win@BT   % big radius
1814     \put(\strip@pt\@tempdima,\strip@pt\@tempdimb){%
1815       \color{#1BorderColor}%
1816       \Left@Corner{\@height}{\@depth}%
1817       \vrule width\@tempdimc height0pt depth\dimen0%
1818       \Right@Corner{\@height}{\@depth}%
1819     }%
1820     \dimen0\Win@BR  \advance\dimen0 by -0.3pt%
1821     \put(\strip@pt\Win@LLX,\strip@pt\@tempdimb){%
1822       \color{#1BackgroundColor}%
1823       \Left@Corner{\@height}{\@depth}%
1824       \vrule width\@tempdimc height0pt depth\dimen0%
1825       \Right@Corner{\@height}{\@depth}%
1826     }%
1827     % top line: corners and top border
1828     \@tempdimb=\Win@LLY  \advance\@tempdimb by -\Win@BR%
1829     \advance\@tempdimb by \Win@DimY%
1830     \dimen0\Win@BR  \advance\dimen0\Win@BT   % big radius
1831     \put(\strip@pt\@tempdima,\strip@pt\@tempdimb){%
1832       \color{#1BorderColor}%
1833       \Left@Corner{\@depth}{\@height}%
1834       \vrule width\@tempdimc height\dimen0 depth0pt%
1835       \Right@Corner{\@depth}{\@height}%
1836     }%
1837     \dimen0\Win@BR%
1838     \dimen0\Win@BR  \advance\dimen0 by -0.3pt%
1839     \put(\strip@pt\Win@LLX,\strip@pt\@tempdimb){%
1840       \color{#1BackgroundColor}%
1841       \Left@Corner{\@depth}{\@height}%
1842       \vrule width\@tempdimc height\dimen0 depth0pt%
1843       \Right@Corner{\@depth}{\@height}%
1844     }%
1845     % middle line: side borders and center
1846     \@tempdimb=\Win@LLY  \advance\@tempdimb by .93\Win@BR%
1847     \@tempdimc=\Win@DimY  \advance\@tempdimc by -1.86\Win@BR%
1848     \put(\strip@pt\@tempdima,\strip@pt\@tempdimb){%
1849       \color{#1BorderColor}%
1850       \vrule width\Win@BT height\@tempdimc depth0pt%
1851       \color{#1BackgroundColor}%
1852       \vrule width\Win@DimX height\@tempdimc depth0pt%
1853       \color{#1BorderColor}%
1854       \vrule width\Win@BT height\@tempdimc depth0pt%
1855     }%
1856   \fi%
1857 }
1858 \def\ShowWindow@Graphics#1{%
1859   \edef\tempFileName{\csname @#1@Overlay\endcsname}%
1860   \put(\strip@pt\Win@LLX,\strip@pt\Win@LLY)%
1861    {\includegraphics[width=\Win@DimX,height=\Win@DimY]{\tempFileName}}%
1862 }
1863 \def\ShowWindow@Contents#1{%
1864   \put(\strip@pt\Win@LLX,\strip@pt\Win@LLY)%
1865    {\makebox(\strip@pt\Win@DimX,\strip@pt\Win@DimY)%
1866    {\csname @#1@\endcsname}}%
1867 }
1868 %
1869 \def\Draw@TopTextWindow{%
1870   \put(\strip@pt\@Text@LLX,\strip@pt\@Text@LLY)%
1871    {\makebox(\strip@pt\@Text@DimX,\strip@pt\@Text@DimY)%
1872    {\Top@Text@}}%
1873 }
1874 
1875 
1876 % --------------------------------------------------------------
1877 % CORNER DRAWING: drawing a few black rectangles, because
1878 % (La)TeX‘s graphical features are very limited...
1879 %
1880 % NOTE: overlap of bars is necessary to avoid white
1881 % lines due to alialising effects.
1882 % The straight forward method, namely putting together simple
1883 % adjacent bars, does not work properly.
1884 % NOTE: \p@ means 0pt. \@width, \@height, \@depth are macros for
1885 % the strings width, height, depth. 120 calls save enough memory
1886 % space to justify that in this section.
1887 \def\Right@Corner#1#2{
1888   \vrule \@width.070\dimen0 #1 \p@ #2 1.0\dimen0  \kern-.070\dimen0%
1889   \vrule \@width.170\dimen0 #1 \p@ #2 .99\dimen0  \kern-.170\dimen0%
1890   \vrule \@width.221\dimen0 #1 \p@ #2 .98\dimen0  \kern-.221\dimen0%
1891   \vrule \@width.262\dimen0 #1 \p@ #2 .97\dimen0  \kern-.262\dimen0%
1892   \vrule \@width.296\dimen0 #1 \p@ #2 .96\dimen0  \kern-.296\dimen0%
1893   \vrule \@width.327\dimen0 #1 \p@ #2 .95\dimen0  \kern-.327\dimen0%
1894   \vrule \@width.354\dimen0 #1 \p@ #2 .94\dimen0  \kern-.354\dimen0%
1895   \vrule \@width.380\dimen0 #1 \p@ #2 .93\dimen0  \kern-.380\dimen0%
1896   \vrule \@width.403\dimen0 #1 \p@ #2 .92\dimen0  \kern-.403\dimen0%
1897   \vrule \@width.425\dimen0 #1 \p@ #2 .91\dimen0  \kern-.425\dimen0%
1898   \vrule \@width.446\dimen0 #1 \p@ #2 .90\dimen0  \kern-.446\dimen0%
1899   \vrule \@width.465\dimen0 #1 \p@ #2 .89\dimen0  \kern-.465\dimen0%
1900   \vrule \@width.484\dimen0 #1 \p@ #2 .88\dimen0  \kern-.484\dimen0%
1901   \vrule \@width.502\dimen0 #1 \p@ #2 .87\dimen0  \kern-.502\dimen0%
1902   \vrule \@width.519\dimen0 #1 \p@ #2 .86\dimen0  \kern-.519\dimen0%
1903   \vrule \@width.535\dimen0 #1 \p@ #2 .85\dimen0  \kern-.535\dimen0%
1904   \vrule \@width.550\dimen0 #1 \p@ #2 .84\dimen0  \kern-.550\dimen0%
1905   \vrule \@width.565\dimen0 #1 \p@ #2 .83\dimen0  \kern-.565\dimen0%
1906   \vrule \@width.579\dimen0 #1 \p@ #2 .82\dimen0  \kern-.579\dimen0%
1907   \vrule \@width.593\dimen0 #1 \p@ #2 .81\dimen0  \kern-.593\dimen0%
1908   \vrule \@width.606\dimen0 #1 \p@ #2 .80\dimen0  \kern-.606\dimen0%
1909   \vrule \@width.619\dimen0 #1 \p@ #2 .79\dimen0  \kern-.619\dimen0%
1910   \vrule \@width.632\dimen0 #1 \p@ #2 .78\dimen0  \kern-.632\dimen0%
1911   \vrule \@width.644\dimen0 #1 \p@ #2 .77\dimen0  \kern-.644\dimen0%
1912   \vrule \@width.656\dimen0 #1 \p@ #2 .76\dimen0  \kern-.656\dimen0%
1913   \vrule \@width.668\dimen0 #1 \p@ #2 .75\dimen0  \kern-.668\dimen0%
1914   \vrule \@width.679\dimen0 #1 \p@ #2 .74\dimen0  \kern-.679\dimen0%
1915   \vrule \@width.689\dimen0 #1 \p@ #2 .73\dimen0  \kern-.689\dimen0%
1916   \vrule \@width.699\dimen0 #1 \p@ #2 .72\dimen0  \kern-.699\dimen0%
1917   \vrule \@width.709\dimen0 #1 \p@ #2 .71\dimen0  \kern-.709\dimen0%
1918   %
1919   \vrule #2 .070\dimen0 #1 \p@ \@width1.0\dimen0  \kern-1.0\dimen0%
1920   \vrule #2 .170\dimen0 #1 \p@ \@width.99\dimen0  \kern-.99\dimen0%
1921   \vrule #2 .221\dimen0 #1 \p@ \@width.98\dimen0  \kern-.98\dimen0%
1922   \vrule #2 .262\dimen0 #1 \p@ \@width.97\dimen0  \kern-.97\dimen0%
1923   \vrule #2 .296\dimen0 #1 \p@ \@width.96\dimen0  \kern-.96\dimen0%
1924   \vrule #2 .327\dimen0 #1 \p@ \@width.95\dimen0  \kern-.95\dimen0%
1925   \vrule #2 .354\dimen0 #1 \p@ \@width.94\dimen0  \kern-.94\dimen0%
1926   \vrule #2 .380\dimen0 #1 \p@ \@width.93\dimen0  \kern-.93\dimen0%
1927   \vrule #2 .403\dimen0 #1 \p@ \@width.92\dimen0  \kern-.92\dimen0%
1928   \vrule #2 .425\dimen0 #1 \p@ \@width.91\dimen0  \kern-.91\dimen0%
1929   \vrule #2 .446\dimen0 #1 \p@ \@width.90\dimen0  \kern-.90\dimen0%
1930   \vrule #2 .465\dimen0 #1 \p@ \@width.89\dimen0  \kern-.89\dimen0%
1931   \vrule #2 .484\dimen0 #1 \p@ \@width.88\dimen0  \kern-.88\dimen0%
1932   \vrule #2 .502\dimen0 #1 \p@ \@width.87\dimen0  \kern-.87\dimen0%
1933   \vrule #2 .519\dimen0 #1 \p@ \@width.86\dimen0  \kern-.86\dimen0%
1934   \vrule #2 .535\dimen0 #1 \p@ \@width.85\dimen0  \kern-.85\dimen0%
1935   \vrule #2 .550\dimen0 #1 \p@ \@width.84\dimen0  \kern-.84\dimen0%
1936   \vrule #2 .565\dimen0 #1 \p@ \@width.83\dimen0  \kern-.83\dimen0%
1937   \vrule #2 .579\dimen0 #1 \p@ \@width.82\dimen0  \kern-.82\dimen0%
1938   \vrule #2 .593\dimen0 #1 \p@ \@width.81\dimen0  \kern-.81\dimen0%
1939   \vrule #2 .606\dimen0 #1 \p@ \@width.80\dimen0  \kern-.80\dimen0%
1940   \vrule #2 .619\dimen0 #1 \p@ \@width.79\dimen0  \kern-.79\dimen0%
1941   \vrule #2 .632\dimen0 #1 \p@ \@width.78\dimen0  \kern-.78\dimen0%
1942   \vrule #2 .644\dimen0 #1 \p@ \@width.77\dimen0  \kern-.77\dimen0%
1943   \vrule #2 .656\dimen0 #1 \p@ \@width.76\dimen0  \kern-.76\dimen0%
1944   \vrule #2 .668\dimen0 #1 \p@ \@width.75\dimen0  \kern-.75\dimen0%
1945   \vrule #2 .679\dimen0 #1 \p@ \@width.74\dimen0  \kern-.74\dimen0%
1946   \vrule #2 .689\dimen0 #1 \p@ \@width.73\dimen0  \kern-.73\dimen0%
1947   \vrule #2 .699\dimen0 #1 \p@ \@width.72\dimen0  \kern-.72\dimen0%
1948   \vrule #2 .709\dimen0 #1 \p@ \@width.71\dimen0  \kern-.71\dimen0%
1949 }
1950 \def\Left@Corner#1#2{
1951   \vrule #2 .070\dimen0 #1 \p@ \@width1.0\dimen0  \kern-.99\dimen0%
1952   \vrule #2 .170\dimen0 #1 \p@ \@width.99\dimen0  \kern-.98\dimen0%
1953   \vrule #2 .221\dimen0 #1 \p@ \@width.98\dimen0  \kern-.97\dimen0%
1954   \vrule #2 .262\dimen0 #1 \p@ \@width.97\dimen0  \kern-.96\dimen0%
1955   \vrule #2 .296\dimen0 #1 \p@ \@width.96\dimen0  \kern-.95\dimen0%
1956   \vrule #2 .327\dimen0 #1 \p@ \@width.95\dimen0  \kern-.94\dimen0%
1957   \vrule #2 .354\dimen0 #1 \p@ \@width.94\dimen0  \kern-.93\dimen0%
1958   \vrule #2 .380\dimen0 #1 \p@ \@width.93\dimen0  \kern-.92\dimen0%
1959   \vrule #2 .403\dimen0 #1 \p@ \@width.92\dimen0  \kern-.91\dimen0%
1960   \vrule #2 .425\dimen0 #1 \p@ \@width.91\dimen0  \kern-.90\dimen0%
1961   \vrule #2 .446\dimen0 #1 \p@ \@width.90\dimen0  \kern-.89\dimen0%
1962   \vrule #2 .465\dimen0 #1 \p@ \@width.89\dimen0  \kern-.88\dimen0%
1963   \vrule #2 .484\dimen0 #1 \p@ \@width.88\dimen0  \kern-.87\dimen0%
1964   \vrule #2 .502\dimen0 #1 \p@ \@width.87\dimen0  \kern-.86\dimen0%
1965   \vrule #2 .519\dimen0 #1 \p@ \@width.86\dimen0  \kern-.85\dimen0%
1966   \vrule #2 .535\dimen0 #1 \p@ \@width.85\dimen0  \kern-.84\dimen0%
1967   \vrule #2 .550\dimen0 #1 \p@ \@width.84\dimen0  \kern-.83\dimen0%
1968   \vrule #2 .565\dimen0 #1 \p@ \@width.83\dimen0  \kern-.82\dimen0%
1969   \vrule #2 .579\dimen0 #1 \p@ \@width.82\dimen0  \kern-.81\dimen0%
1970   \vrule #2 .593\dimen0 #1 \p@ \@width.81\dimen0  \kern-.80\dimen0%
1971   \vrule #2 .606\dimen0 #1 \p@ \@width.80\dimen0  \kern-.79\dimen0%
1972   \vrule #2 .619\dimen0 #1 \p@ \@width.79\dimen0  \kern-.78\dimen0%
1973   \vrule #2 .632\dimen0 #1 \p@ \@width.78\dimen0  \kern-.77\dimen0%
1974   \vrule #2 .644\dimen0 #1 \p@ \@width.77\dimen0  \kern-.76\dimen0%
1975   \vrule #2 .656\dimen0 #1 \p@ \@width.76\dimen0  \kern-.75\dimen0%
1976   \vrule #2 .668\dimen0 #1 \p@ \@width.75\dimen0  \kern-.74\dimen0%
1977   \vrule #2 .679\dimen0 #1 \p@ \@width.74\dimen0  \kern-.73\dimen0%
1978   \vrule #2 .689\dimen0 #1 \p@ \@width.73\dimen0  \kern-.72\dimen0%
1979   \vrule #2 .699\dimen0 #1 \p@ \@width.72\dimen0  \kern-.71\dimen0%
1980   \vrule #2 .709\dimen0 #1 \p@ \@width.71\dimen0  \kern-.709\dimen0%
1981   %
1982   \vrule \@width.709\dimen0 #1 \p@ #2 .71\dimen0  \kern-.699\dimen0%
1983   \vrule \@width.699\dimen0 #1 \p@ #2 .72\dimen0  \kern-.689\dimen0%
1984   \vrule \@width.689\dimen0 #1 \p@ #2 .73\dimen0  \kern-.679\dimen0%
1985   \vrule \@width.679\dimen0 #1 \p@ #2 .74\dimen0  \kern-.668\dimen0%
1986   \vrule \@width.668\dimen0 #1 \p@ #2 .75\dimen0  \kern-.656\dimen0%
1987   \vrule \@width.656\dimen0 #1 \p@ #2 .76\dimen0  \kern-.644\dimen0%
1988   \vrule \@width.644\dimen0 #1 \p@ #2 .77\dimen0  \kern-.632\dimen0%
1989   \vrule \@width.632\dimen0 #1 \p@ #2 .78\dimen0  \kern-.619\dimen0%
1990   \vrule \@width.619\dimen0 #1 \p@ #2 .79\dimen0  \kern-.606\dimen0%
1991   \vrule \@width.606\dimen0 #1 \p@ #2 .80\dimen0  \kern-.593\dimen0%
1992   \vrule \@width.593\dimen0 #1 \p@ #2 .81\dimen0  \kern-.579\dimen0%
1993   \vrule \@width.579\dimen0 #1 \p@ #2 .82\dimen0  \kern-.565\dimen0%
1994   \vrule \@width.565\dimen0 #1 \p@ #2 .83\dimen0  \kern-.550\dimen0%
1995   \vrule \@width.550\dimen0 #1 \p@ #2 .84\dimen0  \kern-.535\dimen0%
1996   \vrule \@width.535\dimen0 #1 \p@ #2 .85\dimen0  \kern-.519\dimen0%
1997   \vrule \@width.519\dimen0 #1 \p@ #2 .86\dimen0  \kern-.502\dimen0%
1998   \vrule \@width.502\dimen0 #1 \p@ #2 .87\dimen0  \kern-.484\dimen0%
1999   \vrule \@width.484\dimen0 #1 \p@ #2 .88\dimen0  \kern-.465\dimen0%
2000   \vrule \@width.465\dimen0 #1 \p@ #2 .89\dimen0  \kern-.446\dimen0%
2001   \vrule \@width.446\dimen0 #1 \p@ #2 .90\dimen0  \kern-.425\dimen0%
2002   \vrule \@width.425\dimen0 #1 \p@ #2 .91\dimen0  \kern-.403\dimen0%
2003   \vrule \@width.403\dimen0 #1 \p@ #2 .92\dimen0  \kern-.380\dimen0%
2004   \vrule \@width.380\dimen0 #1 \p@ #2 .93\dimen0  \kern-.354\dimen0%
2005   \vrule \@width.354\dimen0 #1 \p@ #2 .94\dimen0  \kern-.327\dimen0%
2006   \vrule \@width.327\dimen0 #1 \p@ #2 .95\dimen0  \kern-.296\dimen0%
2007   \vrule \@width.296\dimen0 #1 \p@ #2 .96\dimen0  \kern-.262\dimen0%
2008   \vrule \@width.262\dimen0 #1 \p@ #2 .97\dimen0  \kern-.221\dimen0%
2009   \vrule \@width.221\dimen0 #1 \p@ #2 .98\dimen0  \kern-.170\dimen0%
2010   \vrule \@width.170\dimen0 #1 \p@ #2 .99\dimen0  \kern-.070\dimen0%
2011   \vrule \@width.070\dimen0 #1 \p@ #2 1.0\dimen0%
2012 }
2013 
2014 
2015 %-------------- Verbatim fix -------------
2016 % This code is provided by DP Story
2017 \newdimen\@PDFspaceleft
2018 \def\@PDFpagespace{%
2019   \ifdim\pagetotal=0pt
2020      \@PDFspaceleft=\vsize
2021    \else
2022      \@PDFspaceleft=\pagegoal
2023      \advance\@PDFspaceleft by-\pagetotal
2024  \fi}
2025 \let\@PDFverbatim\verbatim
2026 \let\@PDFendverbatim\endverbatim
2027 \AtBeginDocument{%
2028    \def\verbatim{\begingroup\setbox0=\vbox\bgroup
2029          \hsize=\linewidth%
2030          \@PDFverbatim\verbatim@font}
2031    \def\endverbatim{\@PDFendverbatim\egroup
2032     \@PDFpagespace\ifdim\@PDFspaceleft>\ht0
2033        \else
2034         \setbox1=\vsplit0 to\@PDFspaceleft
2035         \verbatim@font\unvbox1 \penalty\@M
2036        \fi
2037     \ifvoid0\relax\else\verbatim@font\unvbox0\fi
2038     \endgroup}
2039   \def\@verb{\@vobeyspaces \frenchspacing\@sverb}
2040   \if@chinese% added by Shujun Li
2041     \begin{CJK*}{GBK}{kai}\CJKtilde%
2042     \input cnames.tex
2043   \fi% end of chinese option
2044 }
2045 % end of DPS‘ code
2046 %-------------- end of Verbatim fix -------------
2047 
2048 
2049 % --------------------------------------------------------------
2050 % FINAL STUFF: \AtEndDocument settings and config file input
2051 %
2052 \AtEndDocument{%
2053   \clearpage%
2054   \addtocounter{page}{-1}%
2055   \addtocounter{RealPage}{-1}%
2056   \immediate\write\@auxout{\string\gdef\string\LastPageString{\thepage}}%
2057   \immediate\write\@auxout{\string\expandafter\string\gdef%
2058    \string\csname\space LastPageC\arabic{chapter}String\string\endcsname{\thepage}}%
2059   \immediate\write\@auxout{\string\gdef\string\LastPage{\arabic{RealPage}}}%
2060   \immediate\write\@auxout{\string\gdef\string\ChapterNumber{\arabic{chapter}}}%
2061   \addtocounter{page}{1}%
2062   \if@chinese\end{CJK*}\fi% added by Shujun Li
2063 }
2064 
2065 \if@nocfg%
2066   \relax%
2067 \else%
2068   \IfFileExists{pdfwin.cfg}{\input pdfwin.cfg}%
2069   {\PDFWIN@Warning{pdfwin.cfg does not exist!}}%
2070 \fi
2071 
2072 \endinput
2073 
2074 %%%%%%%%%%%%%%%%%%% EOF

 

pdfwin.cfg

% pdfwin.cfg
%
% this file is read by pdfwin.sty
% if you want to modify pdfwin‘s default behavior, you should do it here.

% the following codes are changed by Shujun Li (www.hooklee.com) for his talk 
% on CityU-PolyU joint seminar series of Chaos and System Control, 7 May 2004

% I added a new length to support the explicit setting of the width of the background graphics 
\newlength\@Screen@imagewidth
\setlength\@Screen@imagewidth{0.25\textwidth}
\define@key{pdfwinScreen}{imagewidth}{\setlength\@Screen@imagewidth{#1}}
\def\Draw@ScreenBackground{%
  \ifcase\@Screen@Type%
  \or%
  \or%
    % 2 = colored
    \put(0,0){\bgroup\color{ScreenBackgroundColor}\vrule%
      height\paperheight depth0pt width\paperwidth\egroup}%
  \or%
    % 3 = graphics
    \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]%
      {\@Screen@Overlay}}%
  \or%
    % 4 = extended
    \put(0,0){\bgroup\color{ScreenBackgroundColor}\vrule%
      height\paperheight depth0pt width\paperwidth\egroup}%
    \put(0,0){\includegraphics[width=\paperwidth,height=\paperheight]%
      {\@Screen@Overlay}}%
  \or%
    % 5 = wallpaper
    \bgroup%
      \setbox0=\hbox{\includegraphics[width=\@Screen@imagewidth]{\@Screen@Overlay}}%
      \setlength{\unitlength}{1sp}%
      \@tempcnta=\paperwidth%
      \count255=\wd0%
      \divide\@tempcnta by \count255%
      \setbox2=\hbox{\count255=-1%
        \loop\ifnum\count255<\@tempcnta\advance\count255 by 1\copy0\repeat\hss}
      \@tempcntb=\paperheight%
      \count255=\ht0%
      \divide\@tempcntb by \count255%
      \advance\@tempcntb by 1%
      \multiput(0,0)(0,\count255){\@tempcntb}{\copy2}%
    \egroup%
  \fi%
}

% I increased the maximal page number to be 6
\setcounter{maxdynamicpages}{6}
%
% EOF

 

truncate.sty

  1 % truncate.sty  ver 3.6   20-Aug-2001    Donald Arseneau
  2 % This LaTeX program is released to the public domain.
  3 %
  4 % Truncate text to a specified width:  \truncate [marker]{width}{text}
  5 %
  6 % If the text is too wide to fit in the specified width, then it is
  7 % truncated, and a continuation marker is shown at the end. The default
  8 % marker, used when the optional "[marker]" parameter is omitted, is
  9 % "\,\dots".  You can change this default by redefining "\TruncateMarker"
 10 % ("\renewcommand{\TruncateMarker}{}").
 11 %
 12 % Normally, the text (whether truncated or not) is printed flush-left
 13 % in a box with exactly the width specified. The package option "[fit]"
 14 % ("\usepackage[fit]{truncate}") causes the output text to have its
 15 % natural width, up to a maximum of the specified width.
 16 %
 17 % The text will not normally be truncated in the middle of a word,
 18 % nor at a space specified by the tie "~".  For example:
 19 %
 20 %     "\truncate{122pt}{This text has been~truncated}"   
 21 % gives
 22 %     "This text has...      "
 23 %
 24 % You can give one of the package options "[hyphenate]", "[breakwords]",
 25 % or "[breakall]" to allow breaking in the middle of words. The first 
 26 % two only truncate at hyphenation points; with the difference being that 
 27 % "breakwords" suppresses the hyphen character.  On the other hand, 
 28 % "breakall" allows truncation at any character.  For example: 
 29 %
 30 %     "\truncate{122pt}{This text has been~truncated}" 
 31 % gives
 32 %     "This text has been trun-..."   (hyphenate)
 33 %     "This text has been trun... "   (breakwords)
 34 %     "This text has been trunc..."   (breakall)
 35 %
 36 % (All of these options work through TeX‘s hyphenation mechanism.)
 37 %
 38 \ProvidesPackage{truncate}[2001/08/20 \space ver 3.6]
 39 %
 40 % [breakwords] allows hyphenation but with invisible hyphen characters
 41 \DeclareOption{breakwords}{%
 42    \let\@Trunc@DoSelect\relax
 43    \expandafter\chardef\csname \string\@TruncHyph T1\endcsname 23
 44    \expandafter\chardef\csname \string\@TruncHyph OT1\endcsname 223
 45    \expandafter\chardef\csname \string\@TruncHyph LY1\endcsname 0
 46    \def\@Trunc@Post{\hyphenpenalty\tw@ \exhyphenpenalty\tw@
 47      \doublehyphendemerits\z@ \finalhyphendemerits\z@
 48      \the\@Trunc@RestHyph % set invisible hyphenchars for all fonts used
 49   }}
 50 %
 51 % [breakall] is like breakwords, but all characters are treated like
 52 % the letter "c"; the default language 0 patterns allow hyphenation
 53 % c-c-c-c-c-c-c-c-c.  This means we don‘t need special patterns!
 54 \DeclareOption{breakall}{\ExecuteOptions{breakwords}%
 55     \expandafter\def\expandafter\@Trunc@Post\expandafter{\@Trunc@Post
 56       \@tempcnta\z@ \chardef\c`\c % in knuth patterns, c allows hyphens
 57       \loop \lccode\@tempcnta\c \advance\@tempcnta\@ne
 58       \ifnum\@tempcnta<\@cclvi \repeat}%
 59     \def\@Trunc@Pre{% force US english
 60       \lefthyphenmin\@ne \righthyphenmin\@ne
 61       \doublehyphendemerits\language
 62       \language\z@ % default English language
 63       \let\language\doublehyphendemerits
 64       \uchyph\@ne
 65     }}
 66 %
 67 % [hyphenate] ordinary hyphenation for breakpoints
 68 \DeclareOption{hyphenate}{% takes precedence over breakwords
 69    \def\@Trunc@Post{\hyphenpenalty\sixt@@n}\let\@Trunc@Pre\relax}
 70 %
 71 % [fit] use true size of truncated text, not requested size.
 72 \DeclareOption{fit}{\def\@Trunc@Rebox{%
 73    \setbox\z@\hbox{\unhbox\z@\unskip\unskip\@tempa}%
 74    \ifdim\wd\z@>\hsize \hbox to\hsize{\unhbox\z@}\else \box\z@ \fi}}
 75 %
 76 % Defaults:
 77 \let\@Trunc@Pre\@empty
 78 \def\@Trunc@Post{\hyphenpenalty\@M}
 79 \def\@Trunc@Rebox{\hbox to\hsize{\unhbox\z@\unskip\unskip\@tempa\hfil}}
 80 \let\@Trunc@DoSelect\@empty
 81 
 82 \ProcessOptions\relax
 83 
 84 \providecommand{\TruncateMarker}{\,\dots}
 85 
 86 \newcommand{\truncate}[3][\TruncateMarker]{% #1=marker #2=width #3=text
 87   \parbox[b]{#2}{\tolerance9999 \emergencystretch .216\hsize
 88    \vbadness\maxdimen \vfuzz\vsize % no overfull warnings
 89    \hbadness\maxdimen \hfuzz\vsize
 90    %  set up hyphenchar switching for all fonts used.
 91    \edef\@tempb{\the\@Trunc@RestHyph}% save whole stack
 92    \global\@Trunc@RestHyph{}%
 93    \ifx\@Trunc@DoSelect\relax
 94      \let\@Trunc@DoSelect\selectfont
 95      \def\selectfont{\@Trunc@DoSelect\@Trunc@SaveHChar}%
 96    \fi
 97    \@Trunc@SaveHChar % do it for current font
 98    \setbox\z@\vbox\bgroup
 99     % First set text in a hbox to see if it fits.
100     \setbox\z@\@@line{\ignorespaces #3\unskip\hfil}%
101     \ifnum\badness>\@M  % text does not fit
102       \settowidth\rightskip{#1}%
103       \advance\rightskip \z@\@plus\p@
104       \parfillskip-\@ne\rightskip \@plus\@ne fil 
105       \parshape \tw@ \z@\hsize \z@\maxdimen \linepenalty60
106       \tracinglostchars\z@
107       %% \let\par\relax -- don‘t do this because \vskip causes infinite loop
108       \@Trunc@Pre % must set language before paragraph
109       \noindent \vadjust{\penalty-\@MM}% for splitting off first line
110       \nobreak\hskip\z@skip % allow first word hyphenation
111       \ignorespaces #3% the text
112       \pretolerance\hyphenpenalty \@Trunc@Post % set up `hyphenation‘
113       \@@par
114       \ifnum\prevgraf>\@ne
115        \egroup \def\@tempa{#1}% use truncation marker
116       \else
117        \egroup \let\@tempa\@empty% no linebreak, so all text fits; no marker
118       \fi
119     \else
120       \box\z@ \egroup \let\@tempa\@empty
121     \fi
122    \setbox\@tempboxa\vsplit\z@ to\z@ \unvbox\@tempboxa
123    \unskip\unpenalty\unpenalty
124    \setbox\z@\lastbox
125    \nointerlineskip
126    \hfuzz\p@
127    \@Trunc@Rebox
128    \let\@Trunc@HC\@firstofone \the\@Trunc@RestHyph % restore hyphenchars
129    \global\@Trunc@RestHyph\expandafter{\@tempb}% restore the stack itself
130  }}
131 % (Note that the text may be proessed twice.  I could avoid that
132 % if there are problems with global counters etc.)
133 
134 % we save (implicit global) hyphenchar settings for each font on a 
135 % manual stack -- the token register \@Trunc@RestHyph -- before changing
136 % them.  We execute \@Trunc@RestHyph to set them to the invisible 
137 % characters and then again to restore them.  (I can‘t imagine this
138 % will ever be required.)
139 \newtoks\@Trunc@RestHyph
140 \global\@Trunc@RestHyph{}
141 %
142 \def\@Trunc@SaveHChar{\begingroup
143   \edef\@tempa{%
144     \hyphenchar\the\font=\noexpand\@Trunc@HC{\the\hyphenchar\font}\relax 
145     \the\@Trunc@RestHyph}%
146   \global\@Trunc@RestHyph\expandafter{\@tempa}%
147 %  \hyphenchar\font\z@
148   \endgroup}
149 %
150 % select an invisible character for hyphenation.  Use \textcompwordmark, if
151 % any; use selected numbers for certain encodings (OT1 uses a *missing*
152 % character); use a space otherwise.
153 \def\@Trunc@HC#1{%
154   \@ifundefined{\f@encoding\string\textcompwordmark}{%
155     \@ifundefined{\string\@TruncHyph\f@encoding}%
156       {32}% If no appropriate character, guess space character may be blank
157       {\csname \string\@TruncHyph\f@encoding\endcsname}%
158   }{\csname\f@encoding\string\textcompwordmark\endcsname}}%

 

文章来自:http://www.cnblogs.com/jinliangjiuzhuang/p/4014504.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3