当我想将 3Dviews 添加到我的媒体时,我遇到了问题。我无法编译以下代码,出现错误“未定义的控制序列”。但没有这行代码,3Dviews=test.vws,
它就可以工作。
奇怪的是,在我安装最新的 MikTex 发行版并更新所有软件包之前,这段代码一直运行良好......如果您能提供任何提示我将不胜感激,您能帮帮我吗?
\documentclass[landscape]{article}
\usepackage[a4paper, left=1cm, right=1cm, top=2cm, bottom=2cm]{geometry}
\usepackage{graphicx}
\usepackage[dvipdfmx]{media9}
\usepackage[pdftex]{hyperref}
\begin{document}
\pagestyle{empty}
\centering
\includemedia[
label=converter3degreelines,
width=\textwidth,
height=\textheight,
activate=pagevisible,
deactivate=pageinvisible,
3Dviews=test.vws,
3Dmenu
]{
\includegraphics[width=0.45\textwidth]{test.png}
}{test.u3d}
\end{document}
test.vws 文件包含以下内容:
VIEW=Default
COO=4.675 -4.675 4.675
C2C=0 0 80.9734
ROO=6.1057
ROLL=0
ORTHO=0.081891
PART=Mesh1
RENDERMODE=Wireframe
END
END
来自日志的错误信息如下:
! Undefined control sequence.
<argument> \LaTeX3 error:
Missing number before '*'.
l.20 }{test.u3d}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
.log 中的文件列表如下:
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
geometry.sty 2010/09/12 v5.6 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
media9.sty 2013/08/16 v0.30 acrobat-9/X compatible media
expl3.sty 2013/07/28 v4582 L3 Experimental code bundle wrapper
l3names.sty 2012/12/07 v4346 L3 Namespace for primitives
l3bootstrap.sty 2013/07/28 v4581 L3 Experimental bootstrap code
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty 2013/07/28 v4581 L3 Basic definitions
l3expan.sty 2013/07/24 v4565 L3 Argument expansion
l3tl.sty 2013/07/28 v4581 L3 Token lists
l3seq.sty 2013/07/28 v4581 L3 Sequences and stacks
l3int.sty 2013/07/28 v4581 L3 Integers
l3quark.sty 2013/07/21 v4564 L3 Quarks
l3prg.sty 2013/07/28 v4581 L3 Control structures
l3clist.sty 2013/07/28 v4581 L3 Comma separated lists
l3token.sty 2013/07/28 v4581 L3 Experimental token manipulation
l3prop.sty 2013/07/28 v4581 L3 Property lists
l3msg.sty 2013/07/28 v4581 L3 Messages
l3file.sty 2013/07/28 v4581 L3 File and I/O operations
l3skip.sty 2013/07/28 v4581 L3 Dimensions and skips
l3keys.sty 2013/07/28 v4581 L3 Experimental key-value interfaces
l3fp.sty 2013/07/09 v4521 L3 Floating points
l3box.sty 2013/07/28 v4581 L3 Experimental boxes
l3coffins.sty 2012/09/09 v4212 L3 Coffin code layer
l3color.sty 2012/08/29 v4156 L3 Experimental color support
l3luatex.sty 2013/07/28 v4581 L3 Experimental LuaTeX-specific functions
l3candidates.sty 2013/07/24 v4576 L3 Experimental additions to l3kernel
l3regex.sty 2013/07/24 v4576 L3 Experimental regular expressions
l3tl-build.sty 2011/12/08 v3039 L3 Experimental token list construction
l3tl-analysis.sty 2011/12/08 v3039 L3 Experimental token lists analysis
l3str.sty 2013/07/24 v4576 L3 Experimental strings
l3flag.sty 2011/12/08 v3039 L3 Experimental flags
l3str-convert.sty 2013/01/08 v4339 L3 Experimental string encoding conversio
ns
l3keys2e.sty 2013/07/28 v4582 LaTeX2e option processing using LaTeX3 keys
xparse.sty 2013/07/28 v4582 L3 Experimental document command parser
atbegshi.sty 2011/10/05 v1.16 At begin shipout hook (HO)
hyperref.sty 2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)
hobsub.sty 2012/05/28 v1.13 Construct package bundles (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
intcalc.sty 2007/09/27 v1.1 Expandable calculations with integers (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty 2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty 2012/04/08 v1.3 Expandable calculations on big integers (HO)
bitset.sty 2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty 2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty 2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
hopatch.sty 2012/05/28 v1.2 Wrapper for package hooks (HO)
xcolor-patch.sty 2011/01/30 xcolor patch
atveryend.sty 2011/06/30 v1.8 Hooks at the very end of document (HO)
refcount.sty 2011/10/16 v3.4 Data extraction from label references (HO)
hycolor.sty 2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
auxhook.sty 2011/03/04 v1.3 Hooks for auxiliary files (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
url.sty 2006/04/12 ver 3.3 Verb mode for urls, etc.
hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty 2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
supp-pdf.mkii
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Manage graphics extensions (HO)
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
nameref.sty 2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty 2010/12/03 v1.4 Cleanup title references (HO)
mediatest.out
mediatest.out
test.png Graphic file (type png)
***********
答案1
问题在于 .vws 文件中的标签,
COO=0.2899417579174042 [TAB] 0 [TAB] -4.275146484375
导致问题中所述的错误信息,或
[TAB]PART=Mesh1
导致如下错误
! LaTeX error: "kernel/key-unknown"
!
! The key 'media9/views/ PART' is unknown and is being ignored.
更换[TAB]
即可解决问题。
此外,使用评论,如
% PART=Mesh1
也会导致错误:
! LaTeX error: "kernel/key-unknown"
!
! The key 'media9/views/% PART' is unknown and is being ignored.
删除所有标签和注释行对我有用。
答案2
这是由于expl3
加载的软件包发生了变化media9
。软件包更新应该可以解决此问题:
tlmgr update --all
media9 的当前版本 [2013/08/16 v. 0.30] 尚未通过 MiKTeX 包管理器提供。
TeXLive 的包更新速度通常比 MiKTeX 更快。