[Tex/LaTex] Can’t find ocgbase.sty while using animate

animatemedia9miktex

I am trying to learn the animate package. While I was trying to compile some example codes, I always run into the problem that

**LaTex Error: File `ocgbase.sty' not found.** 

I am using Miktex 2.9, and it installed the animate package automatically. I have Windows 7 Enterprise as OS.

Can any one tell me how I can fix the problem?

This is the file that I was trying to compile:

\documentclass{article}
\usepackage{animate}
\usepackage{media9}
\usepackage{graphicx}
\begin{filecontents}{timeline.txt}
::0x0 % coordinate system & y=e^x, repeated until last frame
::1 % one blue curve per frame
::2
::3
::4
::5
::6
::7
::8
\end{filecontents}
\begin{document}
    \begin{center}
        \animategraphics[
        label=taylor,
        controls, loop,
        timeline=timeline.txt
        ]{4}{exp_}{0}{8}
        \mediabutton[
        jsaction={
        if(anim[’taylor’].isPlaying)
            anim[’taylor’].pause();
        else
            anim[’taylor’].playFwd();
        }
        ]{\fbox{Play/Pause}}
    \end{center}
\end{document}

Best Answer

Installing package ocgx2 will fix the problem. (As ocgbase.sty is part of the ocgx2 package, as referenced here.)

Related Question