⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aeb_pro.dtx

📁 It uses latex to give question papers
💻 DTX
📖 第 1 页 / 共 5 页
字号:
%
%    \begin{macrocode}
\@tfor\aeb@windowopts:={{fit}{FitWindow}}{{center}{CenterWindow}}%
    {{fullscreen}{FullScreen}}{{showtitle}{DisplayDocTitle}}\do
{%
    \expandafter\getargs\aeb@windowopts
    \edef\temp@expand@def{%
            \noexpand\define@key{aebWindowOpts}{\aeb@argi}[true]{%
            \noexpand\def\csname aeb@windowopts\aeb@argii\endcsname{%
                /\aeb@argii\space##1}%
        }%
    }\temp@expand@def
    \expandafter\let\csname aeb@windowopts\aeb@argii\endcsname\@empty
}
%    \end{macrocode}
%    \begin{macro}{\setWindowOptions}
% Set the User Window options on the Initial View tab of the Document Properties dialog box.
%    \begin{macrocode}
\newcommand{\setWindowOptions}[1]{\setkeys{aebWindowOpts}{#1}}
%    \end{macrocode}
%    \end{macro}
% \subsection{User Interface Options}
%    \begin{macrocode}
\@tfor\aeb@uiopts:={{hidetoolbar}{HideToolbar}}
    {{hidemenubar}{HideMenubar}}{{hidewindowui}{HideWindowUI}}\do{%
    \expandafter\getargs\aeb@uiopts
    \edef\temp@expand@def{%
        \noexpand\define@key{aebUIOpts}{\aeb@argi}[true]%
        {%
            \noexpand\edef\csname aeb@uiopts\aeb@argii\endcsname{%
                /\aeb@argii\space##1}%
        }%
    }\temp@expand@def
    \expandafter\let\csname aeb@uiopts\aeb@argii\endcsname\@empty
}
%    \end{macrocode}
%    \begin{macro}{\setUIOptions}
% Set the User Interface options on the Initial View tab of the Document Properties dialog box.
%    \begin{macrocode}
\newcommand{\setUIOptions}[1]{\setkeys{aebUIOpts}{#1}}
%    \end{macrocode}
%    \end{macro}
%
% \subsection{Layout and Magnification}
%
% \subsubsection{Navigation Tab (Page Mode)}
% Supported keys
%\begin{itemize}
% \item \texttt{UseNone}: Page Only
% \item \texttt{UseOutlines}: Bookmarks Panel and Page
% \item \texttt{UseThumbs}: Pages Panel and Page
% \item \texttt{FullScreen}: Fullscreen mode
% \item \texttt{UseOC}: Layers Panel and Page
% \item \texttt{UseAttachments}: Attachments Panel and Page
%\end{itemize}
%    \begin{macrocode}
\define@choicekey+{aebLayoutMag}{navitab}{UseNone,UseOutlines,%
    UseThumbs,FullScreen,UseOC,UseAttachments}[UseNone]{%
        \def\aeb@layoutMagNaviTab{#1}%
}{\PackageWarning{aeb}{Bad choice for PageLayout, permissible values
   are UseNone, UseOutlines, UseThumbs, FullScreen,%
    UseOC, UseAttachments. Try again}}
\let\aeb@layoutMagNaviTab\@empty
%    \end{macrocode}
% \subsubsection{Page Layout}
% Supported keys are
%\begin{itemize}
%   \item \texttt{SinglePage}: Single page
%   \item \texttt{OneColumn}: Single page continuous
%   \item \texttt{TwoPageLeft}: Two-Up (Facing)
%   \item \texttt{TwoColumnLeft}: Two-Up Continuous (Facing)
%   \item \texttt{TwoPageRight}: Two-Up (Cover Page)
%   \item \texttt{TwoColumnRight}: Two-Up Continuous (Cover Page)
%\end{itemize}
%    \begin{macrocode}
\define@choicekey+{aebLayoutMag}{pagelayout}{SinglePage,OneColumn,%
    TwoColumnLeft,TwoColumnRight,TwoPageLeft,TwoPageRight}[SinglePage]{%
        \def\aeb@layoutMagPageLayout{#1}%
}{\PackageWarning{aeb}{Bad choice for PageLayout, permissible values
   are SinglePage, OneColumn, TwoColumnLeft, TwoColumnRight,
   TwoPageLeft,TwoPageRight. Try again}}
\let\aeb@layoutMagPageLayout\@empty
%    \end{macrocode}
% \subsubsection{Magnification}
%\begin{verbatim}
% Actual Size <</D[1 0 R/XYZ -32768 -32768 1.0]/S/GoTo>>
% Fit Page <</D[1 0 R/Fit]/S/GoTo>>
% Fit Width <</D[21 0 R/FitH -32768]/S/GoTo>>
% Fit Height <</D[1 0 R/FitV -32768]/S/GoTo>>
% Fit Visible <</D[21 0 R/FitBH -32768]/S/GoTo>>
% 25% <</D[21 0 R/XYZ -32768 -32768 0.25]/S/GoTo>>
%\end{verbatim}
%    \begin{macrocode}
\define@choicekey+{aebLayoutMag}{mag}[\val\nr]%
    {ActualSize,FitPage,FitWidth,FitHeight,FitVisible}[FitPage]%
{%
    \ifcase\nr\relax
        \def\aeb@layoutMagMag{/XYZ -32768 -32768 1.0}%
    \or
        \def\aeb@layoutMagMag{/Fit}%
    \or
        \def\aeb@layoutMagMag{/FitH -32768}%
    \or
        \def\aeb@layoutMagMag{/FitV -32768}%
    \or
        \def\aeb@layoutMagMag{/FitBH -32768}%
    \fi
}{\edef\aeb@layoutMagMag{/XYZ -32768 -32768 \val\space 100 div}}
\let\aeb@layoutMagMag\@empty
%    \end{macrocode}
% \subsubsection{Open to page}
%    \begin{macrocode}
\define@key{aebLayoutMag}{openatpage}[1]{\def\aeb@openatpageChoice{#1}%
    \def\aeb@layoutMagPage{Page#1}}
\let\aeb@openatpageChoice\@empty
\let\aeb@layoutMagPage\@empty
%    \end{macrocode}
%    \begin{macro}{\setInitLayout}
% Set the User Interface options on the Initial View tab of the Document Properties dialog box.
%    \begin{macrocode}
\newcommand{\setLayoutMag}[1]{\edef\temp@expand@sets{%
    \noexpand\setkeys{aebLayoutMag}{\ifx\aeb@openatpageChoice\@empty
        openatpage=1\else openatpage=\aeb@openatpageChoice\fi}}%
    \temp@expand@sets\setkeys{aebLayoutMag}{#1}}
%    \end{macrocode}
%    \end{macro}
%    \begin{macro}{\DeclareInitView}
% This command is the ultimate holder of the Initial View data. It has three keys
% layoutmag, windowoptions and uioptions. The values for each of these three are
% key values for the commands defined above: \cs{setLayoutMag}, \cs{setWindowOptions} and \cs{setUIOptions}.
%    \begin{macrocode}
\define@key{aebDeclareInitView}{layoutmag}
    {\def\aebDeclareInitView@layoutmag{#1}}
\let\aebDeclareInitView@layoutmag\@empty
\define@key{aebDeclareInitView}{windowoptions}
    {\def\aebDeclareInitView@windowoptions{#1}}
\let\aebDeclareInitView@windowoptions\@empty
\define@key{aebDeclareInitView}{uioptions}
    {\def\aebDeclareInitView@uioptions{#1}}
\let\aebDeclareInitView@uioptions\@empty
\newcommand{\DeclareInitView}[1]{%
    \setkeys{aebDeclareInitView}{#1}%
    \edef\temp@expand@sets{%
        \noexpand\setLayoutMag{\aebDeclareInitView@layoutmag}%
        \noexpand\setWindowOptions{\aebDeclareInitView@windowoptions}%
        \noexpand\setUIOptions{\aebDeclareInitView@uioptions}%
    }\temp@expand@sets
}
%    \end{macrocode}
%    \end{macro}
% Additional Open action
%    \begin{macro}{\additionalOpenAction}
%    \begin{macro}{\requiresVersion}
%\changes{v0.8h}{2008/07/19}
%{
%   Added an optional argument to \cs{requiresVersion}, to give the option
%   of only warning the user that a certain version is required; no exiting
%   of the document is forced on the user.
%}
%    \begin{macro}{\alternateDocumentURL}
%    \begin{macro}{\requiredVersionMsg}
%    \begin{macro}{\requiredVersionMsgRedirect}
%    \begin{macro}{\afterRequirementPassedJS}
% \cs{additionalOpenAction} can be used to add in additional action that is performed with the
% document is opened. This is different from the actions that may be performed when the first page
% is opened.  In fact, this action is independent of what what page is initially opened.
%
% \cs{requiresVersion} can be used to put a version condition on viewing the document. \cs{requiresVersion}
% uses \cs{additionalOpenAction}. If you want to combine several actions, including a version requirement
% you''l have to use \cs{additionalOpenAction}. Usage:
%\begin{verbatim}
%\requiresVersion{7}
%\end{verbatim}
% \cs{requireVersionMsg} is the message that is displayed when the version condition is not met.
%    \begin{macrocode}
\let\aeb@additionalOpenAction\@empty
\newcommand{\additionalOpenAction}[1]{%
    \def\aeb@additionalOpenAction{/Next {aebAdditionalOpenAction}}%
    \setLayoutMag{}%
    \literalps@out{%
    [/_objdef {aebAdditionalOpenAction} /type/dict /OBJ pdfmark
    [ {aebAdditionalOpenAction} << #1 >> /PUT pdfmark}%
}
% \let\addtionalOpenAction\additionalOpenAction
% #1 = warnonly or empty
% #2 = version number
\def\aebp@warnonly{warnonly}
\newcommand{\aebp@app@title}{AcroTeX Message}
\newcommand{\requiresVersion}[2][]{%
    \def\aebp@argi{#1}%
    \def\requiredVersionNumber{#2}\additionalOpenAction{\JS{%
    if( app.viewerVersion < #2 ) {
    try {
        if (this.external) {
            app.alert({cTitle:"\aebp@app@title",
                cMsg:"\aeb@requiredVersionMsgRedirect"});
\ifx\aebp@argi\aebp@warnonly\else
            if (app.viewerVersion >= 7.0)
                app.launchURL("\aebAlternateDocumentURL");
            else
                this.getURL("\aebAlternateDocumentURL",false);
\fi
        } else {
            app.alert({cTitle:"\aebp@app@title",
                cMsg:"\aeb@requiredVersionMsg"});
\ifx\aebp@argi\aebp@warnonly\else
            this.closeDoc(true);
\fi
        }
    } catch(e) {};
    } else {
        \aeb@ViewerPassedRequirementJS
    }
}}}
\def\requiredVersionNumber{7}
\newcommand{\alternateDocumentURL}[1]{\def\aebAlternateDocumentURL{#1}}
\alternateDocumentURL{http://www.acrotex.net/}
\newcommand{\requiredVersionMsg}[1]{\def\aeb@requiredVersionMsg{#1}}
\requiredVersionMsg{This document requires Adobe Reader or Acrobat,
    version \requiredVersionNumber\space or later. The document is now
    closing.}
\newcommand{\requiredVersionMsgRedirect}[1]{%
    \def\aeb@requiredVersionMsgRedirect{#1}}
\requiredVersionMsgRedirect{%
    This document requires Adobe Reader or Acrobat,
    version \requiredVersionNumber\space or later.
    Redirecting browser to an alternate page.}
\newcommand{\afterRequirementPassedJS}[1]{%
    \def\aeb@ViewerPassedRequirementJS{#1}}
\let\aeb@ViewerPassedRequirementJS\@empty
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
% Now let's put it all together.
%    \begin{macrocode}
\def\aeb@SetCatalog{\literalps@out{%
[ {Catalog} <</ViewerPreferences<<%
    \ifx\aeb@windowoptsFitWindow\@empty\else
        \aeb@windowoptsFitWindow\fi
    \ifx\aeb@windowoptsCenterWindow\@empty\else
        \aeb@windowoptsCenterWindow\fi
    \ifx\aeb@windowoptsDisplayDocTitle\@empty\else
        \aeb@windowoptsDisplayDocTitle\fi
    \ifx\aeb@uioptsHideToolbar\@empty\else
        \aeb@uioptsHideToolbar\fi
    \ifx\aeb@uioptsHideMenubar\@empty\else
        \aeb@uioptsHideMenubar\fi
    \ifx\aeb@uioptsHideWindowUI\@empty\else
        \aeb@uioptsHideWindowUI\fi
    \ifx\aeb@layoutMagNaviTab\@empty\else
        /NonFullScreenPageMode/\aeb@layoutMagNaviTab\fi
    >>%
    \ifx\aeb@layoutMagPageLayout\@empty\else
        /PageLayout/\aeb@layoutMagPageLayout%
    \fi
    \ifx\aeb@windowoptsFullScreen\@empty
        \ifx\aeb@layoutMagNaviTab\@empty\else
            /PageMode/\aeb@layoutMagNaviTab%
        \fi
    \else
        /PageMode/FullScreen%
    \fi
    \ifx\aeb@layoutMagPage\@empty
        \ifx\aeb@layoutMagMag\@empty
        \else
            /OpenAction<</D[{Page1}\aeb@layoutMagMag]
                /S/GoTo\aeb@additionalOpenAction>>%
        \fi
    \else
        \ifx\aeb@layoutMagMag\@empty
            /OpenAction<</D[{\aeb@layoutMagPage}/Fit]
                /S/GoTo\aeb@additionalOpenAction>>%
        \else
            /OpenAction<</D[{\aeb@layoutMagPage}\aeb@layoutMagMag]
                /S/GoTo\aeb@additionalOpenAction>>%
        \fi
    \fi
>> /PUT pdfmark}}
\AtBeginDocument{\aeb@SetCatalog}
%    \end{macrocode}
% \section{Fullscreen and Transitions}
% \subsection{\texorpdfstring{\cs{setDefaultFS}}{\textbackslash setDefaultFS}}
%    \begin{macro}{\setDefaultFS}
% Use \cs{setDefaultFS} to set the defaults for fullscreen
% mode in the Adobe Reader or Acrobat.
%    \begin{macrocode}
\newcommand{\setDefaultFS}[1]
{%
    \setkeys{aebDefFS}{Trans=Replace}\setkeys{aebDefFS}{#1}%
    \makeatletter
    \InputIfFileExists{fsprodef.js}{}{\PackageWarning{aeb}
        {Cannot find fsdef.js, please run aeb.ins again}}
    \makeatother
}
\@onlypreamble\setDefaultFS
%    \end{macrocode}
%    \end{macro}
%
% Definitions of key-values for supported transitions;  these are set using the command
% \cs{setDefaultFS}.
%
%    \begin{macrocode}
\def\aeb@NoTransition{NoTransition}
\define@choicekey+{aebDefFS}{Trans}
{NoTransition,UncoverLeft,UncoverRight,UncoverDown,UncoverUp,%
UncoverLeftDown,UncoverLeftUp,UncoverRightDown,UncoverRightUp,%
CoverLeft,CoverRight,CoverDown,CoverUp,CoverLeftDown,CoverLeftUp,%
CoverRightDown,CoverRightUp,PushLeft,PushRight,PushDown,PushUp,%
PushLeftDown,PushLeftUp,PushRightDown,PushRightUp,FlyInRight,%
FlyInLeft,FlyInDown,FlyInUp,FlyOutRight,FlyOutLeft,FlyOutDown,%
FlyOutUp,FlyIn,FlyOut,Blend,Fade,Random,Dissolve,%
GlitterRight,GlitterDown,GlitterRightDown,BoxIn,BoxOut,%
BlindsHorizontal,BlindsVertical,SplitHorizontalIn,%
SplitHorizontalOut,SplitVerticalIn,SplitVerticalOut,WipeLeft,%
WipeRight,WipeDown,WipeUp,WipeLeftDown,WipeLeftUp,%
WipeRightDown,WipeRightUp,Replace,ZoomInDown,ZoomInLeft,%
ZoomInLeftDown,ZoomInLeftUp,ZoomInRight,ZoomInRightDown,%
ZoomInRightUp,ZoomInUp,ZoomOutDown,ZoomOutLeft,ZoomOutLeftDown,%
ZoomOutLeftUp,ZoomOutRight,ZoomOutRightDown,ZoomOutRightUp,%
ZoomOutUp,CombHorizontal,CombVertical}[Replace]{%
    \def\aeb@arg{#1}\ifx\aeb@arg\@empty
    \let\aeb@fsTran=\@empty\else
    \ifx\aeb@arg\aeb@NoTransition
        \def\aeb@fsTran{app.fs.defaultTransition = "";^^J}
    \else
    \def\aeb@fsTran{app.fs.defaultTransition = "#1";^^J}\fi\fi}
{\PackageWarning{aeb}{Bad choice, try again. Meanwhile,
    will use the default, Replace}%
    \def\aeb@fsTran{app.fs.defaultTransition = "Replace";^^J}}
\define@key{aebDefFS}{bgColor}[]{%
    \def\aeb@arg{#1}\ifx\aeb@arg\@empty

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -