summaryrefslogtreecommitdiff
path: root/texmf-dist/source/latex/rmannot/rmannot.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'texmf-dist/source/latex/rmannot/rmannot.dtx')
-rw-r--r--texmf-dist/source/latex/rmannot/rmannot.dtx2674
1 files changed, 1453 insertions, 1221 deletions
diff --git a/texmf-dist/source/latex/rmannot/rmannot.dtx b/texmf-dist/source/latex/rmannot/rmannot.dtx
index d07cdbc0..e33ac22b 100644
--- a/texmf-dist/source/latex/rmannot/rmannot.dtx
+++ b/texmf-dist/source/latex/rmannot/rmannot.dtx
@@ -2,24 +2,23 @@
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% rmannot.sty package, %%
-%% Copyright (C) 2008--2016 D. P. Story %%
+%% Copyright (C) 2008--2020 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 %%
+%% macros/latex/base/lppl.txt; either vers ion 1 of the %%
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{rmannot}
-%<package> [2016/10/09 v2.0e Rich Media Annotations (dps)]
+%<package> [2020/08/21 v2.2 Rich Media Annotations (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
-%\def\texorpdfstring#1#2{#1}
-%\pdfstringdefDisableCommands{\let\\\textbackslash}
+\usepackage{fancyvrb}
\OnlyDescription % comment out for implementation details
\EnableCrossrefs
\CodelineIndex
@@ -29,6 +28,22 @@
\PackageInfo{web}{aebdocfmt.def cannot be found}}
\def\AcroFLeX{AcroF\kern-.1667em\lower.5ex\hbox{L}\kern-.3eme\kern-.125emX\@}
\def\AcroTeX{Acro\negthinspace\TeX}
+\def\CMD#1{\textbackslash#1}
+\let\pkg\textsf
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\let\key\texttt
+\def\visispace{\symbol{32}}
+\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
+\def\meta#1{\textsl{\texttt{#1}}}
+\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
+\def\darg#1{\texttt{\char123\relax#1\char125\relax}}
+\makeatletter
+\renewcommand{\paragraph}
+ {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt}
+ {\normalfont\normalsize\bfseries}}
+\makeatletter
\begin{document}
\def\CMD#1{\textbackslash#1}
\GetFileInfo{rmannot.sty}
@@ -62,15 +77,21 @@
% The \texttt{rmannot} package was written, in part, to support the {\AcroFLeX} Graphing package;
% however, this package has wider application. The \texttt{rmannot} package supports the creation of
% rich media annotations (\texttt{RichMedia}), and the embedding of \textsf{SWF} and \textsf{FLV} files in a \textsf{PDF}. \textsf{SWF}
-% animations and \textsf{FLV} video can then be played within PDF viewed within version 9 (or later) of Adobe Reader
-% and Acrobat.
+% animations and \textsf{FLV} video can then be played within PDF viewed within version 9 (or later) of \app{Adobe Reader}
+% and \app{Acrobat}.
%
-% Source material for the creation of this package is document \textsl{Adobe Supplement to the
+% Source material for the creation of this package is \textsl{Adobe Supplement to the
% ISO 32000}, June 2008. This document contains the PDF specification of rich media annotations.
-% Beginning with version 9, Adobe Reader and Acrobat contain a Adobe Flash Player, which will
+%
+% \paragraph*{Version~9 or later.}
+% Beginning with version 9, \app{Adobe Reader} and \app{Acrobat} contain a Adobe Flash Player, which will
% play \textsf{SWF}, \textsf{FLV}, \textsf{MP3} files, and a number of other formats that
% need to be H.264 encoded.
%
+% \paragraph*{After December 2020.} Adobe drops its support for Flash player (\textsf{SWF} and \textsf{FLV} files) after December 2020;
+% however, this package still works for H.264 encoded videos, including \textsf{MOV}, \textsf{MP4}, \textsf{M4V}, \textsf{3GP}, \textsf{3G2}, \textsf{F4V}.
+% The only audio file format supported is \textsf{MP3}.
+%
%\paragraph*{On the Topic of 3D.}
% Here is something that I've only just come to realize: If you use the UI, and you
% create a 3D annotation in Acrobat, then give it a SWF as a resource, the 3D annot
@@ -117,14 +138,86 @@
% Removed some spurious spaces from \string\cs{rmAnnot}}
% \begin{macrocode}
\RequirePackage{xkeyval}
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+\let\rm@One=1 \let\rm@Zero=0
+% \end{macrocode}
+% (2020/08/21) We test for non-pdfmark drivers, if present, we make minimal
+% package definitions, define all relevant commands to display their \ameta{text}
+% argument. In this way, \app{pdflatex}, \app{lualatex}, and \app{xelatex} can be used
+% to preview the document, perhaps viewing the results in \app{SumatraPDF}.
+% \begin{macrocode}
+\ifpdf
+ \let\RM@action\endinput
+\else
+ \ifxetex
+ \let\RM@action\endinput
+ \else
+ \let\RM@action\relax
+ \fi
+\fi
+\ifx\RM@action\endinput
+% \end{macrocode}
+% We provide definitions to all essential commands and environments
+% to, as best as we can, give a PDF that is viewable, but with no functionality.
+% \begin{macrocode}
+\RequirePackage{eforms}[2020/12/14]
+\DeclareOptionX*{}
+\ProcessOptionsX\relax
+%\let\AcroVer\@gobble
+\newcommand\AcroVer[2][]{}
+\let\saveNamedPath\@gobbletwo
+\def\rma@edefexecute#1{\edef\rm@@temp@@exp{#1}\rm@@temp@@exp}
+\newcommand\makePoster[3][]{}
+\define@key{rmAnnot}{width}{\def\rmAnnot@width{#1}}
+\define@key{rmAnnot}{scale}{\def\rmAnnot@scale{#1}}
+\let\rmAnnot@width\@empty
+\define@key{rmAnnot}{height}{\def\rmAnnot@height{#1}}
+\let\rmAnnot@height\@empty
+\newcommand{\rmAnnot}[4][]{%
+ \bgroup
+ \setlength{\dimen@}{#2}\xdef\rm@Annot@width{\the\dimen@}%
+ \setlength{\dimen@}{#3}\xdef\rm@Annot@height{\the\dimen@}%
+ \egroup
+ \rma@edefexecute{\noexpand\setkeys*{rmAnnot}{#1}}%
+ \bgroup
+ \ifx\rmAnnot@width\@empty
+ \ifx\rmAnnot@height\@empty
+ \else
+ \setlength{\dimen@}%
+ {\rmAnnot@height*\ratio
+ {\rm@Annot@width}{\rm@Annot@height}}%
+ \xdef\rm@Annot@width{\the\dimen@}%
+ \setlength{\dimen@}{\rmAnnot@height}%
+ \xdef\rm@Annot@height{\the\dimen@}%
+ \fi
+ \else
+ \setlength{\dimen@}%
+ {\rmAnnot@width*\ratio
+ {\rm@Annot@height}{\rm@Annot@width}}%
+ \xdef\rm@Annot@height{\the\dimen@}%
+ \setlength{\dimen@}{\rmAnnot@width}%
+ \xdef\rm@Annot@width{\the\dimen@}%
+ \fi
+ \egroup
+ {\previewOn\pushButton[\CA{Distiller required}\BC{}\BG{}
+ \S{S}\Ff{\FfReadOnly}]{btn}{\rm@Annot@width}{\rm@Annot@height}}}
+\def\setRmOptions3D#1#2{}
+\PackageWarningNoLine{rmannot}
+ {PDF creation requires Adobe Distiller.\MessageBreak
+ Workflow is latex > dvips > distiller; otherwise,\MessageBreak
+ this package does nothing}
+\fi
+\RM@action % \endinput or \relax
% \end{macrocode}
+% \section{Options of this package}
% When the \texttt{use3D}\IndexOpt{use3D}option is invoked, the \texttt{annot3d.def} code file is
% input at the end of the package, and the \texttt{fp} package is loaded,
% is package is used to calculate the views matrices.
% \begin{macrocode}
\DeclareOptionX{use3D}{%
- \def\rma@input@iiidCode{\InputIfFileExists{annot3d.def}{}{}}%
- \def\rma@requirefp{\RequirePackage[nomessages]{fp}}%
+ \def\rma@input@iiidCode{\InputIfFileExists{annot3d.def}{}{}}%
+ \def\rma@requirefp{\RequirePackage[nomessages]{fp}}%
}
\let\rma@input@iiidCode\relax
\let\rma@requirefp\relax
@@ -150,9 +243,9 @@
% \begin{macrocode}
\newif\ifrma@EmbedFile\rma@EmbedFiletrue
\newif\ifrma@EmbedVideoPlayer\rma@EmbedVideoPlayerfalse
-\let\rma@isVPEmbedded=0
+\let\rma@isVPEmbedded\rm@Zero
\newif\ifrma@EmbedAudioPlayer\rma@EmbedAudioPlayerfalse
-\let\rma@isAPEmbedded=0
+\let\rma@isAPEmbedded\rm@Zero
% \end{macrocode}
% We use a utility command, taken and renamed from the \texttt{comment} package.
% \begin{macrocode}
@@ -170,11 +263,13 @@
% case future releases move the players elsewhere; in this case,
% \cs{pathToPlayers} must be executed after \cs{pathToSkins}.
%\changes{v2.0a}{2011/09/11}{Arguments now pass through \cs{pdfstringdef}}
+%\changes{v2.0.6}{2018/03/21}{Placed \string\cs{pathToSkins} in a group
+% and disallowed unicode encoding by hyperref}
% \begin{macrocode}
-\newcommand{\pathToSkins}[1]{%
- \pdfstringdef\rma@pathToSkins{#1}%
- \def\PathToSkins{\rma@pathToSkins}%
- \def\rma@pathToPlayers{\rma@pathToSkins/Players}%
+\newcommand{\pathToSkins}[1]{\begingroup
+ \Hy@unicodefalse\pdfstringdef\rma@pathToSkins{#1}%
+ \gdef\PathToSkins{\rma@pathToSkins}%
+ \gdef\rma@pathToPlayers{\rma@pathToSkins/Players}\endgroup
}
% \end{macrocode}
%\changes{v2.0b}{2015/09/30}{Added \cs{AcroVer} and a more intelligent method
@@ -185,98 +280,107 @@
% Typically, the argument of \cs{AcroVer} is a number, \texttt{9},
% \texttt{10}, \texttt{11}, but beginning with the DC versions
% is can be \texttt{2015} (classic) or \texttt{DC} (subscription).
+% \changes{v2.2}{2020/08/21}{Added 32 and 64 as values of the \string\key{win}
+% key of \string\cs{AcroVer}}
% \begin{macrocode}
\newif\ifuseWinAcrobat\useWinAcrobattrue
-\define@key{rmAcroVer}{win}[win]{\useWinAcrobattrue}
+\define@choicekey{rmAcroVer}{win}{32,64}[32]{%
+ \appType{#1}\useWinAcrobattrue}
\define@key{rmAcroVer}{mac}[mac]{\useWinAcrobatfalse}
% \end{macrocode}
% The syntax is \texttt{\cs{AcroVer}[win\string|mac]\{ver\}}
% \begin{macrocode}
+\def\appType#1{\def\@rgi{#1}\def\@tstii{64}%
+ \def\p@thHash{ (x86)}\ifx\@rgi\@tstii\let\p@thHash\@empty\fi
+}
+\def\p@thHash{ (x86)}
\newcommand{\AcroVer}[2][]{%
- \def\rmDC{DC}\def\rmBeta{Beta}\def\rmArgi{#1}%
- \def\AcrobatVer{#2}\ifx\rmArgi\@empty\else
- \setkeys{rmAcroVer}{#1}\fi\def\@x{\string\ }%
+ \def\rmDC{DC}\def\rmBeta{Beta}\def\rmArgi{#1}%
+ \def\AcrobatVer{#2}\ifx\rmArgi\@empty\else
+ \setkeys{rmAcroVer}{#1}\fi\def\@x{\string\ }%
% \end{macrocode}
% If this is the \texttt{DC} version, we handle appropriately
% \begin{macrocode}
- \ifx\AcrobatVer\rmDC
- \ifuseWinAcrobat
- \edef\rmSkinPath{C:/Program Files (x86)/Adobe/Acrobat DC/%
- Acrobat/Multimedia Skins}\else
- \edef\rmSkinPath{/Applications/Adobe{\@x}Acrobat{\@x}DC/%
- Adobe{\@x}Acrobat.app/Contents/Resources/%
- Multimedia{\@x}Skins}\fi
- \else\ifx\AcrobatVer\rmBeta
- \ifuseWinAcrobat
- \edef\rmSkinPath{C:/Program Files (x86)/Adobe/Acrobat Beta/%
- Acrobat/Multimedia Skins}\else
- \edef\rmSkinPath{/Applications/Adobe{\@x}Acrobat{\@x}Beta/%
- Adobe{\@x}Acrobat.app/Contents/Resources/%
- Multimedia{\@x}Skins}\fi
+ \ifx\AcrobatVer\rmDC
+ \ifuseWinAcrobat
+ \edef\rmSkinPath{C:/Program Files\p@thHash/Adobe/Acrobat DC/%
+ Acrobat/Multimedia Skins}\else
+ \edef\rmSkinPath{/Applications/Adobe{\@x}Acrobat{\@x}DC/%
+ Adobe{\@x}Acrobat.app/Contents/Resources/%
+ Multimedia{\@x}Skins}\fi
+ \else\ifx\AcrobatVer\rmBeta
+ \ifuseWinAcrobat
+ \edef\rmSkinPath{C:/Program Files\p@thHash/Adobe/Acrobat Beta/%
+ Acrobat/Multimedia Skins}\else
+ \edef\rmSkinPath{/Applications/Adobe{\@x}Acrobat{\@x}Beta/%
+ Adobe{\@x}Acrobat.app/Contents/Resources/%
+ Multimedia{\@x}Skins}\fi
% \end{macrocode}
% If \cs{AcrobatVer} is not \texttt{DC} or \texttt{Beta} it is a number. Possible values are
% \texttt{9}, \texttt{10}, \texttt{11}, \texttt{2015}, \texttt{2016},...
% \begin{macrocode}
- \else\ifnum\AcrobatVer<9\relax
- \PackageError{rmannot}{Acrobat version 9 or later
- supports\MessageBreak rich multimedia annotations}
- {Upgrade your Acrobat to a more recent version.}%
+ \else
+ \ifnum\AcrobatVer<9\relax
+ \PackageError{rmannot}{Acrobat version 9 or later
+ supports\MessageBreak rich multimedia annotations}
+ {Upgrade your Acrobat to a more recent version.}%
\else
- \ifuseWinAcrobat
+ \ifuseWinAcrobat
% \end{macrocode}
% We are on a Windows OS machine
% \begin{macrocode}
- \ifnum\AcrobatVer<12\relax
+ \ifnum\AcrobatVer<12\relax
% \end{macrocode}
% When version is less than 12, the version numbers are decimal numbers,
% \texttt{9.0}, \texttt{10.0}, \texttt{11.0}. We append `\texttt{.0}' to the end of \cs{AcrobatVer}.
% \begin{macrocode}
- \edef\rmSkinPath{C:/Program Files (x86)/Adobe/%
- Acrobat \AcrobatVer.0/Acrobat/Multimedia Skins}%
- \else
+ \edef\rmSkinPath{C:/Program Files (x86)/Adobe/%
+ Acrobat \AcrobatVer.0/Acrobat/Multimedia Skins}%
+ \else
% \end{macrocode}
% When version is greater than 12, the version is a year \texttt{2015}, etc.
% \begin{macrocode}
- \edef\rmSkinPath{C:/Program Files (x86)/Adobe/%
- Acrobat \AcrobatVer/Acrobat/Multimedia Skins}%
- \fi
- \else
+ \edef\rmSkinPath{C:/Program Files (x86)/Adobe/%
+ Acrobat \AcrobatVer/Acrobat/Multimedia Skins}%
+ \fi
+ \else
% \end{macrocode}
% We are on a Mac OS machine
% \begin{macrocode}
- \ifnum\AcrobatVer<12\relax
- \ifnum\AcrobatVer=9\relax
+ \ifnum\AcrobatVer<12\relax
+ \ifnum\AcrobatVer=9\relax
% \end{macrocode}
% Special path for version 9
% \begin{macrocode}
- \edef\rmSkinPath{/Applications/%
- Adobe{\@x}Acrobat{\@x}\AcrobatVer{\@x}Pro/%
- Adobe{\@x}Acrobat{\@x}Pro.app/Contents/%
- MacOS/Multimedia{\@x}Skins}%
- \else % ver 10 or 11
+ \edef\rmSkinPath{/Applications/%
+ Adobe{\@x}Acrobat{\@x}\AcrobatVer{\@x}Pro/%
+ Adobe{\@x}Acrobat{\@x}Pro.app/Contents/%
+ MacOS/Multimedia{\@x}Skins}%
+ \else % ver 10 or 11
% \end{macrocode}
% Versions 10 and 11 are referred to using roman numerical numbers (\texttt{X} and \texttt{XI})
% \begin{macrocode}
- \ifnum\AcrobatVer=10\relax\def\romanVer{X}\else
- \ifnum\AcrobatVer=11\relax\def\romanVer{XI}\fi\fi
- \edef\rmSkinPath{/Applications/%
- Adobe{\@x}Acrobat{\@x}\romanVer{\@x}Pro/%
- Adobe{\@x}Acrobat{\@x}Pro.app/Contents/%
- Resources/Multimedia{\@x}Skins}\fi
- \else
+ \ifnum\AcrobatVer=10\relax\def\romanVer{X}\else
+ \ifnum\AcrobatVer=11\relax\def\romanVer{XI}\fi\fi
+ \edef\rmSkinPath{/Applications/%
+ Adobe{\@x}Acrobat{\@x}\romanVer{\@x}Pro/%
+ Adobe{\@x}Acrobat{\@x}Pro.app/Contents/%
+ Resources/Multimedia{\@x}Skins}%
+ \fi
+ \else
% \end{macrocode}
% \cs{AcroVer} is greater than 12, it must be a year, \texttt{2015}, \texttt{2016}, etc.
% \begin{macrocode}
- \edef\rmSkinPath{/Applications/%
- Adobe{\@x}Acrobat{\@x}\AcrobatVer/%
- Adobe{\@x}Acrobat.app/Contents/Resources/%
- Multimedia{\@x}Skins}%
- \fi
- \fi\fi\fi\fi
- \expandafter\pathToSkins\expandafter{\rmSkinPath}%
+ \edef\rmSkinPath{/Applications/%
+ Adobe{\@x}Acrobat{\@x}\AcrobatVer/%
+ Adobe{\@x}Acrobat.app/Contents/Resources/%
+ Multimedia{\@x}Skins}%
+ \fi
+ \fi\fi\fi\fi
+ \expandafter\pathToSkins\expandafter{\rmSkinPath}%
}
\@onlypreamble\AcroVer
-\AcroVer{11}
+\AcroVer{DC}
\newcommand{\pathToPlayers}[1]{\pdfstringdef\rma@pathToPlayers{#1}}
% \end{macrocode}
% \end{macro}
@@ -286,12 +390,12 @@
% Special characters are made safe to use. The command takes two arguments, the first
% is the control sequence of the path you want to define; the second argument is
% the path. For example,
-%\begin{verbatim}
-% \defineRMPath{\myURLRMFiles}{http://www.example.com/~dpspeaker/videos}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,codes={\catcode`\%=9}]
+%\defineRMPath{\myURLRMFiles}{http://www.example.com/~dpspeaker/videos}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand{\defineRMPath}[1]{\def\rm@ctrlName{#1}%
- \hyper@normalise\rm@defineURLPath}
+ \hyper@normalise\rm@defineURLPath}
\def\rm@defineURLPath#1{\expandafter\xdef\rm@ctrlName{#1}}
% \end{macrocode}
% \end{macro}
@@ -308,15 +412,15 @@
\newif\ifVideoPlayerEx\VideoPlayerExfalse
\def\rma@VideoPlayer{VideoPlayer.swf}
\newcommand{\useVideoPlayerPlus}{%
- \PackageWarning{rmannot}{The \string\useVideoPlayerPlus\space
- is no longer supported,\MessageBreak
- will use \string\useVideoPlayX\space instead.
- In the future\MessageBreak
- specify \string\useVideoPlayX}%
+ \PackageWarning{rmannot}{The \string\useVideoPlayerPlus\space
+ is no longer supported,\MessageBreak
+ will use \string\useVideoPlayX\space instead.
+ In the future\MessageBreak
+ specify \string\useVideoPlayX}%
% \end{macrocode}
% Use \texttt{VideoPlayerX.swf} instead.
% \begin{macrocode}
- \useVideoPlayerX
+ \useVideoPlayerX
}
% \end{macrocode}
% \end{macro}
@@ -325,8 +429,8 @@
% \begin{NoHyper}\url{http://www.uvsar.com/projects/acrobat/videoplayerx/}\end{NoHyper}.
% \begin{macrocode}
\newcommand{\useVideoPlayerX}{\VideoPlayerExtrue
- \def\rma@VideoPlayer{VideoPlayerX.swf}%
- \let\useVideoPlayerPlus\relax
+ \def\rma@VideoPlayer{VideoPlayerX.swf}%
+ \let\useVideoPlayerPlus\relax
}
% \end{macrocode}
% \cs{useVideoPlayerPlus} and \cs{useVideoPlayerX} allowed only in the preamble.
@@ -372,23 +476,23 @@
% include \cs{mmSkinAutoHide}; hence, there is no reason to even use
% \textbf{VideoPlayerPlus}, which we now don't anymore.
% \begin{macrocode}
- \def\mmSetStageColor{"multimedia_setStageColor"}
- \def\mmIsLooping{"multimedia_isLooping"}
- \def\mmSkinAutoHide{"multimedia_skinAutoHide"}
+\def\mmSetStageColor{"multimedia_setStageColor"}
+\def\mmIsLooping{"multimedia_isLooping"}
+\def\mmSkinAutoHide{"multimedia_skinAutoHide"}
% \end{macrocode}
% Version 10.4 of \textbf{VPX} added the following function.
% \changes{v2.0d}{2016/10/09}{Added 10.4 function \string\cs{mmShowLoopButton}}
% \begin{macrocode}
- \def\mmShowLoopButton{"multimedia_showLoopButton"}
+\def\mmShowLoopButton{"multimedia_showLoopButton"}
% \end{macrocode}
% The \textbf{VPX} is a superset of the API of the core and \textbf{VPPlus}; there is
% actually no reason to use the \textbf{VPPlus} anymore.\par\medskip
%
% \noindent\textbf{Usage:} The following example sets the source for the RMA to play.
-%\begin{verbatim}
-% var rm=this.getAnnotRichMedia(this.pageNum, "myRMA");
-% rm.callAS(\mmSource, "myVideo");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9}]
+%var rm=this.getAnnotRichMedia(this.pageNum, "myRMA");
+%rm.callAS(\mmSource, "myVideo");
+%\end{Verbatim}
% The code is valid for \textbf{VPX}, for the basic \textbf{VPB}.
% Extensive examples may be found on the \textbf{AeB Blog}
% \begin{NoHyper}\url{http://blog.acrotex.net}\end{NoHyper}.
@@ -420,9 +524,9 @@
\string\@MXV@newlabel{@#1@}{\@MXV@getlabelvalue{#1}}%
}\@esphack%
\ifthenelse{%
- \equal{\@MXV@getlabelvalue{#1}}{undefined}\OR%
+ \equal{\@MXV@getlabelvalue{#1}}{undefined}\or%
%double check that the value hasn't changed
- \NOT\equal{\@MXV@getlabelvalue{#1}}{\@MXV@getlabelvalue{@#1@}}%
+ \not\equal{\@MXV@getlabelvalue{#1}}{\@MXV@getlabelvalue{@#1@}}%
}{%
% \end{macrocode}
% Issue warning only once, at end of document
@@ -465,19 +569,25 @@
% macro is used in \cs{rm@saveNamedPath}.
% \begin{macrocode}
\def\rma@embed@mpiii@Poster{%
- \embedEPS[hiresbb]{ramp3poster}{ramp3poster}%
- \global\let\rma@embed@mpiii@Poster\relax
+ \embedEPS[hiresbb]{ramp3poster}{ramp3poster}%
+ \global\let\rma@embed@mpiii@Poster\relax
}
% \end{macrocode}
+% The default legacy dimensions of the MP3 control, these are \DescribeMacro{\audCtrlWd}
+% and \DescribeMacro{\audCtrlHt}.
+% \begin{macrocode}
+\def\audCtrlWd{613bp}\let\cntrlbrWd\audCtrlWd
+\def\audCtrlHt{66bp}\let\cntrlbrHt\audCtrlHt
+% \end{macrocode}
% This is the \textsf{MP3} poster image, but we'll only use it once. The command
% redefines itself to \cs{relax}.
% \begin{macrocode}
\def\rma@set@mpiiiposter{%
- \begin{sp@createImage}{\bboxOf{ramp3poster}}{nramp3poster}%
- \rma@invisible
- \ps@mark{ramp3poster} /SP pdfmark
- \end{sp@createImage}%
- \global\let\rma@set@mpiiiposter\relax
+ \begin{sp@createImage}{\bboxOf{ramp3poster}}{nramp3poster}%
+ \rma@invisible
+ \ps@mark{ramp3poster} /SP pdfmark
+ \end{sp@createImage}%
+ \global\let\rma@set@mpiiiposter\relax
}
% \end{macrocode}
% \DescribeMacro{\saveNamedPath} \textbf{Syntax:} \verb!\saveNamedPath[<MimeType>]{<name>}{<path>}!\\
@@ -485,24 +595,24 @@
% changed this to \cs{@empty}.
% \begin{macrocode}
\newcommand{\saveNamedPath}[2][]{%
- \edef\rm@argii{#2}\@ifundefined{rma@@#2}%
- {\gdef\rm@thisPath{rma@@#2}}{\rma@PkEr@ii}%
- \gdef\rm@thisMimeType{#1}%
- \hyper@normalise\rm@saveNamedPath
+ \edef\rm@argii{#2}\@ifundefined{rma@@#2}%
+ {\gdef\rm@thisPath{rma@@#2}}{\rma@PkEr@ii}%
+ \gdef\rm@thisMimeType{#1}%
+ \hyper@normalise\rm@saveNamedPath
}
\def\rm@saveNamedPath#1{%
- \rm@csarg\gdef{\rm@thisPath}{#1}%
- \rm@csarg\xdef{rma@mt@\rm@argii}{\rm@thisMimeType}%
+ \rm@csarg\gdef{\rm@thisPath}{#1}%
+ \rm@csarg\xdef{rma@mt@\rm@argii}{\rm@thisMimeType}%
% \end{macrocode}
% We check to see if this is an \textsf{MP3} file. If so, we embed the screen shot
% of the \texttt{AudioPlayer} controls as a default poster. The graphic file
% \texttt{ramp3poster.eps} needs to be on the graphics search path of \LaTeX.
% \begin{macrocode}
- \rma@edefexecute{\noexpand\filename@parse{#1}}%
- \@ifundefined{filename@ext}{\rma@PkEr@iii{#1}}{}%
- \rma@edefexecute{\noexpand
- \uppercase{\noexpand\def\noexpand\rma@tempi
- {\filename@ext}}}
+ \rma@edefexecute{\noexpand\filename@parse{#1}}%
+ \@ifundefined{filename@ext}{\rma@PkEr@iii{#1}}{}%
+ \rma@edefexecute{\noexpand
+ \uppercase{\noexpand\def\noexpand\rma@tempi
+ {\filename@ext}}}
% \end{macrocode}
% We define the filename with extension under a convenience command. Authors
% are encouraged to use this command when referencing an embedded file
@@ -512,14 +622,14 @@
% that appears in the \textbf{Resources} tab of the \textbf{Edit Flash}
% under \textbf{Name}.
% \begin{macrocode}
- \rm@csarg\xdef{\rm@argii FileName}{%
- \filename@base.\filename@ext}%
- \rm@csarg\xdef{\rm@argii URL}{%
- \filename@area\filename@base.\filename@ext}%
+ \rm@csarg\xdef{\rm@argii FileName}{%
+ \filename@base.\filename@ext}%
+ \rm@csarg\xdef{\rm@argii URL}{%
+ \filename@area\filename@base.\filename@ext}%
% \end{macrocode}
% Embed the file \texttt{ramp3poster.eps}. \textsf{GraphicxSP} required.
% \begin{macrocode}
- \ifx\rma@tempi\rma@rmAnnot@type@mpiii\rma@embed@mpiii@Poster\fi
+ \ifx\rma@tempi\rma@rmAnnot@type@mpiii\rma@embed@mpiii@Poster\fi
}
% \end{macrocode}
% \cs{rma@useNamedPath} is used internally to access the path through its name.
@@ -533,7 +643,7 @@
% are let to \cs{rma@resource} and to \cs{rma@urlresource}, respectively.
% \begin{macrocode}
\expandafter\def\expandafter\makeJSspecials\expandafter{\makeJSspecials
- \let\Name\rma@resource\let\urlName\rma@urlresource
+ \let\Name\rma@resource\let\urlName\rma@urlresource
}
% \end{macrocode}
% \begin{macro}{\rmaName}
@@ -560,21 +670,21 @@
% later).\par\medskip\noindent \texttt{(2011/11/03)} Added support for
% \textsf{MP4}, \textsf{M4V}, \textsf{MOV}, \textsf{3GP}, \textsf{3G2}, all
% require \textsf{H.264} encoding; if these files do not have
-% \textsf{H.264} encoding, rmannot/distiller will embed anyway, but the
+% \textsf{H.264} encoding, \pkg{rmannot}/\app{distiller} will embed anyway, but the
% video will not play. (2011/12/10) Added \textsf{U3D} and \textsf{PRC} to the list of
% file types supported.
% \begin{macrocode}
\def\getargsiii#1#2#3{\def\aeb@argi{#1}\def\aeb@argii{#2}%
- \def\aeb@argiii{#3}}
+ \def\aeb@argiii{#3}}
\@tfor\rma@data:={{uiiid}{U3D}{model/u3d}}{{prc}{PRC}{model/prc}}%
- {{swf}{SWF}{application/x-shockwave-flash}}%
- {{flv}{FLV}{video/x-flv}}{{fiv}{F4V}{video/mp4}}%
- {{mpiv}{MP4}{video/mp4}}{{mivV}{M4V}{video/x-m4v}}%
- {{mov}{MOV}{video/quicktime}}{{iiiGP}{3GP}{video/3gpp}}%
- {{iiiGii}{3G2}{video/3gpp2}}{{mpiii}{MP3}{audio/x-mp3}}\do{%
- \expandafter\getargsiii\rma@data
- \rm@csarg\edef{rma@rmAnnot@type@\aeb@argi}{\aeb@argii}
- \rm@csarg\edef{rma@mimetype@\aeb@argi}{\aeb@argiii}
+ {{swf}{SWF}{application/x-shockwave-flash}}%
+ {{flv}{FLV}{video/x-flv}}{{fiv}{F4V}{video/mp4}}%
+ {{mpiv}{MP4}{video/mp4}}{{mivV}{M4V}{video/x-m4v}}%
+ {{mov}{MOV}{video/quicktime}}{{iiiGP}{3GP}{video/3gpp}}%
+ {{iiiGii}{3G2}{video/3gpp2}}{{mpiii}{MP3}{audio/x-mp3}}\do{%
+ \expandafter\getargsiii\rma@data
+ \rm@csarg\edef{rma@rmAnnot@type@\aeb@argi}{\aeb@argii}
+ \rm@csarg\edef{rma@mimetype@\aeb@argi}{\aeb@argiii}
}
% \end{macrocode}
% \leavevmode\IndexKey{VideoPlayer}\IndexKey{AudioPlayer}
@@ -589,30 +699,33 @@
% definitions to the beginning of the document.
% \begin{macrocode}
\def\rm@SkinsAndPlayerPaths{%
- \saveNamedPath{VideoPlayer}{\PathToSkins/Players/\rma@VideoPlayer}%
- \saveNamedPath{AudioPlayer}{\PathToSkins/Players/AudioPlayer.swf}%
+ \saveNamedPath{VideoPlayer}{\PathToSkins/Players/\rma@VideoPlayer}%
+ \saveNamedPath{AudioPlayer}{\PathToSkins/Players/AudioPlayer.swf}%
% \end{macrocode}
-% \leavevmode\IndexKey{skin1}\IndexKey{skin2}\IndexKey{skin3}^^A
-% \IndexKey{skin4}\IndexKey{skin5}\IndexKey{skin6}^^A
+% \leavevmode\IndexKey{skin1}\IndexKey{all}\IndexKey{skin2}\IndexKey{skin3}^^A%
+% \IndexKey{skin4}\IndexKey{skin5}\IndexKey{skin6}^^A%
% \IndexKey{skin7}We predefine the seven skins, these should also be
% used as resources of \cs{rmAnnot} when either \texttt{VideoPlayerPlus} or
% \texttt{VideoPlayerX} is used, and when the skins are to be changed dynamically.
+% \changes{v2.2}{2020/08/21}{Added an \string\texttt{all} skin}
% \begin{macrocode}
- \saveNamedPath{skin1}{\PathToSkins/SkinOverAllNoFullNoCaption.swf}%
- \saveNamedPath{skin2}%
- {\PathToSkins/SkinOverAllNoVolNoCaptionNoFull.swf}%
- \saveNamedPath{skin3}{\PathToSkins/SkinOverPlay.swf}%
- \saveNamedPath{skin4}{\PathToSkins/SkinOverPlayMute.swf}%
- \saveNamedPath{skin5}{\PathToSkins/SkinOverPlaySeekMute.swf}%
- \saveNamedPath{skin6}{\PathToSkins/SkinOverPlaySeekStop.swf}%
- \saveNamedPath{skin7}{\PathToSkins/SkinOverPlayStopSeekMuteVol.swf}%
+ \saveNamedPath{skin1}{\PathToSkins/SkinOverAllNoFullNoCaption.swf}%
+ \saveNamedPath{all}{\PathToSkins/SkinOverAllNoFullNoCaption.swf}%
+ \saveNamedPath{skin2}%
+ {\PathToSkins/SkinOverAllNoVolNoCaptionNoFull.swf}%
+ \saveNamedPath{skin3}{\PathToSkins/SkinOverPlay.swf}%
+ \saveNamedPath{skin4}{\PathToSkins/SkinOverPlayMute.swf}%
+ \saveNamedPath{skin5}{\PathToSkins/SkinOverPlaySeekMute.swf}%
+ \saveNamedPath{skin6}{\PathToSkins/SkinOverPlaySeekStop.swf}%
+ \saveNamedPath{skin7}{\PathToSkins/SkinOverPlayStopSeekMuteVol.swf}%
}
% \end{macrocode}
% Now, make all these path definitions at the beginning of the document.
% \begin{macrocode}
\AtBeginDocument{\rm@SkinsAndPlayerPaths}
% \end{macrocode}
-% \leavevmode\IndexKey{none}\IndexKey{noChange} Two special convenience definitions.
+% \leavevmode\IndexKey{none}\IndexKey{noChange}^^A%
+% Two special convenience definitions.
% We make definitions so that \verb!\Name{none}! and \verb!\urlName{none}!
% expand to \cs{@empty}; \verb!\Name{noChange}! and \verb!\urlName{none}!
% both expand to the string \texttt{noChange}.
@@ -684,11 +797,11 @@
% becomes visible).
% \begin{macrocode}
\define@choicekey+{rmAnnot}{enabled}[\val\nr]%
- {onclick,pageopen,pagevisible}[onclick]{%
- \ifcase\nr\relax
- \def\rma@rmAnnot@enabled{/XA}\or
- \def\rma@rmAnnot@enabled{/PO}\or
- \def\rma@rmAnnot@enabled{/PV}\fi
+ {onclick,pageopen,pagevisible}[onclick]{%
+ \ifcase\nr\relax
+ \def\rma@rmAnnot@enabled{/XA}\or
+ \def\rma@rmAnnot@enabled{/PO}\or
+ \def\rma@rmAnnot@enabled{/PV}\fi
}{\PackageWarning{rmannot}{Bad choice for enabled, permissible values
are onclick, pageopen and pagevisible. Try again}}
% \end{macrocode}
@@ -700,11 +813,11 @@
% invisible).
% \begin{macrocode}
\define@choicekey+{rmAnnot}{deactivated}[\val\nr]%
- {onclick,pageclose,pageinvisible}[onclick]{%
- \ifcase\nr\relax
- \def\rma@rmAnnot@deactivated{/XD}\or
- \def\rma@rmAnnot@deactivated{/PC}\or
- \def\rma@rmAnnot@deactivated{/PI}\fi
+ {onclick,pageclose,pageinvisible}[onclick]{%
+ \ifcase\nr\relax
+ \def\rma@rmAnnot@deactivated{/XD}\or
+ \def\rma@rmAnnot@deactivated{/PC}\or
+ \def\rma@rmAnnot@deactivated{/PI}\fi
}{\PackageWarning{rmannot}{Bad choice for deactivated, permissible
values are onclick, pageclose and pageinvisible. Try again}}
% \end{macrocode}
@@ -719,38 +832,38 @@
% \cs{setWindowDimPos} to set all these values.
% \begin{macrocode}
\define@key{winDimPos}{width}{\def\rma@winDimPos@width{#1}}
- \define@key{winDimPosWidth}{default}[288]%
- {\def\rma@winDimPosWidth@def{#1}}
- \define@key{winDimPosWidth}{max}[576]%
- {\def\rma@winDimPosWidth@max{#1}}
- \define@key{winDimPosWidth}{min}[72]%
- {\def\rma@winDimPosWidth@min{#1}}
+ \define@key{winDimPosWidth}{default}[288]%
+ {\def\rma@winDimPosWidth@def{#1}}
+ \define@key{winDimPosWidth}{max}[576]%
+ {\def\rma@winDimPosWidth@max{#1}}
+ \define@key{winDimPosWidth}{min}[72]%
+ {\def\rma@winDimPosWidth@min{#1}}
\define@key{winDimPos}{height}{\def\rma@winDimPos@height{#1}}
- \define@key{winDimPosHeight}{default}[216]%
- {\def\rma@winDimPosHeight@def{#1}}
- \define@key{winDimPosHeight}{max}[432]%
- {\def\rma@winDimPosHeight@max{#1}}
- \define@key{winDimPosHeight}{min}[72]%
- {\def\rma@winDimPosHeight@min{#1}}
+ \define@key{winDimPosHeight}{default}[216]%
+ {\def\rma@winDimPosHeight@def{#1}}
+ \define@key{winDimPosHeight}{max}[432]%
+ {\def\rma@winDimPosHeight@max{#1}}
+ \define@key{winDimPosHeight}{min}[72]%
+ {\def\rma@winDimPosHeight@min{#1}}
\define@key{winDimPos}{position}{\def\rma@winDimPos@position{#1}}
- \define@choicekey+{winDimPosPos}{halign}[\val\nr]%
- {near,center,far}[far]{%
- \ifcase\nr\relax
- \def\rma@winDimPosPos@halign{/Near}\or
- \def\rma@winDimPosPos@halign{/Center}\or
- \def\rma@winDimPosPos@halign{/Far}\fi
- }{}
- \define@choicekey+{winDimPosPos}{valign}[\val\nr]%
- {near,center,far}[near]{%
- \ifcase\nr\relax
- \def\rma@winDimPosPos@valign{/Near}\or
- \def\rma@winDimPosPos@valign{/Center}\or
- \def\rma@winDimPosPos@valign{/Far}\fi
- }{}
- \define@key{winDimPosPos}{hoffset}[18]%
- {\def\rma@winDimPosPos@hoffset{#1}}
- \define@key{winDimPosPos}{voffset}[18]%
- {\def\rma@winDimPosPos@voffset{#1}}
+ \define@choicekey+{winDimPosPos}{halign}[\val\nr]%
+ {near,center,far}[far]{%
+ \ifcase\nr\relax
+ \def\rma@winDimPosPos@halign{/Near}\or
+ \def\rma@winDimPosPos@halign{/Center}\or
+ \def\rma@winDimPosPos@halign{/Far}\fi
+ }{}
+ \define@choicekey+{winDimPosPos}{valign}[\val\nr]%
+ {near,center,far}[near]{%
+ \ifcase\nr\relax
+ \def\rma@winDimPosPos@valign{/Near}\or
+ \def\rma@winDimPosPos@valign{/Center}\or
+ \def\rma@winDimPosPos@valign{/Far}\fi
+ }{}
+ \define@key{winDimPosPos}{hoffset}[18]%
+ {\def\rma@winDimPosPos@hoffset{#1}}
+ \define@key{winDimPosPos}{voffset}[18]%
+ {\def\rma@winDimPosPos@voffset{#1}}
% \end{macrocode}
% \begin{macro}{\setWindowDimPos}
% When the window is floating (\texttt{windowed=true}) there are a number of
@@ -759,12 +872,12 @@
% vertical mode, for the next rich media annotation.
% \begin{macrocode}
\providecommand{\setWindowDimPos}[1]{%
- \setkeys{winDimPos}{#1}%
- \edef\temp@expand@sets{%
- \noexpand\setkeys{winDimPosWidth}{\rma@winDimPos@width}%
- \noexpand\setkeys{winDimPosHeight}{\rma@winDimPos@height}%
- \noexpand\setkeys{winDimPosPos}{\rma@winDimPos@position}%
- }\temp@expand@sets
+ \setkeys{winDimPos}{#1}%
+ \edef\temp@expand@sets{%
+ \noexpand\setkeys{winDimPosWidth}{\rma@winDimPos@width}%
+ \noexpand\setkeys{winDimPosHeight}{\rma@winDimPos@height}%
+ \noexpand\setkeys{winDimPosPos}{\rma@winDimPos@position}%
+ }\temp@expand@sets
}
% \end{macrocode}
% \end{macro}
@@ -773,8 +886,8 @@
% default values.
% \begin{macrocode}
\providecommand{\resetWindowDimPos}{%
- \setWindowDimPos{width={default,max,min},height={default,max,min},
- position={halign,valign,hoffset,voffset}}%
+ \setWindowDimPos{width={default,max,min},height={default,max,min},
+ position={halign,valign,hoffset,voffset}}%
}
\resetWindowDimPos
% \end{macrocode}
@@ -790,18 +903,19 @@
% by \texttt{\#2}. This supports the 3D tab of the user interface for the \textsf{Edit 3D}
% dialog box.\par\medskip\noindent
% \textbf{Proposed syntax:}
-%\begin{verbatim}
-%\setRmOptions3D{<annot_name>}
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars=!()]
+%\setRmOptions3D{myDice}
%{
-% 3DOptions={options for movie15},
-% 3DResources={
-% none={rName=<name1>},...,
-% foreground={rName=<name2>,flashvars=<vars>},...,
-% background={rName=<name3>,flashvars=<vars>},...,
-% material={rName=<name4>,mName=<materialName>,flashvars=<vars>},...
-% }
+% 3DOptions={!ameta(options-from-movie15)},
+% 3DResources={%
+% none={rName=!ameta(name!SUB1)},...,
+% foreground={rName=!ameta(name!SUB2),flashvars=!ameta(vars)},...,
+% background={rName=!ameta(name!SUB3),flashvars=!ameta(vars)},...,
+% material={rName=!ameta(name!SUB4),
+% mName=<materialName>,flashvars=!ameta(vars)},...
+% }
%}
-%\end{verbatim}
+%\end{Verbatim}
% When the \cs{rmAnnot} does not take a 3D file as its 4th argument, the above options are
% ignored.
% \begin{macrocode}
@@ -813,45 +927,69 @@
% \texttt{none} (the default), \texttt{thin}, \texttt{medium}, and \texttt{thick}.
% \begin{macrocode}
\define@choicekey+{rmAnnot}{borderwidth}[\val\nr]%
- {none,thin,medium,thick}[none]{%
- \ifcase\nr\relax
- \def\rma@rmAnnot@borderwidth{0}\or
- \def\rma@rmAnnot@borderwidth{1}\or
- \def\rma@rmAnnot@borderwidth{3}\or
- \def\rma@rmAnnot@borderwidth{5}\fi
+ {none,thin,medium,thick}[none]{%
+ \ifcase\nr\relax
+ \def\rma@rmAnnot@borderwidth{0}\or
+ \def\rma@rmAnnot@borderwidth{1}\or
+ \def\rma@rmAnnot@borderwidth{3}\or
+ \def\rma@rmAnnot@borderwidth{5}\fi
}{\PackageWarning{rmannot}{Bad choice for borderwidth, permissible
values are none,thin,medium,and thick. Try again}}
% \end{macrocode}
-% \leavevmode\IndexKey{poster}\IndexKey{posternote}The name of a embedded graphic to be used as a poster for the video.
+% \leavevmode\IndexKey{poster}\IndexKey{posternote}^^A%
+% The name of a embedded graphic to be used as a poster for the video.
%
% If the \texttt{poster} key is not specified, a substitute poster will
% be generated, see the definition of \cs{defaultPoster}. This default poster
% has a little message, or note, in the lower left corner. The default message
% is an advertisement for {\AcroTeX} followed by the words Flash, Video, or
% MP3, depending on the file type.
+% \changes{v2.2}{2020/08/21}{Added \string\texttt{defaultposter} designed for use with
+% MP3s}
% \begin{macrocode}
\define@key{rmAnnot}{poster}[]{\def\rma@rmAnnot@poster{#1}}
\define@key{rmAnnot}{posternote}[AcroTeX \rma@poster@descrip]%
- {\def\rma@posternote{#1}}
+ {\def\rma@posternote{#1}}
+\define@boolkey{rmAnnot}{defaultposter}[true]{}
% \end{macrocode}
% \leavevmode\IndexKey{invisible}\texttt{(2010/09/29 v1.0a)} When the invisible option is used and there
-% is no poster option, then the poster is transparent. This makes it useful
+% is no poster option, the poster is transparent. This makes it useful
% when viewing the video in a window, and you want to hide the annot in an
-% obscure corner of the page (or under a form field).
+% obscure corner of the page (or under a form field). In this case, the video/audio is played
+% by JavaScript.
% \begin{macrocode}
\define@key{rmAnnot}{invisible}[]%
- {\def\rma@invisible{\ps@mark/ca 0/SetTransparency pdfmark }}
+ {\def\rma@invisible{\ps@mark/ca 0/SetTransparency pdfmark }}
\let\rma@invisible\@empty
% \end{macrocode}
% \leavevmode\IndexKey{transparentBG}This option is available only for SWF files. Set the background to
% transparent.
% \begin{macrocode}
\define@boolkey{rmAnnot}{transparentBG}[true]{%
- \ifKV@rmAnnot@transparentBG
- \def\rma@rmAnnot@transparent{true}\else
- \def\rma@rmAnnot@transparent{false}\fi
+ \ifKV@rmAnnot@transparentBG
+ \def\rma@rmAnnot@transparent{true}\else
+ \def\rma@rmAnnot@transparent{false}\fi
}
% \end{macrocode}
+%\leavevmode\IndexKey{width}^^A%
+%\IndexKey{height}^^A%
+%We attempt to resize the annot according to the \key{width}
+%or \key{height}. Resize proportionally. Only the first one
+%of these two keys is obeyed, never both.
+% \begin{macrocode}
+\define@key{rmAnnot}{width}{\def\rmAnnot@width{#1}}
+\let\rmAnnot@width\@empty
+\define@key{rmAnnot}{height}{\def\rmAnnot@height{#1}}
+\let\rmAnnot@height\@empty
+% \end{macrocode}
+%\leavevmode\IndexKey{scale}^^A%
+%We attempt to resize the RMA according to the \key{scale} factor provided.
+%The \key{scale} key is only obeyed if no \key{width} or \key{height} key is
+%specified.
+% \begin{macrocode}
+\define@key{rmAnnot}{scale}{\def\rmAnnot@scale{#1}}
+\let\rmAnnot@scale\@empty
+% \end{macrocode}
%\leavevmode\IndexKey{toolbar}\IndexKey{modeltree}These are keys concern 3D annots.
% \texttt{toolbar} is a Boolean, which if true (the default), causes
% the 3D toolbar to appear when the annot is activated. If
@@ -859,9 +997,9 @@
% annotation is activated.
% \begin{macrocode}
\define@boolkey{rmAnnot}{toolbar}[true]{%
- \ifKV@rmAnnot@toolbar
- \def\rma@rmAnnot@toolbar{true}\else
- \def\rma@rmAnnot@toolbar{false}\fi
+ \ifKV@rmAnnot@toolbar
+ \def\rma@rmAnnot@toolbar{true}\else
+ \def\rma@rmAnnot@toolbar{false}\fi
}
% \end{macrocode}
% \texttt{modeltree} is a Boolean, which if true causes the \textbf{Model
@@ -869,9 +1007,9 @@
% the \textbf{Model Tree} is not displayed when the annotation is activated.
% \begin{macrocode}
\define@boolkey{rmAnnot}{modeltree}[true]{%
- \ifKV@rmAnnot@modeltree
- \def\rma@rmAnnot@modeltree{true}\else
- \def\rma@rmAnnot@modeltree{false}\fi
+ \ifKV@rmAnnot@modeltree
+ \def\rma@rmAnnot@modeltree{true}\else
+ \def\rma@rmAnnot@modeltree{false}\fi
}
% \end{macrocode}
% \leavevmode\IndexKey{passcontext}This option is available only for SWF files. SWF file developers
@@ -885,9 +1023,9 @@
% the annotation, perhaps through JavaScript.
% \begin{macrocode}
\define@boolkey{rmAnnot}{passcontext}[true]{%
- \ifKV@rmAnnot@passcontext
- \def\rma@rmAnnot@PassContextClick{true}\else
- \def\rma@rmAnnot@PassContextClick{false}\fi
+ \ifKV@rmAnnot@passcontext
+ \def\rma@rmAnnot@PassContextClick{true}\else
+ \def\rma@rmAnnot@PassContextClick{false}\fi
}
% \end{macrocode}
%
@@ -896,38 +1034,41 @@
% Skins are used with video files.
%\par\medskip
% \noindent\IndexKey{skin}When playing a supported video file, various skins can be used. I've labeled them
-% \texttt{skin1}--\texttt{skin7} and \texttt{none}. The names of the SWF
+% \texttt{skin1}--\texttt{skin7}, \texttt{all}, and \texttt{none}. The names of the SWF
% files describe each skin.
% \par\medskip\noindent
% \textbf{Note:} By experimenting with the UI, it is apparent that one cannot have
% different controls for the same video file.
+% \changes{v2.2}{2020/08/21}{Added \string\texttt{all} skin name}
% \begin{macrocode}
\define@choicekey+{rmAnnot}{skin}[\val\nr]%
- {none,skin1,skin2,skin3,skin4,skin5,skin6,skin7}[skin1]{%
- \edef\rma@skinName{#1}% 2011/10/18 changed from number to name
- \ifcase\nr\relax
- \let\rma@rmAnnot@Skin\@empty\or
- \def\rma@rmAnnot@Skin{SkinOverAllNoFullNoCaption.swf}\or
- \def\rma@rmAnnot@Skin{SkinOverAllNoVolNoCaptionNoFull.swf}\or
- \def\rma@rmAnnot@Skin{SkinOverPlay.swf}\or
- \def\rma@rmAnnot@Skin{SkinOverPlayMute.swf}\or
- \def\rma@rmAnnot@Skin{SkinOverPlaySeekMute.swf}\or
- \def\rma@rmAnnot@Skin{SkinOverPlaySeekStop.swf}\or
- \def\rma@rmAnnot@Skin{SkinOverPlayStopSeekMuteVol.swf}\fi
+ {none,all,skin1,skin2,skin3,skin4,skin5,skin6,skin7}[skin1]{%
+ \edef\rma@skinName{#1}% 2011/10/18 changed from number to name
+ \ifcase\nr\relax
+ \let\rma@rmAnnot@Skin\@empty\or % none
+ \def\rma@skinName{skin1}%
+ \def\rma@rmAnnot@Skin{SkinOverAllNoFullNoCaption.swf}\or % all
+ \def\rma@rmAnnot@Skin{SkinOverAllNoFullNoCaption.swf}\or % 1
+ \def\rma@rmAnnot@Skin{SkinOverAllNoVolNoCaptionNoFull.swf}\or % 2
+ \def\rma@rmAnnot@Skin{SkinOverPlay.swf}\or % 3
+ \def\rma@rmAnnot@Skin{SkinOverPlayMute.swf}\or % 4
+ \def\rma@rmAnnot@Skin{SkinOverPlaySeekMute.swf}\or % 5
+ \def\rma@rmAnnot@Skin{SkinOverPlaySeekStop.swf}\or % 6
+ \def\rma@rmAnnot@Skin{SkinOverPlayStopSeekMuteVol.swf}\fi % 7
}{%
- \@ifundefined{rma@@#1}{%
- \PackageWarning{rmannot}{Bad choice for 'skin,' permissible
- values are skin1--skin7, or a custom skin already defined.
- Try again}}{%
+ \@ifundefined{rma@@#1}{%
+ \PackageWarning{rmannot}{Bad choice for 'skin,' permissible
+ values are none, all, skin1--skin7, or a custom skin already
+ defined. Try again}}{%
% \end{macrocode}
% If a value of \texttt{skin} is not one of the defaults, we allow the user to
% define a skin, name and path to a skin SWF must be declared using \cs{saveNamedPath}.
% \begin{macrocode}
- \PackageWarning{rmannot}{Recording new skin, '#1'}%
- \edef\rma@skinName{#1}%
- \edef\rma@rmAnnot@Skin{\csname#1FileName\endcsname}%
- \rm@csarg\let{embedSkin#1}=1
- }%
+ \PackageWarning{rmannot}{Recording new skin, '#1'}%
+ \edef\rma@skinName{#1}%
+ \edef\rma@rmAnnot@Skin{\csname#1FileName\endcsname}%
+ \rm@csarg\let{embedSkin#1}\rm@One
+ }%
}
% \end{macrocode}
% We use \verb!\let\csname embedSkin<skinName>\endcsname! determining to
@@ -936,15 +1077,15 @@
% used is set to 0; hence we will not embed it again.
% \begin{macrocode}
\@tfor\rma@arg:={skin0}{skin1}{skin2}{skin3}{skin4}%
- {skin5}{skin6}{skin7}\do{%
- \rm@csarg\let{embedSkin\rma@arg}=1
+ {skin5}{skin6}{skin7}\do{%
+ \rm@csarg\let{embedSkin\rma@arg}\rm@One
}
% \end{macrocode}
% \leavevmode\IndexKey{skinAutoHide}A Boolean key that determines if the skin automatically hides itself
% when the mouse pointer is removed from the annot. The default is \texttt{true}.
% \begin{macrocode}
\define@boolkey{rmAnnot}{skinAutoHide}[true]{%
- \ifKV@rmAnnot@skinAutoHide
+ \ifKV@rmAnnot@skinAutoHide
\def\rma@skinAutoHide{true}\else
\def\rma@skinAutoHide{false}\fi
}
@@ -953,19 +1094,19 @@
% is \texttt{0x5F5F5F}.
% \begin{macrocode}
\define@key{rmAnnot}{skinBGColor}[0x5F5F5F]%
- {\def\rma@skinBGColor{#1}}
+ {\def\rma@skinBGColor{#1}}
% \end{macrocode}
% \leavevmode\IndexKey{skinBGAlpha}The alpha for the skin, a number between 0 and 1. The default is 0.75.
% \begin{macrocode}
\define@key{rmAnnot}{skinBGAlpha}[0.75]%
- {\def\rma@skinBGAlpha{#1}}
+ {\def\rma@skinBGAlpha{#1}}
% \end{macrocode}
% \leavevmode\IndexKey{volume}The initial volume of the audio track. Values range from 0 (muted) to 1. The default is
% 1.0. The volume may be adjusted by the user at run time, if the selected skin has a volume
% control, or by a JavaScript control.
% \begin{macrocode}
\define@key{rmAnnot}{volume}[1.00]%
- {\def\rma@rmAnnot@volume{#1}}
+ {\def\rma@rmAnnot@volume{#1}}
% \end{macrocode}
%
% \subsubsection{Animation Settings}
@@ -976,7 +1117,7 @@
% effectively speeds up the animation.
% \begin{macrocode}
\define@key{rmAnnot}{speed}[1]{%
- \def\rma@rmAnnot@speed{#1}%
+ \def\rma@rmAnnot@speed{#1}%
}
% \end{macrocode}
% \leavevmode\IndexKey{playcount}Description quoted from the \textsl{Adobe Suppl.\ Doc}: An integer specifying the play count
@@ -985,7 +1126,7 @@
% indicates that the animation is infinitely repeated. The default is -1.
% \begin{macrocode}
\define@key{rmAnnot}{playcount}[-1]{%
- \def\rma@rmAnnot@playcount{#1}%
+ \def\rma@rmAnnot@playcount{#1}%
}
% \end{macrocode}
%
@@ -996,17 +1137,17 @@
% file. Currently, the additional resources are other SWF files only.
% Items must be specified using \cs{useNamedPath} command, and is
% a lists of delimited by braces
-%\begin{verbatim}
-% resources={mySWF1,mySWF2}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9}]
+%resources={mySWF1,mySWF2}
+%\end{Verbatim}
% where \texttt{mySWF1} and \texttt{mySWF2} are defined by \cs{saveNamedPath}.
% \begin{macrocode}
\newtoks\rma@toks\rma@toks={}
\newcount\rma@nResources
\newif\ifrma@isiiid\rma@isiiidfalse
-\define@key{rmAnnot}{resources}[]{\rma@toks={}\rma@nResources=0%
- \ifrma@isiiid\let\rma@next\relax
- \else\def\rma@next{\rma@proc@resources{#1}}\fi\rma@next
+\define@key{rmAnnot}{resources}[]{\rma@toks={}\rma@nResources=0\relax
+ \ifrma@isiiid\let\rma@next\relax
+ \else\def\rma@next{\rma@proc@resources{#1}}\fi\rma@next
}
% \end{macrocode}
% When we are doing 3D, we don't process resources through \texttt{rmAnnot} family.
@@ -1014,48 +1155,48 @@
% separate command \cs{setRmOptions3D}
% \begin{macrocode}
\newcommand{\rma@proc@resources}[1]{%
- \def\rma@rmAnnot@resources{#1}%
- \ifx\rma@rmAnnot@resources\@empty\let\rma@addResources\@empty
- \let\rma@addFileSpecs\@empty\else
+ \def\rma@rmAnnot@resources{#1}%
+ \ifx\rma@rmAnnot@resources\@empty\let\rma@addResources\@empty
+ \let\rma@addFileSpecs\@empty\else
% \end{macrocode}
% We process resources when there are some to process \texttt{:-)}
% \begin{macrocode}
- \@for\rma@arg:=\rma@rmAnnot@resources\do{%
- \advance\rma@nResources1\relax
- \rma@edefexecute{\noexpand
- \filename@parse{\rma@useNamedPath{\rma@arg}}}%
- \@ifundefined{filename@ext}{%
- \rma@PkEr@iii{\rma@useNamedPath{\rma@arg}}}{}%
- \edef\rma@fs@expand{rmFileStrm\rma@arg}%
- \@ifundefined{\rma@fs@expand}{%
+ \@for\rma@arg:=\rma@rmAnnot@resources\do{%
+ \advance\rma@nResources1\relax
+ \rma@edefexecute{\noexpand
+ \filename@parse{\rma@useNamedPath{\rma@arg}}}%
+ \@ifundefined{filename@ext}{%
+ \rma@PkEr@iii{\rma@useNamedPath{\rma@arg}}}{}%
+ \edef\rma@fs@expand{rmFileStrm\rma@arg}%
+ \@ifundefined{\rma@fs@expand}{%
% \end{macrocode}
% If this resource has not been used, we define it, and give it
% a indirect reference: \verb!rmfstream\therm@Cnt-\the\rma@nResources!
% \begin{macrocode}
- \rm@csarg\xdef{\rma@fs@expand}%
- {rmfstream\therm@Cnt-\the\rma@nResources}%
- \def\rma@embed{1}}{\def\rma@embed{0}}%
+ \rm@csarg\xdef{\rma@fs@expand}%
+ {rmfstream\therm@Cnt-\the\rma@nResources}%
+ \def\rma@embed{1}}{\def\rma@embed{0}}%
% \end{macrocode}
% Add this file to our token list of all resources.
% \begin{macrocode}
- \edef\rma@tmp@exp{\the\rma@toks%
- \noexpand\\{\the\rma@nResources}%
- {\filename@area}{\filename@base.\filename@ext}%
- {\rma@embed}{\csname\rma@fs@expand\endcsname}%
+ \edef\rma@tmp@exp{\the\rma@toks%
+ \noexpand\\{\the\rma@nResources}%
+ {\filename@area}{\filename@base.\filename@ext}%
+ {\rma@embed}{\csname\rma@fs@expand\endcsname}%
% \end{macrocode}
% (12/27/10) changed the expansion to \verb!\expandafter\noexpand! to leave
% a token as as this argument. Later, in \cs{rm@appendFileSpecs} we test this token
% against \cs{@empty}. This argument is \texttt{\#6} in \cs{rm@appendFileSpecs}.
% \begin{macrocode}
- {\rm@csarg\noexpand{rma@mt@\rma@arg}}}%
- \rma@toks=\expandafter{\rma@tmp@exp}%
- }%
+ {\rm@csarg\noexpand{rma@mt@\rma@arg}}}%
+ \rma@toks=\expandafter{\rma@tmp@exp}%
+ }% do
\let\\\rm@appendNameTree
\expandafter\xdef\expandafter\rma@addResources%
\expandafter{\the\rma@toks}%
\let\\\rm@appendFileSpecs
\expandafter\xdef\expandafter\rma@addFileSpecs%
- \expandafter{\the\rma@toks}%
+ \expandafter{\the\rma@toks}%
\fi
}
% \end{macrocode}
@@ -1077,8 +1218,8 @@
% in a macro \cs{rma@addFileSpecs} to be used later.
% \begin{macrocode}
\def\rm@appendNameTree#1#2#3#4#5#6{%
- \ps@mark{\rma@ANT} (#3) /APPEND pdfmark^^J%
- \ps@mark{\rma@ANT} {rmfilespec\therm@Cnt-#1}/APPEND pdfmark^^J%
+ \ps@mark{\rma@ANT} (#3) /APPEND pdfmark^^J%
+ \ps@mark{\rma@ANT} {rmfilespec\therm@Cnt-#1}/APPEND pdfmark^^J%
}
% \end{macrocode}
% \DescribeMacro{\rm@appendFileSpecs}
@@ -1093,32 +1234,32 @@
% indirect reference to the file stream, whether it is a new one that
% has never been embedded, or is one that has already been embedded.
% \begin{macrocode}
- \ps@mark/_objdef {rmfilespec\therm@Cnt-#1}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmfilespec\noexpand\therm@Cnt-#1} <<%
- /F(#3)%
- /UF (#3)%
- /EF <</F {#5}>>%
- /Type/Filespec%
- >>/PUT pdfmark^^J%
+ \ps@mark/_objdef {rmfilespec\therm@Cnt-#1}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmfilespec\noexpand\therm@Cnt-#1} <<%
+ /F(#3)%
+ /UF (#3)%
+ /EF <</F {#5}>>%
+ /Type/Filespec%
+ >>/PUT pdfmark^^J%
% \end{macrocode}
% \paragraph*{File stream:} We only embed if \texttt{\#4} is equal to 1, if it is
% 0, this particular file has already been embedded.
% \begin{macrocode}
- \if#41
- \ps@mark/_objdef {#5} /type/stream/OBJ pdfmark^^J%
- \ps@mark{#5} (#2#3) (r) file /PUT pdfmark^^J%
- \ps@mark{#5}<<%
- /Type/EmbeddedFile%
+ \if#41
+ \ps@mark/_objdef {#5} /type/stream/OBJ pdfmark^^J%
+ \ps@mark{#5} (#2#3) (r) file /PUT pdfmark^^J%
+ \ps@mark{#5}<<%
+ /Type/EmbeddedFile%
% \end{macrocode}
% (12/27/10) The \texttt{/Subtype} key is optional,
% so we make it optional if \texttt{\#6} is empty.
% \begin{macrocode}
\ifx#6\@empty\else
- /Subtype(#6)%
+ /Subtype(#6)%
\fi
- >>/PUT pdfmark^^J%
- \ps@mark{#5} /CLOSE pdfmark^^J%
- \fi
+ >>/PUT pdfmark^^J%
+ \ps@mark{#5} /CLOSE pdfmark^^J%
+ \fi
}
% \end{macrocode}
% \leavevmode\IndexKey{flashvars}Flash variables to pass to a SWF file.
@@ -1146,37 +1287,37 @@
%
% \begin{macrocode}
\define@key{rmAnnot}{cuepoints}[]{%
- \edef\rma@rmAnnot@cuepoints{#1}%
- \ifx\rma@rmAnnot@cuepoints\@empty\else
- \rma@nResources=0%
- \def\rma@array@hold{}\def\rma@dict@hold{}%
- \@for\arg:=\rma@rmAnnot@cuepoints\do{%
- \advance\rma@nResources1\relax
- \rma@edefexecute{\noexpand\setkeys{rmCuePt}{\arg}}%
- % need to build the array of indirect references,
- \edef\rma@array@hold{\rma@array@hold\space
- {rmCuePoints\therm@Cnt-\the\rma@nResources}}%
- % and the code for the cue point dictionary
- \edef\rma@dict@hold{\rma@dict@hold
- \ps@mark/_objdef %
- {rmCuePoints\therm@Cnt-\the\rma@nResources}%
- /type/dict/OBJ pdfmark^^J%
- \ps@mark{rmCuePoints\therm@Cnt-\the\rma@nResources} <<
- /Type/CuePoint
+ \edef\rma@rmAnnot@cuepoints{#1}%
+ \ifx\rma@rmAnnot@cuepoints\@empty\else
+ \rma@nResources=0\relax% dps
+ \def\rma@array@hold{}\def\rma@dict@hold{}%
+ \@for\arg:=\rma@rmAnnot@cuepoints\do{%
+ \advance\rma@nResources1\relax
+ \rma@edefexecute{\noexpand\setkeys{rmCuePt}{\arg}}%
+ % need to build the array of indirect references,
+ \edef\rma@array@hold{\rma@array@hold\space
+ {rmCuePoints\therm@Cnt-\the\rma@nResources}}%
+ % and the code for the cue point dictionary
+ \edef\rma@dict@hold{\rma@dict@hold
+ \ps@mark/_objdef %
+ {rmCuePoints\therm@Cnt-\the\rma@nResources}%
+ /type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmCuePoints\therm@Cnt-\the\rma@nResources} <<
+ /Type/CuePoint
\ifx\rma@rmCuePt@name\@empty
- /Name (RMACP \the\rma@nResources)
+ /Name (RMACP \the\rma@nResources)
\else
- /Name (\rma@rmCuePt@name)
+ /Name (\rma@rmCuePt@name)
\fi
- /Subtype \rma@rmCuePt@type
- /Time \rma@rmCuePt@time
+ /Subtype \rma@rmCuePt@type
+ /Time \rma@rmCuePt@time
\ifx\rma@rmCuePt@action\@empty\else
- /A << /Type/Action\JS{\rma@rmCuePt@action} >>
+ /A << /Type/Action\JS{\rma@rmCuePt@action} >>
\fi
- >> /PUT pdfmark^^J%
- }%
- }% end of \@for
- \fi
+ >> /PUT pdfmark^^J%
+ }%
+ }% end of \@for
+ \fi
}
% \end{macrocode}
% \leavevmode\IndexKey{type (cuepoints)}^^A
@@ -1187,21 +1328,21 @@
% are \texttt{type}, \texttt{name}, \texttt{time}, and
% \texttt{action}. These keys are entered as a value of the
% \texttt{cuepoints} key, like so,
-%\begin{verbatim}
-%\newcommand{\myCuePoints}{%
-% {type=nav,name=Chapter1,time=0,action={console.println("Chapter1")}},%
-% {type=nav,name=Chapter2,time=1883,action={console.println("Chapter2")}},%
-% {type=nav,name=Chapter3,time=5197,action={console.println("Chapter3")}},%
-% {type=nav,name=Chapter4,time=6817,action={console.println("Chapter4")}},%
-% {type=nav,name=Chapter5,time=9114,action={console.println("Chapter6")}},%
+%\begin{Verbatim}[codes={\catcode`\%=9},fontsize=\small,commandchars={!~@}]
+%\newcommand{\myCuePoints}{!%
+% {type=nav,name=Chapter1,time=0,action={console.println("Chapter1")}},!%
+% {type=nav,name=Chapter2,time=1883,action={console.println("Chapter2")}},!%
+% {type=nav,name=Chapter3,time=5197,action={console.println("Chapter3")}},!%
+% {type=nav,name=Chapter4,time=6817,action={console.println("Chapter4")}},!%
+% {type=nav,name=Chapter5,time=9114,action={console.println("Chapter6")}},!%
% {type=nav,name=Chapter6,time=12712,action={console.println("Chapter6")}}
%}
-%\end{verbatim}
+%\end{Verbatim}
% Note the use of the comment symbol \texttt{\%} following at the end of each line.
% We define the cue points using a command, then pass it to \cs{rmAnnot}, like so,
-%\begin{verbatim}
-% \rmAnnot[cuepoints={\myCuePoints}]{320bp}{240bp}{sample}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9}]
+%\rmAnnot[cuepoints={\myCuePoints}]{320bp}{240bp}{sample}
+%\end{Verbatim}
% Note the parentheses around \cs{myCuePoints}, the command expands to contain commas,
% so the rules of \textsf{xkeyval} say to enclose in parentheses.
%
@@ -1230,10 +1371,10 @@
% \paragraph*{Default values of key-values pairs.} We set the default values of all the keys on startup.
% \begin{macrocode}
\setkeys{rmAnnot}{name,url=false,enabled,deactivated,borderwidth,%
- windowed=false,poster,posternote,skin,skinAutoHide,skinBGColor,%
- skinBGAlpha,volume,speed,playcount,resources,flashvars,%
- transparentBG=false,passcontext=false,cuepoints,toolbar,%
- modeltree=false}
+ windowed=false,poster,posternote,skin,skinAutoHide,skinBGColor,%
+ skinBGAlpha,volume,speed,playcount,resources,flashvars,%
+ transparentBG=false,passcontext=false,cuepoints,toolbar,%
+ modeltree=false}
% \end{macrocode}
%
% \subsection{The definition of \texorpdfstring{\cs{rmAnnot}}{\CMD{rmAnnot}}}
@@ -1243,24 +1384,26 @@
% the re-embedding of the player again.
% \begin{macrocode}
\def\rma@recordVideoPlayer{%
- \ifrma@EmbedVideoPlayer
- \global\let\rma@isVPEmbedded=1\global\rma@EmbedVideoPlayerfalse
- \else
- \if\rma@isVPEmbedded0\global\rma@EmbedVideoPlayertrue\fi
- \fi
+ \ifrma@EmbedVideoPlayer
+ \global\let\rma@isVPEmbedded\rm@One\global\rma@EmbedVideoPlayerfalse
+ \else
+ \if\rma@isVPEmbedded\rm@Zero
+ \global\rma@EmbedVideoPlayertrue\fi
+ \fi
}
\def\rma@recordAudioPlayer{%
- \ifrma@EmbedAudioPlayer
- \global\let\rma@isAPEmbedded=1\global\rma@EmbedAudioPlayerfalse
- \else
- \if\rma@isAPEmbedded0\global\rma@EmbedAudioPlayertrue\fi
+ \ifrma@EmbedAudioPlayer
+ \global\let\rma@isAPEmbedded\rm@One\global\rma@EmbedAudioPlayerfalse
+ \else
+ \if\rma@isAPEmbedded\rm@Zero
+ \global\rma@EmbedAudioPlayertrue\fi
% \end{macrocode}
% If the file is \textsf{MP3}, and there is no poster defined for it, we use the default
% \textsf{MP3} poster, a screen shot of the \texttt{AudioPlayer} controls.
% \begin{macrocode}
-% \ifx\rma@rmAnnot@poster\@empty\rma@set@mpiiiposter\fi
- \rma@set@mpiiiposter
- \fi
+ \ifx\rma@rmAnnot@poster\@empty\rma@set@mpiiiposter\fi
+% \rma@set@mpiiiposter
+ \fi
}
% \end{macrocode}
% A switch to indicate success or failure when looking for a Video extension. Used
@@ -1280,36 +1423,40 @@
% \item[\texttt{\#3}:] The height of the annot
% \item[\texttt{\#4}:] The name of the file to play (the name is defined by the \cs{saveNamedPath} command)
%\end{enumerate}
+%\changes{v2.2}{2020/08/21}{Added pmpv to \string\cs{rmAnnot}, now displays name of the file to play}
% \begin{macrocode}
\newcommand{\rmAnnot}[4][]{\begingroup
+ \PMPV{#4}%
% \end{macrocode}
% We \cs{let} \cs{Name} to \cs{rma@resource}. The author can then refer to
% the name of the resource within, for example, the \texttt{flashvars} key.
% \begin{macrocode}
- \let\Name\rma@resource
- \let\urlName\rma@urlresource
- \makeJSspecials
+ \let\Name\rma@resource
+ \let\urlName\rma@urlresource
+ \makeJSspecials
% \end{macrocode}
% Empty these to macros for they might contain content from a previous
% annot with resources.
% \begin{macrocode}
- \let\rma@addResources\@empty\let\rma@addFileSpecs\@empty
+ \let\rma@addResources\@empty\let\rma@addFileSpecs\@empty
% \end{macrocode}
% We begin by passing the dimensions through a length so the author
% can use the \texttt{calc} package.
% \begin{macrocode}
- {\setlength{\dimen@}{#2}\xdef\rm@Annot@width{\the\dimen@}%
- \setlength{\dimen@}{#3}\xdef\rm@Annot@height{\the\dimen@}}%
+ \bgroup
+ \setlength{\dimen@}{#2}\xdef\rm@Annot@width{\the\dimen@}%
+ \setlength{\dimen@}{#3}\xdef\rm@Annot@height{\the\dimen@}%
+ \egroup
% \end{macrocode}
% Next we increment a running counter, to give each annot, and all indirect
% references a unique name.
% \begin{macrocode}
- \stepcounter{rm@Cnt}%
+ \stepcounter{rm@Cnt}%
% \end{macrocode}
% We take the 4th parameter, a named path, and pass it to \cs{useNamedPath},
% then use \cs{filename@parse} to extract the components of the path.
% \begin{macrocode}
- \rma@edefexecute{\noexpand\filename@parse{\rma@useNamedPath{#4}}}%
+ \rma@edefexecute{\noexpand\filename@parse{\rma@useNamedPath{#4}}}%
% \end{macrocode}
% We record this named path as \verb!rmFileStrm#4!, if this command is
% undefined, we define it. It's value is the indirect reference to the
@@ -1317,44 +1464,94 @@
% reference to the same file that has been already embedded. If undefined
% we set a boolean to embed this stream, otherwise, we don't embed.
% \begin{macrocode}
- \edef\rma@fs@expand{rmFileStrm#4}\@ifundefined{\rma@fs@expand}{%
- \rm@csarg\xdef{\rma@fs@expand}%
- {rmfstream\therm@Cnt}\global\rma@EmbedFiletrue}%
- {\global\rma@EmbedFilefalse}%
+ \edef\rma@fs@expand{rmFileStrm#4}\@ifundefined{\rma@fs@expand}{%
+ \rm@csarg\xdef{\rma@fs@expand}%
+ {rmfstream\therm@Cnt}\global\rma@EmbedFiletrue}%
+ {\global\rma@EmbedFilefalse}%
% \end{macrocode}
% After having parsed the path, we now save the pieces for later use.
% \begin{macrocode}
- \edef\rma@thisfilepath{\filename@area}%
- \edef\rma@basefilename{\filename@base}%
- \edef\rma@extension{\filename@ext}%
- \rma@edefexecute{\noexpand\uppercase{\noexpand
- \def\noexpand\rma@tempi{\rma@extension}}}%
+ \edef\rma@thisfilepath{\filename@area}%
+ \edef\rma@basefilename{\filename@base}%
+ \edef\rma@extension{\filename@ext}%
+ \rma@edefexecute{\noexpand\uppercase{\noexpand
+ \def\noexpand\rma@tempi{\rma@extension}}}%
% \end{macrocode}
% Take a look at the file extension, if it is a 3D type extension,
% mark it as a RM3D annot by setting \cs{rma@isiiidtrue}.
% \begin{macrocode}
- \ifx\rma@tempi\rma@rmAnnot@type@uiiid\rma@isiiidtrue
- \else\ifx\rma@tempi\rma@rmAnnot@type@prc\rma@isiiidtrue
- \else\rma@isiiidfalse
- \fi\fi
+ \ifx\rma@tempi\rma@rmAnnot@type@uiiid\rma@isiiidtrue
+ \else\ifx\rma@tempi\rma@rmAnnot@type@prc\rma@isiiidtrue
+ \else\rma@isiiidfalse
+ \fi\fi
% \end{macrocode}
% \paragraph*{Process Options.} We finally get around to processing the options.
% We put \cs{setkeys} in an \cs{edef} to allow the user to use macros to specify
% some of the options. The next line are the options passed by \texttt{\#1} of
% \cs{rmAnnot}.
% \begin{macrocode}
- \rma@edefexecute{\noexpand\setkeys{rmAnnot}{#1}}%
+ \rma@edefexecute{\noexpand\setkeys{rmAnnot}{#1}}%
+% \end{macrocode}
+% If use has specified either the \key{width} or \key{height},
+% we reset the width and height of the annotation, while
+% preserving the aspect ratio. We first test \key{width} then
+% \key{height}. If both are specified, we use the \key{width} key
+% and ignore the \key{height} key.
+% \changes{v2.2}{2020/08/21}{Support for keys \string\key{width}
+% and \string\key{height} of the \string\texttt{rmAnnot} family.
+% The \string\key{scale} key is also defined.}
+% \begin{macrocode}
+ \bgroup
+ \ifx\rmAnnot@width\@empty
+ \ifx\rmAnnot@height\@empty
+% \end{macrocode}
+% If \key{width} and \key{height} are not specified, we
+% determine if the \key{scale} key is listed.
+% \begin{macrocode}
+ \ifx\rmAnnot@scale\@empty\else
+ \setlength{\dimen@}%
+ {\rm@Annot@height*\real{\rmAnnot@scale}}%
+ \xdef\rm@Annot@height{\the\dimen@}%
+ \setlength{\dimen@}%
+ {\rm@Annot@width*\real{\rmAnnot@scale}}%
+ \xdef\rm@Annot@width{\the\dimen@}%
+ \fi
+ \else
+% \end{macrocode}
+% If \key{height} but not \key{width} is specified,
+% we resize accordingly.
+% \begin{macrocode}
+ \setlength{\dimen@}%
+ {\rmAnnot@height*\ratio
+ {\rm@Annot@width}{\rm@Annot@height}}%
+ \xdef\rm@Annot@width{\the\dimen@}%
+ \setlength{\dimen@}{\rmAnnot@height}%
+ \xdef\rm@Annot@height{\the\dimen@}%
+ \fi
+ \else
+% \end{macrocode}
+% If \key{width} but not \key{height} is specified,
+% we resize accordingly.
+% \begin{macrocode}
+ \setlength{\dimen@}%
+ {\rmAnnot@width*\ratio
+ {\rm@Annot@height}{\rm@Annot@width}}%
+ \xdef\rm@Annot@height{\the\dimen@}%
+ \setlength{\dimen@}{\rmAnnot@width}%
+ \xdef\rm@Annot@width{\the\dimen@}%
+ \fi
+ \egroup
\ifx\rma@input@iiidCode\relax\else
\ifrma@isiiid
% \end{macrocode}
% Process the options of the RM3D annot, as passed to us by \cs{setRmOptions3D}.
% \begin{macrocode}
- \@ifundefined{\rma@Annot@name_3DOPTS}{%
+ \@ifundefined{\rma@Annot@name_3DOPTS}{%
% \end{macrocode}
% \textbf{To Do.} Here, we can insert some default options if the user did not
% specify anything. Including a reminder to make a declaration.
% \begin{macrocode}
- }{%
+ }{%
% \end{macrocode}
% If the user has specified the \texttt{use3D} option and
% the file specified in \texttt{\#4} is a 3D model (U3D or PRC),
@@ -1364,39 +1561,39 @@
% by \cs{setRmOptions3D}; we only process if there are options
% for this annot.
% \begin{macrocode}
- \def\rma@Instances{}\def\rma@appendToNameTree{}%
+ \def\rma@Instances{}\def\rma@appendToNameTree{}%
% \end{macrocode}
% Expand the arguments of \cs{setkeys} before allowing
% \cs{setkeys} to execute.
% \begin{macrocode}
- \rma@edefexecute{\noexpand\setkeys{rm3DOptsTopLevel}%
- {\@nameuse{\rma@Annot@name_3DOPTS}}}%
- \edef\additional@Instances{\rma@Instances}%
- \edef\rma@addResources{\rma@appendToNameTree}%
+ \rma@edefexecute{\noexpand\setkeys{rm3DOptsTopLevel}%
+ {\@nameuse{\rma@Annot@name_3DOPTS}}}%
+ \edef\additional@Instances{\rma@Instances}%
+ \edef\rma@addResources{\rma@appendToNameTree}%
% \end{macrocode}
% \paragraph*{3Djscript:} We determine if there is one or more
% javascript files specified.
% \begin{macrocode}
- \ifx\rma@rmAnnot@iiiDjs\@empty\else
- \def\@MXV@jscriptiiid{}%
- \literalps@out{%
- \ps@mark/_objdef {jscriptiiid\therm@Cnt}%
- /type/array/OBJ pdfmark^^J%
- \rmiiid@addToScriptsArray
- \rma@addFileSpecs
- }%
+ \ifx\rma@rmAnnot@iiiDjs\@empty\else
+ \def\@MXV@jscriptiiid{}%
+ \literalps@out{%
+ \ps@mark/_objdef {jscriptiiid\therm@Cnt}%
+ /type/array/OBJ pdfmark^^J%
+ \rmiiid@addToScriptsArray
+ \rma@addFileSpecs
+ }%
% \end{macrocode}
% We save the key-value pair for the \texttt{Scripts} key.
% \begin{macrocode}
- \edef\@MXV@jscriptiiid{%
- /Scripts {jscriptiiid\therm@Cnt}%
- }%
- \fi
+ \edef\@MXV@jscriptiiid{%
+ /Scripts {jscriptiiid\therm@Cnt}%
+ }%
+ \fi
% \end{macrocode}
% Build the array of 3D views
% \begin{macrocode}
- \@MXV@buildva%
- }%
+ \@MXV@buildva%
+ }%
\fi\fi
% \end{macrocode}
% \paragraph*{Identify the Extension.} We try to identify the extension provided
@@ -1405,71 +1602,71 @@
% or one of the other supported extensions. The macro \cs{rma@tempi} contains the upper case
% form of the extension.
% \begin{macrocode}
- \rma@edefexecute{\noexpand\uppercase{\noexpand
- \def\noexpand\rma@tempi{\rma@extension}}}%
+ \rma@edefexecute{\noexpand\uppercase{\noexpand
+ \def\noexpand\rma@tempi{\rma@extension}}}%
% \end{macrocode}
% \subparagraph*{3D Model.} Search for a \textsf{U3D} or \textsf{PRC}. We earlier
% did a test to see if this is 3D or not, so the boolean \cs{ifrma@isiiid} has already
% been set.
% \begin{macrocode}
\ifrma@isiiid
- \def\rma@poster@descrip{3D}%
- \def\rma@RMCSubtype{/3D}%
- \ifx\rma@tempi\rma@rmAnnot@type@uiiid
- \def\rma@rmAnnot@type{U3D}%
- \edef\rma@mimeType{\rma@mimetype@uiiid}%
- \else
- \ifx\rma@tempi\rma@rmAnnot@type@prc
- \def\rma@rmAnnot@type{PRC}%
- \edef\rma@mimeType{\rma@mimetype@prc}%
- \fi\fi
+ \def\rma@poster@descrip{3D}%
+ \def\rma@RMCSubtype{/3D}%
+ \ifx\rma@tempi\rma@rmAnnot@type@uiiid
+ \def\rma@rmAnnot@type{U3D}%
+ \edef\rma@mimeType{\rma@mimetype@uiiid}%
+ \else
+ \ifx\rma@tempi\rma@rmAnnot@type@prc
+ \def\rma@rmAnnot@type{PRC}%
+ \edef\rma@mimeType{\rma@mimetype@prc}%
+ \fi\fi
\else
% \end{macrocode}
% Not a 3D model, so we'll check for more conventional types.
%
% \subparagraph*{Flash Application.} Search for a \textsf{SWF} file, we set the identifiers for later use.
% \begin{macrocode}
- \def\rma@poster@descrip{Flash}%
- \ifx\rma@tempi\rma@rmAnnot@type@swf
- \def\rma@rmAnnot@type{SWF}\edef\rma@mimeType{\rma@mimetype@swf}%
- \def\rma@RMCSubtype{/Flash}%
- \else % if not flash
+ \def\rma@poster@descrip{Flash}%
+ \ifx\rma@tempi\rma@rmAnnot@type@swf
+ \def\rma@rmAnnot@type{SWF}\edef\rma@mimeType{\rma@mimetype@swf}%
+ \def\rma@RMCSubtype{/Flash}%
+ \else % if not flash
% \end{macrocode}
% \subparagraph*{Video Formats.} We search for extension that is generally classified
% as video.
% \begin{macrocode}
- \def\rma@poster@descrip{Video}\def\rma@rmAnnot@type{FLV}%
- \@FndSuppExtfalse
- \@tfor\rma@type:={flv}{fiv}{mpiv}{mivV}{mov}{iiiGP}{iiiGii}\do{%
- \expandafter\ifx\expandafter\rma@tempi\csname%
- rma@rmAnnot@type@\rma@type\endcsname
- \@FndSuppExttrue
- \edef\rma@mimeType{\csname%
- rma@mimetype@\rma@type\endcsname}%
- \rma@recordVideoPlayer\@break@tfor
- \fi
- }%
- \if@FndSuppExt
- \def\rma@RMCSubtype{/Video}%
- \xdef\FileStrmVideoPlayer{rmVideoPlayer\therm@Cnt}%
- \else % if not video
+ \def\rma@poster@descrip{Video}\def\rma@rmAnnot@type{FLV}%
+ \@FndSuppExtfalse
+ \@tfor\rma@type:={flv}{fiv}{mpiv}{mivV}{mov}{iiiGP}{iiiGii}\do{%
+ \expandafter\ifx\expandafter\rma@tempi\csname%
+ rma@rmAnnot@type@\rma@type\endcsname
+ \@FndSuppExttrue
+ \edef\rma@mimeType{\csname%
+ rma@mimetype@\rma@type\endcsname}%
+ \rma@recordVideoPlayer\@break@tfor
+ \fi
+ }%
+ \if@FndSuppExt
+ \def\rma@RMCSubtype{/Video}%
+ \xdef\FileStrmVideoPlayer{rmVideoPlayer\therm@Cnt}%
+ \else % if not video
% \end{macrocode}
% \subparagraph*{Audio Formats.} Test for a \textsf{MP3} file, we need
% to embed the \texttt{AudioPlayer} once and only once. The Boolean
% \cs{ifrma@EmbedAudioPlayer} and the marker \cs{rma@isAPEmbedded} are used
% to keep track of whether the player has been embedded.
% \begin{macrocode}
- \ifx\rma@tempi\rma@rmAnnot@type@mpiii
+ \ifx\rma@tempi\rma@rmAnnot@type@mpiii
\def\rma@rmAnnot@type{MP3}\edef\rma@mimeType{\rma@mimetype@mpiii}%
\def\rma@poster@descrip{MP3}\def\rma@RMCSubtype{/Sound}%
\xdef\FileStrmAudioPlayer{rmAudioPlayer\therm@Cnt}%
\let\rma@rmAnnot@resources\@empty
\rma@recordAudioPlayer
- \else % not mp3
+ \else % not mp3
% \end{macrocode}
% \subparagraph*{Error.} The extension is not recognized.
% \begin{macrocode}
- \rma@PkEr@i
+ \rma@PkEr@i
% \end{macrocode}
% end testing for 3D (u3d and prc), flash, video, and audio
% \begin{macrocode}
@@ -1477,69 +1674,84 @@
% \end{macrocode}
% Define \cs{rma@thisfileName} and \cs{rma@fullpath} for later use.
% \begin{macrocode}
- \def\rma@thisfileName{\rma@basefilename.\rma@extension}%
- \def\rma@fullpath{\rma@thisfilepath\rma@thisfileName}%
+ \def\rma@thisfileName{\rma@basefilename.\rma@extension}%
+ \def\rma@fullpath{\rma@thisfilepath\rma@thisfileName}%
% \end{macrocode}
% If this is an FLV video file, we don't let the user created flash variables
% \begin{macrocode}
- \ifx\rma@rmAnnot@type\rma@rmAnnot@type@flv
- \let\rma@rmAnnot@flashvars\@empty\fi
- \ifx\rma@rmAnnot@type\rma@rmAnnot@type@mpiii
- \let\rma@rmAnnot@flashvars\@empty\fi
+ \ifx\rma@rmAnnot@type\rma@rmAnnot@type@flv
+ \let\rma@rmAnnot@flashvars\@empty\fi
+ \ifx\rma@rmAnnot@type\rma@rmAnnot@type@mpiii
+ \let\rma@rmAnnot@flashvars\@empty\fi
% \end{macrocode}
% If there is no poster, we supply one. For \textsf{MP3}, it is an image of
% the \texttt{AudioPlayer} controls, otherwise, it is the default poster.
% \begin{macrocode}
\ifx\rma@rmAnnot@poster\@empty
-\ifx\rma@rmAnnot@type\rma@rmAnnot@type@mpiii
- \def\rma@rmAnnot@poster{nramp3poster}%
-\else
+ \ifKV@rmAnnot@defaultposter
\Gin@defaultbp\this@width\rm@Annot@width
\Gin@defaultbp\this@height\rm@Annot@height
\ifdim\rm@Annot@width < \rm@Annot@height
- \edef\calc@prop{\this@width}\else
- \edef\calc@prop{\this@height}\fi
+ \edef\calc@prop{\this@width}\else
+ \edef\calc@prop{\this@height}\fi
\def\this@bbox{0 0 \this@width\space\this@height}%
\begin{sp@createImage}{\this@bbox}{rmAP@#4@\therm@Cnt}%
\rma@invisible
\rma@psgraphics@poster
\end{sp@createImage}%
\def\rma@rmAnnot@poster{rmAP@#4@\therm@Cnt}%
-\fi\fi
+\else
+ \ifx\rma@rmAnnot@type\rma@rmAnnot@type@mpiii
+ \def\rma@rmAnnot@poster{nramp3poster}%
+ \else
+ \Gin@defaultbp\this@width\rm@Annot@width
+ \Gin@defaultbp\this@height\rm@Annot@height
+ \ifdim\rm@Annot@width < \rm@Annot@height
+ \edef\calc@prop{\this@width}\else
+ \edef\calc@prop{\this@height}\fi
+ \def\this@bbox{0 0 \this@width\space\this@height}%
+ \begin{sp@createImage}{\this@bbox}{rmAP@#4@\therm@Cnt}%
+ \rma@invisible
+ \rma@psgraphics@poster
+ \end{sp@createImage}%
+ \def\rma@rmAnnot@poster{rmAP@#4@\therm@Cnt}%
+ \fi
+ \fi
+\fi
% \end{macrocode}
% \paragraph*{Begin the construction of the RMA.}
% Place the dimensions input by the author in a \cs{Bbox} within \cs{pdf@rect}.
-% \cs{Bbox} is defined in the \textsf{eForms} package.
+% \cs{Bbox} is defined in the \pkg{eforms} package.
% \begin{macrocode}
- \pdf@rect{\Bbox{\rm@Annot@width}{\rm@Annot@height}}%
+ \pdf@rect{\Bbox{\rm@Annot@width}{\rm@Annot@height}}%
% \end{macrocode}
% \begin{macrocode}
- \@MXV@newlabel{rmAnnot_\rma@Annot@name}{rmAnnot\therm@Cnt}%
- \@MXV@labeltoaux{rmAnnot_\rma@Annot@name}{rmAnnot\therm@Cnt}%
+ \@MXV@newlabel{rmAnnot_\rma@Annot@name}{rmAnnot\therm@Cnt}%
+ \@MXV@labeltoaux{rmAnnot_\rma@Annot@name}{rmAnnot\therm@Cnt}%
% \end{macrocode}
% Begin writing the rich media annotation through a PostScript special.
% The command \cs{literalps@out} is defined in \textsf{hyperref}.
% \begin{macrocode}
- \literalps@out{%
+ \literalps@out{%
% \end{macrocode}
%
% \paragraph*{Create the RichMedia Annotation.}
%
% \begin{macrocode}
- \ps@mark/_objdef {rmAnnot\therm@Cnt}%
- /Type/Annot%
- /Subtype/RichMedia%
- /NM (\rma@Annot@name)% % Annotation name
+ \ps@mark/_objdef {rmAnnot\therm@Cnt}%
+ /Type/Annot%
+ /Subtype/RichMedia%
+ /NM (\rma@Annot@name)% % Annotation name
\ifx\rma@rmAnnot@poster\@empty\else
- /AP <</N {\rma@rmAnnot@poster}>>% % poster appearance
+ /AP <</N {\rma@rmAnnot@poster}>>% % poster appearance
\fi
- /F 68% % Annotation flags
- /P {ThisPage}% % Parent
- /Border [ 0 0 \rma@rmAnnot@borderwidth ]% Border
- /BS <</Type/Border% % Border Style dictionary
+ /F 68% % Annotation flags
+ /P {ThisPage}% % Parent
+ /Border [ 0 0 \rma@rmAnnot@borderwidth ]% Border
+ /BS <</Type/Border% % Border Style dictionary
/W \rma@rmAnnot@borderwidth% % Width
/S/S% % Border style (Solid)
- >>%
+ >>%
% \end{macrocode}
% The \textbf{RichMedia} annot has a \textbf{RichMediaContent} dictionary, and
% a \textbf{RichMediaSettings} dictionary, give indirect references
@@ -1557,22 +1769,22 @@
% dictionary.
%
% \begin{macrocode}
- \ps@mark/_objdef {rmContent\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmContent\therm@Cnt} <<%
- /Type/RichMediaContent%
+ \ps@mark/_objdef {rmContent\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmContent\therm@Cnt} <<%
+ /Type/RichMediaContent%
% \end{macrocode}
% If this is a RM3DA, we declare it in the \texttt{RichMediaContent}
% dictionary. Here we declare \texttt{/Subtype/3D} and insert a views
% array.
% \begin{macrocode}
\ifrma@isiiid
- /Subtype/3D%
+ /Subtype/3D%
\ifx\@MXV@varray\@empty\else
- /Views [\@MXV@varray]%
+ /Views [\@MXV@varray]%
\fi\fi
- /Configurations [{rmConfig\therm@Cnt}]%
- /Assets {rmAssets\therm@Cnt}%
- >>/PUT pdfmark^^J%
+ /Configurations [{rmConfig\therm@Cnt}]%
+ /Assets {rmAssets\therm@Cnt}%
+ >>/PUT pdfmark^^J%
% \end{macrocode}
%
% \paragraph*{The RichMediaConfiguration dictionary.} We set the primary
@@ -1583,14 +1795,14 @@
% \begin{macrocode}
\ps@mark/_objdef {rmConfig\therm@Cnt}/type/dict/OBJ pdfmark^^J%
\ps@mark{rmConfig\therm@Cnt} <<%
- /Type/RichMediaConfiguration%
- /Name (RMConfig\therm@Cnt)%
+ /Type/RichMediaConfiguration%
+ /Name (RMConfig\therm@Cnt)%
% \end{macrocode}
% The \texttt{Subtype} is \texttt{3D}, \texttt{Flash}, \texttt{Video}, or \texttt{Sound},
% here, \cs{rma@RMCSubtype} was determined earlier.
% \begin{macrocode}
- /Subtype\rma@RMCSubtype%
- /Instances {rmInstances\therm@Cnt}%
+ /Subtype\rma@RMCSubtype%
+ /Instances {rmInstances\therm@Cnt}%
>> /PUT pdfmark^^J%
% \end{macrocode}
% \paragraph*{The Instances Array.}\strut\par\medskip\noindent
@@ -1599,7 +1811,7 @@
\ps@mark/_objdef {rmInstances\therm@Cnt}/type/array/OBJ pdfmark^^J%
\ifrma@isiiid
\ps@mark{rmInstances\therm@Cnt} {rmInstance\therm@Cnt}%
- /APPEND pdfmark^^J%
+ /APPEND pdfmark^^J%
\additional@Instances
\else
% \end{macrocode}
@@ -1607,19 +1819,19 @@
% \begin{macrocode}
\ifx\rma@rmAnnot@type\rma@rmAnnot@type@flv
\ps@mark{rmInstances\therm@Cnt} {rmVideoPlayer\therm@Cnt}%
- /APPEND pdfmark^^J%
+ /APPEND pdfmark^^J%
\else\ifx\rma@rmAnnot@type\rma@rmAnnot@type@swf
% \end{macrocode}
% The Instances array will be populated later by resources.
% \begin{macrocode}
\ps@mark{rmInstances\therm@Cnt} {rmInstance\therm@Cnt}%
- /APPEND pdfmark^^J%
+ /APPEND pdfmark^^J%
\else
% \end{macrocode}
% We load the indirect reference to the AudioPlayer
% \begin{macrocode}
\ps@mark{rmInstances\therm@Cnt} {rmAudioPlayer\therm@Cnt}%
- /APPEND pdfmark^^J%
+ /APPEND pdfmark^^J%
\fi\fi\fi
% \end{macrocode}
%
@@ -1630,31 +1842,31 @@
% the skin select through the skin key is included as assets, and its corresponding \textsf{SWF} needs
% to be embedded, if not embedded already.
% \begin{macrocode}
- \ps@mark/_objdef {rmAssets\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmAssets\therm@Cnt} <<%
- /Names {\rma@ANT}>>/PUT pdfmark^^J%
- \ps@mark/_objdef {\rma@ANT}/type/array/OBJ pdfmark^^J%
+ \ps@mark/_objdef {rmAssets\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmAssets\therm@Cnt} <<%
+ /Names {\rma@ANT}>>/PUT pdfmark^^J%
+ \ps@mark/_objdef {\rma@ANT}/type/array/OBJ pdfmark^^J%
\ifrma@isiiid
- \ps@mark{\rma@ANT} (\rma@thisfileName) /APPEND pdfmark^^J%
- \ps@mark{\rma@ANT} {rmfilespec\therm@Cnt} /APPEND pdfmark^^J%
- \rma@addResources
+ \ps@mark{\rma@ANT} (\rma@thisfileName) /APPEND pdfmark^^J%
+ \ps@mark{\rma@ANT} {rmfilespec\therm@Cnt} /APPEND pdfmark^^J%
+ \rma@addResources
\else
\ifx\rma@rmAnnot@type\rma@rmAnnot@type@swf
- \ifKV@rmAnnot@url\else
- \ps@mark{\rma@ANT} (\rma@thisfileName)/APPEND pdfmark^^J%
- \ps@mark{\rma@ANT} {rmfilespec\therm@Cnt}/APPEND pdfmark^^J%
- \rma@addResources
- \fi
+ \ifKV@rmAnnot@url\else
+ \ps@mark{\rma@ANT} (\rma@thisfileName)/APPEND pdfmark^^J%
+ \ps@mark{\rma@ANT} {rmfilespec\therm@Cnt}/APPEND pdfmark^^J%
+ \rma@addResources
+ \fi
\else\ifx\rma@rmAnnot@type\rma@rmAnnot@type@flv
\ifKV@rmAnnot@url\else
- \ps@mark{\rma@ANT} (\rma@thisfileName)/APPEND pdfmark^^J%
- \ps@mark{\rma@ANT} {rmfilespec\therm@Cnt}/APPEND pdfmark^^J%
- \ifVideoPlayerEx\rma@addResources\fi
+ \ps@mark{\rma@ANT} (\rma@thisfileName)/APPEND pdfmark^^J%
+ \ps@mark{\rma@ANT} {rmfilespec\therm@Cnt}/APPEND pdfmark^^J%
+ \ifVideoPlayerEx\rma@addResources\fi
\fi
\ifx\rma@rmAnnot@Skin\@empty\else
- \ps@mark{\rma@ANT} (\rma@rmAnnot@Skin)/APPEND pdfmark^^J%
- \ps@mark{\rma@ANT} {rmfilespecSkin\rma@skinName}%
- /APPEND pdfmark^^J%
+ \ps@mark{\rma@ANT} (\rma@rmAnnot@Skin)/APPEND pdfmark^^J%
+ \ps@mark{\rma@ANT} {rmfilespecSkin\rma@skinName}%
+ /APPEND pdfmark^^J%
\fi
\ps@mark{\rma@ANT} (\rma@VideoPlayer)/APPEND pdfmark^^J%
\ps@mark{\rma@ANT} {rmfilespecVP}/APPEND pdfmark^^J%
@@ -1672,35 +1884,35 @@
%
% \begin{macrocode}
\ifrma@isiiid
- \ps@mark/_objdef {rmInstance\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmInstance\therm@Cnt}%
+ \ps@mark/_objdef {rmInstance\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmInstance\therm@Cnt}%
\else
\ifx\rma@rmAnnot@type\rma@rmAnnot@type@flv
- \ps@mark/_objdef {rmVideoPlayer\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmVideoPlayer\therm@Cnt}%
+ \ps@mark/_objdef {rmVideoPlayer\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmVideoPlayer\therm@Cnt}%
\else\ifx\rma@rmAnnot@type\rma@rmAnnot@type@swf
- \ps@mark/_objdef {rmInstance\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmInstance\therm@Cnt}%
+ \ps@mark/_objdef {rmInstance\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmInstance\therm@Cnt}%
\else
- \ps@mark/_objdef {rmAudioPlayer\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmAudioPlayer\therm@Cnt}%
+ \ps@mark/_objdef {rmAudioPlayer\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmAudioPlayer\therm@Cnt}%
\fi\fi\fi
<<%
- /Type/RichMediaInstance%
+ /Type/RichMediaInstance%
\ifrma@isiiid
- /Subtype/3D%
- /Asset {rmfilespec\therm@Cnt}%
+ /Subtype/3D%
+ /Asset {rmfilespec\therm@Cnt}%
\else
- /Subtype/Flash%
+ /Subtype/Flash%
\ifx\rma@rmAnnot@type\rma@rmAnnot@type@flv
- /Asset {rmfilespecVP}%
+ /Asset {rmfilespecVP}%
\else\ifx\rma@rmAnnot@type\rma@rmAnnot@type@swf
- /Asset {rmfilespec\therm@Cnt}%
+ /Asset {rmfilespec\therm@Cnt}%
\else
- /Asset {rmfilespecAP}%
+ /Asset {rmfilespecAP}%
\fi\fi\fi
\ifrma@isiiid\else
- /Params {rmParams\therm@Cnt}%
+ /Params {rmParams\therm@Cnt}%
\fi
>> /PUT pdfmark^^J%
% \end{macrocode}
@@ -1713,18 +1925,18 @@
% and is determined by the PDF creation application, this package.
%
% \begin{macrocode}
- \ps@mark/_objdef {rmParams\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmParams\therm@Cnt} <<%
- /Type/RichMediaParams%
+ \ps@mark/_objdef {rmParams\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmParams\therm@Cnt} <<%
+ /Type/RichMediaParams%
% \end{macrocode}
% If there are no additional resources specified, we bind the animation
% to the background, if there are (\textsf{SWF}) resources, we bind to the foreground.
% \begin{macrocode}
\ifrma@isiiid\else
\ifx\rma@rmAnnot@resources\@empty
- /Binding/Background%
+ /Binding/Background%
\else
- /Binding/Foreground%
+ /Binding/Foreground%
\fi\fi
% \end{macrocode}
% If this is a FLV (video), we use the custom flash variables of Acrobat (reverse engineering).
@@ -1732,20 +1944,20 @@
% \begin{macrocode}
\ifrma@isiiid\else
\ifx\rma@rmAnnot@type\rma@rmAnnot@type@flv
- \ifKV@rmAnnot@url
- /FlashVars (source=\rma@fullpath&%
- \else
- /FlashVars (source=\rma@thisfileName&%
- \fi
- \ifx\rma@rmAnnot@Skin\@empty\else
- skin=\rma@rmAnnot@Skin&%
- \fi
- skinAutoHide=\rma@skinAutoHide&%
- skinBackgroundColor=\rma@skinBGColor&%
- skinBackgroundAlpha=\rma@skinBGAlpha&%
- volume=\rma@rmAnnot@volume)
+ \ifKV@rmAnnot@url
+ /FlashVars (source=\rma@fullpath&%
+ \else
+ /FlashVars (source=\rma@thisfileName&%
+ \fi
+ \ifx\rma@rmAnnot@Skin\@empty\else
+ skin=\rma@rmAnnot@Skin&%
+ \fi
+ skinAutoHide=\rma@skinAutoHide&%
+ skinBackgroundColor=\rma@skinBGColor&%
+ skinBackgroundAlpha=\rma@skinBGAlpha&%
+ volume=\rma@rmAnnot@volume)
\ifx\rma@rmAnnot@cuepoints\@empty\else
- /CuePoints [\rma@array@hold]%
+ /CuePoints [\rma@array@hold]%
\fi
\else\ifx\rma@rmAnnot@type\rma@rmAnnot@type@swf
% \end{macrocode}
@@ -1753,12 +1965,12 @@
% hope s/he knows what is s/he is doing.
% \begin{macrocode}
\ifx\rma@rmAnnot@flashvars\@empty\else
- /FlashVars (\rma@rmAnnot@flashvars)%
+ /FlashVars (\rma@rmAnnot@flashvars)%
\fi
\else
- /FlashVars (source=\ifKV@rmAnnot@url\rma@fullpath\else
- \rma@thisfileName\fi&autoPlay=true&%
- volume=\rma@rmAnnot@volume)%
+ /FlashVars (source=\ifKV@rmAnnot@url\rma@fullpath\else
+ \rma@thisfileName\fi&autoPlay=true&%
+ volume=\rma@rmAnnot@volume)%
\fi\fi\fi
>> /PUT pdfmark^^J%
% \end{macrocode}
@@ -1770,45 +1982,45 @@
% deactivation of the annotation, and contains two dictionaries.
%
% \begin{macrocode}
- \ps@mark/_objdef {rmSettings\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmSettings\therm@Cnt} <<%
- /Type/RichMediaSettings%
+ \ps@mark/_objdef {rmSettings\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmSettings\therm@Cnt} <<%
+ /Type/RichMediaSettings%
% \end{macrocode}
% The Activation key is a dictionary that describes how the annot is to be activated
% and played.
% \begin{macrocode}
- /Activation <<%
- /Type/RichMediaActivation%
- /Condition\rma@rmAnnot@enabled
- /Configuration {rmConfig\therm@Cnt}%
+ /Activation <<%
+ /Type/RichMediaActivation%
+ /Condition\rma@rmAnnot@enabled
+ /Configuration {rmConfig\therm@Cnt}%
% \end{macrocode}
% (2011/11/08) Used for Keyframe animation, normally not needed. Will uncomment when I
% develop an example of usage. Note, the \texttt{speed} and \texttt{playcount} keys are now ignored.
% \begin{macrocode}
\ifrma@isiiid
- /Animation%
- <<%
- /Type/RichMediaAnimation%
- /Subtype/Linear%
- /Speed \rma@rmAnnot@speed
- /PlayCount \rma@rmAnnot@playcount
- >>%
+ /Animation%
+ <<%
+ /Type/RichMediaAnimation%
+ /Subtype/Linear%
+ /Speed \rma@rmAnnot@speed
+ /PlayCount \rma@rmAnnot@playcount
+ >>%
\ifx\@MXV@defaultview\@empty\else
- /View \@MXV@defaultview
+ /View \@MXV@defaultview
\fi
\ifx\@MXV@jscriptiiid\@empty\else
- \@MXV@jscriptiiid
+ \@MXV@jscriptiiid
\fi\fi
- /Presentation {rmPresentation\therm@Cnt}%
- >>
+ /Presentation {rmPresentation\therm@Cnt}%
+ >>
% \end{macrocode}
% The Deactivation key is a dictionary that describes how the annot is to be deactivated.
% \begin{macrocode}
- /Deactivation<<%
- /Type/RichMediaDeactivation%
- /Condition\rma@rmAnnot@deactivated
- >>%
->>/PUT pdfmark^^J%
+ /Deactivation<<%
+ /Type/RichMediaDeactivation%
+ /Condition\rma@rmAnnot@deactivated
+ >>%
+ >>/PUT pdfmark^^J%
% \end{macrocode}
% \paragraph*{The CuePoints Array.}
%
@@ -1823,30 +2035,30 @@
% the media is to be played within the page or in a floating window.
%
% \begin{macrocode}
- \ps@mark/_objdef {rmPresentation\therm@Cnt}%
- /type/dict/OBJ pdfmark^^J%
- \ps@mark{rmPresentation\therm@Cnt}<<%
- /Type/RichMediaPresentation%
+ \ps@mark/_objdef {rmPresentation\therm@Cnt}%
+ /type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmPresentation\therm@Cnt}<<%
+ /Type/RichMediaPresentation%
\ifrma@isiiid
- /NavigationPane \rma@rmAnnot@modeltree % need key
- /Toolbar \rma@rmAnnot@toolbar % need key
- /Transparent \rma@rmAnnot@transparent
+ /NavigationPane \rma@rmAnnot@modeltree % need key
+ /Toolbar \rma@rmAnnot@toolbar % need key
+ /Transparent \rma@rmAnnot@transparent
\else
\ifx\rma@rmAnnot@type\rma@rmAnnot@type@swf
- /Transparent \rma@rmAnnot@transparent
- /PassContextClick \rma@rmAnnot@PassContextClick
- /NavigationPan false%
+ /Transparent \rma@rmAnnot@transparent
+ /PassContextClick \rma@rmAnnot@PassContextClick
+ /NavigationPan false%
\else
- /Transparent false%
- /NavigationPan false%
+ /Transparent false%
+ /NavigationPan false%
\fi\fi
\ifKV@rmAnnot@windowed
- /Style/Windowed%
- /Window {rmWindow\therm@Cnt}%
+ /Style/Windowed%
+ /Window {rmWindow\therm@Cnt}%
\else
- /Style/Embedded%
+ /Style/Embedded%
\fi
- >>/PUT pdfmark^^J%
+ >>/PUT pdfmark^^J%
% \end{macrocode}
%
% \paragraph*{The RichMediaWindow Dictionary.} When the style is Windowed
@@ -1857,27 +2069,27 @@
%
% \begin{macrocode}
\ifKV@rmAnnot@windowed
- \ps@mark/_objdef {rmWindow\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmWindow\therm@Cnt}<<%
- /Type/RichMediaWindow%
- /Height<<%
- /Default \rma@winDimPosHeight@def
- /Max \rma@winDimPosHeight@max
- /Min \rma@winDimPosHeight@min
- >>%
- /Width<<%
- /Default \rma@winDimPosWidth@def
- /Max \rma@winDimPosWidth@max
- /Min \rma@winDimPosWidth@min
- >>%
- /Position<<%
- /Type/RichMediaPosition % RichMediaPosition dictionary
- /HAlign\rma@winDimPosPos@halign
- /VAlign\rma@winDimPosPos@valign
- /HOffset \rma@winDimPosPos@hoffset
- /VOffset \rma@winDimPosPos@voffset
- >>%
- >>/PUT pdfmark^^J%
+ \ps@mark/_objdef {rmWindow\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmWindow\therm@Cnt}<<%
+ /Type/RichMediaWindow%
+ /Height<<%
+ /Default \rma@winDimPosHeight@def
+ /Max \rma@winDimPosHeight@max
+ /Min \rma@winDimPosHeight@min
+ >>%
+ /Width<<%
+ /Default \rma@winDimPosWidth@def
+ /Max \rma@winDimPosWidth@max
+ /Min \rma@winDimPosWidth@min
+ >>%
+ /Position<<%
+ /Type/RichMediaPosition % RichMediaPosition dictionary
+ /HAlign\rma@winDimPosPos@halign
+ /VAlign\rma@winDimPosPos@valign
+ /HOffset \rma@winDimPosPos@hoffset
+ /VOffset \rma@winDimPosPos@voffset
+ >>%
+ >>/PUT pdfmark^^J%
\fi
% \end{macrocode}
%
@@ -1895,32 +2107,32 @@
%
% \subparagraph*{File specs: Filespec dictionary}
% \begin{macrocode}
- \ps@mark/_objdef {rmfilespec\therm@Cnt}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmfilespec\therm@Cnt} <<%
+ \ps@mark/_objdef {rmfilespec\therm@Cnt}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmfilespec\therm@Cnt} <<%
\ifKV@rmAnnot@url
- /F(\rma@fullpath)%
- /FS/URL%
+ /F(\rma@fullpath)%
+ /FS/URL%
\else
- /F(\rma@thisfileName)%
- /UF (\rma@thisfileName)%
- /EF <</F {\csname rmFileStrm#4\endcsname}>>
+ /F(\rma@thisfileName)%
+ /UF (\rma@thisfileName)%
+ /EF <</F {\csname rmFileStrm#4\endcsname}>>
\fi
- /Type/Filespec
- >>/PUT pdfmark^^J%
+ /Type/Filespec
+ >>/PUT pdfmark^^J%
% \end{macrocode}
% \paragraph*{File stream: EmbeddedFile dictionary}
% \begin{macrocode}
\ifKV@rmAnnot@url\else
\ifrma@EmbedFile
- \ps@mark/_objdef {\csname rmFileStrm#4\endcsname}%
- /type/stream/OBJ pdfmark^^J%
- \ps@mark{\csname rmFileStrm#4\endcsname} (\rma@fullpath)
- (r) file /PUT pdfmark^^J%
- \ps@mark{\csname rmFileStrm#4\endcsname} <<%
- /Type/EmbeddedFile%
- /Subtype(\rma@mimeType)%
- >>/PUT pdfmark^^J%
- \ps@mark{\csname rmFileStrm#4\endcsname} /CLOSE pdfmark^^J%
+ \ps@mark/_objdef {\csname rmFileStrm#4\endcsname}%
+ /type/stream/OBJ pdfmark^^J%
+ \ps@mark{\csname rmFileStrm#4\endcsname} (\rma@fullpath)
+ (r) file /PUT pdfmark^^J%
+ \ps@mark{\csname rmFileStrm#4\endcsname} <<%
+ /Type/EmbeddedFile%
+ /Subtype(\rma@mimeType)%
+ >>/PUT pdfmark^^J%
+ \ps@mark{\csname rmFileStrm#4\endcsname} /CLOSE pdfmark^^J%
\fi\fi
% \end{macrocode}
% If we are dealing with a \textsf{SWF} or 3D file, we'll then include additional file specs and streams
@@ -1938,28 +2150,28 @@
\ifx\rma@rmAnnot@type\rma@rmAnnot@type@flv
\ifVideoPlayerEx\rma@addFileSpecs\fi
\ifx\rma@rmAnnot@Skin\@empty\else
- \ps@mark/_objdef {rmfilespecSkin\rma@skinName}%
- /type/dict/OBJ pdfmark^^J%
- \ps@mark{rmfilespecSkin\rma@skinName} <<%
- /F (\rma@rmAnnot@Skin)%
- /Type/Filespec%
- /UF (\rma@rmAnnot@Skin)%
- /EF <</F {rmfstreamSkin\rma@skinName}>>
- >>/PUT pdfmark^^J%
+ \ps@mark/_objdef {rmfilespecSkin\rma@skinName}%
+ /type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmfilespecSkin\rma@skinName} <<%
+ /F (\rma@rmAnnot@Skin)%
+ /Type/Filespec%
+ /UF (\rma@rmAnnot@Skin)%
+ /EF <</F {rmfstreamSkin\rma@skinName}>>
+ >>/PUT pdfmark^^J%
% \end{macrocode}
%\paragraph*{File stream for skin}
% \begin{macrocode}
-\rm@csarg\if{embedSkin\rma@skinName}1
- \ps@mark/_objdef {rmfstreamSkin\rma@skinName}%
- /type/stream/OBJ pdfmark^^J%
- \ps@mark{rmfstreamSkin\rma@skinName}%
- (\rma@pathToSkins/\rma@rmAnnot@Skin) (r) file%
- /PUT pdfmark^^J%
- \ps@mark{rmfstreamSkin\rma@skinName} <<%
- /Type/EmbeddedFile
- /Subtype (\rma@mimetype@swf)
- >>/PUT pdfmark^^J%
- \ps@mark{rmfstreamSkin\rma@skinName}/CLOSE pdfmark^^J%
+\rm@csarg\if{embedSkin\rma@skinName}\rm@One
+ \ps@mark/_objdef {rmfstreamSkin\rma@skinName}%
+ /type/stream/OBJ pdfmark^^J%
+ \ps@mark{rmfstreamSkin\rma@skinName}%
+ (\rma@pathToSkins/\rma@rmAnnot@Skin) (r) file%
+ /PUT pdfmark^^J%
+ \ps@mark{rmfstreamSkin\rma@skinName} <<%
+ /Type/EmbeddedFile
+ /Subtype (\rma@mimetype@swf)
+ >>/PUT pdfmark^^J%
+ \ps@mark{rmfstreamSkin\rma@skinName}/CLOSE pdfmark^^J%
\fi\fi\fi
% \end{macrocode}
% Now the specs and stream of the \texttt{VideoPlayer}
@@ -1967,27 +2179,27 @@
%\paragraph*{File specs for video player}
% \begin{macrocode}
\ifx\rma@rmAnnot@type\rma@rmAnnot@type@flv
- \ps@mark/_objdef {rmfilespecVP}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmfilespecVP} <<%
- /Type/Filespec%
- /F (\rma@VideoPlayer)%
- /UF (\rma@VideoPlayer)%
- /EF <</F {rmfstreamVP}>>
- >>/PUT pdfmark^^J%
+ \ps@mark/_objdef {rmfilespecVP}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmfilespecVP} <<%
+ /Type/Filespec%
+ /F (\rma@VideoPlayer)%
+ /UF (\rma@VideoPlayer)%
+ /EF <</F {rmfstreamVP}>>
+ >>/PUT pdfmark^^J%
% \end{macrocode}
% We'll only embed once, provided \cs{ifrma@EmbedVideoPlayer} is true.
%
% \paragraph*{File stream for video player}
% \begin{macrocode}
\ifrma@EmbedVideoPlayer
- \ps@mark/_objdef {rmfstreamVP}/type/stream/OBJ pdfmark^^J%
- \ps@mark{rmfstreamVP} (\rma@pathToPlayers/\rma@VideoPlayer)
- (r) file /PUT pdfmark^^J%
- \ps@mark{rmfstreamVP} <<%
- /Type/EmbeddedFile%
- /Subtype (\rma@mimetype@swf)%
- >>/PUT pdfmark^^J%
- \ps@mark{rmfstreamVP} /CLOSE pdfmark^^J%
+ \ps@mark/_objdef {rmfstreamVP}/type/stream/OBJ pdfmark^^J%
+ \ps@mark{rmfstreamVP} (\rma@pathToPlayers/\rma@VideoPlayer)
+ (r) file /PUT pdfmark^^J%
+ \ps@mark{rmfstreamVP} <<%
+ /Type/EmbeddedFile%
+ /Subtype (\rma@mimetype@swf)%
+ >>/PUT pdfmark^^J%
+ \ps@mark{rmfstreamVP} /CLOSE pdfmark^^J%
\fi\fi
% \end{macrocode}
% Now the specs and stream of the \texttt{AudioPlayer}
@@ -1995,27 +2207,27 @@
% \paragraph*{File specs for audio player}
% \begin{macrocode}
\ifx\rma@rmAnnot@type\rma@rmAnnot@type@mpiii
- \ps@mark/_objdef {rmfilespecAP}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmfilespecAP} <<%
- /F (AudioPlayer.swf)%
- /Type/Filespec%
- /UF (AudioPlayer.swf)%
- /EF <</F {rmfstreamAP}>>%
- >>/PUT pdfmark^^J%
+ \ps@mark/_objdef {rmfilespecAP}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmfilespecAP} <<%
+ /F (AudioPlayer.swf)%
+ /Type/Filespec%
+ /UF (AudioPlayer.swf)%
+ /EF <</F {rmfstreamAP}>>%
+ >>/PUT pdfmark^^J%
% \end{macrocode}
% We'll only embed once, provided \cs{ifrma@EmbedAudioPlayer} is true.
%
%\paragraph*{File stream for audio player}
% \begin{macrocode}
\ifrma@EmbedAudioPlayer
- \ps@mark/_objdef {rmfstreamAP}/type/stream/OBJ pdfmark^^J%
- \ps@mark{rmfstreamAP}(\rma@pathToPlayers/AudioPlayer.swf)
- (r) file /PUT pdfmark^^J%
- \ps@mark{rmfstreamAP} <<%
- /Type/EmbeddedFile%
- /Subtype (\rma@mimetype@mpiii)%
- >>/PUT pdfmark^^J%
- \ps@mark{rmfstreamAP} /CLOSE pdfmark^^J%
+ \ps@mark/_objdef {rmfstreamAP}/type/stream/OBJ pdfmark^^J%
+ \ps@mark{rmfstreamAP}(\rma@pathToPlayers/AudioPlayer.swf)
+ (r) file /PUT pdfmark^^J%
+ \ps@mark{rmfstreamAP} <<%
+ /Type/EmbeddedFile%
+ /Subtype (\rma@mimetype@mpiii)%
+ >>/PUT pdfmark^^J%
+ \ps@mark{rmfstreamAP} /CLOSE pdfmark^^J%
\fi\fi}%
% \end{macrocode}
% If we are using user defined skins, we set the skin just used
@@ -2023,7 +2235,7 @@
% \begin{macrocode}
\ifx\rma@rmAnnot@type@flv\rma@rmAnnot@type
\ifx\rma@rmAnnot@Skin\@empty\else
-\expandafter\global\rm@csarg\let{embedSkin\rma@skinName}=0\relax
+\expandafter\global\rm@csarg\let{embedSkin\rma@skinName}\rm@Zero
\fi\fi
% \end{macrocode}
% \paragraph*{End of \cs{rmAnnot}.} Close off the group, and end the \cs{rmAnnot} command definition.
@@ -2052,49 +2264,69 @@
\newcommand{\defaultPoster}[1]{\def\rma@psgraphics@poster{#1}}
\defaultPoster
{%
- \rma@ps@bg@setcolor
- 0 0 \this@width\space\this@height\space rectfill
- \rma@ps@txt@x\adj@measure\rma@ps@txt@y\adj@measure moveto
- \rma@ps@txt@setcolor/\rma@ps@font\this@height\space
- \rma@ps@relfontsize div selectfont
- \rma@ps@msg
+ \rma@ps@bg@setcolor
+ 0 0 \this@width\space\this@height\space rectfill
+ \rma@ps@txt@x\adj@measure\rma@ps@txt@y\adj@measure moveto
+ \rma@ps@txt@setcolor/\rma@ps@font
+ \rma@ps@relfontsize\rma@ps@fontsize selectfont
+ \rma@ps@msg
}
% \end{macrocode}
% The definitions of the text macros that enable the document author
% to make minor changes in color, font, and placement of text, to
% the default poster.
% \begin{macrocode}
-\def\adj@measure{\calc@prop\space mul 100 div }%
+\def\adj@measure{\calc@prop\space mul 100 div }
\def\rma@ps@bg@setcolor{.7529 setgray }
\def\rma@ps@txt@x{10 }\def\rma@ps@txt@y{10 }
\def\rma@ps@txt@setcolor{.4 setgray }
-\def\rma@ps@font{Helvetica }\def\rma@ps@relfontsize{10 }%
+\def\rma@ps@font{Helvetica }
+\def\rma@ps@relfontsize{10 \adj@measure}
+\let\rma@ps@fontsize\@empty
\def\rma@ps@msg{(\rma@posternote) show}
% \end{macrocode}
% \end{macro}
+% \leavevmode\DescribeMacro{\setPosterProps}\hskip-\marginparsep\texttt{\darg{\ameta{KV-pairs}}}
+% A convenience command to execute \ameta{KV-pairs} from the \texttt{rmPoster} family.
+% Below are the key-values of the \texttt{rmPoster} family for designing your own custom default poster.
+% All values are expressed in PostScript operators.
+%\changes{v2.2}{2020/08/21}{Add user interface to design of default poster}
+% \begin{macrocode}
+\define@key{rmPoster}{color}[]{\def\rma@ps@bg@setcolor{#1 }}
+\define@key{rmPoster}{xPos}[]{\def\rma@ps@txt@x{#1 }}
+\define@key{rmPoster}{yPos}[]{\def\rma@ps@txt@y{#1 }}
+\define@key{rmPoster}{textColor}[]{\def\rma@ps@txt@setcolor{#1 }}
+\define@key{rmPoster}{relTextSize}[]{\def
+ \rma@ps@relfontsize{#1 \adj@measure}%
+ \let\rma@ps@fontsize\@empty}
+\define@key{rmPoster}{textSize}[]{\def\rma@ps@fontsize{#1 }%
+ \let\rma@ps@relfontsize\@empty}
+\define@key{rmPoster}{textFont}[]{\def\rma@ps@font{#1 }}
+\def\setPosterProps#1{\setkeys{rmPoster}{#1}}
+% \end{macrocode}
%
% \begin{macro}{\makePoster}
%
% A convenience command for making posters. Assuming you have an eps of the
% appropriate aspect ratio to use as poster, you can say
-%\begin{verbatim}
-% \makePoster[<graphics_options>]{<name>}{<graphics_file>}
-%\end{verbatim}
+%\begin{Verbatim}[codes={\catcode`\%=9},fontsize=\small,commandchars={!()}]
+%\makePoster[!ameta(graphics_options)]{!ameta(name)}{!ameta(graphics_file)}
+%\end{Verbatim}
% for example
-%\begin{verbatim}
-% \makePoster[hiresbb]{AcroAd_poster}{AcroAd_poster}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},fontsize=\small,commandchars={!()}]
+%\makePoster[hiresbb]{AcroAd_poster}{AcroAd_poster}
+%\end{Verbatim}
% Then you can say
-%\begin{verbatim}
-% \rmAnnot[poster=AcroAd_poster]{612bp}{265bp}{AcroAd}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},fontsize=\small,commandchars={!()}]
+%\rmAnnot[poster=AcroAd_poster]{612bp}{265bp}{AcroAd}
+%\end{Verbatim}
%
% \begin{macrocode}
\providecommand{\makePoster}[3][]{%
- \embedEPS[#1]{rma@#2}{#3}%
- \begin{createImage}{\bboxOf{rma@#2}}{#2}%
- \ps@mark{rma@#2} /SP pdfmark
- \end{createImage}%
+ \embedEPS[#1]{rma@#2}{#3}%
+ \begin{createImage}{\bboxOf{rma@#2}}{#2}%
+ \ps@mark{rma@#2} /SP pdfmark
+ \end{createImage}%
}
\@onlypreamble{\makePoster}
% \end{macrocode}
@@ -2104,20 +2336,20 @@
% Finally, we define several error messages.
% \begin{macrocode}
\def\rma@PkEr@i{%
-\PackageError{rmannot}{%
+ \PackageError{rmannot}{%
You must specify a file with an extension\MessageBreak
of .swf, .flv, .f4v, .mp4, .m4v, .mov, .3gp,\MessageBreak
.3g2, .mp3}{Specify one of the supported file extensions to
embed in this annotation.\MessageBreak
See the rmannot manual for details on supported extensions.}}
\def\rma@PkEr@ii{%
-\PackageError{rmannot}{%
+ \PackageError{rmannot}{%
The name `\rm@argii' has already been used. Either\MessageBreak
you are defining the same path, or a different path\MessageBreak
with the same name}{%
Names must be unique to the document, choose another}}
\def\rma@PkEr@iii#1{%
-\PackageError{rmannot}{%
+ \PackageError{rmannot}{%
No extension supplied with this file name,\MessageBreak#1.%
\MessageBreak Please include a file extension of\MessageBreak
.swf, .flv, or .mp3, as appropriate}{%
@@ -2133,38 +2365,38 @@
% \begin{macrocode}
%<*3Dcode>
% \end{macrocode}
-%\begin{verbatim}
+%\begin{Verbatim}[codes={\catcode`\%=9},fontsize=\small,commandchars={!()}]
%\setRmOptions3D{myDice}
%{
-% 3DOptions={options from movie15},
+% 3DOptions={!ameta(options-from-movie15)},
% 3DResources={%
-% none={rName=<name1>},...,
-% foreground={rName=<name2>,flashvars=<vars>},...,
-% background={rName=<name3>,flashvars=<vars>},...,
-% material={rName=<name4>,mName=<materialName>,flashvars=<vars>},...
+% none={rName=!ameta(name!SUB1)},...,
+% foreground={rName=!ameta(name!SUB2),flashvars=!ameta(vars)},...,
+% background={rName=!ameta(name!SUB3),flashvars=!ameta(vars)},...,
+% material={rName=!ameta(name!SUB4),mName=<materialName>,flashvars=!ameta(vars)},...
% }
%}
-%\end{verbatim}
+%\end{Verbatim}
% \leavevmode\IndexKey{3DOptions (3D)}^^A
% \IndexKey{3DResources (3D)}^^A
% The \texttt{rm3DOptsTopLevel} family supports to top-level keys
% of \cs{setRmOptions3D}: \texttt{3DOptions} and \texttt{3DResources}.
% \begin{macrocode}
\define@key{rm3DOptsTopLevel}{3DOptions}{%
- \def\rmiiiDTLOpts{#1}%
+ \def\rmiiiDTLOpts{#1}%
% \end{macrocode}
% This \cs{define@key}, in turn, executes the family \texttt{MXV@user},
% taken from \textsf{movie15}.
% \begin{macrocode}
- \setkeys{MXV@user}{#1}%
+ \setkeys{MXV@user}{#1}%
}
\define@key{rm3DOptsTopLevel}{3DResources}{%
- \def\rmiiiDOptsTLRes{#1}%
+ \def\rmiiiDOptsTLRes{#1}%
% \end{macrocode}
% This \cs{define@key}, in turn, executes the family \texttt{rm3DOpts},
% an original family defined in this package.
% \begin{macrocode}
- \setkeys{rm3DOpts}{#1}%
+ \setkeys{rm3DOpts}{#1}%
}
% \end{macrocode}
% \paragraph*{3DResources.} This key recognizes the keys \texttt{none},
@@ -2178,12 +2410,12 @@
% defines \cs{rm@irfstrm} for later use.
% \begin{macrocode}
\def\rma@ckFileForEmbed#1#2{%
- \edef\rma@fs@expand{rmFileStrm#1}%
- \@ifundefined{\rma@fs@expand}{%
- \rm@csarg\xdef{\rma@fs@expand}{%
- rmfstream\therm@Cnt-#2#1}\def\rma@embed{1}}%
- {\def\rma@embed{0}}%
- \edef\rm@irfstrm{\@nameuse{rmFileStrm#1}}%
+ \edef\rma@fs@expand{rmFileStrm#1}%
+ \@ifundefined{\rma@fs@expand}{%
+ \rm@csarg\xdef{\rma@fs@expand}{%
+ rmfstream\therm@Cnt-#2#1}\def\rma@embed{1}}%
+ {\def\rma@embed{0}}%
+ \edef\rm@irfstrm{\@nameuse{rmFileStrm#1}}%
}
% \end{macrocode}
% \paragraph*{The \texttt{none} key}\leavevmode\IndexKey{none (3D)}
@@ -2191,108 +2423,108 @@
\define@key{rm3DOpts}{none}{%
% \end{macrocode}
% We use nested key-values, the \texttt{none} key calls the family
-% rm3DOpts@no, defined further below.
+% \texttt{rm3DOpts@no}, defined further below.
% \begin{macrocode}
- \setkeys{rm3DOpts@no}{rName,#1}%
+ \setkeys{rm3DOpts@no}{rName,#1}%
% \end{macrocode}
% Parse the symbolic name, by using \cs{filename@parse}.
% \begin{macrocode}
- \rma@edefexecute{\noexpand
- \filename@parse{\rma@useNamedPath{\rmiiiDOpts@no@rName}}}%
- \rma@ckFileForEmbed{\rmiiiDOpts@no@rName}{NONE}%
+ \rma@edefexecute{\noexpand
+ \filename@parse{\rma@useNamedPath{\rmiiiDOpts@no@rName}}}%
+ \rma@ckFileForEmbed{\rmiiiDOpts@no@rName}{NONE}%
% \end{macrocode}
% Add to the instance array, file specs/stream, and name tree.
% \begin{macrocode}
- \edef\rma@Instances{\rma@Instances
- \ps@mark{rmInstances\therm@Cnt} %
- {rmInstance\therm@Cnt_NONE\rmiiiDOpts@no@rName}%
- /APPEND pdfmark^^J%
- \ps@mark/_objdef{rmInstance\therm@Cnt_NONE%
+ \edef\rma@Instances{\rma@Instances
+ \ps@mark{rmInstances\therm@Cnt} %
+ {rmInstance\therm@Cnt_NONE\rmiiiDOpts@no@rName}%
+ /APPEND pdfmark^^J%
+ \ps@mark/_objdef{rmInstance\therm@Cnt_NONE%
\rmiiiDOpts@no@rName}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmInstance\therm@Cnt_NONE\rmiiiDOpts@no@rName}<<%
- /Asset {rmfilespec\therm@Cnt-NONE\rmiiiDOpts@no@rName}%
- /Type/RichMediaInstance>>/PUT pdfmark^^J%
- \rm@appendFileSpecs{NONE\rmiiiDOpts@no@rName}%
- {\filename@area}{\filename@base.\filename@ext}%
- {\rma@embed}{\rm@irfstrm}{}%
- }%
- \edef\rma@appendToNameTree{\rma@appendToNameTree
- \rm@appendNameTree{NONE\rmiiiDOpts@no@rName}%
- {\filename@area}{\filename@base.\filename@ext}%
- {\rma@embed}{\rm@irfstrm}{}%
- }%
+ \ps@mark{rmInstance\therm@Cnt_NONE\rmiiiDOpts@no@rName}<<%
+ /Asset {rmfilespec\therm@Cnt-NONE\rmiiiDOpts@no@rName}%
+ /Type/RichMediaInstance>>/PUT pdfmark^^J%
+ \rm@appendFileSpecs{NONE\rmiiiDOpts@no@rName}%
+ {\filename@area}{\filename@base.\filename@ext}%
+ {\rma@embed}{\rm@irfstrm}{}%
+ }%
+ \edef\rma@appendToNameTree{\rma@appendToNameTree
+ \rm@appendNameTree{NONE\rmiiiDOpts@no@rName}%
+ {\filename@area}{\filename@base.\filename@ext}%
+ {\rma@embed}{\rm@irfstrm}{}%
+ }%
}
% \end{macrocode}
% \paragraph*{The \texttt{foreground} key}\leavevmode\IndexKey{foreground (3D)}
% \begin{macrocode}
\define@key{rm3DOpts}{foreground}{%
- \setkeys{rm3DOpts@fg}{rName,flashvars,#1}%
+ \setkeys{rm3DOpts@fg}{rName,flashvars,#1}%
% \end{macrocode}
% Parse the symbolic name, by using \cs{filename@parse}.
% \begin{macrocode}
- \rma@edefexecute{\noexpand
- \filename@parse{\rma@useNamedPath{\rmiiiDOpts@fg@rName}}}%
- \rma@ckFileForEmbed{\rmiiiDOpts@fg@rName}{FG}%
+ \rma@edefexecute{\noexpand
+ \filename@parse{\rma@useNamedPath{\rmiiiDOpts@fg@rName}}}%
+ \rma@ckFileForEmbed{\rmiiiDOpts@fg@rName}{FG}%
% \end{macrocode}
% Add to the instance array, file specs/stream, and name tree.
% \begin{macrocode}
- \edef\rma@Instances{\rma@Instances
- \ps@mark{rmInstances\therm@Cnt} %
- {rmInstance\therm@Cnt_FG\rmiiiDOpts@fg@rName}%
- /APPEND pdfmark^^J%
- \ps@mark/_objdef{rmInstance\therm@Cnt_FG%
- \rmiiiDOpts@fg@rName}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmInstance\therm@Cnt_FG\rmiiiDOpts@fg@rName}<<%
- /Asset {rmfilespec\therm@Cnt-FG\rmiiiDOpts@fg@rName}%
- /Params <</Binding/Foreground%
- /FlashVars(\rmiiiDOpts@fg@flashvars)>>%
- /Type/RichMediaInstance%
- >>/PUT pdfmark^^J%
- \rm@appendFileSpecs{FG\rmiiiDOpts@fg@rName}{\filename@area}%
- {\filename@base.\filename@ext}{\rma@embed}%
- {\rm@irfstrm}{}%
- }%
- \edef\rma@appendToNameTree{\rma@appendToNameTree
- \rm@appendNameTree{FG\rmiiiDOpts@fg@rName}{\filename@area}%
- {\filename@base.\filename@ext}{\rma@embed}%
- {\rm@irfstrm}{}%
- }%
+ \edef\rma@Instances{\rma@Instances
+ \ps@mark{rmInstances\therm@Cnt} %
+ {rmInstance\therm@Cnt_FG\rmiiiDOpts@fg@rName}%
+ /APPEND pdfmark^^J%
+ \ps@mark/_objdef{rmInstance\therm@Cnt_FG%
+ \rmiiiDOpts@fg@rName}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmInstance\therm@Cnt_FG\rmiiiDOpts@fg@rName}<<%
+ /Asset {rmfilespec\therm@Cnt-FG\rmiiiDOpts@fg@rName}%
+ /Params <</Binding/Foreground%
+ /FlashVars(\rmiiiDOpts@fg@flashvars)>>%
+ /Type/RichMediaInstance%
+ >>/PUT pdfmark^^J%
+ \rm@appendFileSpecs{FG\rmiiiDOpts@fg@rName}{\filename@area}%
+ {\filename@base.\filename@ext}{\rma@embed}%
+ {\rm@irfstrm}{}%
+ }%
+ \edef\rma@appendToNameTree{\rma@appendToNameTree
+ \rm@appendNameTree{FG\rmiiiDOpts@fg@rName}{\filename@area}%
+ {\filename@base.\filename@ext}{\rma@embed}%
+ {\rm@irfstrm}{}%
+ }%
}
% \end{macrocode}
% \paragraph*{The \texttt{background} key}\leavevmode\IndexKey{background (3D)}
% \begin{macrocode}
\define@key{rm3DOpts}{background}{%
- \setkeys{rm3DOpts@bg}{rName,flashvars,#1}%
+ \setkeys{rm3DOpts@bg}{rName,flashvars,#1}%
% \end{macrocode}
% Parse the symbolic name, by using \cs{filename@parse}.
% \begin{macrocode}
- \rma@edefexecute{\noexpand
- \filename@parse{\rma@useNamedPath{\rmiiiDOpts@bg@rName}}}%
- \rma@ckFileForEmbed{\rmiiiDOpts@bg@rName}{BG}%
+ \rma@edefexecute{\noexpand
+ \filename@parse{\rma@useNamedPath{\rmiiiDOpts@bg@rName}}}%
+ \rma@ckFileForEmbed{\rmiiiDOpts@bg@rName}{BG}%
% \end{macrocode}
% Add to the instance array, file specs/stream, and name tree.
% \begin{macrocode}
- \edef\rma@Instances{\rma@Instances
- \ps@mark{rmInstances\therm@Cnt} %
- {rmInstance\therm@Cnt_BG\rmiiiDOpts@bg@rName}%
- /APPEND pdfmark^^J%
- \ps@mark/_objdef{rmInstance\therm@Cnt_BG%
- \rmiiiDOpts@bg@rName}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmInstance\therm@Cnt_BG\rmiiiDOpts@bg@rName}<<%
- /Asset {rmfilespec\therm@Cnt-BG\rmiiiDOpts@bg@rName}%
- /Params <</Binding/Background%
- /FlashVars(\rmiiiDOpts@bg@flashvars)>>%
- /Type/RichMediaInstance%
- >>/PUT pdfmark^^J%
- \rm@appendFileSpecs{BG\rmiiiDOpts@bg@rName}{\filename@area}%
- {\filename@base.\filename@ext}{\rma@embed}%
- {\rm@irfstrm}{}%
- }%
- \edef\rma@appendToNameTree{\rma@appendToNameTree
- \rm@appendNameTree{BG\rmiiiDOpts@bg@rName}{\filename@area}%
- {\filename@base.\filename@ext}{\rma@embed}%
- {\rm@irfstrm}{}%
- }%
+ \edef\rma@Instances{\rma@Instances
+ \ps@mark{rmInstances\therm@Cnt} %
+ {rmInstance\therm@Cnt_BG\rmiiiDOpts@bg@rName}%
+ /APPEND pdfmark^^J%
+ \ps@mark/_objdef{rmInstance\therm@Cnt_BG%
+ \rmiiiDOpts@bg@rName}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmInstance\therm@Cnt_BG\rmiiiDOpts@bg@rName}<<%
+ /Asset {rmfilespec\therm@Cnt-BG\rmiiiDOpts@bg@rName}%
+ /Params <</Binding/Background%
+ /FlashVars(\rmiiiDOpts@bg@flashvars)>>%
+ /Type/RichMediaInstance%
+ >>/PUT pdfmark^^J%
+ \rm@appendFileSpecs{BG\rmiiiDOpts@bg@rName}{\filename@area}%
+ {\filename@base.\filename@ext}{\rma@embed}%
+ {\rm@irfstrm}{}%
+ }%
+ \edef\rma@appendToNameTree{\rma@appendToNameTree
+ \rm@appendNameTree{BG\rmiiiDOpts@bg@rName}{\filename@area}%
+ {\filename@base.\filename@ext}{\rma@embed}%
+ {\rm@irfstrm}{}%
+ }%
}
% \end{macrocode}
%\leavevmode\IndexKey{material (3D)}^^A
@@ -2303,38 +2535,38 @@
% application.
% \begin{macrocode}
\define@key{rm3DOpts}{material}{%
- \setkeys{rm3DOpts@mat}{rName,mName,flashvars,#1}%
+ \setkeys{rm3DOpts@mat}{rName,mName,flashvars,#1}%
% \end{macrocode}
% Parse the symbolic name, by using \cs{filename@parse}.
% \begin{macrocode}
- \rma@edefexecute{\noexpand
- \filename@parse{\rma@useNamedPath{\rmiiiDOpts@mat@rName}}}%
- \rma@ckFileForEmbed{\rmiiiDOpts@mat@rName}{MAT}%
+ \rma@edefexecute{\noexpand
+ \filename@parse{\rma@useNamedPath{\rmiiiDOpts@mat@rName}}}%
+ \rma@ckFileForEmbed{\rmiiiDOpts@mat@rName}{MAT}%
% \end{macrocode}
% Add to the instance array, file specs/stream, and name tree.
% \begin{macrocode}
- \edef\rma@Instances{\rma@Instances
- \ps@mark{rmInstances\therm@Cnt} %
- {rmInstance\therm@Cnt_MAT\rmiiiDOpts@mat@rName}%
- /APPEND pdfmark^^J%
- \ps@mark/_objdef{rmInstance\therm@Cnt_MAT%
- \rmiiiDOpts@mat@rName}/type/dict/OBJ pdfmark^^J%
- \ps@mark{rmInstance\therm@Cnt_MAT\rmiiiDOpts@mat@rName}<<%
- /Asset {rmfilespec\therm@Cnt-MAT\rmiiiDOpts@mat@rName}%
- /Params <</Binding/Material%
- /BindingMaterialName(\rmiiiDOpts@mat@mName)%
- /FlashVars(\rmiiiDOpts@mat@flashvars)>>%
- /Type/RichMediaInstance%
- >>/PUT pdfmark^^J%
- \rm@appendFileSpecs{MAT\rmiiiDOpts@mat@rName}{\filename@area}%
- {\filename@base.\filename@ext}{\rma@embed}%
- {\rm@irfstrm}{}%
- }%
- \edef\rma@appendToNameTree{\rma@appendToNameTree
- \rm@appendNameTree{MAT\rmiiiDOpts@mat@rName}{\filename@area}%
- {\filename@base.\filename@ext}{\rma@embed}%
- {\rm@irfstrm}{}%
- }%
+ \edef\rma@Instances{\rma@Instances
+ \ps@mark{rmInstances\therm@Cnt} %
+ {rmInstance\therm@Cnt_MAT\rmiiiDOpts@mat@rName}%
+ /APPEND pdfmark^^J%
+ \ps@mark/_objdef{rmInstance\therm@Cnt_MAT%
+ \rmiiiDOpts@mat@rName}/type/dict/OBJ pdfmark^^J%
+ \ps@mark{rmInstance\therm@Cnt_MAT\rmiiiDOpts@mat@rName}<<%
+ /Asset {rmfilespec\therm@Cnt-MAT\rmiiiDOpts@mat@rName}%
+ /Params <</Binding/Material%
+ /BindingMaterialName(\rmiiiDOpts@mat@mName)%
+ /FlashVars(\rmiiiDOpts@mat@flashvars)>>%
+ /Type/RichMediaInstance%
+ >>/PUT pdfmark^^J%
+ \rm@appendFileSpecs{MAT\rmiiiDOpts@mat@rName}{\filename@area}%
+ {\filename@base.\filename@ext}{\rma@embed}%
+ {\rm@irfstrm}{}%
+ }%
+ \edef\rma@appendToNameTree{\rma@appendToNameTree
+ \rm@appendNameTree{MAT\rmiiiDOpts@mat@rName}{\filename@area}%
+ {\filename@base.\filename@ext}{\rma@embed}%
+ {\rm@irfstrm}{}%
+ }%
}
% \end{macrocode}
% \paragraph*{Process \texttt{none} values}
@@ -2356,7 +2588,7 @@
\define@key{rm3DOpts@mat}{rName}[]{\def\rmiiiDOpts@mat@rName{#1}}
\define@key{rm3DOpts@mat}{mName}[]{\def\rmiiiDOpts@mat@mName{#1}}
\define@key{rm3DOpts@mat}{flashvars}[]{%
- \def\rmiiiDOpts@mat@flashvars{#1}}
+ \def\rmiiiDOpts@mat@flashvars{#1}}
% \end{macrocode}
% \subsubsection{Code from \textsf{movie15}}
% My gracious thanks to Alexander Grahn for granting permission to use
@@ -2407,354 +2639,354 @@
% \end{macrocode}
%View vector (opposite to c2c)
% \begin{macrocode}
- \FPupn\@MXV@viewx{#4 neg}%
- \FPupn\@MXV@viewy{#5 neg}%
- \FPupn\@MXV@viewz{#6 neg}%
+ \FPupn\@MXV@viewx{#4 neg}%
+ \FPupn\@MXV@viewy{#5 neg}%
+ \FPupn\@MXV@viewz{#6 neg}%
% \end{macrocode}
% Normalize view vector
% \begin{macrocode}
- \FPupn\@MXV@modulo{\@MXV@viewx{} copy mul %
- \@MXV@viewy{} copy mul + %
- \@MXV@viewz{} copy mul + 2 swap root%
- }%
- \FPupn\@MXV@viewx{\@MXV@viewx{} \@MXV@modulo{} div}%
- \FPupn\@MXV@viewy{\@MXV@viewy{} \@MXV@modulo{} div}%
- \FPupn\@MXV@viewz{\@MXV@viewz{} \@MXV@modulo{} div}%
+ \FPupn\@MXV@modulo{\@MXV@viewx{} copy mul %
+ \@MXV@viewy{} copy mul + %
+ \@MXV@viewz{} copy mul + 2 swap root%
+ }%
+ \FPupn\@MXV@viewx{\@MXV@viewx{} \@MXV@modulo{} div}%
+ \FPupn\@MXV@viewy{\@MXV@viewy{} \@MXV@modulo{} div}%
+ \FPupn\@MXV@viewz{\@MXV@viewz{} \@MXV@modulo{} div}%
% \end{macrocode}
% Camera roll
% \begin{macrocode}
- \FPupn\@MXV@sinroll{#8 180.0 div \FPpi{} mul sin}%
- \FPupn\@MXV@cosroll{#8 180.0 div \FPpi{} mul cos}%
+ \FPupn\@MXV@sinroll{#8 180.0 div \FPpi{} mul sin}%
+ \FPupn\@MXV@cosroll{#8 180.0 div \FPpi{} mul cos}%
% \end{macrocode}
% Top and bottom views
% \begin{macrocode}
- \FPupn\@MXV@leftx{-1.0}%
- \FPupn\@MXV@lefty{0.0}%
- \FPupn\@MXV@leftz{0.0}%
- \FPifneg\@MXV@viewz% top view
- %up-vector
- \FPupn\@MXV@upx{0.0}%
- \FPupn\@MXV@upy{1.0}%
- \FPupn\@MXV@upz{0.0}%
- \else% bottom view
- %up-vector
- \FPupn\@MXV@upx{0.0}%
- \FPupn\@MXV@upy{-1.0}%
- \FPupn\@MXV@upz{0.0}%
- \fi%
- \FPupn\@MXV@sumxy{\@MXV@viewx{} abs \@MXV@viewy{} abs add}%
- \FPifeq\@MXV@sumxy{0}\else% other views than top and bottom
- %up-vector = up_world - (up_world dot view) view
- \FPupn\@MXV@upx{\@MXV@viewz{} \@MXV@viewx{} mul neg}%
- \FPupn\@MXV@upy{\@MXV@viewz{} \@MXV@viewy{} mul neg}%
- \FPupn\@MXV@upz{\@MXV@viewz{} \@MXV@viewz{} mul neg 1.0 add}%
- %normalize up-vector
- \FPupn\@MXV@modulo{\@MXV@upx{} copy mul \@MXV@upy{} copy %
- mul + \@MXV@upz{} copy mul + 2 swap root}%
- \FPupn\@MXV@upx{\@MXV@upx{} \@MXV@modulo{} div}%
- \FPupn\@MXV@upy{\@MXV@upy{} \@MXV@modulo{} div}%
- \FPupn\@MXV@upz{\@MXV@upz{} \@MXV@modulo{} div}%
- %left vector = up x view
- \FPupn\@MXV@leftx{\@MXV@viewz{} \@MXV@upy{} mul %
- \@MXV@viewy{} \@MXV@upz{} mul sub}%
- \FPupn\@MXV@lefty{\@MXV@viewx{} \@MXV@upz{} mul %
- \@MXV@viewz{} \@MXV@upx{} mul sub}%
- \FPupn\@MXV@leftz{\@MXV@viewy{} \@MXV@upx{} mul %
- \@MXV@viewx{} \@MXV@upy{} mul sub}%
- %normalize left vector
- \FPupn\@MXV@modulo{\@MXV@leftx{} copy mul \@MXV@lefty{} %
- copy mul + \@MXV@leftz{} copy mul + 2 swap root}%
- \FPupn\@MXV@leftx{\@MXV@leftx{} \@MXV@modulo{} div}%
- \FPupn\@MXV@lefty{\@MXV@lefty{} \@MXV@modulo{} div}%
- \FPupn\@MXV@leftz{\@MXV@leftz{} \@MXV@modulo{} div}%
- \fi%
+ \FPupn\@MXV@leftx{-1.0}%
+ \FPupn\@MXV@lefty{0.0}%
+ \FPupn\@MXV@leftz{0.0}%
+ \FPifneg\@MXV@viewz% top view
+ %up-vector
+ \FPupn\@MXV@upx{0.0}%
+ \FPupn\@MXV@upy{1.0}%
+ \FPupn\@MXV@upz{0.0}%
+ \else% bottom view
+ %up-vector
+ \FPupn\@MXV@upx{0.0}%
+ \FPupn\@MXV@upy{-1.0}%
+ \FPupn\@MXV@upz{0.0}%
+ \fi%
+ \FPupn\@MXV@sumxy{\@MXV@viewx{} abs \@MXV@viewy{} abs add}%
+ \FPifeq\@MXV@sumxy{0}\else% other views than top and bottom
+ %up-vector = up_world - (up_world dot view) view
+ \FPupn\@MXV@upx{\@MXV@viewz{} \@MXV@viewx{} mul neg}%
+ \FPupn\@MXV@upy{\@MXV@viewz{} \@MXV@viewy{} mul neg}%
+ \FPupn\@MXV@upz{\@MXV@viewz{} \@MXV@viewz{} mul neg 1.0 add}%
+ %normalize up-vector
+ \FPupn\@MXV@modulo{\@MXV@upx{} copy mul \@MXV@upy{} copy %
+ mul + \@MXV@upz{} copy mul + 2 swap root}%
+ \FPupn\@MXV@upx{\@MXV@upx{} \@MXV@modulo{} div}%
+ \FPupn\@MXV@upy{\@MXV@upy{} \@MXV@modulo{} div}%
+ \FPupn\@MXV@upz{\@MXV@upz{} \@MXV@modulo{} div}%
+ %left vector = up x view
+ \FPupn\@MXV@leftx{\@MXV@viewz{} \@MXV@upy{} mul %
+ \@MXV@viewy{} \@MXV@upz{} mul sub}%
+ \FPupn\@MXV@lefty{\@MXV@viewx{} \@MXV@upz{} mul %
+ \@MXV@viewz{} \@MXV@upx{} mul sub}%
+ \FPupn\@MXV@leftz{\@MXV@viewy{} \@MXV@upx{} mul %
+ \@MXV@viewx{} \@MXV@upy{} mul sub}%
+ %normalize left vector
+ \FPupn\@MXV@modulo{\@MXV@leftx{} copy mul \@MXV@lefty{} %
+ copy mul + \@MXV@leftz{} copy mul + 2 swap root}%
+ \FPupn\@MXV@leftx{\@MXV@leftx{} \@MXV@modulo{} div}%
+ \FPupn\@MXV@lefty{\@MXV@lefty{} \@MXV@modulo{} div}%
+ \FPupn\@MXV@leftz{\@MXV@leftz{} \@MXV@modulo{} div}%
+ \fi%
% \end{macrocode}
% Apply camera roll
% \begin{macrocode}
- \FPupn\@MXV@leftxprime{\@MXV@leftx{} \@MXV@cosroll{} mul %
- \@MXV@upx{} \@MXV@sinroll{} mul +}%
- \FPupn\@MXV@leftyprime{\@MXV@lefty{} \@MXV@cosroll{} mul %
- \@MXV@upy{} \@MXV@sinroll{} mul +}%
- \FPupn\@MXV@leftzprime{\@MXV@leftz{} \@MXV@cosroll{} mul %
- \@MXV@upz{} \@MXV@sinroll{} mul +}%
- \FPupn\@MXV@upxprime{\@MXV@upx{} \@MXV@cosroll{} mul %
- \@MXV@leftx{} \@MXV@sinroll{} mul sub}%
- \FPupn\@MXV@upyprime{\@MXV@upy{} \@MXV@cosroll{} mul %
- \@MXV@lefty{} \@MXV@sinroll{} mul sub}%
- \FPupn\@MXV@upzprime{\@MXV@upz{} \@MXV@cosroll{} mul %
- \@MXV@leftz{} \@MXV@sinroll{} mul sub}%
- \FPupn\@MXV@leftx{\@MXV@leftxprime}%
- \FPupn\@MXV@lefty{\@MXV@leftyprime}%
- \FPupn\@MXV@leftz{\@MXV@leftzprime}%
- \FPupn\@MXV@upx{\@MXV@upxprime}%
- \FPupn\@MXV@upy{\@MXV@upyprime}%
- \FPupn\@MXV@upz{\@MXV@upzprime}%
+ \FPupn\@MXV@leftxprime{\@MXV@leftx{} \@MXV@cosroll{} mul %
+ \@MXV@upx{} \@MXV@sinroll{} mul +}%
+ \FPupn\@MXV@leftyprime{\@MXV@lefty{} \@MXV@cosroll{} mul %
+ \@MXV@upy{} \@MXV@sinroll{} mul +}%
+ \FPupn\@MXV@leftzprime{\@MXV@leftz{} \@MXV@cosroll{} mul %
+ \@MXV@upz{} \@MXV@sinroll{} mul +}%
+ \FPupn\@MXV@upxprime{\@MXV@upx{} \@MXV@cosroll{} mul %
+ \@MXV@leftx{} \@MXV@sinroll{} mul sub}%
+ \FPupn\@MXV@upyprime{\@MXV@upy{} \@MXV@cosroll{} mul %
+ \@MXV@lefty{} \@MXV@sinroll{} mul sub}%
+ \FPupn\@MXV@upzprime{\@MXV@upz{} \@MXV@cosroll{} mul %
+ \@MXV@leftz{} \@MXV@sinroll{} mul sub}%
+ \FPupn\@MXV@leftx{\@MXV@leftxprime}%
+ \FPupn\@MXV@lefty{\@MXV@leftyprime}%
+ \FPupn\@MXV@leftz{\@MXV@leftzprime}%
+ \FPupn\@MXV@upx{\@MXV@upxprime}%
+ \FPupn\@MXV@upy{\@MXV@upyprime}%
+ \FPupn\@MXV@upz{\@MXV@upzprime}%
% \end{macrocode}
% Translation vector
% \begin{macrocode}
- \FPupn\@MXV@roo{#7 abs}%
- \FPifeq\@MXV@roo{0}\FPupn\@MXV@roo{0.0000001}\fi%
- \FPupn\@MXV@transx{#1 \@MXV@roo{} \@MXV@viewx{} mul sub}%
- \FPupn\@MXV@transy{#2 \@MXV@roo{} \@MXV@viewy{} mul sub}%
- \FPupn\@MXV@transz{#3 \@MXV@roo{} \@MXV@viewz{} mul sub}%
+ \FPupn\@MXV@roo{#7 abs}%
+ \FPifeq\@MXV@roo{0}\FPupn\@MXV@roo{0.0000001}\fi%
+ \FPupn\@MXV@transx{#1 \@MXV@roo{} \@MXV@viewx{} mul sub}%
+ \FPupn\@MXV@transy{#2 \@MXV@roo{} \@MXV@viewy{} mul sub}%
+ \FPupn\@MXV@transz{#3 \@MXV@roo{} \@MXV@viewz{} mul sub}%
% \end{macrocode}
% Rotation matrix
% \begin{macrocode}
- \xdef\@MXV@matrix{%
- \@MXV@leftx\space\@MXV@lefty\space\@MXV@leftz\space%
- \@MXV@upx\space\@MXV@upy\space\@MXV@upz\space%
- \@MXV@viewx\space\@MXV@viewy\space\@MXV@viewz}%
+ \xdef\@MXV@matrix{%
+ \@MXV@leftx\space\@MXV@lefty\space\@MXV@leftz\space%
+ \@MXV@upx\space\@MXV@upy\space\@MXV@upz\space%
+ \@MXV@viewx\space\@MXV@viewy\space\@MXV@viewz}%
% \end{macrocode}
% Transformation matrix
% \begin{macrocode}
- \xdef\@MXV@matrix{%
- \@MXV@matrix\space\@MXV@transx\space%
- \@MXV@transy\space\@MXV@transz%
- }%
+ \xdef\@MXV@matrix{%
+ \@MXV@matrix\space\@MXV@transx\space%
+ \@MXV@transy\space\@MXV@transz%
+ }%
}% end of \@MXV@ciiwmatrix
% \end{macrocode}
% Macro for parsing one line of 3D views file (old format)
% \begin{macrocode}
\newcommand{\@MXV@parseline}[6][]{%
- \pdfstringdef\@MXV@xname{#1}% name of the view (optional)
- \ifthenelse{\equal{#2}{}}{%
- \xdef\@MXV@coo{0 0 0}%
- }{%
- \xdef\@MXV@coo{#2}%
- }%
- \ifthenelse{\equal{#3}{}}{%
- \xdef\@MXV@ctoc{0 -1 0}%
- }{%
- \xdef\@MXV@ctoc{#3}%
- }%
- \ifthenelse{\equal{#4}{}}{%
- \xdef\@MXV@roo{0}%
- }{%
- \xdef\@MXV@roo{#4}%
- }%
- \ifthenelse{\equal{#5}{}}{%
- \xdef\@MXV@roll{0}%
- }{%
- \xdef\@MXV@roll{#5}%
- }%
- \ifthenelse{\equal{#6}{}}{%
- \xdef\@MXV@aac{30}%
- }{%
- \xdef\@MXV@aac{#6}%
- }%
+ \pdfstringdef\@MXV@xname{#1}% name of the view (optional)
+ \ifthenelse{\equal{#2}{}}{%
+ \xdef\@MXV@coo{0 0 0}%
+ }{%
+ \xdef\@MXV@coo{#2}%
+ }%
+ \ifthenelse{\equal{#3}{}}{%
+ \xdef\@MXV@ctoc{0 -1 0}%
+ }{%
+ \xdef\@MXV@ctoc{#3}%
+ }%
+ \ifthenelse{\equal{#4}{}}{%
+ \xdef\@MXV@roo{0}%
+ }{%
+ \xdef\@MXV@roo{#4}%
+ }%
+ \ifthenelse{\equal{#5}{}}{%
+ \xdef\@MXV@roll{0}%
+ }{%
+ \xdef\@MXV@roll{#5}%
+ }%
+ \ifthenelse{\equal{#6}{}}{%
+ \xdef\@MXV@aac{30}%
+ }{%
+ \xdef\@MXV@aac{#6}%
+ }%
}
% \end{macrocode}
% For parsing lines of views file (new format)
% \begin{macrocode}
\define@key{MXV@view}{VIEW}[]{%
- \ifnum\@MXV@cursection<\z@\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- A VIEW section cannot be nested into another section}{}%
- \fi%
- \def\@MXV@cursection{0}%
- \pdfstringdef\@MXV@xname{#1}% name of the view (optional)
- %default camera settings
- \gdef\@MXV@coo{0 0 0}%
- \gdef\@MXV@ctoc{0 -1 0}%
- \gdef\@MXV@roo{0}%
- \gdef\@MXV@roll{0}%
- \gdef\@MXV@aac{30}%
- %default background, lights, render mode
- \xdef\@MXV@background{/BG <</CS/DeviceRGB/C [\@MXV@defaultbg]>>}%
- \xdef\@MXV@lights{/LS <</Subtype/\@MXV@defaultlights>>}%
- \gdef\@MXV@render{/RM <</Subtype/\@MXV@defaultrender>>}%
- %initialise array of node dicts
- \gdef\@MXV@naarray{}%
- \global\@MXV@nodecount=\z@
- %initialise array of crosssection dicts
- \gdef\@MXV@saarray{}%
- \global\@MXV@cscount=\z@
+ \ifnum\@MXV@cursection<\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ A VIEW section cannot be nested into another section}{}%
+ \fi%
+ \def\@MXV@cursection{0}%
+ \pdfstringdef\@MXV@xname{#1}% name of the view (optional)
+ %default camera settings
+ \gdef\@MXV@coo{0 0 0}%
+ \gdef\@MXV@ctoc{0 -1 0}%
+ \gdef\@MXV@roo{0}%
+ \gdef\@MXV@roll{0}%
+ \gdef\@MXV@aac{30}%
+ %default background, lights, render mode
+ \xdef\@MXV@background{/BG <</CS/DeviceRGB/C [\@MXV@defaultbg]>>}%
+ \xdef\@MXV@lights{/LS <</Subtype/\@MXV@defaultlights>>}%
+ \gdef\@MXV@render{/RM <</Subtype/\@MXV@defaultrender>>}%
+ %initialise array of node dicts
+ \gdef\@MXV@naarray{}%
+ \global\@MXV@nodecount=\z@
+ %initialise array of crosssection dicts
+ \gdef\@MXV@saarray{}%
+ \global\@MXV@cscount=\z@
}
\define@key{MXV@view}{COO}{%
- \ifnum\@MXV@cursection=\z@\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- COO entry not allowed here; must go into a VIEW section}{}%
- \fi%
- \xdef\@MXV@coo{#1}%
+ \ifnum\@MXV@cursection=\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ COO entry not allowed here; must go into a VIEW section}{}%
+ \fi%
+ \xdef\@MXV@coo{#1}%
}
\define@key{MXV@view}{C2C}{%
- \ifnum\@MXV@cursection=\z@\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- C2C entry not allowed here; must go into a VIEW section}{}%
- \fi\xdef\@MXV@ctoc{#1}%
+ \ifnum\@MXV@cursection=\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ C2C entry not allowed here; must go into a VIEW section}{}%
+ \fi\xdef\@MXV@ctoc{#1}%
}
\define@key{MXV@view}{ROO}{%
- \ifnum\@MXV@cursection=\z@\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- ROO entry not allowed here; must go into a VIEW section}{}%
- \fi\xdef\@MXV@roo{#1}%
+ \ifnum\@MXV@cursection=\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ ROO entry not allowed here; must go into a VIEW section}{}%
+ \fi\xdef\@MXV@roo{#1}%
}
\define@key{MXV@view}{AAC}{%
- \ifnum\@MXV@cursection=\z@\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- AAC entry not allowed here; must go into a VIEW section}{}%
- \fi\xdef\@MXV@aac{#1}%
+ \ifnum\@MXV@cursection=\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ AAC entry not allowed here; must go into a VIEW section}{}%
+ \fi\xdef\@MXV@aac{#1}%
}
\define@key{MXV@view}{ROLL}{%
- \ifnum\@MXV@cursection=\z@\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- ROLL entry not allowed here; must go into a VIEW section}{}%
- \fi\xdef\@MXV@roll{#1}%
+ \ifnum\@MXV@cursection=\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ ROLL entry not allowed here; must go into a VIEW section}{}%
+ \fi\xdef\@MXV@roll{#1}%
}
\define@key{MXV@view}{BGCOLOR}{%
- \ifnum\@MXV@cursection=\z@\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- BGCOLOR entry not allowed here; must go into a VIEW section}{}%
- \fi\def\@MXV@background{/BG<</CS/DeviceRGB/C[#1]>>}%
+ \ifnum\@MXV@cursection=\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ BGCOLOR entry not allowed here; must go into a VIEW section}{}%
+ \fi\def\@MXV@background{/BG<</CS/DeviceRGB/C[#1]>>}%
}
\define@key{MXV@view}{LIGHTS}{%
- \ifnum\@MXV@cursection=\z@\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- LIGHTS entry not allowed here; must go into a VIEW section}{}%
- \fi\def\@MXV@lights{/LS <</Subtype/#1>>}%
+ \ifnum\@MXV@cursection=\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ LIGHTS entry not allowed here; must go into a VIEW section}{}%
+ \fi\def\@MXV@lights{/LS <</Subtype/#1>>}%
}
\define@key{MXV@view}{RENDERMODE}{%
- \ifnum\@MXV@cursection=\z@
- \def\@MXV@render{/RM <</Subtype/#1>>}%
+ \ifnum\@MXV@cursection=\z@
+ \def\@MXV@render{/RM <</Subtype/#1>>}%
+ \else%
+ \ifnum\@MXV@cursection=\@ne
+ \def\@MXV@nrender{/RM <</Subtype/#1>>}%
\else%
- \ifnum\@MXV@cursection=\@ne
- \def\@MXV@nrender{/RM <</Subtype/#1>>}%
- \else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- RENDERMODE entry not allowed here; must go into %
- either a VIEW or a PART section}{}%
- \fi%
- \fi%
-}
-\define@key{MXV@view}{PART}[]{%
- \ifnum\@MXV@cursection=\z@\else%
\PackageError{rmannot}{%
File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- PART not allowed here; must be a sub-section of %
- a VIEW section}{}%
+ RENDERMODE entry not allowed here; must go into %
+ either a VIEW or a PART section}{}%
\fi%
- \ifthenelse{\equal{#1}{}}{%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- You must provide a valid PART name (PART=<part name>), as
- shown in the model tree of the 3D object %
- (go to `View'->`Navigation Panels'->`Model Tree' %
- in Adobe Reader)}{}%
- }{}%
- \def\@MXV@cursection{1}%
- \pdfstringdef\@MXV@partname{#1}% name of the part
- \gdef\@MXV@nopacity{}%
- \gdef\@MXV@nvisibility{}%
- \gdef\@MXV@nrender{}%
- \gdef\@MXV@ntransform{}%
+ \fi%
+}
+\define@key{MXV@view}{PART}[]{%
+ \ifnum\@MXV@cursection=\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ PART not allowed here; must be a sub-section of %
+ a VIEW section}{}%
+ \fi%
+ \ifthenelse{\equal{#1}{}}{%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ You must provide a valid PART name (PART=<part name>), as
+ shown in the model tree of the 3D object %
+ (go to `View'->`Navigation Panels'->`Model Tree' %
+ in Adobe Reader)}{}%
+ }{}%
+ \def\@MXV@cursection{1}%
+ \pdfstringdef\@MXV@partname{#1}% name of the part
+ \gdef\@MXV@nopacity{}%
+ \gdef\@MXV@nvisibility{}%
+ \gdef\@MXV@nrender{}%
+ \gdef\@MXV@ntransform{}%
}
\define@key{MXV@view}{CROSSSECT}[]{%
- \ifnum\@MXV@cursection=\z@\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- CROSSSECT not allowed here; must be a sub-section of %
- a VIEW section}{}%
- \fi%
- \ifthenelse{\equal{#1}{}}{}{%
- \PackageWarning{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- CROSSECT does not take a value%
- }%
+ \ifnum\@MXV@cursection=\z@\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ CROSSSECT not allowed here; must be a sub-section of %
+ a VIEW section}{}%
+ \fi%
+ \ifthenelse{\equal{#1}{}}{}{%
+ \PackageWarning{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ CROSSECT does not take a value%
}%
- \def\@MXV@cursection{2}%
- \gdef\@MXV@cscenter{0 0 0}%
- \gdef\@MXV@csorient{null 0 0}%
+ }%
+ \def\@MXV@cursection{2}%
+ \gdef\@MXV@cscenter{0 0 0}%
+ \gdef\@MXV@csorient{null 0 0}%
}
\define@key{MXV@view}{OPACITY}{%
- \ifnum\@MXV@cursection=\@ne\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- OPACITY entry not allowed here; must go into a PART section}{}%
- \fi%
- \gdef\@MXV@nopacity{/O #1}%
+ \ifnum\@MXV@cursection=\@ne\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ OPACITY entry not allowed here; must go into a PART section}{}%
+ \fi%
+ \gdef\@MXV@nopacity{/O #1}%
}
\define@key{MXV@view}{VISIBLE}{%
- \ifnum\@MXV@cursection=\@ne\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- VISIBLE entry not allowed here; must go into a PART section}{}%
- \fi%
- \gdef\@MXV@nvisibility{/V #1}%
+ \ifnum\@MXV@cursection=\@ne\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ VISIBLE entry not allowed here; must go into a PART section}{}%
+ \fi%
+ \gdef\@MXV@nvisibility{/V #1}%
}
\define@key{MXV@view}{MATRIX}{%
- \ifnum\@MXV@cursection=\@ne\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- MATRIX entry not allowed here; must go into a PART section}{}%
- \fi%
- \gdef\@MXV@ntransform{/M [#1]}%
+ \ifnum\@MXV@cursection=\@ne\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ MATRIX entry not allowed here; must go into a PART section}{}%
+ \fi%
+ \gdef\@MXV@ntransform{/M [#1]}%
}
\define@key{MXV@view}{CENTER}{%
- \ifnum\@MXV@cursection=2\relax\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: CENTER %
- entry not allowed here; must go into a CROSSECT section}{}%
- \fi%
- \gdef\@MXV@cscenter{#1}%
+ \ifnum\@MXV@cursection=2\relax\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: CENTER %
+ entry not allowed here; must go into a CROSSECT section}{}%
+ \fi%
+ \gdef\@MXV@cscenter{#1}%
}
\define@key{MXV@view}{ORIENTATION}{%
- \ifnum\@MXV@cursection=2\relax\else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: ORIENT %
- entry not allowed here; must go into a CROSSECT section}{}%
- \fi%
- \gdef\@MXV@csorient{#1}%
+ \ifnum\@MXV@cursection=2\relax\else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: ORIENT %
+ entry not allowed here; must go into a CROSSECT section}{}%
+ \fi%
+ \gdef\@MXV@csorient{#1}%
}
\define@key{MXV@view}{END}[]{%
- \ifcase\@MXV@cursection%
- %END VIEW
- \edef\@MXV@args{%
- \@MXV@coo\space\@MXV@ctoc\space\@MXV@roo\space%
- \@MXV@roll\space}%
- \expandafter\@MXV@ciiwmatrix\@MXV@args% build C2W matrix
- \global\advance\@MXV@viewscount by \@ne%
- \ifthenelse{\equal{\@MXV@xname}{}}{% default view name
- \pdfstringdef\@MXV@xname{View \the\@MXV@viewscount}%
- }{}%
- \ifthenelse{\equal{\@MXV@naarray}{}}{}{%
- \gdef\@MXV@naentry{/NR true/NA [\@MXV@naarray]}%
- }%
- \ifthenelse{\equal{\@MXV@saarray}{}}{}{%
- \gdef\@MXV@saentry{/SA [\@MXV@saarray]}%
- }%
- \@MXV@viewobj% create pdf object of 3D view
- %append current view obj ref to VA array
- \xdef\@MXV@varray{\@MXV@varray\space\@MXV@@viewobj}%
- \global\@MXV@viewsprovidedtrue%
- \def\@MXV@cursection{-1}%
- \or%
- %END PART
- \global\advance\@MXV@nodecount by \@ne
- \@MXV@nodeobj% create pdf object of 3D node dict
- %append it to node array
- \xdef\@MXV@naarray{\@MXV@naarray\space\@MXV@@nodeobj}%
- \def\@MXV@cursection{0}%
- \or%
- %END CROSSSECT
- \global\advance\@MXV@cscount by \@ne
- \@MXV@csobj% create pdf object of 3D cross section dict
- %append it to cross section array
- \xdef\@MXV@saarray{\@MXV@saarray\space\@MXV@@csobj}%
- \def\@MXV@cursection{0}%
- \else%
- \PackageError{rmannot}{%
- File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
- There is nothing to be ENDed here}{}%
- \fi%
+ \ifcase\@MXV@cursection%
+ %END VIEW
+ \edef\@MXV@args{%
+ \@MXV@coo\space\@MXV@ctoc\space\@MXV@roo\space%
+ \@MXV@roll\space}%
+ \expandafter\@MXV@ciiwmatrix\@MXV@args% build C2W matrix
+ \global\advance\@MXV@viewscount by \@ne%
+ \ifthenelse{\equal{\@MXV@xname}{}}{% default view name
+ \pdfstringdef\@MXV@xname{View \the\@MXV@viewscount}%
+ }{}%
+ \ifthenelse{\equal{\@MXV@naarray}{}}{}{%
+ \gdef\@MXV@naentry{/NR true/NA [\@MXV@naarray]}%
+ }%
+ \ifthenelse{\equal{\@MXV@saarray}{}}{}{%
+ \gdef\@MXV@saentry{/SA [\@MXV@saarray]}%
+ }%
+ \@MXV@viewobj% create pdf object of 3D view
+ %append current view obj ref to VA array
+ \xdef\@MXV@varray{\@MXV@varray\space\@MXV@@viewobj}%
+ \global\@MXV@viewsprovidedtrue%
+ \def\@MXV@cursection{-1}%
+ \or%
+ %END PART
+ \global\advance\@MXV@nodecount by \@ne
+ \@MXV@nodeobj% create pdf object of 3D node dict
+ %append it to node array
+ \xdef\@MXV@naarray{\@MXV@naarray\space\@MXV@@nodeobj}%
+ \def\@MXV@cursection{0}%
+ \or%
+ %END CROSSSECT
+ \global\advance\@MXV@cscount by \@ne
+ \@MXV@csobj% create pdf object of 3D cross section dict
+ %append it to cross section array
+ \xdef\@MXV@saarray{\@MXV@saarray\space\@MXV@@csobj}%
+ \def\@MXV@cursection{0}%
+ \else%
+ \PackageError{rmannot}{%
+ File \@MXV@viewsfileii, line \the\@MXV@inputlineno: %
+ There is nothing to be ENDed here}{}%
+ \fi%
}%
% \end{macrocode}
% Macro for generating an array of 3D views (varray)
@@ -2762,63 +2994,63 @@
\def\@MXV@procinputline#1{\setkeys{MXV@view}{#1}}
\newcount\@MXV@inputlineno
\def\@MXV@buildva{%
- \global\@MXV@viewscount=0%
+ \global\@MXV@viewscount=0\relax% dps
\xdef\@MXV@varray{}% empty varray
%
%default view (one of the command options 3Dcoo, 3Dc2c, etc. given)
- \edef\@MXV@args{%
- \@MXV@coo\space\@MXV@ctoc\space\@MXV@roo\space%
- \@MXV@roll\space}%
- \expandafter\@MXV@ciiwmatrix\@MXV@args% build C2W matrix
- \pdfstringdef\@MXV@xname{Default}%
- \if@MXV@defaultviewprovided%
- \@MXV@viewobj% create pdf object of 3D view
+ \edef\@MXV@args{%
+ \@MXV@coo\space\@MXV@ctoc\space\@MXV@roo\space%
+ \@MXV@roll\space}%
+ \expandafter\@MXV@ciiwmatrix\@MXV@args% build C2W matrix
+ \pdfstringdef\@MXV@xname{Default}%
+ \if@MXV@defaultviewprovided%
+ \@MXV@viewobj% create pdf object of 3D view
% \edef\@MXV@defaultview{/3DV \@MXV@@viewobj}%
- \edef\@MXV@defaultview{\@MXV@@viewobj}%
- \fi%
+ \edef\@MXV@defaultview{\@MXV@@viewobj}%
+ \fi%
% \end{macrocode}
% Read out 3D views file (new version)
% \begin{macrocode}
- \def\@MXV@cursection{-1}% views file is divided in sections
- \IfFileExists{\@MXV@viewsfileii}{%
- \begingroup%
- \endlinechar=-1% suppress trailing space at input line end
- \@MXV@inputlineno=\z@%
- \openin\@MXV@@viewsfile=\@MXV@viewsfileii%
+ \def\@MXV@cursection{-1}% views file is divided in sections
+ \IfFileExists{\@MXV@viewsfileii}{%
+ \begingroup%
+ \endlinechar=-1% suppress trailing space at input line end
+ \@MXV@inputlineno=\z@%
+ \openin\@MXV@@viewsfile=\@MXV@viewsfileii%
+ \read\@MXV@@viewsfile to \@MXV@inputline%
+ \ifeof\@MXV@@viewsfile\setboolean{@MXV@eof}{true}\else%
+ \setboolean{@MXV@eof}{false}\fi%
+ \whiledo{\not\boolean{@MXV@eof}}{%
+ \advance\@MXV@inputlineno by \@ne%
+ %process input line
+ \edef\@MXV@@inputline{{\@MXV@inputline}}%
+ \expandafter\@MXV@procinputline\@MXV@@inputline%
\read\@MXV@@viewsfile to \@MXV@inputline%
- \ifeof\@MXV@@viewsfile\setboolean{@MXV@eof}{true}\else%
- \setboolean{@MXV@eof}{false}\fi%
- \whiledo{\NOT\boolean{@MXV@eof}}{%
- \advance\@MXV@inputlineno by \@ne%
- %process input line
- \edef\@MXV@@inputline{{\@MXV@inputline}}%
- \expandafter\@MXV@procinputline\@MXV@@inputline%
- \read\@MXV@@viewsfile to \@MXV@inputline%
- \ifeof\@MXV@@viewsfile%
- \setboolean{@MXV@eof}{true}%
- \else%
- \setboolean{@MXV@eof}{false}%
- \fi%
- }%
- \closein\@MXV@@viewsfile%
- \endgroup%
- }{}%
+ \ifeof\@MXV@@viewsfile%
+ \setboolean{@MXV@eof}{true}%
+ \else%
+ \setboolean{@MXV@eof}{false}%
+ \fi%
+ }%
+ \closein\@MXV@@viewsfile%
+ \endgroup%
+ }{}%
% \end{macrocode}
% Make the first view in the VA array the default view, if no default one has
% explicitly been provided, but if the VA array itself is empty too (no
% additional views provided) use our fallback view (c2c=0 -1 0) as default
% \begin{macrocode}
- \ifthenelse{\NOT\boolean{@MXV@defaultviewprovided}%
- \AND\boolean{@MXV@viewsprovided}}{%
+ \ifthenelse{\not\boolean{@MXV@defaultviewprovided}%
+ \and\boolean{@MXV@viewsprovided}}{%
% \xdef\@MXV@defaultview{/3DV/F}%
- \xdef\@MXV@defaultview{/F}%
- }{}%
- \ifthenelse{\NOT\boolean{@MXV@defaultviewprovided}%
- \AND\NOT\boolean{@MXV@viewsprovided}}{%
- \@MXV@viewobj% create pdf object of 3D view
+ \xdef\@MXV@defaultview{/F}%
+ }{}%
+ \ifthenelse{\not\boolean{@MXV@defaultviewprovided}%
+ \and\not\boolean{@MXV@viewsprovided}}{%
+ \@MXV@viewobj% create pdf object of 3D view
% \edef\@MXV@defaultview{/3DV \@MXV@@viewobj}%
- \edef\@MXV@defaultview{\@MXV@@viewobj}%
- }{}%
+ \edef\@MXV@defaultview{\@MXV@@viewobj}%
+ }{}%
}
% \end{macrocode}
% Following macros, including the 3D inclusion macro have driver specific
@@ -2826,58 +3058,58 @@
% macro for creating 3D view object and associated projection dict
% \begin{macrocode}
\def\@MXV@viewobj{\literalps@out{%
- %projection dict
+%projection dict
\ps@mark/_objdef {pdict\therm@Cnt_\the\@MXV@viewscount}%
- /type/dict/OBJ pdfmark^^J%
+ /type/dict/OBJ pdfmark^^J%
\ps@mark{pdict\therm@Cnt_\the\@MXV@viewscount} <<%
- /Subtype/P/FOV \@MXV@aac/PS/Min>>/PUT pdfmark^^J%
+ /Subtype/P/FOV \@MXV@aac/PS/Min>>/PUT pdfmark^^J%
\ps@mark/_objdef {viewobj\therm@Cnt_\the\@MXV@viewscount}%
- /type/dict/OBJ pdfmark^^J%
+ /type/dict/OBJ pdfmark^^J%
\ps@mark{viewobj\therm@Cnt_\the\@MXV@viewscount} <<%
- /MS/M%
- /CO \@MXV@roo%
- /P {pdict\therm@Cnt_\the\@MXV@viewscount}%
- /C2W[\@MXV@matrix]%
- /XN(\@MXV@xname)%
-/IN(\@MXV@xname)%
+ /MS/M%
+ /CO \@MXV@roo%
+ /P {pdict\therm@Cnt_\the\@MXV@viewscount}%
+ /C2W[\@MXV@matrix]%
+ /XN(\@MXV@xname)%
+ /IN(\@MXV@xname)%
\@MXV@background%
\@MXV@lights%
\@MXV@render%
\@MXV@naentry%
\@MXV@saentry%
- >>%
- /PUT pdfmark
- }%
- \xdef\@MXV@@viewobj{{viewobj\therm@Cnt_\the\@MXV@viewscount}}%
+ >>%
+ /PUT pdfmark
+}%
+\xdef\@MXV@@viewobj{{viewobj\therm@Cnt_\the\@MXV@viewscount}}%
}%
%3D node object
\def\@MXV@nodeobj{\literalps@out{%
- \ps@mark/type/dict%
- /_objdef {nodeobj\therm@Cnt_\the\@MXV@viewscount_%
- \the\@MXV@nodecount}/OBJ pdfmark^^J%
- \ps@mark{nodeobj\therm@Cnt_\the\@MXV@viewscount_%
- \the\@MXV@nodecount}<<%
- /Type/3DNode%
- /N (\@MXV@partname)%
- \@MXV@nopacity\@MXV@nvisibility\@MXV@ntransform%
- \@MXV@nrender%
- >>/PUT pdfmark
- }%
- \xdef\@MXV@@nodeobj{%
- {nodeobj\therm@Cnt_\the\@MXV@viewscount_%
- \the\@MXV@nodecount}}%
+ \ps@mark/type/dict%
+ /_objdef {nodeobj\therm@Cnt_\the\@MXV@viewscount_%
+ \the\@MXV@nodecount}/OBJ pdfmark^^J%
+ \ps@mark{nodeobj\therm@Cnt_\the\@MXV@viewscount_%
+ \the\@MXV@nodecount}<<%
+ /Type/3DNode%
+ /N (\@MXV@partname)%
+ \@MXV@nopacity\@MXV@nvisibility\@MXV@ntransform%
+ \@MXV@nrender%
+ >>/PUT pdfmark
+}%
+\xdef\@MXV@@nodeobj{%
+ {nodeobj\therm@Cnt_\the\@MXV@viewscount_%
+ \the\@MXV@nodecount}}%
}%
%3D cross section object
\def\@MXV@csobj{\literalps@out{%
- \ps@mark/type/dict%
- /_objdef {csobj\therm@Cnt_\the\@MXV@viewscount_%
- \the\@MXV@cscount}/OBJ pdfmark^^J%
- \ps@mark{csobj\therm@Cnt_\the\@MXV@viewscount_%
- \the\@MXV@cscount}<<%
- /Type/3DCrossSection%
- /C [\@MXV@cscenter]%
- /O [\@MXV@csorient]%
- >>/PUT pdfmark
+ \ps@mark/type/dict%
+ /_objdef {csobj\therm@Cnt_\the\@MXV@viewscount_%
+ \the\@MXV@cscount}/OBJ pdfmark^^J%
+ \ps@mark{csobj\therm@Cnt_\the\@MXV@viewscount_%
+ \the\@MXV@cscount}<<%
+ /Type/3DCrossSection%
+ /C [\@MXV@cscenter]%
+ /O [\@MXV@csorient]%
+ >>/PUT pdfmark
}%
\xdef\@MXV@@csobj{%
{csobj\therm@Cnt_\the\@MXV@viewscount_\the\@MXV@cscount}}%
@@ -2886,66 +3118,66 @@
% \paragraph*{MXV@user family}
% \begin{macrocode}
\define@key{MXV@user}{3Dbg}[1 1 1]{%
- \def\@MXV@defaultbg{#1}%
- \def\@MXV@background{/BG<</CS/DeviceRGB/C[#1]>>}%
+ \def\@MXV@defaultbg{#1}%
+ \def\@MXV@background{/BG<</CS/DeviceRGB/C[#1]>>}%
}
\define@key{MXV@user}{3Djscript}{%
- \def\rma@rmAnnot@iiiDjs{#1}%
- \ifx\rma@rmAnnot@iiiDjs\@empty\let\rma@addResources\@empty
+ \def\rma@rmAnnot@iiiDjs{#1}%
+ \ifx\rma@rmAnnot@iiiDjs\@empty\let\rma@addResources\@empty
\let\rma@addFileSpecs\@empty\else
% \end{macrocode}
% We process resources when there are some to process \texttt{:-)}
% \begin{macrocode}
- \rma@toks={}\def\rmiiid@addToScriptsArray{}%
- \@for\rma@arg:=\rma@rmAnnot@iiiDjs\do{%
- \rma@edefexecute{\noexpand
- \filename@parse{\rma@useNamedPath{\rma@arg}}}%
- \@ifundefined{filename@ext}{%
- \rma@PkEr@iii{\rma@useNamedPath{\rma@arg}}}{}%
- \edef\rmiiid@addToScriptsArray{\rmiiid@addToScriptsArray
- \ps@mark{jscriptiiid\therm@Cnt}%
- {rmfilespec\therm@Cnt-JS\rma@arg}%
- /APPEND pdfmark^^J%
- }%
- \edef\rma@fs@expand{rmFileStrm\rma@arg}%
- \@ifundefined{\rma@fs@expand}{%
- \rm@csarg\xdef{\rma@fs@expand}%
- {rmfstream\therm@Cnt-JS\rma@arg}%
- \def\rma@embed{1}}{\def\rma@embed{0}}%
- \edef\rma@tmp@exp{\the\rma@toks%
- \noexpand\\{JS\rma@arg}%
- {\filename@area}{\filename@base.\filename@ext}%
- {\rma@embed}{\csname\rma@fs@expand\endcsname}%
- {\rm@csarg\noexpand{rma@mt@\rma@arg}}}%
- \rma@toks=\expandafter{\rma@tmp@exp}%
- }%
- \let\\\rm@appendNameTree
- \expandafter\xdef\expandafter\rma@addResources%
- \expandafter{\the\rma@toks}%
- \let\\\rm@appendFileSpecs
- \expandafter\xdef\expandafter\rma@addFileSpecs%
- \expandafter{\the\rma@toks}%
- \fi
+ \rma@toks={}\def\rmiiid@addToScriptsArray{}%
+ \@for\rma@arg:=\rma@rmAnnot@iiiDjs\do{%
+ \rma@edefexecute{\noexpand
+ \filename@parse{\rma@useNamedPath{\rma@arg}}}%
+ \@ifundefined{filename@ext}{%
+ \rma@PkEr@iii{\rma@useNamedPath{\rma@arg}}}{}%
+ \edef\rmiiid@addToScriptsArray{\rmiiid@addToScriptsArray
+ \ps@mark{jscriptiiid\therm@Cnt}%
+ {rmfilespec\therm@Cnt-JS\rma@arg}%
+ /APPEND pdfmark^^J%
+ }%
+ \edef\rma@fs@expand{rmFileStrm\rma@arg}%
+ \@ifundefined{\rma@fs@expand}{%
+ \rm@csarg\xdef{\rma@fs@expand}%
+ {rmfstream\therm@Cnt-JS\rma@arg}%
+ \def\rma@embed{1}}{\def\rma@embed{0}}%
+ \edef\rma@tmp@exp{\the\rma@toks%
+ \noexpand\\{JS\rma@arg}%
+ {\filename@area}{\filename@base.\filename@ext}%
+ {\rma@embed}{\csname\rma@fs@expand\endcsname}%
+ {\rm@csarg\noexpand{rma@mt@\rma@arg}}}%
+ \rma@toks=\expandafter{\rma@tmp@exp}%
+ }% do
+ \let\\\rm@appendNameTree
+ \expandafter\xdef\expandafter\rma@addResources%
+ \expandafter{\the\rma@toks}%
+ \let\\\rm@appendFileSpecs
+ \expandafter\xdef\expandafter\rma@addFileSpecs%
+ \expandafter{\the\rma@toks}%
+ \fi
}
\define@key{MXV@user}{3Dcoo}{%
- \def\@MXV@coo{#1}%
- \setboolean{@MXV@defaultviewprovided}{true}%
+ \def\@MXV@coo{#1}%
+ \setboolean{@MXV@defaultviewprovided}{true}%
}
\define@key{MXV@user}{3Dc2c}{%
- \def\@MXV@ctoc{#1}%
- \setboolean{@MXV@defaultviewprovided}{true}%
+ \def\@MXV@ctoc{#1}%
+ \setboolean{@MXV@defaultviewprovided}{true}%
}
\define@key{MXV@user}{3Droo}{%
- \def\@MXV@roo{#1}%
- \setboolean{@MXV@defaultviewprovided}{true}%
+ \def\@MXV@roo{#1}%
+ \setboolean{@MXV@defaultviewprovided}{true}%
}
\define@key{MXV@user}{3Daac}{%
- \def\@MXV@aac{#1}%
- \setboolean{@MXV@defaultviewprovided}{true}%
+ \def\@MXV@aac{#1}%
+ \setboolean{@MXV@defaultviewprovided}{true}%
}
\define@key{MXV@user}{3Droll}{%
- \def\@MXV@roll{#1}%
- \setboolean{@MXV@defaultviewprovided}{true}%
+ \def\@MXV@roll{#1}%
+ \setboolean{@MXV@defaultviewprovided}{true}%
}
% \end{macrocode}
% Since we are starting fresh, we don't use the old format used
@@ -2953,36 +3185,36 @@
% and eliminating the old format and code completely.
% \begin{macrocode}
\define@key{MXV@user}{3Dviews}{%
- \IfFileExists{#1}{%
- \def\@MXV@viewsfileii{#1}%
+ \IfFileExists{#1}{%
+ \def\@MXV@viewsfileii{#1}%
+ }{%
+ \PackageError{rmannot}{3D views file `#1' cannot be opened%
}{%
- \PackageError{rmannot}{3D views file `#1' cannot be opened%
- }{%
- Make sure file `#1' exists and is readable!%
- }%
+ Make sure file `#1' exists and is readable!%
}%
+ }%
}
\define@choicekey+{MXV@user}{3Dlights}%
- {None,White,Day,Night,Hard,Primary,Blue,%
- Red,Cube,CAD,Headlamp}[Cube]{%
- \gdef\@MXV@defaultlights{#1}%
- \gdef\@MXV@lights{/LS <</Subtype/#1>>}%
+ {None,White,Day,Night,Hard,Primary,Blue,%
+ Red,Cube,CAD,Headlamp}[Cube]{%
+ \gdef\@MXV@defaultlights{#1}%
+ \gdef\@MXV@lights{/LS <</Subtype/#1>>}%
}{\PackageWarning{rmannot}{Bad choice for 3Dlights, permissible
- values are None, White, Day, Night, Hard, Primary, Blue,
- Red, Cube, CAD, HeadLamp. Try again}}
+ values are None, White, Day, Night, Hard, Primary, Blue,
+ Red, Cube, CAD, HeadLamp. Try again}}
\define@choicekey+{MXV@user}{3Drender}%
- {Solid,SolidWireframe,Transparent,TransparentWireframe,%
- BoundingBox,TransparentBoundingBox,TransparentBoundingBoxOutline,%
- Wireframe,ShadedWireframe,HiddenWireframe,Vertices,ShadedVertices,%
- SolidOutline,Illustration,ShadedIllustration}[Solid]{%
- \gdef\@MXV@defaultrender{#1}%
- \gdef\@MXV@render{/RM <</Subtype/#1>>}%
+ {Solid,SolidWireframe,Transparent,TransparentWireframe,%
+ BoundingBox,TransparentBoundingBox,TransparentBoundingBoxOutline,%
+ Wireframe,ShadedWireframe,HiddenWireframe,Vertices,ShadedVertices,%
+ SolidOutline,Illustration,ShadedIllustration}[Solid]{%
+ \gdef\@MXV@defaultrender{#1}%
+ \gdef\@MXV@render{/RM <</Subtype/#1>>}%
}{\PackageWarning{rmannot}{Bad choice for 3Dlights, permissible
- values are Solid, SolidWireframe, Transparent, TransparentWireframe,
- BoundingBox, TransparentBoundingBox, TransparentBoundingBoxOutline,
- Wireframe, ShadedWireframe, HiddenWireframe, Vertices,
- ShadedVertices, SolidOutline, Illustration, ShadedIllustration.
- Try again}}
+ values are Solid, SolidWireframe, Transparent, TransparentWireframe,
+ BoundingBox, TransparentBoundingBox, TransparentBoundingBoxOutline,
+ Wireframe, ShadedWireframe, HiddenWireframe, Vertices,
+ ShadedVertices, SolidOutline, Illustration, ShadedIllustration.
+ Try again}}
% \end{macrocode}
% \begin{macrocode}
%</3Dcode>