Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've tried to include a second U3D model to my document and got the following error:

! LaTeX error: "kernel/command-already-defined"
! 
! Control sequence \l_mix_vfile_stream already defined.

The (minimal) code to include the models is:

% COMPILED WITH PDF LATEX
% USING THE UP-TO-DATE VERSIONS OF media9 AND l3kernel
\documentclass[ a4paper, 11pt, twoside, openleft ]{book}
\usepackage[dvipdfmx]{media9}

\begin{document}
% Include model1
\includemedia[%
activate=onclick,%
deactivate=pageinvisible,%
3Dviews=model1.vws]{}%
{model1.u3d}% Binary file
% Include model2
\includemedia[%
activate=onclick,%
deactivate=pageinvisible,%
3Dviews=model2.vws]{}%
{model2.u3d}% Binary file
\end{document}

.u3d files are binary and the .vws looks like:

% modelX.vws - Nothing special here.
VIEW=MATLABfig
COO=0.35        0.35        0.05
C2C=3.8613     -4.3644       1.671
ROO=0.596
ROLL=0
ORTHO=0.83893

PART=Mesh1
    RENDERMODE=SolidWireframe
END

PART=Mesh2
    RENDERMODE=SolidWireframe
END
END

The error disappears if I remove the 3Dviews options from one of them. But then I cannot configure the rendering of one model (transparency, light, etc).

I'm not familiar to the internals of latex, but looking at media9.sty it is clear that the command

\l_mix_vfile_stream

is used to open/close the .vws file.

Is this a bug from media9? or from latex 3?

share|improve this question

closed as too localized by cyberSingularity, lockstep, zeroth, Stefan Kottwitz Jan 6 '13 at 14:09

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
could you make the sequences available for others? In that way we can test it. Moreover, try and include a full MWE so that we exactly can see your used packages etc. :) –  zeroth Sep 28 '12 at 20:56
1  
Completed the MWE. The .u3d files are binaries, so you will have to create somme dummy one to test it. –  Felipe Sep 28 '12 at 21:58
2  
It seems like a bug in media9: the declaration \ior_new:N\l_mix_vfile_stream should go outside the definition of \includemedia. –  egreg Sep 28 '12 at 22:00
    
I'm not familiar with the syntax, but I will try to move it out. I'll keep you posted. –  Felipe Sep 28 '12 at 23:34
    
Moving the declaration to line 98 did the work for me! Thanks. We should file a bug to the maintainer. –  Felipe Sep 29 '12 at 0:03

Browse other questions tagged or ask your own question.