我对 LaTex 还很陌生,所以我的代码非常简单,直接来自 MeshLab,在导出为 U3D 时生成,我打算将其插入到我的 pdf 中:
\documentclass[a4paper]{article}
\usepackage[3D]{movie15}
\usepackage{hyperref}
\usepackage[UKenglish]{babel}
\begin{document}
\includemovie[
poster,
controls,
label=cube.u3d,
text=(cube.u3d),
3Daac=60.000000, 3Droll=0.000000, 3Dc2c=-91.924004 84.159401 -64.042999, 3Droo=140.122559, 3Dcoo=-0.000000 0.000000 0.000000,
3Dlights=CAD,
]{\linewidth}{\linewidth}{cube.u3d}
\end{document}
这是 .log 的最后一部分:
! Missing \endcsname inserted.
<to be read again>
\message
l.14 ]{\linewidth}{\linewidth}{cube.u3d}
? q
OK, entering \batchmode...
File ignored
! Extra \endcsname.
\KV@split ...csname \KV@prefix \@tempa \endcsname
\ifx \@tempc \relax \KV@er...
l.14 ]{\linewidth}{\linewidth}{cube.u3d}
I'm ignoring this, since I wasn't doing a \csname.
! Package keyval Error: \message {File ignored} undefined.
See the keyval package documentation for explanation.
Type H <return> for immediate help.
答案1
此包movie15
已过时,不再维护。请改用 pkg media9
。它允许您通过右键单击菜单“生成默认视图”找到 3D 视图设置的良好值,该菜单在 Acrobat Reader 中激活 3D 对象后可用。将建议的设置复制到文档源中并重新运行latex
。
\documentclass[a4paper]{article}
\usepackage{media9}
\usepackage{hyperref}
\usepackage[UKenglish]{babel}
\begin{document}
\noindent\includemedia[
%label=cube.u3d,
3Dtoolbar,
width=\linewidth,height=\linewidth,
activate=pageopen,
3Dmenu, % gives you right click menu: "Generate Default View", among others
%3Daac=..., % to be found with --------^^^^
%3Dlights=...,
]{}{cube.u3d}
\end{document}