summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog8
-rw-r--r--Master/texmf-dist/doc/latex/media9/README6
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/dice.vws4
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin1561740 -> 1589265 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.tex53
-rw-r--r--Master/texmf-dist/tex/latex/media9/javascript/3Dmenu.js60
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty129
7 files changed, 174 insertions, 86 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index 9ca3716e549..182d3185ebc 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,5 +1,11 @@
+2012-08-14
+ * v0.11
+ * new: package option `bigfiles' added which defers file embedding to the
+ ps->pdf step; needed when latex aborts with error `TeX capacity exceeded'
+ + fix: minor fixes in 3Dmenu.js and media9.sty
+
2012-07-31
- * v0.9
+ * v0.9, v.10
* fix: new l3fp infix syntax for calculations; deprecated expl3 functions
replaced
diff --git a/Master/texmf-dist/doc/latex/media9/README b/Master/texmf-dist/doc/latex/media9/README
index 631079c3c55..8c460a3befa 100644
--- a/Master/texmf-dist/doc/latex/media9/README
+++ b/Master/texmf-dist/doc/latex/media9/README
@@ -36,11 +36,11 @@ The package was written in the new LaTeX3 syntax.
Requirements:
- * l3kernel (LaTeX package), version >=2011/06/19
- * l3packages (LaTeX package), version >=2011/07/02
+ * l3kernel (LaTeX package), version >=2012/07/16
+ * l3packages (LaTeX package), version >=2012/07/16
* pdfTeX, version >=1.30
* Ghostscript, version >=8.31 or Adobe Distiller for PS to PDF conversion
- * dvipdfmx, version >=20080607 for DVI to PDF conversion
+ * dvipdfmx, version >=20120420 for DVI to PDF conversion
* Adobe Reader, version >=9
diff --git a/Master/texmf-dist/doc/latex/media9/files/dice.vws b/Master/texmf-dist/doc/latex/media9/files/dice.vws
index df43434781b..ef77a276fe8 100644
--- a/Master/texmf-dist/doc/latex/media9/files/dice.vws
+++ b/Master/texmf-dist/doc/latex/media9/files/dice.vws
@@ -17,6 +17,10 @@ VIEW=Top
ROO=27
C2C=0 0 1
END
+VIEW=Bottom
+ ROO=27
+ C2C=0 0 -1
+END
VIEW=Fish Eye at Centre
AAC=130
END
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index 3aed971ff09..ac72412c640 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.pdf
+++ b/Master/texmf-dist/doc/latex/media9/media9.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/media9.tex b/Master/texmf-dist/doc/latex/media9/media9.tex
index 3dd9a124a5b..4fefb902b9a 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.tex
+++ b/Master/texmf-dist/doc/latex/media9/media9.tex
@@ -64,8 +64,18 @@
\makeatother
\fi
+\def\parsedate#1/#2/#3\relax{
+ \def\year{#1}
+ \def\month{#2}
+ \def\day{#3}
+}
+
\begin{document}
-\title{The {\sffamily media9} Package}
+\makeatletter
+%\title{The {\sffamily media9} Package\\Version \g@mix@version@tl}
+\title{The {\sffamily media9} Package, v\g@mix@version@tl}
+\expandafter\parsedate\g@mix@date@tl\relax %set current date to package date
+\makeatother
\author{Alexander Grahn\\[1ex]\includegraphics[height=2.7ex]{mailto}}
\maketitle
@@ -85,15 +95,17 @@ Among the supported media types, video and sound files require an additional Fla
Package `media9' supports the usual PDF making workflows, i.\,e. pdf\LaTeX{}, Lua\LaTeX, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+.
-The final PDF can be viewed in current Adobe Readers on MS Windows and other platforms. On Unix platforms including Linux, however, support of Flash, video and sound was discontinued at Reader version 9.4.2, probably for security reasons.
+The final PDF can be viewed in current Adobe Readers on MS Windows and other platforms. On Unix platforms including Linux, however, support of Flash, video and sound was discontinued at Reader version 9.4.2, probably for security reasons. On tablets and phones running Android or iOS, ezPDF Reader was reported to play video and sound files embedded with `media9'.
\section{Requirements}
\begin{trivlist}
-\item l3kernel (\LaTeX{} package), version $\ge 2011/06/19$
-\item l3packages (\LaTeX{} package), version $\ge 2011/07/02$
+\makeatletter
+\item l3kernel (\LaTeX{} package), version $\ge \g@mix@liiikerneldate$
+\item l3packages (\LaTeX{} package), version $\ge \g@mix@liiipkgdate$
+\makeatother
\item pdf\TeX{}, version $\ge1.30$
\item Ghostscript, version $\ge8.31$ or Adobe Distiller for PS to PDF conversion
-\item dvipdfmx, version $\ge20080607$ for DVI to PDF conversion
+\item dvipdfmx, version $\ge 20120420$ for DVI to PDF conversion
\item Adobe Reader, version $\ge9$
\end{trivlist}
@@ -105,7 +117,7 @@ Otherwise, a manual installation into the \emph{local} TeX-Directory-Structure (
\item Download the TDS compliant package file `\href{http://tug.ctan.org/tex-archive/install/macros/latex/contrib/media9.tds.zip}{media9.tds.zip}' from CTAN.
\item Find the local TDS root directory by running\\
{\tt\phantom{xx}kpsewhich -var-value TEXMFLOCAL}\\
-on the command line. The local TDS root directory is intended for packages that are not maintained by the TeXLive package manager.
+ on the command line. The local TDS root directory is intended for packages that are not maintained by the \TeX{}Live package manager.
\item Unzip `\href{http://tug.ctan.org/tex-archive/install/macros/latex/contrib/media9.tds.zip}{media9.tds.zip}' into the local TDS root directory previously found. Depending on the location of this directory, you may need to be logged in as Root/Administrator.
\item After installation, update the filename database by running `{\tt texhash}' on the command line. Again, Root/Administrator privileges may be required.
\end{enumerate}
@@ -122,6 +134,7 @@ to the preamble of your document, i.\,e. somewhere between \verb+\documentclass+
\begin{verbatim}
dvipdfmx
xetex
+bigfiles
draft
final
activate=...
@@ -139,12 +152,14 @@ passcontext
3Dlights=...
3Drender=...
\end{verbatim}
-Except for `\verb+dvipdfmx+' and `\verb+xetex+', the options above are also available (among others) as command options and will be explained shortly. However, if used as package options they have global scope, taking effect on all embedded media in the document. In turn, command options locally override global settings. Options without an argument are boolean options and can be negated by appending `\verb+=false+'.
+Except for `\verb+dvipdfmx+', `\verb+xetex+' and `\verb+bigfiles+', the options above are also available (among others) as command options and will be explained shortly. However, if used as package options they have global scope, taking effect on all embedded media in the document. In turn, command options locally override global settings. Options without an argument are boolean options and can be negated by appending `\verb+=false+'.
\XeLaTeX{} will be auto-detected. Therefore package option `\verb+xetex+' is optional. However, in case of \verb+dvipdfmx+, package option `\verb+dvipdfmx+' is mandatory because it cannot be auto-detected.
\begin{animateinline}[autoplay,loop]{1.5}\strut\emph{Important:}\newframe\newframe[5]\end{animateinline} If PDF is generated via DVI and Postscript by the command sequence \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+, \verb+dvips+ option `\verb+-Ppdf+' should \emph{not} be set when converting the intermediate DVI into Postscript. If you cannot do without, put `\verb+-D 1200+' \emph{after} `\verb+-Ppdf+' on the command line. Users of \LaTeX-aware text editors with menu-driven toolchain invocation, such as \TeX{}nicCenter, should check the configuration of the \verb+dvips+ call.
+Option `\verb+bigfiles+' is only relevant for the \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+ workflow. It may be needed if large media files cause \verb+latex+ to abort with error `\verb+TeX capacity exceeded+'. See Sect.\ \ref{bugs}.
+
\section{The user interface}
Package `media9' provides the command
\begin{verbatim}
@@ -425,7 +440,7 @@ Things like animation, lighting, background of 3D objects etc. may also be scrip
\end{tabular}
\end{table}
-%\clearpage
+\clearpage
\section[Embedding Flash, video and sound (with examples)]{Embedding Flash, video and sound}
A YouTube video clip, as shown in Fig.~\ref{alien}, may serve as a basic example of loading Flash content from a URL to be displayed in an embedded fashion in a PDF document. Indeed, a YouTube clip is nothing more than a small SWF file which loads a video stream and other necessary resources, such as user controls and a player skin from a remote server. It can be configured via ActionScript variables, to play several videos in a row, to play a video in a loop etc. Player parameters are documented on \url{http://code.google.com/apis/youtube/player_parameters.html} and can be passed to the player using either the `\verb+flashvars+' option, as in the example, or appended to the URL string after the video ID. A question mark `\verb+?+' must be put between the video ID and the parameter string. Some of the documented parameters, such as `\verb+rel+', seem to have an effect only if they are passed as part of the URL.
@@ -728,14 +743,13 @@ Below, two examples of embedded 3D files are shown. The first one, Fig.~\ref{asy
\includemedia[
width=0.5\linewidth,height=0.5\linewidth,
activate=pageopen,
- 3Dtoolbar,
+ 3Dtoolbar, 3Dmenu,
3Dviews=dice.vws,
- 3Dmenu
]{}{dice.u3d}
\end{Verbatim}
\vspace{1ex}
Contents of `dice.vws':
-\begin{Verbatim}
+\begin{Verbatim}[fontsize=\small]
VIEW=Front
ROO=27
END
@@ -755,6 +769,10 @@ Contents of `dice.vws':
ROO=27
C2C=0 0 1
END
+ VIEW=Bottom
+ ROO=27
+ C2C=0 0 -1
+ END
VIEW=Fish Eye at Centre
AAC=130
END
@@ -827,6 +845,19 @@ Contents of `dice.vws':
A few 3D JavaScript files ready to be used are already installed along with `media9.sty', see \hyperlink{3dscripts}{above}.
\end{enumerate}
+\section{Caveats}\label{bugs}
+Large media files may cause \TeX{} to interrupt with error
+\begin{verbatim}
+! TeX capacity exceeded, sorry [main memory size=3000000].
+\end{verbatim}
+when using \verb+latex+ in \verb+dvips+ mode. While writing the DVI file, media files in the current page that are about to be embedded are kept in \TeX's memory until shipping out of the readily typeset page. In case of large or many files, this may be more than \TeX{} can cope with by default.
+
+There are two options to handle such situations:
+
+The first one is to increase \TeX's main memory. You may follow the steps in the \href{http://www.ctan.org/tex-archive/macros/latex/contrib/animate/animate.pdf\#dest:mem}{Bugs} section of the `animate' package documentation. In \TeX{}Live-2012, the maximum value that can be set is \verb+main_memory = 12435455+.
+
+If increasing \TeX's main memory does not help, use the package option `\verb+bigfiles+' with media9. It defers file embedding from the DVI producing to the PDF producing step. However, this requires that \verb+ps2pdf+ be called with option `\verb+-dNOSAFER+'. Otherwise, \verb+ps2pdf+ aborts with error \verb+/invalidfileaccess+.
+
\section{Acknowledgements}
This package was written using the new \LaTeX3 syntax which was a lot of fun. Many thanks to the \LaTeX3 team!
diff --git a/Master/texmf-dist/tex/latex/media9/javascript/3Dmenu.js b/Master/texmf-dist/tex/latex/media9/javascript/3Dmenu.js
index b6c82a22876..a987b5ed08c 100644
--- a/Master/texmf-dist/tex/latex/media9/javascript/3Dmenu.js
+++ b/Master/texmf-dist/tex/latex/media9/javascript/3Dmenu.js
@@ -4,7 +4,7 @@
//
// 3Dmenu.js
//
-// version 20120301
+// version 20120813
//
////////////////////////////////////////////////////////////////////////////////
//
@@ -311,20 +311,14 @@ function calc3Dopts () {
c2c.set(camera.position);
c2c.subtractInPlace(camera.targetPosition);
c2c.normalize();
- var x=(Math.abs(c2c.x) < 1e-12 ? 0 : c2c.x);
- var y=(Math.abs(c2c.y) < 1e-12 ? 0 : c2c.y);
- var z=(Math.abs(c2c.z) < 1e-12 ? 0 : c2c.z);
- if(!(x==0 && y==-1 && z==0))
- res+=host.util.printf('\n3Dc2c=%s %s %s,', x, y, z);
+ if(!(c2c.x==0 && c2c.y==-1 && c2c.z==0))
+ res+=host.util.printf('\n3Dc2c=%s %s %s,', c2c.x, c2c.y, c2c.z);
//
//new camera settings
//
//bounding sphere centre --> new camera target
var coo=new Vector3();
coo.set((mb.center())[0], (mb.center())[1], (mb.center())[2]);
- coo.x = (Math.abs(coo.x) < 1e-12 ? 0 : coo.x);
- coo.y = (Math.abs(coo.y) < 1e-12 ? 0 : coo.y);
- coo.z = (Math.abs(coo.z) < 1e-12 ? 0 : coo.z);
if(coo.length)
res+=host.util.printf('\n3Dcoo=%s %s %s,', coo.x, coo.y, coo.z);
//radius of orbit
@@ -422,17 +416,11 @@ function get3Dview () {
var roo=c2c.length;
c2c.normalize();
var res='VIEW%=insert optional name here\n';
- var x = (Math.abs(coo.x) < 1e-12 ? 0 : coo.x);
- var y = (Math.abs(coo.y) < 1e-12 ? 0 : coo.y);
- var z = (Math.abs(coo.z) < 1e-12 ? 0 : coo.z);
- if(!(x==0 && y==0 && z==0))
+ if(!(coo.x==0 && coo.y==0 && coo.z==0))
res+=host.util.printf(' COO=%s %s %s\n', coo.x, coo.y, coo.z);
- x = (Math.abs(c2c.x) < 1e-12 ? 0 : c2c.x);
- y = (Math.abs(c2c.y) < 1e-12 ? 0 : c2c.y);
- z = (Math.abs(c2c.z) < 1e-12 ? 0 : c2c.z);
- if(!(x==0 && y==-1 && z==0))
- res+=host.util.printf(' C2C=%s %s %s\n', x, y, z);
- if(roo > 0.11e-17)
+ if(!(c2c.x==0 && c2c.y==-1 && c2c.z==0))
+ res+=host.util.printf(' C2C=%s %s %s\n', c2c.x, c2c.y, c2c.z);
+ if(roo > 1e-9)
res+=host.util.printf(' ROO=%s\n', roo);
var roll = camera.roll*180/Math.PI;
if(host.util.printf('%.4f', roll)!=0)
@@ -576,18 +564,12 @@ function get3Dview () {
var uvec=mesh.transform.transformDirection(new Vector3(0,1,0));
var vvec=mesh.transform.transformDirection(new Vector3(0,0,1));
respart+=' TRANSFORM='
- +(Math.abs(lvec.x) < 1e-12 ? 0 : lvec.x)+' '
- +(Math.abs(lvec.y) < 1e-12 ? 0 : lvec.y)+' '
- +(Math.abs(lvec.z) < 1e-12 ? 0 : lvec.z)+' '
- +(Math.abs(uvec.x) < 1e-12 ? 0 : uvec.x)+' '
- +(Math.abs(uvec.y) < 1e-12 ? 0 : uvec.y)+' '
- +(Math.abs(uvec.z) < 1e-12 ? 0 : uvec.z)+' '
- +(Math.abs(vvec.x) < 1e-12 ? 0 : vvec.x)+' '
- +(Math.abs(vvec.y) < 1e-12 ? 0 : vvec.y)+' '
- +(Math.abs(vvec.z) < 1e-12 ? 0 : vvec.z)+' '
- +(Math.abs(mesh.transform.translation.x) < 1e-12 ? 0 : mesh.transform.translation.x)+' '
- +(Math.abs(mesh.transform.translation.y) < 1e-12 ? 0 : mesh.transform.translation.y)+' '
- +(Math.abs(mesh.transform.translation.z) < 1e-12 ? 0 : mesh.transform.translation.z)+'\n';
+ +lvec.x+' '+lvec.y+' '+lvec.z+' '
+ +uvec.x+' '+uvec.y+' '+uvec.z+' '
+ +vvec.x+' '+vvec.y+' '+vvec.z+' '
+ +mesh.transform.translation.x+' '
+ +mesh.transform.translation.y+' '
+ +mesh.transform.translation.z+'\n';
defaultvals=false;
}
respart+=' END\n';
@@ -610,16 +592,12 @@ function get3Dview () {
var centre=clip.transform.translation;
var normal=clip.transform.transformDirection(new Vector3(0,0,1));
res+=' CROSSSECT\n';
- var x = (Math.abs(centre.x) < 1e-12 ? 0 : centre.x);
- var y = (Math.abs(centre.y) < 1e-12 ? 0 : centre.y);
- var z = (Math.abs(centre.z) < 1e-12 ? 0 : centre.z);
- if(!(x==0 && y==0 && z==0))
- res+=host.util.printf(' CENTER=%s %s %s\n', x, y, z);
- var x = (Math.abs(normal.x) < 1e-12 ? 0 : normal.x);
- var y = (Math.abs(normal.y) < 1e-12 ? 0 : normal.y);
- var z = (Math.abs(normal.z) < 1e-12 ? 0 : normal.z);
- if(!(x==1 && y==0 && z==0))
- res+=host.util.printf(' NORMAL=%s %s %s\n', x, y, z);
+ if(!(centre.x==0 && centre.y==0 && centre.z==0))
+ res+=host.util.printf(
+ ' CENTER=%s %s %s\n', centre.x, centre.y, centre.z);
+ if(!(normal.x==1 && normal.y==0 && normal.z==0))
+ res+=host.util.printf(
+ ' NORMAL=%s %s %s\n', normal.x, normal.y, normal.z);
res+=' END\n';
}
res+='END\n';
diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty
index f860b19cf1e..8c6096b6285 100644
--- a/Master/texmf-dist/tex/latex/media9/media9.sty
+++ b/Master/texmf-dist/tex/latex/media9/media9.sty
@@ -39,8 +39,12 @@
\RequirePackage{l3keys2e}
\RequirePackage{ifpdf}
-\def\g@mix@date@tl{2012/07/31}
-\def\g@mix@version@tl{0.10}
+\def\g@mix@date@tl{2012/08/14}
+\def\g@mix@version@tl{0.11}
+
+\def\g@mix@liiikerneldate{2012/07/16}
+\def\g@mix@liiipkgdate{2012/07/16}
+
\ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl}
{acrobat-9/X compatible media}
@@ -61,15 +65,15 @@
}
\tex_endinput:D
}
-\@ifpackagelater{expl3}{2012/07/16}{}{
+\@ifpackagelater{expl3}{\g@mix@liiikerneldate}{}{
\msg_error:nnn{media9}{support~outdated}{l3kernel}
\tex_endinput:D
}
-\@ifpackagelater{xparse}{2012/07/16}{}{
+\@ifpackagelater{xparse}{\g@mix@liiipkgdate}{}{
\msg_error:nnn{media9}{support~outdated}{l3packages}
\tex_endinput:D
}
-\@ifpackagelater{l3keys2e}{2012/07/16}{}{
+\@ifpackagelater{l3keys2e}{\g@mix@liiipkgdate}{}{
\msg_error:nnn{media9}{support~outdated}{l3packages}
\tex_endinput:D
}
@@ -97,6 +101,7 @@
perhaps~it~is~spelled~incorrectly.
}
+\bool_new:N\g_mix_pkgbigfiles_bool
\bool_new:N\g_mix_dvipdfmx_bool
\bool_new:N\g_mix_pkgdraft_bool
\tl_gset:Nn\g_mix_pkgact_tl{/XA}
@@ -117,6 +122,11 @@
dvipdfmx .bool_gset:N = \g_mix_dvipdfmx_bool,
xetex .bool_gset:N = \g_mix_dvipdfmx_bool,
+ bigfiles .choice:,
+ bigfiles / true .code:n = {\bool_gset_true:N\g_mix_pkgbigfiles_bool},
+ bigfiles / false .code:n = {\bool_gset_false:N\g_mix_pkgbigfiles_bool},
+ bigfiles .default:n = {true},
+
draft .choice:,
draft / true .code:n = {\bool_gset_true:N\g_mix_pkgdraft_bool},
draft / false .code:n = {\bool_gset_false:N\g_mix_pkgdraft_bool},
@@ -296,7 +306,7 @@
\tl_gset:Nn\g_mix_opt_coo_tl{0~0~0}
\tl_gset:Nn\g_mix_opt_ctoc_tl{0~-1~0}
\tl_gset:Nn\g_mix_opt_ciiw_tl{}
- \fp_gset:Nn\g_mix_opt_roo_fp{1e-8}
+ \fp_gset:Nn\g_mix_opt_roo_fp{1e-9}
\fp_gset:Nn\g_mix_opt_aac_fp{30}
\fp_gset:Nn\g_mix_opt_oscale_fp{1}
\fp_gset:Nn\g_mix_opt_roll_fp{0}
@@ -318,7 +328,7 @@
\tl_set:Nn\l_mix_ctoc_tl{0~-1~0}
\tl_set:Nn\l_mix_ciiw_tl{}
- \fp_set:Nn\l_mix_roo_fp{1e-8}
+ \fp_set:Nn\l_mix_roo_fp{1e-9}
\fp_set:Nn\l_mix_aac_fp{30}
\fp_set:Nn\l_mix_oscale_fp{1}
\fp_set:Nn\l_mix_roll_fp{0}
@@ -492,6 +502,28 @@
ifelse~
}
}
+ \bool_if:NT\g_mix_pkgbigfiles_bool{
+ \special{!~(./\jobname.m9)~run~}
+ %open auxiliary file \jobname.m9 for writing hex encoded streams
+ %of media files. This file is read and executed during ps2pdf
+ %conversion.
+ \iow_new:N\g_mix_mstreams_stream
+ \iow_open:Nn\g_mix_mstreams_stream{\jobname.m9}
+ \iow_now:Nn\g_mix_mstreams_stream{
+ 1~dict~begin~
+ /o{mark/_objdef}bind~def/O{/type/stream/OBJ~pdfmark}bind~def
+ /m~systemdict/mark~get~def
+ /P{/ASCIIHexDecode~filter/PUT~pdfmark}bind~def
+ /C{/CLOSE~pdfmark}bind~def
+ }
+ }
+ }
+ \bool_if:NT\g_mix_pkgbigfiles_bool{
+ \RequirePackage{atenddvi}
+ \AtEndDvi{
+ \iow_now:Nn\g_mix_mstreams_stream{end}
+ \iow_close:N\g_mix_mstreams_stream
+ }
}
\cs_new:Nn\mix_pdfobj:nnn{
@@ -500,14 +532,23 @@
% #3:content (key-value, file, string); may be empty
\tl_set:Nn\l_mix_usenum_tl{}
\tl_if_blank:oTF{#1}{
- \special{ps:~mark~/_objdef~{mix@obj\int_use:N\g_mix_obj_int}~/type
- \str_case:nnn{#2}{
- {dict}{/dict}
- {array}{/array}
- {stream}{/stream}
- {fstream}{/stream}
- }{}~
- /OBJ~pdfmark~
+ \bool_if:nTF{
+ \g_mix_pkgbigfiles_bool &&
+ \str_if_eq_p:nn{#2}{fstream}
+ }{
+ \iow_now:Nx\g_mix_mstreams_stream{
+ o{mix@obj\int_use:N\g_mix_obj_int}O
+ }
+ }{
+ \special{ps:~mark~/_objdef~{mix@obj\int_use:N\g_mix_obj_int}~/type
+ \str_case:nnn{#2}{
+ {dict}{/dict}
+ {array}{/array}
+ {stream}{/stream}
+ {fstream}{/stream}
+ }{}~
+ /OBJ~pdfmark~
+ }
}
\tl_set:Nx\l_mix_usenum_tl{{mix@obj\int_use:N\g_mix_obj_int}}
\int_gincr:N\g_mix_obj_int
@@ -530,19 +571,32 @@
\bool_while_do:nn{
\int_compare_p:n{\l_mix_offset_tl<\l_mix_fsize_tl}
}{
- \special{ps:~
- mark~
- \l_mix_usenum_tl~
- (\mix_filedump:nnn{\l_mix_offset_tl}{32767}{#3})~
- /ASCIIHexDecode~filter~/PUT~
- pdfmark~
+ \bool_if:NTF\g_mix_pkgbigfiles_bool{
+ \iow_now:Nx\g_mix_mstreams_stream{
+ m\l_mix_usenum_tl
+ (\mix_filedump:nnn{\l_mix_offset_tl}{32767}{#3})P
+ }
+ }{
+ \special{ps:~
+ mark~
+ \l_mix_usenum_tl~
+ (\mix_filedump:nnn{\l_mix_offset_tl}{32767}{#3})~
+ /ASCIIHexDecode~filter~/PUT~
+ pdfmark~
+ }
}
\tl_set:Nx\l_mix_offset_tl{\int_eval:n{\l_mix_offset_tl+32767}}
\message{.}
}
\message{>}
- \special{ps:~
- mark~\l_mix_usenum_tl~/CLOSE~pdfmark~
+ \bool_if:NTF\g_mix_pkgbigfiles_bool{
+ \iow_now:Nx\g_mix_mstreams_stream{
+ m\l_mix_usenum_tl~C
+ }
+ }{
+ \special{ps:~
+ mark~\l_mix_usenum_tl~/CLOSE~pdfmark~
+ }
}
}
}{}
@@ -694,6 +748,7 @@
\cs_new:Nn\mix_embedasset:n{ %#1 file name or url
\filename@parse{#1}
+ \tl_set:Nx\l_mix_base_tl{\filename@base}
\tl_set:Nx\l_mix_ext_tl{\filename@ext}
\tl_replace_all:Nnn\l_mix_ext_tl{A}{a}
\tl_replace_all:Nnn\l_mix_ext_tl{B}{b}
@@ -942,8 +997,19 @@
\bool_set_eq:NN\l_mix_url_bool\g_mix_url_bool
\mix_uribegin:
\mix_embedasset:n{#3}
- \bool_gset:Nn\g_mix_iiid_bool{ %test on 3D file type
+ \bool_if:nTF{
\str_if_eq_p:Vn\l_mix_ext_tl{prc}||\str_if_eq_p:Vn\l_mix_ext_tl{u3d}
+ }{
+ \bool_gset_true:N\g_mix_iiid_bool
+ \tl_gset:Nn\g_mix_mainassetsub_tl{3D}
+ }{
+ \str_case_x:nnn{\l_mix_base_tl}{
+ {APlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Sound}}
+ {AudioPlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Sound}}
+ {VPlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Video}}
+ {VideoPlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Video}}
+ {StrobeMediaPlayback}{\tl_gset:Nn\g_mix_mainassetsub_tl{Video}}
+ }{\tl_gset:Nn\g_mix_mainassetsub_tl{Flash}}
}
\tl_gset:Nx\g_mix_mainasset_tl{~\g_mix_lastasset_tl}
\mix_uriend:
@@ -1020,7 +1086,7 @@
}
\mix_pdfobj:nnn{}{dict}{
- /Subtype/\bool_if:NTF\g_mix_iiid_bool{3D}{Flash}
+ /Subtype/\g_mix_mainassetsub_tl
/Asset~\g_mix_mainasset_tl
\bool_if:NF\g_mix_iiid_bool{
/Params~<<
@@ -1031,7 +1097,10 @@
>>
}
}
- \mix_pdfobj:nnn{}{dict}{/Instances~[\g_mix_pdflastobj_tl]}%
+ \mix_pdfobj:nnn{}{dict}{
+ /Subtype/\g_mix_mainassetsub_tl
+ /Instances~[\g_mix_pdflastobj_tl]
+ }%
\mix_pdfobj:nnn{}{dict}{
/Assets~<</Names~[\g_mix_assets_tl]>>
/Configurations~[\g_mix_pdflastobj_tl]
@@ -1476,8 +1545,8 @@
3Droo .code:n = {
\fp_gset:Nn\g_mix_opt_roo_fp{abs(#1)}
- \fp_compare:nNnT\g_mix_opt_roo_fp=\c_zero_fp{
- \fp_set:Nn\g_mix_opt_roo_fp{1e-8}}
+ \fp_compare:nNnT\g_mix_opt_roo_fp<{1e-9}{
+ \fp_gset:Nn\g_mix_opt_roo_fp{1e-9}}
\bool_gset_true:N\g_mix_opt_iiidview_bool
\bool_set_true:N\l_mix_roo_bool
},
@@ -1700,8 +1769,8 @@
{\g_mix_vfile_tl}{\int_use:N\l_mix_lineno_int}{ROO}{a~VIEW}
}
\fp_set:Nn\l_mix_roo_fp{abs(#1)}
- \fp_compare:nNnT\l_mix_roo_fp=\c_zero_fp{
- \fp_set:Nn\l_mix_roo_fp{1e-8}}
+ \fp_compare:nNnT\l_mix_roo_fp<{1e-9}{
+ \fp_set:Nn\l_mix_roo_fp{1e-9}}
\bool_set_true:N\l_mix_roo_bool
},
ROO .value_required:,