media9 似乎与 xr-hyper 冲突

media9 似乎与 xr-hyper 冲突

一年前,我的书一切正常。但现在编译失败。我设法将问题定位到以下 MWE。当 pdflatex 在第二个文件(B.tex)上运行时,会发生以下错误:

! Undefined control sequence.
\XR@explist ->\expandafter \XR@next \XR@list 
                                             \\
l.14 \zexternaldocument
                       [A-]{A}
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.

! Argument of \XR@next has an extra }.
<inserted text> 
                \par 
l.14 \zexternaldocument
                       [A-]{A}
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
\\
! Paragraph ended before \XR@next was complete.
<to be read again> 
                   \par 
l.14 \zexternaldocument
                       [A-]{A}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

! Too many }'s.
<recently read> }

l.14 \zexternaldocument
                       [A-]{A}
You've closed more groups than you opened.
Such booboos are generally harmless, so keep going.

这是我的第一个文件A.tex

\documentclass{book}

\usepackage{media9}

% Package xr-hyper needs to be loaded before hyperref 
% but \externaldocument should be given after loading hyperref:

\usepackage{xr-hyper} 
\usepackage[user,xr]{zref} 
\usepackage{zref-xr} 
\usepackage{hyperref} 
\externaldocument[B-]{B} 
\zexternaldocument[B-]{B}


\begin{document}

empty page

\newpage \section{Dittmer}\label{Dittmer}\zlabel{Dittmer}

Dittmer

\newpage \section{Langmuir}\label{Langmuir}\zlabel{Langmuir}

Langmuir

\newpage \section{References}

\hyperref[Dittmer]{hyperref to Dittmer} on page \pageref{Dittmer}, \zpageref{Dittmer}

\hyperref[Langmuir]{hyperref to Langmuir} on page \pageref{Langmuir}, \zpageref{Langmuir}

\hyperref[B-Shafranov]{hyperref to B-Shafranov} on page \pageref{B-Shafranov}, \zpageref{B-Shafranov}

\hyperref[B-Stupakov]{hyperref to B-Stupakov} on page \pageref{B-Stupakov}, \zpageref{B-Stupakov}

\begin{figure}[!tp]\centering
        \includemedia[
            width=\linewidth,height=0.528\linewidth,
            activate=pageopen,%onclick
            addresource=Video/2012-05-09.mp4,
            flashvars={%
                src={Video/2012-05-09.mp4}%
                &muted=true%
                &loop=true%
                &controlBarAutoHideTimeout=2%
            }
        ]{}{StrobeMediaPlayback.swf}
    \caption{Caption}
    \label{fig:05-09} \end{figure} \end{document}

这是我的第二个源文件B.tex

\documentclass{book}

\usepackage{xr-hyper}
\usepackage{hyperref}
\usepackage[user,xr]{zref}
\usepackage{zref-xr}
\externaldocument[A-]{A}
\zexternaldocument[A-]{A}

\begin{document}

empty page

\newpage
\section{Shafranov}\label{Shafranov}\zlabel{Shafranov}

Shafranov

\newpage
\section{Stupakov}\label{Stupakov}\zlabel{Stupakov}

Stupakov

\newpage
\section{References}

\hyperref[A-Dittmer]{hyperref to A-Dittmer} on page \pageref{A-Dittmer}, \zpageref{A-Dittmer}

\hyperref[A-Langmuir]{hyperref to A-Langmuir} on page \pageref{A-Langmuir}, \zpageref{A-Langmuir}

\hyperref[Shafranov]{hyperref to Shafranov} on page \pageref{Shafranov}, \zpageref{Shafranov}

\hyperref[Stupakov]{hyperref to Stupakov} on page \pageref{Stupakov}, \zpageref{Stupakov}

\end{document}

如果我删除导入视频的宏,上述错误就会消失\includemedia。因此,怀疑 中存在错误mmedia,它是此 MWE 中加载的所有其他软件包中最常更新的软件包。

相关内容