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

📄 aeb_pro.dtx

📁 It uses latex to give question papers
💻 DTX
📖 第 1 页 / 共 5 页
字号:
%\iffalse
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% aeb_pro.sty package,                  2006-9-08      %%
%% Copyright (C) 2006  D. P. Story                      %%
%%   dpstory@acrotex.net                                %%
%%                                                      %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License        %%
%% Distributed from CTAN archives in directory          %%
%% macros/latex/base/lppl.txt; either version 1 of the  %%
%% License, or (at your option) any later version.      %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{aeb_pro}
%<package> [2008/07/19 v0.8h aeb_pro: A support package (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[dvipsone,colorlinks,hyperindex]{hyperref}
%\pdfstringdefDisableCommands{\let\\\textbackslash}
%\EnableCrossrefs \CodelineIndex
\begin{document}
  \GetFileInfo{aeb_pro.sty}
  \title{aeb\_pro\\as suggested by J\"{u}rgen Gilg}
  \author{D. P. Story\\
    Email: \texttt{dpstory@acrotex.net}}
  \date{processed \today}
  \maketitle
  \tableofcontents
  \let\Email\texttt
  \DocInput{aeb_pro.dtx}
  \PrintIndex
\end{document}
%</driver>
% \fi
% \MakeShortVerb{|}
% \StopEventually{}
%
% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let}
% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi}
% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup}
% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
% \DoNotIndex{\space,\@empty,\special}
%
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
% \section{Introduction}
%
% The \texttt{aeb\_pro} package uses JavaScript methods and
% techniques that require Acrobat~7.0 Professional for document
% assembly, and assumes the PDF document is created using the
% Acrobat~7.0 distiller application. It is also, what I call, the AeB
% Control Central. You can use \texttt{aeb\_pro} to load all your
% Acro\negthinspace\TeX packages in the correct order. If you don't
% use Acrobat Pro and distiller, then there is a \texttt{nopro}
% option, so you can still use the AeB Control Central feature, if
% you wish.
%
% \section{Declare Options}
%    \begin{macrocode}
%    \end{macrocode}
%    \begin{macrocode}
\RequirePackage{xkeyval}
%    \end{macrocode}
% \subsection{AeB Control Central}
%    \begin{macro}{web}
%    \begin{macro}{exerquiz}
%    \begin{macro}{dljslib}
%    \begin{macro}{eforms}
%    \begin{macro}{insdljs}
%    \begin{macro}{eq2db}
%    \begin{macro}{aebxmp}
%    \begin{macro}{hyperref}
%    \begin{macro}{graphicxsp}
%\changes{v0.8f}{2008/06/15 }
%{
%   Added \textsf{graphicxsp} to the list of support packages
%}
% AeB control central is simply a set of options for including the
% other members of the AeB family.  This assures that the package are
% loaded in the correct order. The values of teach of these option
% keys are the options of the packages they reference.
%
%    \begin{macrocode}
\@tfor\aeb@pcks:={web}{exerquiz}{dljslib}%
{eforms}{insdljs}{eq2db}{aebxmp}{hyperref}{graphicxsp}\do
{%
    \edef\aeb@pack@def{%
        \noexpand\define@key{aeb_pro.sty}{\aeb@pcks}[]%
        {%
            \expandafter\def\csname aeb@\aeb@pcks @opts\endcsname{##1}%
            \noexpand\PassOptionsToPackage{##1}{\aeb@pcks}%
        }%
    }\aeb@pack@def
}
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \end{macro}
%    \begin{macro}{driver}
% We provide a convenient way to pass the driver used, dvips or
% dvipsone. If the user chooses the web option, then he/she might
% have a \texttt{web.cfg} file, so using this option may not be
% needed, in this case.
%    \begin{macrocode}
\define@choicekey+{aeb_pro.sty}{driver}%
    {dvipsone,dvips,pdftex,dvipdfm,textures}{%
    \def\aeb@driver{#1}\ifx\aeb@driver\@empty\else
        \PassOptionsToPackage{#1}{web}
        \PassOptionsToPackage{#1}{exerquiz}
        \PassOptionsToPackage{#1}{hyperref}
        \PassOptionsToPackage{#1}{insdljs}
        \PassOptionsToPackage{#1}{eforms}
        \PassOptionsToPackage{#1}{graphicxsp}
    \fi
}{\PackageWarning{aeb}{Bad choice for the driver, permissible values
   are dvipsone and dvips. Try again}}
\let\aeb@driver\@empty
%    \end{macrocode}
%    \end{macro}
% \subsection{\texttt{uselayers} option}
%    \begin{macro}{uselayers}
% The document author wishes to use Optional Content Groups, a.k.a., layers.
%    \begin{macrocode}
\DeclareOptionX{uselayers}{\AtEndOfPackage{\aeb@InputAeBLayers}}
\def\aeb@InputAeBLayers{\InputIfFileExists{aeblayers.def}%
    {\typeout{aeb_pro: Inputting code for uselayers option}}%
    {\typeout{aeb_pro: Cannot find aeblayers.def.
        Reinstall or refresh your file name database.}}}
%    \end{macrocode}
%    \end{macro}
% \subsection{\texttt{nopro} option}
%    \begin{macro}{nopro}
% The \texttt{pro} option for \textsf{aeb\_pro} will bring in all the
% code that would require the use of the Distiller and Acrobat Pro,
% this is the default. The \texttt{nopro} cancels out the pro option.
% If the author wants to use AeB Control Central feature only.
%    \begin{macrocode}
% \DeclareOptionX{pro}{\AtEndOfPackage{\@inputAeBPro}}
\def\aeb@InputAeBPro{\InputIfFileExists{aebpro.def}%
    {\typeout{aeb_pro: Inputting code for the pro option}}%
    {\typeout{aeb_pro: Cannot find aebpro.def.
        Reinstall or refresh your file name database, as needed.}}}
\AtEndOfPackage{\aeb@InputAeBPro}
\DeclareOptionX{nopro}{%
    \let\aeb@InputAeBPro\@empty
    \PackageWarningNoLine{aeb_pro}{%
    The nopro option was taken.\MessageBreak
    Page and document events, fullscreen\MessageBreak
    and attachments are not available.\MessageBreak
    If you wish some of these features,\MessageBreak
    remove the nopro option}%
}
%    \end{macrocode}
%    \end{macro}
% \subsection{\texttt{gopro} option}
%    \begin{macro}{gopro}
% Some of the components of AeB have the pro option. Use \texttt{gopro} to
% pass the \texttt{pro} option to all components that take it.
%    \begin{macrocode}
\DeclareOptionX{gopro}{\PassOptionsToPackage{pro}{web}}
%    \end{macrocode}
%    \end{macro}
% \subsection{\texttt{attachsource} option}
%    \begin{macro}{attachsource}
% A simple interface to attaching the source file(s) of \cs{jobname}.
%    \begin{macrocode}
\DeclareOptionX{attachsource}{\def\aeb@attachsource{#1}}
\let\aeb@attachsource\@empty
%    \end{macrocode}
%    \end{macro}
% \subsection{\texttt{attachments} option}
%    \begin{macro}{attachments}
% A general routine for attaching files other than the \cs{jobname}.
%    \begin{macrocode}
\DeclareOptionX{attachments}{\def\aeb@attachments{#1}}
\let\aeb@attachments\@empty
%    \end{macrocode}
%    \end{macro}
% \subsection{\texttt{linktoattachments} and \texttt{latin1} option}
%    \begin{macro}{linktoattachments}
%    \begin{macro}{latin1}
% A general routine for linking to attached PDF files. The latin1 option
% is only available if you take the \texttt{linktoattachments} options.
%    \begin{macrocode}
\def\@aeb@InputUnicodes{\InputIfFileExists{unicodes.def}%
    {\typeout{aeb_pro: Inputting code for the linktoattachments option}}%
    {\typeout{aeb_pro: Cannot find unicodes.def.
        Reinstall or refresh your file name database, as needed.}}}
\let\aeb@InputUnicodes\@empty
\def\aeb@InputUnicodesi{\InputIfFileExists{unicodes1.def}%
    {\typeout{aeb_pro: Inputting code for the latin1 option}}%
    {\typeout{aeb_pro: Cannot find unicodes1.def.
        Reinstall or refresh your file name database, as needed.}}}
\DeclareOptionX{linktoattachments}{%
    \let\aeb@InputUnicodes\@aeb@InputUnicodes
    \AtEndOfPackage{\aeb@InputUnicodes}%
}
\DeclareOptionX{latin1}{%
    \AtEndOfPackage{%
    \ifx\aeb@InputUnicodes\@empy\else
        \aeb@InputUnicodesi\fi
    }}
\DeclareOptionX{childof}{%
    \def\aeb@childof{#1}%
    \AtEndOfPackage{\InputIfFileExists{\aeb@childof_xref.cut}{}{}}%
}
\let\aeb@childof\@empty
%    \end{macrocode}
%    \end{macro}
%    \end{macro}
% We allow for a configuration file, usually of the form
%\begin{verbatim}
%\ExecuteOptions{driver=<driver>} % dvips, dvipsone, pdftex, dvipdfm
%\end{verbatim}
% For the last two, AeB Pro can only act as a central control of
% the AeB Family.
%    \begin{macrocode}
\InputIfFileExists{aebpro.cfg}{}{}
%    \end{macrocode}
%    \begin{macrocode}
\ProcessOptionsX
%    \end{macrocode}
% Check for correct driver if the pro option is still in effect.
%    \begin{macrocode}
\let\aeb@continue\relax
\ifx\aeb@InputAeBPro\@empty
\else
    \ifx\aeb@driver\@empty % no driver specified
    \else
        \def\aeb@testdriver{dvips}%
        \ifx\aeb@testdriver\aeb@driver % ok to continue
        \else
            \def\aeb@testdriver{dvipsone}%
            \ifx\aeb@testdriver\aeb@driver % ok to continue
            \else
                \PackageError{aeb_pro}{%
                   You have not specified the dvips or dvipsone driver.%
                   \MessageBreak The pro option requires one of these
                   two drivers
                }{%
                   Specify dvips or dvipsone as the value of the driver
                   key\MessageBreak or specify the nopro option
                }%
                \let\aeb@continue\endinput
            \fi
        \fi
    \fi
\fi
\aeb@continue
%    \end{macrocode}
% \section{Package requirements}
% AeB builds on the \textsf{web} package to a certain extent, hence requires \textsf{insdljs}.
%    \begin{macrocode}
\@ifpackageloaded{web}{}
{%
    \def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
    \@ifundefined{aeb@web@opts}{}
    {\RequirePackage{web}}%
}
\@ifpackageloaded{exerquiz}{}
{%
    \@ifundefined{aeb@exerquiz@opts}{}
    {\RequirePackage{exerquiz}}%
}
\@ifpackageloaded{hyperref}{}
{%
    \@ifundefined{aeb@hyperref@opts}{}
    {\usepackage{hyperref}}%
}
\@ifpackageloaded{eq2db}{}
{%
    \@ifundefined{aeb@eq2db@opts}{}
    {\RequirePackage{eq2db}}%
}
\@ifpackageloaded{dljslib}{}
{%
    \@ifundefined{aeb@dljslib@opts}{}
    {\RequirePackage{dljslib}}%
}
\@ifpackageloaded{insdljs}{\let\execjs=y}
{%
    \RequirePackage[execJS]{insdljs}%
}
\@ifpackageloaded{eforms}{\let\execjs=y}
{%
    \@ifundefined{aeb@eforms@opts}{}
    {\RequirePackage[execJS]{eforms}}%
}
\@ifpackageloaded{aebxmp}{}
{%
    \@ifundefined{aeb@aebxmp@opts}{}
    {\RequirePackage{aebxmp}}%
}
\@ifpackageloaded{graphicxsp}{}
{%
    \@ifundefined{aeb@graphicxsp@opts}{}
    {\RequirePackage{graphicxsp}}%
}
\let\execjs=y
\RequirePackage{comment}
\RequirePackage{calc}
\RequirePackage{eso-pic}
%    \end{macrocode}
% The following write command is used by both the layers stuff, and the attachments routines.
%    \begin{macrocode}
\def\aeb@IWVO{\immediate\write\verbatim@out}
%    \end{macrocode}
%    \begin{macrocode}
%</package>
%<*aeblayers>
%    \end{macrocode}
%    \begin{macrocode}
%    \end{macrocode}
% \section{Support for OCG}
% We place PostScript code in the document that supports OCG.
% \subsection{Initialization}
%    \begin{macrocode}
\newif\ifaeb@ocOn \aeb@ocOntrue
\ifaeb@ocOn
\AtBeginDocument{%
\headerps@out{%
{/OCProcSet /ProcSet findresource} stopped not
{/initialize get exec}
{
/BeginOC /pop load def
/EndOC {} def

⌨️ 快捷键说明

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