我正在尝试制作 3d pdf 图像,但出现此错误。如能提供任何建议,我将不胜感激。
\documentclass[a4paper]{article}
\usepackage[3D]{movie15}
\usepackage{hyperref}
\usepackage[UKenglish]{babel}
\begin{document}
\includemovie[
poster,
toolbar, %same as `controls'
label=cylinder.u3d,
text=(cylinder.u3d),
3Daac=60.000000, 3Droll=0.000000, 3Dc2c=0.000000 -16.490000 0.000000, 3Droo=16.490000, 3Dcoo=-0.000000 5.000000 0.000000,
3Dlights=CAD,
]{\linewidth}{\linewidth}{cylinder.u3d}
\end{document}
错误显示:
! Missing \endcsname inserted.
<to be read again>
\message
l.13 ]{\linewidth}{\linewidth}{cylinder.u3d}
.u3d 和 .tex 文件是从 Meshlab v2020.07 输出的,我在其中建模了一个简单的圆柱体。
提前感谢所提供的任何帮助!
答案1
movie15
已过时。请改用media9
:
\documentclass[a4paper]{article}
\usepackage{media9}
\usepackage{tikz} % for creating a poster
%\usepackage{hyperref}
%\usepackage[UKenglish]{babel}
\begin{document}
\includemedia[
activate=onclick,
3Dtoolbar,
% label=cylinder.u3d,
3Dmenu,
% found by right-click on 'Generate Default View'
3Daac=60.000001669652114,
3Dcoo=1.1920928955078125e-7 5.000276565551758 0,
3Droo=11.489760585373341,
3Dlights=CAD,
]{%
\tikz\node[draw,minimum width=0.5\linewidth,minimum height=0.5\linewidth]{\ttfamily(cylinder.u3d)};
}{cylinder.u3d}
\end{document}